*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--body-size, 1.0625rem);
  line-height: var(--body-leading, 1.6);
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: var(--link, var(--accent)); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--page-max, 72rem); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 48rem) { .wrap { padding: 0 2rem; } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: 0.5rem 0.75rem; z-index: 10; }

/* Header */
.site-head { border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1.1rem; padding-bottom: 1.1rem; }
.brand { font-family: var(--font-display); font-weight: var(--brand-weight, 700); font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.nav { display: flex; gap: 1.25rem; font-family: var(--font-ui); font-size: 0.95rem; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; }

/* Type */
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; }
h1 { font-size: var(--h1, clamp(2.1rem, 5vw, 3.6rem)); line-height: 1.08; font-weight: var(--h1-weight, 700); letter-spacing: var(--h1-track, -0.02em); max-width: 22ch; }
h2 { font-size: var(--h2, 1.9rem); line-height: 1.2; font-weight: var(--h2-weight, 700); }
h3 { font-size: 1.35rem; line-height: 1.3; font-weight: var(--h3-weight, 600); }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2, var(--ink)); max-width: 40rem; }
.muted { color: var(--muted); }
ul, ol { padding-left: 1.2rem; }
li { margin-bottom: 0.4em; }

/* Hero */
.hero { padding: 3.5rem 0 3rem; }
.hero-grid { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .hero-grid { grid-template-columns: minmax(0, 1fr) 17rem; align-items: start; } }
.hero h1 { margin-bottom: 1.25rem; }
.hero del { display: none; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-family: var(--font-ui); margin-top: 1.5rem; }
.photo {
  aspect-ratio: 4 / 5; width: 100%; max-width: 17rem;
  background: var(--surface); border: 1px dashed var(--muted);
  display: grid; place-items: center; text-align: center;
  font-family: var(--font-ui); font-size: 0.85rem; color: var(--muted); padding: 1rem;
}

/* Sections */
.section { padding: 3rem 0; border-top: 1px solid var(--rule); }
.section > .wrap > h2 { margin-bottom: 1.5rem; }
.section-intro { max-width: 40rem; margin-bottom: 2rem; }

/* Claims carry their source. Each theme decides how the source is shown. */
.claim { }
.src { font-family: var(--font-ui); font-size: 0.8rem; line-height: 1.4; color: var(--muted); }
.src a { color: inherit; }

/* Work list */
.work-list { list-style: none; padding: 0; margin: 0; }
.work-item { padding: 1.75rem 0; border-top: 1px solid var(--rule); display: grid; gap: 0.6rem; }
.work-item:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 52rem) { .work-item { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 2.5rem; } }
.work-meta { font-family: var(--font-ui); font-size: 0.9rem; color: var(--muted); }
.work-item h3 a { color: var(--ink); text-decoration: none; }
.work-item h3 a:hover { text-decoration: underline; }
.work-item p { max-width: 42rem; }
.status { font-family: var(--font-ui); font-size: 0.8rem; font-weight: 600; color: var(--accent); white-space: nowrap; }

/* AI timeline: a real sequence, so it is an ordered list */
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.timeline li { display: grid; gap: 0.25rem 2rem; padding: 1.25rem 0; border-top: 1px solid var(--rule); margin: 0; }
@media (min-width: 52rem) { .timeline li { grid-template-columns: 9rem 14rem minmax(0, 1fr); } }
.timeline .when { font-family: var(--font-ui); font-weight: 600; }
.timeline .what { font-weight: 600; }

/* Companies */
.companies { display: grid; gap: 1.25rem 2.5rem; }
@media (min-width: 52rem) { .companies { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.company h3 { font-size: 1.05rem; }
.company p { margin: 0.2rem 0 0; color: var(--ink-2, var(--ink)); font-size: 0.98rem; }

/* Principles */
.principles { display: grid; gap: 2rem; }
@media (min-width: 52rem) { .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.principles h3 { margin-bottom: 0.5rem; }

/* Case study */
.case-head { padding: 3rem 0 2rem; }
.case-head .kicker { font-family: var(--font-ui); color: var(--muted); margin-bottom: 0.75rem; }
.case-head h1 { max-width: 26ch; margin-bottom: 1rem; }
.facts { display: grid; gap: 0.75rem 2rem; margin: 2rem 0 0; padding: 1.25rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-family: var(--font-ui); font-size: 0.92rem; }
@media (min-width: 48rem) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts dt { color: var(--muted); }
.facts .fact-result { grid-column: 1 / -1; padding-top: 0.75rem; border-top: 1px solid var(--rule); }
.facts .fact-result dd { font-weight: 600; }
.facts dd { margin: 0.15rem 0 0; }
.article { padding: 1rem 0 4rem; }
.prose { max-width: var(--measure, 40rem); }
.prose h2 { margin: 2.5rem 0 0.9rem; }
.prose h3 { margin: 1.75rem 0 0.5rem; }
.prose blockquote { margin: 2rem 0; padding: 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.35; }
.callout { margin: 1.75rem 0; padding: 1.1rem 1.25rem; background: var(--surface); border-radius: var(--radius, 4px); }
.callout p:last-child { margin-bottom: 0; }
.next { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); font-family: var(--font-ui); }

/* Skills */
.skills { display: grid; gap: 1.25rem 2.5rem; }
@media (min-width: 52rem) { .skills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.skills h3 { font-size: 1rem; margin-bottom: 0.35rem; }
.skills p { margin: 0; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 6rem; font-family: var(--font-ui); }
.site-foot h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
