:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b6070;
  --line: #e3e1da;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2efe9;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 8px 24px rgba(20, 20, 30, .06);
  --radius: 14px;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1114; --surface: #171a1f; --text: #ecedef; --muted: #9aa0ad;
    --line: #262a31; --accent: #5cc8a8; --accent-ink: #0b1210; --accent-soft: #15302a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1114; --surface: #171a1f; --text: #ecedef; --muted: #9aa0ad;
  --line: #262a31; --accent: #5cc8a8; --accent-ink: #0b1210; --accent-soft: #15302a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--accent-ink); font: 600 12px var(--mono);
}
.nav nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--text); }
.theme-toggle {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer;
}
.theme-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}

/* Hero */
.hero { padding-top: 96px; padding-bottom: 72px; }
.eyebrow { color: var(--accent); font-size: 13px; margin: 0 0 20px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); font-weight: 700; max-width: 18ch; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 56ch; margin: 24px 0 32px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; height: 46px; padding: 0 20px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 500;
  transition: transform .15s, border-color .15s;
}
.btn:hover { transform: translateY(-1px); border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.facts {
  display: flex; flex-wrap: wrap; gap: 12px 32px; list-style: none; padding: 28px 0 0; margin: 56px 0 0;
  border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.facts strong { color: var(--text); font-weight: 500; margin-right: 6px; }

/* Sections */
.section { padding-top: 72px; padding-bottom: 72px; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 36px; }
.section h2 { font-size: clamp(26px, 3.4vw, 34px); }
.section-head p { margin: 0; }
.tag { font-size: 12px; color: var(--accent); margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }

/* Featured case study */
.feature {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 24px;
}
.feature-visual {
  display: grid; place-items: center; padding: 40px 24px;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-soft), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 27px, var(--line) 27px 28px),
    repeating-linear-gradient(90deg, transparent 0 27px, var(--line) 27px 28px);
  border-right: 1px solid var(--line);
}
.phone {
  width: 220px; border-radius: 28px; background: var(--bg); border: 6px solid var(--text);
  box-shadow: var(--shadow); overflow: hidden;
}
.phone-bar { display: grid; place-items: center; height: 22px; }
.phone-bar span { width: 56px; height: 5px; border-radius: 3px; background: var(--line); }
.phone-body { padding: 8px 16px 18px; font-size: 13px; }
.ph-label { font-size: 10px; color: var(--accent); margin: 0; }
.ph-title { font-weight: 600; margin: 2px 0 10px; }
.ph-list { list-style: none; margin: 0 0 12px; padding: 0; }
.ph-list li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.ph-list li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.ph-list li.done { color: var(--text); }
.ph-list li.done::before { background: var(--accent); border-color: var(--accent); }
.ph-list li.now { color: var(--text); font-weight: 600; }
.ph-list li.now::before { border-color: var(--accent); }
.ph-progress { height: 6px; border-radius: 3px; background: var(--line); margin-bottom: 12px; }
.ph-progress span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.ph-btn { text-align: center; padding: 9px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.feature-body { padding: 36px; }
.feature-body h3 { font-size: 26px; margin-bottom: 12px; }
.feature-body > p { color: var(--muted); margin: 0 0 20px; }
.cs { margin: 0 0 22px; display: grid; gap: 14px; }
.cs div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; }
.cs dt { font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-top: 3px; }
.cs dd { margin: 0; font-size: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 20px; }
.chips li { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }
.links { display: flex; gap: 20px; }
.link { color: var(--accent); font-weight: 500; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Grid */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column; padding: 28px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p:not(.tag) { color: var(--muted); font-size: 15px; margin: 0 0 18px; flex: 1; }

/* Stack */
.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stack > div { background: var(--surface); padding: 24px; }
.stack h3 { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin-bottom: 10px; }
.stack p { margin: 0; font-size: 15px; }

/* Screenshot in phone frame */
.feature-visual.shot .phone { width: 240px; border-radius: 30px; }
.feature-visual.shot img { display: block; width: 100%; height: auto; }

/* Experience */
.about { display: grid; grid-template-columns: 1fr 2fr; gap: 24px 48px; }
.about .intro { margin: 12px 0 0; max-width: 30ch; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 28px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
}
.timeline .when { font-size: 12px; color: var(--accent); margin: 0 0 4px; }
.timeline h3 { font-size: 17px; margin-bottom: 6px; }
.timeline p:not(.when) { margin: 0; color: var(--muted); font-size: 15px; }
.sub { font-size: 17px; margin: 12px 0 12px; }
.edu { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.contact { text-align: center; }
.contact .cta { justify-content: center; margin-top: 24px; }
.contact p { margin: 12px 0 0; }

.footer { display: flex; justify-content: space-between; padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.footer a { text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .feature { grid-template-columns: 1fr; }
  .feature-visual { border-right: 0; border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr 1fr; }
  .stack { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .nav nav a { display: none; }
  .hero { padding-top: 56px; padding-bottom: 48px; }
  .facts { margin-top: 40px; }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .feature-body { padding: 24px; }
  .cs div { grid-template-columns: 1fr; gap: 2px; }
  .grid, .stack, .about { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}
