/* === TOKENS === */
:root {
  --bg: #080C14;
  --surface: #0E1626;
  --surface2: #162038;
  --border: #1E2E52;
  --text: #EEF2FF;
  --muted: #6B80A8;
  --cyan: #00C8FF;
  --cyan-dim: rgba(0,200,255,0.1);
  --green: #00E5A0;
  --nav-bg: rgba(8,12,20,0.9);
  --toggle-track: #162038;
}
[data-theme="light"] {
  --bg: #F4F7FB;
  --surface: #FFFFFF;
  --surface2: #EBF0F8;
  --border: #C8D4E8;
  --text: #0A0F1E;
  --muted: #5A6A88;
  --cyan: #0077AA;
  --cyan-dim: rgba(0,119,170,0.1);
  --green: #00885A;
  --nav-bg: rgba(244,247,251,0.92);
  --toggle-track: #C8D4E8;
}

/* === BASE === */
body { background: var(--bg); color: var(--text); transition: background 0.3s, color 0.3s; overflow-x: hidden; }
section { scroll-margin-top: 4.5rem; }
#hero h1 { letter-spacing: -0.04em; }

/* === NAV === */
nav { background: var(--nav-bg); border-bottom: 1px solid var(--border); }
.nav-logo { color: var(--text); }
.nav-logo span { color: var(--cyan); }
.nav-link { color: var(--muted); transition: color 0.2s; position: relative; }
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--cyan); }
.nav-link.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--cyan); opacity: 0.6;
}
.nav-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.15s;
}
.nav-icon-btn:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-1px); }
.nav-icon-btn svg { width: 16px; height: 16px; fill: currentColor; }
.nav-cta {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.85rem; font-weight: 600;
  color: var(--bg); background: var(--cyan);
  padding: 0.45rem 1.2rem; border-radius: 5px;
  text-decoration: none; transition: opacity 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { opacity: 0.9; box-shadow: 0 4px 16px rgba(0,200,255,0.3); }

/* === THEME TOGGLE === */
.theme-toggle {
  position: relative; width: 44px; height: 24px;
  background: var(--toggle-track); border: 1px solid var(--border);
  border-radius: 12px; cursor: pointer; transition: background 0.3s;
}
.theme-toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--cyan);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
[data-theme="light"] .theme-toggle::after { transform: translateX(20px); }
.toggle-icons {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: space-between; padding: 0 5px;
  pointer-events: none; font-size: 9px;
}

/* === HERO === */
#hero { background: var(--bg); }
.hero-grid-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(0,200,255,0.08) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 15%, rgba(99,102,241,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 35% 45% at 75% 85%, rgba(0,229,160,0.05) 0%, transparent 55%);
}
[data-theme="light"] .hero-grid-bg {
  background:
    radial-gradient(ellipse 70% 60% at 15% 50%, rgba(0,119,170,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 85% 15%, rgba(99,102,241,0.04) 0%, transparent 65%),
    radial-gradient(ellipse 35% 45% at 75% 85%, rgba(0,136,90,0.04) 0%, transparent 55%);
}
.hero-eyebrow { color: var(--cyan); }
.hero-eyebrow::before { content: ''; display: block; width: 24px; height: 1px; background: var(--cyan); }
.firstname { color: var(--text); }
.lastname { color: var(--cyan); display: block; }
.hero-role { color: var(--muted); }
.stat-num { color: var(--text); }
.stat-num span { color: var(--cyan); }
.stat-label { color: var(--muted); }

/* === TERMINAL === */
.hero-terminal { background: var(--surface); border: 1px solid var(--border); }
.term-line { color: var(--muted); }
.term-line .prompt { color: var(--green); }
.term-line .cmd { color: var(--text); }
.term-line .out { color: var(--cyan); }
.term-line .out-muted { color: var(--muted); }
#typewriter { color: var(--cyan); }
.cursor {
  display: inline-block; width: 8px; height: 1em;
  background: var(--cyan); margin-left: 2px;
  animation: blink 1s step-end infinite; vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* === PHOTO === */
.hero-photo { border: 2px solid var(--border); }
.hero-photo-ring { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--cyan); opacity: 0.25; }
.hero-photo-glow { position: absolute; inset: -24px; border-radius: 50%; background: radial-gradient(circle, rgba(0,200,255,0.12) 0%, transparent 65%); }

/* === EXPERIENCE === */
#experience { background: var(--surface); }
.section-label { color: var(--cyan); }
.section-label::after {
  content: ''; display: inline-block; width: 80px; height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
  margin-left: 0.6rem; vertical-align: middle;
}
.timeline::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 0; width: 1px; background: var(--border); }
.job::before {
  content: ''; position: absolute; left: -5px; top: 8px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--cyan);
  box-shadow: 0 0 8px rgba(0,200,255,0.25);
}
.job { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.job.visible { opacity: 1; transform: translateY(0); }
.job-company { color: var(--text); }
.job-title { color: var(--cyan); }
.job-meta { color: var(--muted); }
.job-achievements li { color: var(--muted); border-bottom: 1px solid var(--border); }
.job-achievements li:last-child { border-bottom: none; }
.job-achievements li::before { content: '→'; position: absolute; left: 0; color: var(--cyan); font-size: 0.75rem; top: 0.38rem; }

/* === PROJECTS === */
#projects { background: var(--bg); }

/* === SKILLS === */
#skills { background: var(--bg); border-top: 1px solid var(--border); }
.skill-card {
  background: var(--surface); border: 1px solid var(--border);
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease, border-color 0.2s, box-shadow 0.2s;
}
.skill-card.visible { opacity: 1; transform: translateY(0); }
.skill-card:hover {
  border-color: rgba(0,200,255,0.4);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,200,255,0.08);
}
.skill-card-title { color: var(--cyan); }
.pill { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.cert-item { color: var(--muted); border-bottom: 1px solid var(--border); }
.cert-item:last-child { border-bottom: none; }
.cert-icon { color: var(--green); }

/* === CONTACT === */
#contact { background: var(--surface); }
.contact-links li { border-bottom: 1px solid var(--border); }
.contact-links li:last-child { border-bottom: none; }
.contact-links a { color: var(--text); transition: color 0.2s; }
.contact-links a:hover { color: var(--cyan); }
.contact-icon { background: var(--surface2); color: var(--cyan); }
.contact-label { color: var(--muted); }
.avail-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--green);
}
.avail-dot { background: var(--green); animation: pulse-dot 2s ease infinite; }
.avail-status-text { color: var(--green); }
.avail-desc { color: var(--muted); }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,160,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(0,229,160,0); }
}
.btn-primary {
  display: inline-block; font-family: 'Space Grotesk', sans-serif;
  font-weight: 600; font-size: 0.9rem;
  color: var(--bg); background: var(--cyan);
  padding: 0.7rem 1.8rem; border-radius: 5px;
  text-decoration: none; transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,200,255,0.2); }

/* === FOOTER === */
footer { border-top: 1px solid var(--border); color: var(--muted); }
footer a { color: var(--muted); }
footer a:hover { color: var(--cyan); }

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  .job, .skill-card { opacity: 1; transform: none; transition: none; }
  .cursor { animation: none; opacity: 1; }
  .avail-dot { animation: none; }
}
