/* --- Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --bg: #fafaf9;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #4b5563;
  --border: #e5e7eb;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-ink: #1e40af;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04), 0 1px 3px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(17, 24, 39, 0.06), 0 10px 20px -5px rgba(17, 24, 39, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 960px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1020;
    --bg-alt: #0f152a;
    --surface: #131a32;
    --text: #e5e7eb;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --border: #1f2944;
    --accent: #60a5fa;
    --accent-hover: #93c5fd;
    --accent-soft: #182547;
    --accent-ink: #bfdbfe;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.4), 0 12px 24px rgba(0, 0, 0, 0.35);
  }
}

/* --- Layout ---------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Header ---------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  font-weight: 800;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.brand-dot { color: var(--accent); }
.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--accent); }
@media (max-width: 600px) {
  .site-nav { display: none; }
}

/* --- Hero ------------------------------------------------------------ */
.hero {
  padding: 88px 0 72px;
  background:
    radial-gradient(900px 360px at 12% -20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(700px 320px at 90% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.lede {
  margin: 0 0 28px;
  max-width: 720px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-soft);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
}
.chip-accent {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* --- Sections -------------------------------------------------------- */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-title {
  margin: 0 0 36px;
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: -0.015em;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-num {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 8px;
  border-radius: 6px;
}
.prose p {
  margin: 0 0 16px;
  max-width: 75ch;
  color: var(--text-soft);
  font-size: 17px;
}

/* --- Skills ---------------------------------------------------------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) {
  .skills-grid { grid-template-columns: 1fr; }
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.skill-card h3 {
  margin: 0 0 18px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.bullet-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.bullet-list li {
  position: relative;
  padding: 6px 0 6px 20px;
  color: var(--text-soft);
}
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.bullet-list.compact li {
  padding: 3px 0 3px 20px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-soft);
  transition: all 0.15s ease;
}
.tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* --- Timeline -------------------------------------------------------- */
.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding: 0 0 32px 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-marker {
  position: absolute;
  left: 4px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.section-alt .timeline-marker { box-shadow: 0 0 0 4px var(--bg-alt); }
.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}
.role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.role-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.role-head .company { color: var(--accent); }
.period {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}
.role-summary {
  margin: 0 0 14px;
  color: var(--text-soft);
}
.stack {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: var(--bg);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-soft);
  line-height: 1.7;
}
.stack strong {
  color: var(--text);
  font-weight: 600;
}
code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--accent-soft);
  color: var(--accent-ink);
  padding: 1px 6px;
  border-radius: 4px;
}

.earlier-career {
  margin-top: 36px;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.earlier-career h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.muted { color: var(--text-muted); }

/* --- Education ------------------------------------------------------- */
.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 720px) {
  .education-grid { grid-template-columns: 1fr; }
}
.education-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.education-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.education-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 600;
}
.education-card p {
  margin: 0;
  color: var(--text-muted);
}

/* --- Footer ---------------------------------------------------------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Print ----------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .hero-meta { display: none; }
  .hero { padding: 24px 0; }
  .section { padding: 24px 0; page-break-inside: avoid; }
  .timeline-content, .skill-card, .education-card, .earlier-career {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
  body { background: #fff; color: #000; }
}
