/* DARK MODE */
html[data-theme="dark"] {
  --bg-glass: rgba(15, 15, 15, 0.75);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.05);
}

/* LIGHT MODE (DEFAULT) */
:root {
  /* Brand */
  --accent: #facc15;
  --accent-dark: #eab308;
  --accent-glow: rgba(250, 204, 21, 0.45);

  /* Glass */
  --bg-glass: rgb(255, 255, 255, 0.15);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-highlight: rgb(255, 255, 255, 0.5);

  /* Backgrounds */
  --bg-page: #ffffff;
  --bg-section: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.65);

  /* Text */
  --text-primary: #111111;
  --text-secondary: #3f3f46;
  --text-muted: #6b7280;
  --text-inverse: #ffffff;

  /* Borders */
  --border-subtle: rgba(0, 0, 0, 0.08);

  /* Shadows */
  --shadow-sm: 0 6px 16px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.18);

  /* Motion */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s ease;
  --nav-offset: 120px;
}

section {
  scroll-margin-top: var(--nav-offset);
}

/* DARK MODE */
html[data-theme="dark"] {
  --bg-page: #0b0b0b;
  --bg-section: #0f0f0f;
  --bg-card: #151515;
  --bg-glass: rgba(15, 15, 15, 0.75);

  --text-primary: #f5f5f5;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-inverse: #000000;

  --border-subtle: rgba(255, 255, 255, 0.08);

  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.6);
  --shadow-md: 0 14px 35px rgba(0, 0, 0, 0.75);
  --shadow-lg: 0 25px 70px rgba(0, 0, 0, 0.9);
}

img {
  max-width: 100%;
  height: auto;
}

* {
  min-width: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  transition: background-color var(--transition-base),
    color var(--transition-base);
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  width: min(1200px, 92%);
  margin: auto;
}

h1,
h2,
h3,
h4 {
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
}

small,
.muted {
  color: var(--text-muted);
}

/* ABOUT / PROJECTS / EDUCATION */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base),
    box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow:
    var(--shadow-lg),
    0 0 40px var(--accent-glow);
}

/* NAVBAR */
.topbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  max-width: 1800px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 15rem);
  width: 100%;
  max-width: 3600px;
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 999px;
  padding: 0.45rem 1.6rem;
  border: 1px solid var(--glass-border);

  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* =======NAV LINKS======== */
.nav-center {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-center a {
  position: relative;
  color: var(--text-primary);
  opacity: 0.85;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;

  transition:
    color var(--transition-fast),
    background var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.nav-center a:hover {
  color: var(--accent);
  background: rgba(248, 198, 0, 0.12);
  box-shadow: 0 0 22px var(--accent-glow);
}

/* ===========LOGO================ */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition:
    transform var(--transition-fast),
    filter var(--transition-fast);
}

.logo-text {
  font-family: 'WindSong', cursive;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--text-primary);

  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent);
}

.nav-logo:hover {
  transform: scale(1.08);
  filter:
    drop-shadow(0 4px 8px rgba(250, 220, 26, 0.53)) drop-shadow(0 0 14px var(--accent-glow));
}

/* HAMBURGER BUTTON */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ====CTA + THEME TOGGLE===== */
.nav-cta-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav-cta {
  padding: 0.55rem 1.5rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.15);
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(250, 204, 21, 0.56);

  transition:
    background var(--transition-fast),
    box-shadow var(--transition-fast);
  white-space: nowrap;
}

/* =====DARK MODE NAV PILL======== */
html[data-theme="dark"] .nav-pill {
  background: rgba(15, 15, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.75);
}

html[data-theme="dark"] .nav-center a {
  color: var(--text-secondary);
}

.nav-cta:hover {
  background: var(--accent);
  color: #111;
  box-shadow: 0 0 18px var(--accent-glow);
}

/* ===== THEME TOGGLE ====== */
.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.toggle-track {
  position: relative;
  width: 80px;
  height: 40px;
  border-radius: 999px;

  background: linear-gradient(135deg,
      var(--accent),
      #60a5fa);

  transition: background var(--transition-base),
    box-shadow var(--transition-base);
}

/* HOVER GLOW */
.theme-toggle:hover .toggle-track {
  box-shadow: 0 0 25px var(--accent-glow);
}

/* THUMB */
.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;

  width: 32px;
  height: 32px;
  border-radius: 50%;

  background: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: transform 0.4s cubic-bezier(.68, -0.55, .27, 1.55),
    background var(--transition-base);

  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

/* ICON INSIDE THUMB */
.thumb-icon {
  font-size: 16px;
  transition: transform 0.3s ease, color 0.3s ease;
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(250, 204, 21, 0.6));
}

/* ===ICONS==== */
.icon {
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
  color: white;
  transition: opacity var(--transition-fast);
}

/* ====DARK MODE STATE==== */
html[data-theme="dark"] .toggle-track {
  background: linear-gradient(135deg,
      #1e3a8a,
      #9333ea);
}

html[data-theme="dark"] .toggle-thumb {
  transform: translateX(36px);
  background: #000000;
}

html[data-theme="dark"] .sun {
  opacity: 0.35;
}

html[data-theme="dark"] .moon {
  opacity: 1;
}

html:not([data-theme="dark"]) .moon {
  opacity: 0.35;
}

html:not([data-theme="dark"]) .sun {
  opacity: 1;
}

/* ====HERO SECTION===== */
.hero-modern {
  padding: 8rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-image {
  animation: float 3.5s ease-in-out infinite;
}

.hero-image img {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow:
    0 18px 50px rgba(250, 204, 21, 0.45),
    0 0 80px rgba(250, 204, 21, 0.35);
  transition: transform 0.35s ease,
    box-shadow 0.35s ease;
}

.hero-image img:hover {
  transform: scale(1.08);
  box-shadow:
    0 30px 65px rgba(250, 204, 21, 0.55),
    0 0 120px rgba(250, 204, 21, 0.45);
}

@keyframes float {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-24px);
  }

  100% {
    transform: translateY(0);
  }
}

.hero-text .intro {
  font-size: 2.2rem;
  font-weight: 700;
}

.hero-text h1 {
  font-size: 5rem;
  line-height: 0.95;
}

.hero-text .role {
  font-size: 2.1rem;
  font-weight: 700;
  white-space: nowrap;
}

#typing {
  color: var(--accent);
  position: relative;
  padding-right: 8px;
}

#typing::after {
  content: "|";
  position: absolute;
  right: 0;
  animation: blink 1s infinite;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* ====SOCIAL ICONS====== */
.socials {
  display: flex;
  gap: 1rem;
  margin: 1rem 0 1.6rem;
}

.socials a {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  border: 1.5px solid var(--accent);

  color: var(--accent);
  text-decoration: none;

  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.socials a:hover {
  background: var(--accent);
  color: #111;
  transform: scale(1.12);
  box-shadow: 0 10px 25px var(--accent-glow);
}

.socials i {
  font-size: 22px;
  line-height: 1;
}

/* ====BUTTON===== */
.btn-primary {
  background: var(--accent);
  color: #111;
  padding: 0.85rem 2.4rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 30px var(--accent-glow);
}

/* ==SECTIONS & FOOTER=== */
.section {
  padding: 4rem 0;
  background: var(--bg-section);
}

.footer {
  background: var(--bg-section);
  color: var(--text-secondary);
  text-align: center;
  padding: 1.5rem 0;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-image img {
    width: 300px;
    height: 300px;
  }

  .hero-text h1 {
    font-size: 4rem;
  }
}

/* TABLET (≤ 992px) */
@media (max-width: 992px) {

  .nav-pill {
    gap: 4rem;
    padding: 0.45rem 1.2rem;
  }

  .logo-text {
    font-size: 1.6rem;
  }

  .hero-grid {
    grid-template-columns: 300px 1fr;
    gap: 2.5rem;
  }

  .hero-image img {
    width: 320px;
    height: 320px;
  }

  .hero-text h1 {
    font-size: 3.8rem;
  }

  .hero-text .intro {
    font-size: 1.8rem;
  }

  .hero-text .role {
    font-size: 1.7rem;
  }

}

/* MOBILE (≤ 600px) */
@media (max-width: 600px) {

  .nav-pill {
    gap: 1rem;
    padding: 0.35rem 0.9rem;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .nav-cta {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
  }

  .hero-modern {
    padding: 6rem 0 4rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-image img {
    width: 250px;
    height: 250px;
  }

  .hero-text h1 {
    font-size: 3rem;
    line-height: 1.05;
  }

  .hero-text .intro {
    font-size: 1.5rem;
  }

  .hero-text .role {
    font-size: 1.3rem;
    white-space: normal;
  }

  .socials {
    justify-content: center;
  }

}

/* NAVBAR RESPONSIVE FIX */
@media (max-width: 768px) {

  .topbar {
    width: 95%;
  }

  .nav-pill {
    gap: 0.8rem;
    padding: 0.35rem 0.8rem;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .nav-center::-webkit-scrollbar {
    display: none;
  }

  .nav-center a {
    font-size: 0.8rem;
    padding: 0.35rem 0.8rem;
  }

  .nav-cta {
    padding: 0.4rem 0.9rem;
    font-size: 0.85rem;
  }

  .toggle-track {
    width: 60px;
    height: 32px;
  }

  .toggle-thumb {
    width: 24px;
    height: 24px;
  }

  html[data-theme="dark"] .toggle-thumb {
    transform: translateX(28px);
  }
}

/* MOBILE NAV */
@media (max-width: 900px) {

  .menu-toggle {
    display: flex;
  }

  .nav-center {
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;

    background: var(--bg-glass);
    backdrop-filter: blur(18px);

    border-radius: 18px;
    padding: 1.2rem 0;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-12px);
    transition: all 0.3s ease;

    z-index: 2000;
  }

  .nav-center.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

}