/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
  --bg:             #0d0d0d;
  --surface:        #1c1c1e;
  --border:         #2c2c2e;
  --text-primary:   #f5f5f7;
  --text-secondary: #ffffff;
  --accent:         #0A84FF;

  --max-width:      1100px;
  --gutter:         24px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-card:    12px;
  --radius-btn:     8px;
  --radius-tag:     6px;
  --radius-photo:   16px;

  --transition:     0.2s ease;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px; /* nav height */
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: 120px;
}

.section-heading {
  font-size: 32px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 56px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.cards-grid {
  display: grid;
  gap: 24px;
}

.cards-grid--two {
  grid-template-columns: 1fr 1fr;
}

.card-header {
  margin-bottom: 16px;
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.card-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-description {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-bullets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-bullets li {
  color: var(--text-secondary);
  font-size: 15px;
  padding-left: 16px;
  position: relative;
}

.card-bullets li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ============================================================
   TAGS
   ============================================================ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background-color: var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: var(--radius-tag);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: var(--radius-btn);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition), background-color var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-ghost {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background-color: var(--surface);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#main-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  height: 64px;
  transition: box-shadow var(--transition);
}


.nav-inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 28px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Hamburger — hidden on desktop */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger open state */
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding-block: 80px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
}

.hero-content {
  max-width: 600px;
}

.hero-content h1 {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-tagline {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-photo img {
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: var(--radius-photo);
  border: 1px solid var(--border);
  background-color: var(--surface);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-text {
  max-width: 700px;
  border-left: 3px solid var(--accent);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.75;
}

/* ============================================================
   PROJECTS
   ============================================================ */
#projects .card {
  display: flex;
  flex-direction: column;
}


/* ============================================================
   SKILLS
   ============================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-group {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 32px;
}

.skill-group-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.skill-list li {
  color: var(--text-secondary);
  font-size: 15px;
  padding-left: 16px;
  position: relative;
}

.skill-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact-inner {
  text-align: center;
}

.contact-inner .section-heading {
  margin-bottom: 16px;
}

.contact-sub {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 480px;
  margin-inline: auto;
  margin-bottom: 40px;
}

.contact-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 32px;
}

.footer-inner {
  display: flex;
  justify-content: center;
}

footer p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   RESPONSIVE — 768px breakpoint
   ============================================================ */
@media (max-width: 768px) {

  section {
    padding-block: 80px;
  }

  .section-heading {
    font-size: 26px;
    margin-bottom: 40px;
  }

  /* Nav: show hamburger, hide links by default */
  .nav-hamburger {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 14px 24px;
    font-size: 16px;
    width: 100%;
  }

  /* Hero: single column */
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
    order: 2;
  }

  .hero-photo {
    order: 1;
    display: flex;
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 40px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-photo img {
    max-width: 200px;
  }

  /* Cards: single column */
  .cards-grid--two {
    grid-template-columns: 1fr;
  }

  /* Skills: single column */
  .skills-grid {
    grid-template-columns: 1fr;
  }

  /* About: reduce left border padding */
  .about-text {
    padding-left: 20px;
  }

  /* Hide sliding indicator on mobile */
  .nav-indicator {
    display: none;
  }

}

/* ============================================================
   SECTION ALTERNATION
   Background variation to separate sections visually
   ============================================================ */
#hero       { background-color: var(--bg); }
#about      { background-color: var(--bg); }
#experience { background-color: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#projects   { background-color: var(--bg); }
#skills     { background-color: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
#contact    { background-color: var(--bg); border-top: 1px solid var(--border); }

/* ============================================================
   NAV ACTIVE LINK HIGHLIGHT
   ============================================================ */
.nav-links a.active {
  color: var(--text-primary);
}

.nav-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 1px;
  background-color: var(--text-primary);
  border-radius: 0;
  transition: transform 0.3s ease, width 0.3s ease, opacity 0.2s ease;
  pointer-events: none;
  opacity: 0;
}

.nav-indicator.visible {
  opacity: 1;
}

/* ============================================================
   FOCUS STYLES (accessibility)
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   LIGHT THEME TOKEN OVERRIDES
   ============================================================ */
html.light {
  --bg:             #ffffff;
  --surface:        #f2f2f7;
  --border:         #d1d1d6;
  --text-primary:   #000000;
  --text-secondary: #000000;
  --accent:         #0071e3;
}

/* ============================================================
   THEME TOGGLE BUTTON
   ============================================================ */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: color var(--transition);
  border-radius: 8px;
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-primary);
}

/* ============================================================
   LIQUID GLASS — DARK MODE
   Subtle frosted glass on cards, skill groups, and nav.
   Replaces solid surfaces with translucent blur + edge highlight.
   ============================================================ */

/* Cards and skill groups */
.card,
.skill-group {
  background: rgba(255, 255, 255, 0.069);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 4px 24px rgba(0, 0, 0, 0.25);
}

/* Nav bar */
#main-nav {
  background: rgba(27, 27, 27, 0.738);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.494);
}

/* ============================================================
   LIQUID GLASS — LIGHT MODE
   ============================================================ */

html.light .card,
html.light .skill-group {
  background: rgba(0, 2, 95, 0.068);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.90),
    0 4px 24px rgba(0, 0, 0, 0.08);
}

html.light #main-nav {
  background: rgba(244, 248, 255, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

html.light .nav-logo img {
  filter: invert(1);
}

/* ============================================================
   PROJECT CARD IMAGES
   ============================================================ */
.card-image {
  margin: -32px -32px 24px -32px;
  border-radius: 11px 11px 0 0; /* --radius-card (12px) minus 1px border */
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body .card-description {
  flex: 1;
}
