:root {
  --bg: #0f1117;
  --bg-surface: #1a1f2e;
  --bg-card: #212736;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: #2d3748;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', monospace;
}

:root.light {
  --bg: #f8fafc;
  --bg-surface: #f1f5f9;
  --bg-card: #ffffff;
  --accent: #0284c7;
  --accent-dim: #0369a1;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
}

.nav-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

nav ul a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

nav ul a:hover { color: var(--text); text-decoration: none; }

.nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
}

.nav-cta:hover { background: var(--accent-dim); }

.nav-resume {
  color: var(--text-muted) !important;
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}
.nav-resume:hover { border-color: var(--accent); color: var(--accent) !important; text-decoration: none; }

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: border-color 0.2s, color 0.2s;
}
#theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* HERO */
#hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5rem 2rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

#hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-links {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  transition: border-color 0.2s, color 0.2s;
}

.hero-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.hero-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-stack span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
}

/* SECTIONS */
section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

section h2 {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.about-text strong { color: var(--text); }

.about-highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.highlight-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.highlight-num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.highlight-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SKILLS */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.skill-group h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.skill-group ul {
  list-style: none;
}

.skill-group li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}

.skill-group li::before {
  content: '›';
  color: var(--accent);
  margin-right: 0.5rem;
}

/* TIMELINE */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.timeline-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 1.75rem;
}

.timeline-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-company {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timeline-role {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1rem;
}

.timeline-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.timeline-details li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
}

.timeline-details li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--border);
}

/* CERTS */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text);
}

.cert-icon {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  min-width: 2.5rem;
  text-align: center;
}

/* CONTACT */
#contact {
  text-align: center;
}

.contact-sub {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-btn {
  background: var(--accent);
  color: var(--bg);
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.contact-btn:hover { background: var(--accent-dim); text-decoration: none; }

.contact-btn-outline {
  background: transparent;
  color: var(--text) !important;
  border: 1px solid var(--border);
}

.contact-btn-outline:hover { border-color: var(--accent); color: var(--accent) !important; }

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--accent); }

/* RESPONSIVE */
@media (max-width: 768px) {
  nav ul { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-highlights { grid-template-columns: 1fr 1fr; }
  .skills-grid { grid-template-columns: 1fr; }
  .certs-grid { grid-template-columns: 1fr; }

  .timeline-meta { flex-direction: column; }
}

@media (max-width: 480px) {
  .about-highlights { grid-template-columns: 1fr; }
}
