/* ── SITE PAGES ────────────────────────────────────────────────────────────
   Home, Work, Services, About, Now. Tokens, nav, buttons and footer come
   from /blog/base.css. One idea per band. Two hues, two jobs: jade (--accent)
   is for action (CTA, links, focus); periwinkle (--accent-2) labels structure. */

.site-nav .nav-links a { font-family: var(--font-body); font-size: 14px; }
.site-nav .nav-links { gap: 26px; }

main { padding-top: var(--nav-h); }
/* Arriving at /about/#case must land instantly (a smooth scroll on load would
   be captured mid-flight by the page transition). In-page jumps stay smooth. */
html { scroll-behavior: auto; }
html.is-loaded { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html.is-loaded { scroll-behavior: auto; } }
h1, h2, h3 { font-weight: 400; color: var(--text); text-wrap: balance; }
p { text-wrap: pretty; }

.link-quiet {
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-decoration-color: var(--border-2);
  text-underline-offset: 4px;
  transition: color 0.15s, text-decoration-color 0.15s;
}
.link-quiet:hover { color: var(--text); text-decoration-color: var(--accent); }

.avatar {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  /* Duotone ring: jade → periwinkle, drawn as a gradient border. */
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(140deg, var(--accent), var(--accent-2)) border-box;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 600;
}
.avatar-xl { width: 64px; height: 64px; font-size: 1.375rem; }

/* ── Home: hero (screen 1) ─────────────────────────────────────────────── */
.hero { position: relative; padding-top: clamp(56px, 10vh, 112px); padding-bottom: 64px; }
/* The site's one atmospheric moment: a faint two-hue glow behind the hero. */
.hero::before {
  content: "";
  position: absolute; z-index: -1;
  inset: calc(-1 * var(--nav-h)) -20vw auto -20vw;
  height: 640px;
  
  background:
    radial-gradient(40% 55% at 22% 18%, color-mix(in oklab, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(35% 50% at 70% 8%, color-mix(in oklab, var(--accent-2) 11%, transparent), transparent 70%);
  pointer-events: none;
}
[data-theme="light"] .hero::before { opacity: 0.8; }
.page-home main, .page-about main { overflow-x: clip; }
.hero > * { max-width: 760px; }
.hero-id { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.hero-lead {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  line-height: 1.45;
  color: var(--text-muted);
}
.hero-lead strong { color: var(--text); font-weight: 500; }
.hero-prev { margin-top: 10px; font-size: 1.0625rem; color: var(--text-meta); }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 36px; }
.hero-note { margin-top: 14px; font-size: 0.875rem; color: var(--text-meta); }
.hero-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.hero-note a:hover { color: var(--text); }

.now-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 40px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.now-next dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 6px;
}
.now-next dd { font-size: 0.9375rem; line-height: 1.55; color: var(--text-muted); }
.now-stamp { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--text-meta); }
.now-stamp:hover { color: var(--text); }

/* ── Home: bands ───────────────────────────────────────────────────────── */
.band { position: relative; padding-top: 64px; padding-bottom: 64px; }
/* Divider aligned to the content edge, not the container's padding box. */
.band::before { content: ""; position: absolute; top: 0; left: 32px; right: 32px; border-top: 1px solid var(--border); }
@media (max-width: 768px) { .band::before { left: 16px; right: 16px; } }
.band-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.band-head h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 1.875rem); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile {
  display: flex; flex-direction: column;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.15s, background-color 0.15s;
}
.tile:hover { border-color: var(--accent-dim); background: var(--surface); }
.tile-metric { font-family: var(--font-display); font-size: 2.25rem; line-height: 1; color: var(--text); }
.tile-metric-label { margin-top: 6px; font-size: 0.8125rem; color: var(--text-meta); }
.tile h3 { margin-top: 28px; font-size: 1.0625rem; font-weight: 500; line-height: 1.4; }
.tile p { margin-top: auto; padding-top: 12px; font-size: 0.875rem; color: var(--text-meta); }

.worked-at { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 28px; }
.worked-at-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); }
.worked-at .org { font-size: 0.9375rem; color: var(--text-muted); }

/* Company name + logo, linked to the company. Logos sit on a small light
   tile so dark marks (e.g. OpenAI's) stay visible in dark mode. */
.org { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; transition: color 0.15s; }
.org:hover { color: var(--accent); }
.org-logo {
  flex: none;
  width: 20px; height: 20px;
  padding: 2px;
  border-radius: 5px;
  background: #F4F8F7;
  object-fit: contain;
  box-shadow: 0 0 0 1px var(--border);
}

.offers { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 32px; }
.offers a { display: block; padding-top: 16px; border-top: 1px solid var(--border-2); transition: border-color 0.15s; }
.offers a:hover { border-color: var(--accent); }
.offers h3 { font-size: 1.0625rem; font-weight: 500; }
.offers p { margin-top: 6px; font-size: 0.9375rem; line-height: 1.55; color: var(--text-muted); }
.offer-meta { display: block; margin-top: 10px; font-size: 0.8125rem; color: var(--text-meta); }
.band-cta { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 36px; }
.band-cta .hero-note { margin-top: 0; }

.writing-list { list-style: none; }
.writing-list li + li { border-top: 1px solid var(--border); }
.writing-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 24px; padding: 18px 0; }
.writing-list h3 { font-family: var(--font-display); font-size: 1.1875rem; line-height: 1.35; transition: color 0.15s; }
.writing-list a:hover h3 { color: var(--accent); }
.writing-list p { grid-column: 1; font-size: 0.9375rem; color: var(--text-muted); }
.writing-meta { grid-column: 2; grid-row: 1; font-size: 0.8125rem; color: var(--text-meta); white-space: nowrap; }

/* ── Inner pages ───────────────────────────────────────────────────────── */
.page { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 32px; }
.page-narrow { max-width: 760px; }
.page-head { max-width: 680px; margin-bottom: 48px; }
.page-head h1 { font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 300; line-height: 1.1; }
.page-head p { margin-top: 16px; font-size: 1.125rem; line-height: 1.6; color: var(--text-muted); }
.page h2 { font-family: var(--font-display); font-size: 1.5rem; }

/* About & work: one page; its header is the home hero, extended. */
.about-hero { padding-bottom: 56px; }
.about-bio { margin-top: 22px; }
.about-bio p { font-size: 1.0625rem; line-height: 1.65; color: var(--text-muted); }
.about-bio p + p { margin-top: 12px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.jump a {
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: border-color 0.15s, color 0.15s;
}
.jump a:hover { border-color: var(--accent); color: var(--text); }
.band-note { font-size: 0.875rem; color: var(--text-meta); }

.case { padding: 40px 0; border-top: 1px solid var(--border); }
.band-head + .case { padding-top: 4px; border-top: 0; }
.case-metric { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.1; color: var(--text); }
.case-metric span { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 0.875rem; color: var(--text-meta); }
.case-head h3 { margin-top: 16px; font-family: var(--font-display); font-size: 1.5rem; }
.case-where { margin-top: 6px; font-size: 0.875rem; color: var(--text-meta); }
.case-body { max-width: 760px; margin: 28px 0 24px; display: grid; gap: 16px; }
.case-body > div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.case-body dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); padding-top: 4px; }
.case-body dd { font-size: 1rem; line-height: 1.65; color: var(--text-muted); }

.more-work { padding-top: 40px; border-top: 1px solid var(--border); }
.more-work h3 { font-family: var(--font-display); font-size: 1.25rem; }
.more-work ul { list-style: none; margin-top: 20px; max-width: 760px; display: grid; gap: 14px; }
.more-work li { font-size: 1rem; line-height: 1.6; color: var(--text-muted); }
.more-work strong { color: var(--text); font-weight: 500; }

.cta-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin: 32px 0 24px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cta-card h2 { font-size: 1.375rem; }
.cta-card p { margin-top: 6px; font-size: 0.9375rem; color: var(--text-muted); }

/* Services */
.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 48px; }
.fit h2 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 12px; }
.fit ul { list-style: none; display: grid; gap: 10px; }
.fit li { padding-left: 22px; position: relative; font-size: 1rem; line-height: 1.5; color: var(--text-muted); }
.fit li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.fit div + div li::before { content: "–"; color: var(--text-meta); }

.price-list { border-top: 1px solid var(--border); }
.price-item { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.price-main { max-width: 560px; }
.price-main h3 { font-size: 1.125rem; font-weight: 500; display: flex; align-items: center; gap: 10px; }
.price-main p { margin-top: 6px; font-size: 0.9375rem; line-height: 1.55; color: var(--text-muted); }
.price-side { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 20px; align-items: center; flex: none; text-align: right; }
.price { font-family: var(--font-display); font-size: 1.375rem; color: var(--text); }
.price-dur { grid-row: 2; font-size: 0.8125rem; color: var(--text-meta); }
.price-side .btn { grid-column: 2; grid-row: 1 / span 2; min-width: 76px; }
.badge { padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; }

.steps { margin-top: 56px; }
.steps ol { margin-top: 20px; padding-left: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; max-width: 680px; }
.steps li { counter-increment: step; position: relative; padding-left: 40px; font-size: 1rem; line-height: 1.6; color: var(--text-muted); }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 1px;
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2);
  font-size: 0.8125rem; color: var(--text);
}
.steps strong { color: var(--text); font-weight: 500; }
.fine-print { margin-top: 24px; font-size: 0.8125rem; color: var(--text-meta); }
.fine-print a { text-decoration: underline; text-underline-offset: 3px; }

.about-links { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 24px; }
.timeline { border-top: 1px solid var(--border); }
.role { border-bottom: 1px solid var(--border); }
.role summary, .role-static { display: grid; grid-template-columns: 170px minmax(0, 1fr) 20px; gap: 16px; padding: 18px 0; }
.role-static { grid-template-columns: 170px minmax(0, 1fr); }
.role summary { cursor: pointer; list-style: none; }
.role summary::-webkit-details-marker { display: none; }
.role summary::after { content: "+"; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; color: var(--text-meta); font-size: 1.125rem; line-height: 1; transition: transform 0.15s; }
.role[open] summary::after { transform: rotate(45deg); }

.role-when { font-size: 0.875rem; color: var(--text-meta); padding-top: 2px; }
.role-what { font-size: 1rem; color: var(--text-muted); }
.role-what .org { vertical-align: -4px; }
.role-sum { display: block; margin-top: 4px; font-size: 0.9375rem; color: var(--text-meta); }
.role ul { margin: 0 0 20px 186px; padding-left: 18px; display: grid; gap: 8px; max-width: 680px; }
.role li { font-size: 0.9375rem; line-height: 1.6; color: var(--text-muted); }
.about-block > p { max-width: 720px; font-size: 1rem; line-height: 1.65; color: var(--text-muted); }
.about-block > p + p { margin-top: 14px; }
.about-block strong { color: var(--text); font-weight: 500; }
.skills { display: grid; gap: 10px; max-width: 760px; }
.skills > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; }
.skills dt { font-size: 0.9375rem; color: var(--text); }
.skills dd { font-size: 0.9375rem; color: var(--text-muted); }

/* Now */
.now-updated { font-size: 0.9375rem !important; }
.prose h2 { margin: 36px 0 10px; font-size: 1.25rem; }
.prose p { font-size: 1.0625rem; line-height: 1.7; color: var(--text-muted); }
.prose a { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent-dim); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .tiles, .offers { grid-template-columns: 1fr; }
  .tile h3 { margin-top: 16px; }
}
@media (max-width: 640px) {
  .hero { padding-top: 40px; }
  .hero-id { gap: 14px; margin-bottom: 20px; }
  .avatar-xl { width: 52px; height: 52px; font-size: 1.125rem; }
  .now-next, .fit { grid-template-columns: 1fr; }
  .band { padding-top: 48px; padding-bottom: 48px; }
  .page { padding-top: calc(var(--nav-h) + 32px); }
  .case-body > div, .skills > div { grid-template-columns: 1fr; gap: 4px; }
  .cta-card { flex-direction: column; align-items: flex-start; padding: 24px; }
  .price-item { flex-direction: column; align-items: stretch; gap: 14px; }
  .price-side { text-align: left; grid-template-columns: 1fr auto; }
  .role summary { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 12px; }
  .role summary .role-when { grid-column: 1; }
  .role summary .role-what { grid-column: 1; }
  .role summary::after { grid-column: 2; grid-row: 1 / span 2; }
  .role-static { grid-template-columns: 1fr; gap: 4px; }
  .role ul { margin-left: 0; }
  .writing-list a { grid-template-columns: 1fr; }
  .writing-meta { grid-column: 1; grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ── Page transitions ──────────────────────────────────────────────────────
   Cross-document View Transitions between site pages. Home and About share
   the same hero, so it holds still while the content below rises into place;
   a clicked work tile's number glides into its case study. Browsers without
   support simply navigate. The blog doesn't opt in.                       */
@view-transition { navigation: auto; }
.site-nav { view-transition-name: site-nav; }
.hero-id .avatar { view-transition-name: hero-avatar; }
.hero-name { view-transition-name: hero-name; }
.hero-lead { view-transition-name: hero-lead; }
.tile-metric.is-leaving, .case:target .case-metric { view-transition-name: case-metric; }

::view-transition-group(*) { animation-duration: 0.42s; animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1); }
::view-transition-old(root) { animation: 0.16s ease-out both vt-fade-out; }
::view-transition-new(root) { animation: 0.36s cubic-bezier(0.2, 0.8, 0.2, 1) 0.08s both vt-rise; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-rise { from { opacity: 0; transform: translateY(14px); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
