:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --ink: #111827;
  --body: #374151;
  --muted: #6b7280;
  --rule: #e7e5e4;
  --accent: #0f766e;
  --accent-soft: #f0fdfa;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 760px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1214;
    --surface: #161a1d;
    --ink: #f3f4f6;
    --body: #cbd2d9;
    --muted: #8b949e;
    --rule: #262c31;
    --accent: #5eead4;
    --accent-soft: #11292a;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1214;
  --surface: #161a1d;
  --ink: #f3f4f6;
  --body: #cbd2d9;
  --muted: #8b949e;
  --rule: #262c31;
  --accent: #5eead4;
  --accent-soft: #11292a;
}
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; }
p, ul, dl { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

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

/* Header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { font-family: var(--serif); font-size: 20px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.header-right { display: flex; align-items: center; gap: 22px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }

.controls { display: flex; align-items: center; gap: 8px; }
.lang { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; padding: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; }
.lang a { padding: 4px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.theme-toggle { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.no-js .theme-toggle { display: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Hero */
.hero { padding: 72px 0 56px; }
.hero__photo { width: 96px; height: 96px; border-radius: 50%; margin-bottom: 28px; }
.eyebrow { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 6vw, 52px); line-height: 1.12; letter-spacing: -0.015em; }
.hero__lead { margin-top: 22px; font-size: 19px; color: var(--body); max-width: 620px; }
.actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-block; padding: 11px 20px; border-radius: 6px; font-size: 15px; font-weight: 500; text-decoration: none; border: 1px solid var(--ink); color: var(--ink); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn:hover { opacity: 0.85; }

/* Metrics */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.metric { padding: 26px 16px 24px 0; }
.metric + .metric { padding-left: 20px; border-left: 1px solid var(--rule); }
.metric__value { font-family: var(--serif); font-size: 27px; white-space: nowrap; color: var(--ink); line-height: 1.1; }
.metric__label { font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.45; }

/* Sections */
.section { padding: 64px 0 8px; }
.section__title { font-family: var(--serif); font-weight: 400; font-size: 30px; margin-bottom: 28px; }
.section__intro { color: var(--muted); margin: -16px 0 28px; }
.prose p + p { margin-top: 16px; }

/* Timeline */
.entry { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 28px; padding: 26px 0; border-top: 1px solid var(--rule); }
.entry:first-of-type { border-top: 0; padding-top: 0; }
.entry__dates { font-size: 14px; color: var(--muted); padding-top: 4px; font-variant-numeric: tabular-nums; }
.entry__org { font-size: 20px; font-weight: 600; }
.entry__role { color: var(--accent); font-weight: 500; font-size: 16px; }
.entry__note { color: var(--muted); font-size: 15px; font-style: italic; margin-top: 8px; }
.entry ul { margin-top: 10px; }

.bullets li { position: relative; padding-left: 18px; }
.bullets li + li { margin-top: 6px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.clients { margin-top: 18px; border-left: 2px solid var(--accent); padding-left: 20px; }
.client + .client { margin-top: 24px; }
.client__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; align-items: baseline; }
.client__name { font-size: 18px; font-weight: 600; }
.client__name span { font-weight: 400; color: var(--body); }
.client__dates { font-size: 14px; color: var(--muted); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 2px 7px; margin-right: 6px; vertical-align: 3px; }
.group-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin: 16px 0 6px; }
.stack { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Work */
.work { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 22px; }
.card h3 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.card p { font-size: 15px; color: var(--body); line-height: 1.6; }

/* Definition lists */
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0 28px; }
.kv dt, .kv dd { padding: 14px 0; border-top: 1px solid var(--rule); }
.kv dt:first-of-type, .kv dt:first-of-type + dd { border-top: 0; padding-top: 0; }
.kv dt { color: var(--ink); font-weight: 600; font-size: 15px; }
.kv dd { margin: 0; }

/* Contact */
.contact { padding: 72px 0 80px; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 42px); }
.contact p { margin-top: 12px; color: var(--muted); }
.contact__links { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 16px; }

.site-footer { border-top: 1px solid var(--rule); padding: 24px 0 40px; font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-wrap: wrap; row-gap: 10px; }
  .header-right { display: contents; }
  .controls { order: 2; }
  .nav { order: 3; width: 100%; gap: 4px 14px; font-size: 14px; }
  .hero { padding: 48px 0 40px; }
  .hero__lead { font-size: 17px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 20px 12px 18px 0; }
  .metric + .metric { padding-left: 0; border-left: 0; }
  .metric:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule); }
  .metric:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .metric__value { font-size: 26px; }
  .section { padding-top: 48px; }
  .section__title { font-size: 26px; }
  .entry, .kv { grid-template-columns: minmax(0, 1fr); }
  .entry__dates { padding-top: 0; }
  .kv dd { border-top: 0; padding-top: 0; }
  .kv dt { padding-bottom: 4px; }
  .work { grid-template-columns: minmax(0, 1fr); }
  .clients { padding-left: 14px; }
}

@media print {
  .site-header, .actions, .contact__links { display: none; }
}
