/* Tokens: light by default, dark follows the system setting */
:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --surface: #ffffff;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --line: #e5e7eb;
  --accent: #c2410c;
  --accent-soft: #fff4ec;
  --btn: #0f172a;
  --btn-text: #ffffff;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
  --wrap: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1120;
    --bg-soft: #0f172a;
    --surface: #111a2e;
    --text: #e8ecf3;
    --text-2: #c3cad6;
    --muted: #8b95a7;
    --line: #1f2a40;
    --accent: #fb923c;
    --accent-soft: rgba(251, 146, 60, .12);
    --btn: #e8ecf3;
    --btn-text: #0b1120;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--btn); color: var(--btn-text); padding: 8px 14px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Header */
.header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--text-2); }
.nav a:hover { color: var(--text); }
.nav .nav-cta { color: var(--btn-text); background: var(--btn); padding: 7px 14px; border-radius: 8px; font-weight: 600; }
.nav .nav-cta:hover { color: var(--btn-text); opacity: .9; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--btn); color: var(--btn-text); border-color: var(--btn); }
.btn-primary:hover { opacity: .9; border-color: var(--btn); }

/* Intro */
.intro { padding: 88px 0 72px; }
.intro-grid { display: grid; grid-template-columns: 1fr 240px; gap: 64px; align-items: center; }
.role { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 14px; }
h1 { font-size: clamp(38px, 5.4vw, 56px); letter-spacing: -0.03em; }
.pitch { font-size: clamp(17px, 1.9vw, 19px); color: var(--text-2); max-width: 60ch; margin-top: 20px; line-height: 1.6; }
.meta { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.meta li { position: relative; padding-left: 14px; }
.meta li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.photo { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); box-shadow: var(--shadow); }

/* Employers */
.employers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-soft); padding: 22px 0; }
.employers-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.employers-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 32px; font-weight: 600; color: var(--text-2); font-size: 17px; }

/* Sections */
.section { padding: 88px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 36px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
h2 { font-size: clamp(28px, 3.6vw, 36px); letter-spacing: -0.025em; }

/* Projects */
.project { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; }
.project + .project { margin-top: 28px; }
.project-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.project h3 { font-size: 24px; }
.project-sub { color: var(--muted); margin-top: 4px; }
.project-links { display: flex; gap: 18px; font-weight: 600; font-size: 15px; }
.project-links a { color: var(--accent); text-decoration: none; }
.project-links a:hover { text-decoration: underline; }
.project-text { color: var(--text-2); margin-top: 18px; max-width: 72ch; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 28px 0 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stats div { padding: 18px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats dt { color: var(--muted); font-size: 13.5px; }
.stats dd { margin: 4px 0 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

.label { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 32px 0 12px; }
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; counter-reset: step; }
.pipeline li { counter-increment: step; padding: 14px 14px 16px; border-right: 1px solid var(--line); font-size: 14px; }
.pipeline li:last-child { border-right: 0; }
.pipeline b { display: block; font-weight: 600; }
.pipeline b::before { content: counter(step) ". "; color: var(--accent); }
.pipeline span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; margin-top: 4px; }

.hero-shot { margin: 28px 0 0; }
.hero-shot img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #000; }
figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }

.thumbs { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 18px; }
.thumbs img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 8px; border: 1px solid var(--line); transition: transform .15s; }
.thumbs a:hover img { transform: translateY(-2px); }
.thumbs span { display: block; font-size: 14px; color: var(--muted); margin-top: 8px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { font-size: 13px; font-weight: 500; padding: 4px 10px; border-radius: 6px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-2); }

.project-split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.split-shot img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.points { margin-top: 14px; padding-left: 18px; color: var(--text-2); }
.points li { margin: 6px 0; }
.points li::marker { color: var(--accent); }

/* Skills */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skills > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.skills h3 { font-size: 16px; }
.skills .tags { margin-top: 14px; }

/* Experience */
.jobs { list-style: none; border-top: 1px solid var(--line); }
.jobs li { display: grid; grid-template-columns: 190px 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.job-when { color: var(--muted); font-size: 14.5px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.job-body h3 { font-size: 17px; }
.job-org { color: var(--accent); font-weight: 500; font-size: 15px; margin-top: 2px; }
.job-body p:last-child { color: var(--text-2); margin-top: 8px; max-width: 70ch; }
.edu { margin-top: 32px; }
.edu h3 { font-size: 17px; margin-bottom: 6px; }
.edu p { color: var(--text-2); }

/* Contact */
.contact { text-align: center; }
.contact p { color: var(--text-2); margin: 14px auto 0; max-width: 56ch; font-size: 17px; }
.contact .actions { justify-content: center; }

/* Footer */
.footer { padding: 28px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Responsive */
@media (max-width: 960px) {
  .pipeline { grid-template-columns: repeat(4, 1fr); }
  .pipeline li:nth-child(4) { border-right: 0; }
  .pipeline li:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .project-split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .intro { padding: 48px 0 48px; }
  .intro-grid { grid-template-columns: 1fr; gap: 28px; }
  .photo { order: -1; width: 112px; height: 112px; }
  .section { padding: 64px 0; }
  .project { padding: 22px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .pipeline { grid-template-columns: 1fr; }
  .pipeline li { border-right: 0; border-bottom: 1px solid var(--line); }
  .pipeline li:last-child { border-bottom: 0; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
  .skills { grid-template-columns: 1fr; }
  .jobs li { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { flex-direction: column; }
}
