/* main */
:root {
  --primary-color: #818cf8;
  --secondary-color: #ffffff;
  --bg-color: #0f172a;
  --card-bg: #1e293b;
  --text-color: #e2e8f0;
  --text-light: #94a3b8;
  --footer-bg-color: #0b1120;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --border-color: rgba(255, 255, 255, 0.05); 
  --border-strong: rgba(255, 255, 255, 0.1); 
  --gradient-primary: linear-gradient(135deg, #818cf8 0%, #6366f1 100%);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --primary-color: #6c63ff;
  --secondary-color: #2f2e41;
  --bg-color: #f9f9f9;
  --card-bg: #ffffff; 
  --text-color: #333333;
  --text-light: #666666;
  --footer-bg-color: #e2e8f0; 
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.8); 
  --border-color: rgba(0, 0, 0, 0.08); 
  --border-strong: rgba(0, 0, 0, 0.15); 
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* navbar */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.dot {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  transition: var(--transition);
  opacity: 0.8;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* buttons */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--white) !important;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  box-shadow: 0 0 20px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 30px rgba(129, 140, 248, 0.5);
}

.btn-secondary {
  padding: 12px 30px;
  border-radius: 30px;
  border: 2px solid var(--border-strong);
  color: var(--text-color);
  font-weight: 600;
  margin-left: 10px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.05);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--bg-color);
  border-color: var(--white);
}

/* theme */
#change-theme-btn {
  background: transparent; 
  border: 1px solid var(--border-color); 
  color: var(--text-color);
  font-size: 1.2rem; 
  cursor: pointer;
  width: 45px; 
  height: 45px; 
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

#change-theme-btn:hover {
  background: var(--border-strong);
  color: var(--primary-color); 
  transform: translateY(-3px); 
  box-shadow: 0 5px 15px rgba(129, 140, 248, 0.2); 
}


#change-theme-btn svg {
  transition: var(--transition);
}

.icon-moon {
  display: none; 
}
.icon-sun {
  display: block;
}

[data-theme="dark"] .icon-sun {
  display: none;
}
[data-theme="dark"] .icon-moon {
  display: block;
}

/* hero */
#hero {
  min-height: 90vh;
  height: auto;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at top right, rgba(129, 140, 248, 0.1), transparent 40%),
              radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.1), transparent 40%);
  padding-top: 100px;
  padding-bottom: 50px;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.hero-text {
  flex: 1;
  padding-right: 50px;
}

.hero-text h1 {
  font-size: 4rem;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-color);
  letter-spacing: -1px;
}

.highlight {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.about-profile-img {
  width: 210px;
  height: 210px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  border: 5px solid var(--white);
}

/* underline */
.highlight::after {
  display: none;
}

.hero-text p {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.floating-img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* about/sections */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 60px;
  color: var(--text-color);
}

.about-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--text-light);
}

/* projects */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.project-card:hover {
  transform: translateY(-10px);
}

.card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.card-info {
  padding: 25px;
}

.card-info h3 {
  margin-bottom: 10px;
  color: var(--text-color);
}

.card-info p {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.text-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

.text-link:hover {
  text-decoration: underline;
}

/* footer */
footer {
  background: var(--footer-bg-color);
  color: var(--text-color);
  padding: 80px 0 30px;
  text-align: center;
  border-top: 1px solid var(--border-color);
}

.contact-wrapper h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.contact-wrapper p {
  margin-bottom: 30px;
  color: var(--text-color);
}

.socials {
  margin: 40px 0;
}

.socials a {
  color: var(--text-color);
  margin: 0 15px;
  font-size: 1.1rem;
  opacity: 0.8;
  transition: var(--transition);
}

.socials a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.5;
  margin-top: 50px;
  border-top: 1px solid var(--border-strong);
  padding-top: 20px;
}

/* navbar checkbox */
.nav-toggle {
  display: none !important;
}

.nav-toggle-label {
  display: none;
}

/* responsive */
@media (max-width: 768px) {
  .nav-container {
    justify-content: space-between;
    align-items: center;
    position: relative;
  }

  .nav-toggle-label {
    display: block;
    cursor: pointer;
    margin-left: auto;
  }

  .nav-toggle-label span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin-bottom: 5px;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);

    flex-direction: column;
    align-items: center;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;

    border-top: 1px solid var(--border-color);
    box-shadow: 0 10px 15px var(--border-color);
    transition: all 0.4s ease-in-out;
    z-index: 999;
  }

  .nav-links li {
    margin: 15px 0;
    width: 100%;
    text-align: center;
  }
  /* checked */
  #nav-toggle:checked ~ .nav-links {
    max-height: 500px;
    opacity: 1;
    padding: 20px 0;
  }


  #nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  #nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
    opacity: 0;
  }

  #nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .hero-content {
    flex-direction: column-reverse;
    text-align: center;
  }
  .hero-text {
    margin-top: 30px;
    padding-right: 0;
  }
  .hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0 20px;
  }
  .btn-secondary {
    margin-left: 0;
  }
}
