/* Self-hosted (latin) — Google Fonts @import was failing on some networks → Inter/system fallback */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/fonts/bricolage-grotesque-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/geist-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #F0EFEC;
  --ink: #18171A;
  --body: #2A2823;
  --muted: #6B6862;
  --line: #E5E3DE;
  --accent: #A8472A;
  --accent-press: #8A3920;
  --error: #B23A22;
  --sans: 'Geist', system-ui, sans-serif;
  --display: 'Bricolage Grotesque', 'Geist', sans-serif;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius: 14px;
}

* { box-sizing: border-box; }

/* Skip link: visually hidden until focused, then slides into view */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 8px 0;
  font-size: 0.9rem;
}
.skip-link:focus { left: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

/* Layout: centered editorial column (+2 steps from 47.5rem / 760px) */
.page {
  max-width: 52.5rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) clamp(1.25rem, 5vw, 2rem) clamp(4rem, 10vw, 7rem);
}

/* Hero */
.section-rule {
  margin: clamp(2.5rem, 6vw, 4rem) 0;
  border: none;
  border-top: 1px solid var(--line);
  opacity: 0.85;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}
.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.eyebrow::after { content: none; }
.eyebrow-company {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ink);
  font-weight: 600;
}
.eyebrow-logo { flex: 0 0 auto; width: 16px; height: 16px; }

h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.case-page,
.articles-index {
  --page-h1-size: clamp(2rem, 5vw, 2.75rem);
}
.case-page h1,
.articles-index h1,
.article-header h1 {
  font-size: var(--page-h1-size);
}
.page code,
.article-page code {
  font-family: "Geist Mono", ui-monospace, "SF Mono", monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: var(--ink);
}
.page :where([data-copy], [data-copy-target]),
.article-page :where([data-copy], [data-copy-target]) {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  background-image: none;
  font-family: var(--sans);
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s var(--ease), transform 0.15s var(--ease);
}
.page :where([data-copy], [data-copy-target]):hover,
.article-page :where([data-copy], [data-copy-target]):hover {
  color: var(--ink);
}
.page :where([data-copy-target]).copied,
.article-page :where([data-copy-target]).copied {
  color: var(--accent);
}
.page :where([data-copy-target]) .icon-check,
.article-page :where([data-copy-target]) .icon-check { display: none; }
.page :where([data-copy-target]).copied .icon-copy,
.article-page :where([data-copy-target]).copied .icon-copy { display: none; }
.page :where([data-copy-target]).copied .icon-check,
.article-page :where([data-copy-target]).copied .icon-check { display: inline-block; }
.page :where([data-copy-target]):active,
.article-page :where([data-copy-target]):active { transform: scale(0.97); }

/* Hero */
.hero-pitch {
  margin-bottom: clamp(1.75rem, 4.5vw, 2.5rem);
}

.hero-pitch h1,
.hero-headline {
  margin: 0 0 0.9rem;
  font-size: clamp(2.35rem, 6.2vw, 3.85rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.hero-headline {
  text-wrap: balance;
}

.hero-word {
  display: inline-block;
  opacity: 0.12;
  filter: blur(10px);
  transform: translateY(0.55em) scale(0.94);
  will-change: transform, opacity, filter;
  animation: hero-word-in 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(0.15s + (var(--i) * 0.11s));
}

@keyframes hero-word-in {
  from {
    opacity: 0.12;
    filter: blur(10px);
    transform: translateY(0.55em) scale(0.94);
  }
  to {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
  }
}

/* After the word stagger, reveal a marker highlight behind “humans and AI” */
.hero-mark {
  --hero-mark: color-mix(in srgb, var(--accent) 24%, var(--bg));
  position: relative;
  display: inline;
  padding: 0.02em 0.08em 0.04em;
  margin: 0 -0.08em;
  color: inherit;
  vertical-align: baseline;
  background-color: transparent;
  background-image: linear-gradient(
    180deg,
    transparent 54%,
    var(--hero-mark) 54%,
    var(--hero-mark) 90%,
    transparent 90%
  );
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 0 100%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  animation: hero-mark-wipe 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 2.25s;
}

.hero-mark .hero-word {
  position: relative;
  z-index: 1;
}

@keyframes hero-mark-wipe {
  to {
    background-size: 100% 100%;
  }
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(1.08rem, 2.2vw, 1.22rem);
  line-height: 1.5;
  color: var(--muted);
  font-weight: 500;
  text-wrap: pretty;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 clamp(1.5rem, 4vw, 2rem);
  padding-top: clamp(1.5rem, 3.5vw, 2rem);
  border-top: 1px solid var(--line);
}

.hero-avatar {
  flex: 0 0 auto;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
}

.hero-identity-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-name {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.8vw, 1.5rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.hero-role {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* Section headings: sentence-case with a short clay tick (no uppercase label grammar) */
h2 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
h2::after {
  content: "";
  display: block;
  width: 1.75rem;
  height: 2px;
  margin-top: 0.5rem;
  background: var(--accent);
}

section { margin-bottom: clamp(2.5rem, 6vw, 4rem); }

/* Story: narrative intro as its own band */
.story-flow .story-intro:last-child {
  margin-bottom: 0;
}

/* Impact: timeline as a distinct section */
.impact-section .section-label,
.case-section .section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.impact-section .section-label {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
}
.section-label-icon {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  color: var(--muted);
}

.story-intro {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  font-size: clamp(1.06rem, 2.2vw, 1.12rem);
  line-height: 1.65;
  color: var(--body);
}
.story-intro + .story-intro {
  margin-top: -0.75rem;
}
.story-intro strong {
  color: var(--ink);
  font-weight: 600;
}

.section-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Section label: small muted sentence-case header above a section */
.section-label {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.section-label::after { display: none; }

/* Links: ink text with an accent underline that reveals on hover */
a {
  color: var(--ink);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size 0.3s var(--ease), color 0.3s var(--ease);
}
a:hover { background-size: 100% 1.5px; }

/* Primary CTA: clay pill with a nested arrow circle */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.7rem 0.7rem 1.3rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  background-image: none;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.cta:hover { background: var(--accent-press); transform: translateY(-1px); }
.cta:active { transform: translateY(0) scale(0.99); }
.cta.copied { background: var(--accent-press); }
.cta.copied .cta-arrow { background: rgba(255, 255, 255, 0.28); }

.email-addr {
  display: none;
  margin-top: 0.75rem;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.85rem;
  color: var(--muted);
  background-image: none;
}
.email-addr.revealed { display: inline-block; animation: fade-in 0.35s var(--ease) both; }
.email-addr:hover { color: var(--ink); }
.cta-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.25s var(--ease);
}
.cta:hover .cta-arrow { background: rgba(255, 255, 255, 0.28); }
.cta-arrow .icon-check { display: none; }
.cta.copied .cta-arrow .icon-copy { display: none; }
.cta.copied .cta-arrow .icon-check { display: block; }

/* Icon-only round button (e.g. LinkedIn) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: #0A66C2;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.icon-btn:hover {
  background: var(--surface);
  border-color: #0A66C2;
  color: #004182;
}
.icon-btn svg { display: block; }

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.cta:focus-visible { outline-offset: 2px; }

/* Link row */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.hero-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.hero-email {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink);
  background-image: none;
  text-decoration: none;
  margin-left: 0.25rem;
}
.hero-email:hover { color: var(--accent); }

.hero-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.98rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.98rem;
}

/* Impact list: same track-event component as the Skills page (left-border spine + outline dot) */
.impact-tree li { padding-bottom: 0.45rem; }
.impact-tree li:last-child { padding-bottom: 0; }
.impact-text {
  margin: 0;
  line-height: 1.4;
}
.impact-text a,
.story-intro a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  padding: 0.1rem 0.55rem 0.15rem;
  margin: 0 -0.1rem;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
  background-image: none;
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.impact-text a::after,
.story-intro a::after {
  content: "\2197";
  display: inline-block;
  font-size: 0.85em;
  line-height: 1;
  color: var(--muted);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.impact-text a:hover,
.story-intro a:hover {
  background: var(--accent);
  color: #fff;
}
.impact-text a:hover::after,
.story-intro a:hover::after {
  color: #fff;
  transform: translate(1px, -1px);
}

/* Quote: testimonial carousel */
.quote-section {
  position: relative;
  margin-top: clamp(0.5rem, 2vw, 1rem);
}

.carousel {
  position: relative;
  margin: 0;
}

.carousel-track {
  position: relative;
  display: grid;
}

.quote-card {
  grid-area: 1 / 1;
  margin: 0;
  padding: clamp(2.25rem, 5vw, 3.25rem) clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 1.5rem;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(28, 26, 22, 0.05);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  transform: translateY(6px);
}
.quote-card.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.quote-card blockquote {
  margin: 0 0 1.35rem;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.2vw, 1.22rem);
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
}
.quote-card blockquote p { margin: 0; }

.quote-card figcaption {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
}

.quote-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
  overflow: hidden;
}
.quote-avatar-logo {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.quote-attribution {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.quote-card .quote-name { color: var(--ink); font-weight: 600; }
.quote-card .quote-role { color: var(--muted); }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.35rem;
}

.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.carousel-btn:hover {
  background: var(--bg);
  border-color: color-mix(in srgb, var(--muted) 50%, var(--line));
  color: var(--accent);
  box-shadow: 0 2px 4px rgba(28, 26, 22, 0.06);
}
.carousel-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.carousel-dots {
  display: flex;
  align-items: center;
  gap: 0;
}
.carousel-dot {
  box-sizing: content-box;
  width: 0.5rem;
  height: 0.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: 50%;
  background: var(--line);
  background-clip: content-box;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.carousel-dot:hover { background-color: var(--muted); }
.carousel-dot.is-active {
  background-color: var(--accent);
  transform: scale(1.25);
}
.carousel-dot:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

footer {
  margin-top: clamp(3rem, 7vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
}

/* Auth / login */
.auth-card {
  max-width: 24rem;
  margin: clamp(4rem, 12vw, 7rem) auto;
  padding: 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
}
.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.auth-card p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.auth-card label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-card input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  font: inherit;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 71, 42, 0.15);
}
.auth-card form > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.auth-card form > button:hover { background: var(--accent-press); transform: translateY(-1px); }
.auth-card form > button:active { transform: translateY(0) scale(0.99); }
.auth-back { margin-top: 1.5rem; font-size: 0.9rem; }
.auth-back a { color: var(--muted); }
.auth-back a:hover { color: var(--ink); }

/* Homepage case-study password modal */
.case-auth-modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: 24rem;
  width: calc(100% - 2rem);
}
.case-auth-modal::backdrop {
  background: rgba(28, 26, 22, 0.4);
}
.case-auth-modal .auth-card {
  position: relative;
  margin: 0;
  width: 100%;
}
.case-auth-modal h2 {
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
}
.case-auth-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.case-auth-close:hover { color: var(--ink); background: var(--surface-2); }
.case-auth-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.error {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--error);
}

/* Case index */
.case-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.case-header h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.case-header a { font-size: 0.9rem; color: var(--muted); }
.case-header a:hover { color: var(--ink); }

.case-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.case-list li { padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.case-list li:first-child { padding-top: 0; }
.case-list a {
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.case-list a:hover { color: var(--accent); }
.case-list p { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* Metrics */
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 1.5rem;
}
.metric {
  padding: 1rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
}
.metric-value {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metric-label {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.35;
}

/* Case pages */
.case-page h1 { margin-bottom: 0.4rem; }
.case-meta { margin: 0 0 2rem; font-size: 0.95rem; color: var(--muted); text-wrap: pretty; }

/* Back link with a leading arrow for clear wayfinding */
.back-link { margin: 0 0 1.5rem; font-size: 0.9rem; }
.back-link a { color: var(--muted); }
.back-link a::before { content: "\2190\00a0"; color: var(--muted); }
.back-link a:hover { color: var(--ink); }

/* Skills decision tree */
.skill-tree {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  border-left: 1px solid var(--line);
}
.skill-tree li { position: relative; padding: 0 0 1.1rem 1.6rem; }
.skill-tree li::before {
  content: "";
  position: absolute;
  left: -0.375rem;
  top: 0.55rem;
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--muted);
  box-sizing: border-box;
}
.skill-tree li:has(.tree-step-today)::before {
  background: var(--accent);
  border-color: var(--accent);
}
.tree-step { padding: 0.1rem 0 0; }
.tree-era {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.tree-where { margin: 0.2rem 0 0; font-size: 0.9rem; color: var(--muted); }
.tree-step-today {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(28, 26, 22, 0.04);
  margin-left: -0.35rem;
}
.now-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: 0.15em;
}

.tree-role {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  text-wrap: pretty;
}
.tree-impact {
  margin: 0.7rem 0 0;
  padding: 0 0 0 1.1rem;
  list-style: none;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.55;
}
.tree-impact li { margin-bottom: 0.4rem; }
.tree-impact li:last-child { margin-bottom: 0; }
.tree-impact strong { color: var(--ink); font-weight: 600; }
.tree-impact code {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.88em;
  background: var(--surface-2);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: var(--ink);
}

/* Top skills chips */
.skills-top { margin: 0 0 2.5rem; }
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.skill-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
}
.skill-years {
  display: inline-flex;
  align-items: center;
  padding-left: 0.5rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.skills-tree-section { margin-bottom: 2.5rem; }

/* Meta blocks: certifications, honors, publications */
.skills-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin: 0 0 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
@media (min-width: 720px) {
  .skills-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.meta-block { min-width: 0; }
.meta-list {
  margin: 0.5rem 0 0;
  padding: 0 0 0 1.1rem;
  list-style: disc;
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.55;
}
.meta-list li { margin-bottom: 0.4rem; }
.meta-list em { color: var(--ink); font-style: italic; }

/* Terminal card: physical-object code block, warm-tinted dark on bone */
.terminal {
  position: relative;
  margin: 1.75rem 0;
  background: #1C1A16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(28, 26, 22, 0.18);
  overflow: hidden;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.tl { width: 0.7rem; height: 0.7rem; border-radius: 50%; }
.tl-r { background: #C96B6B; }
.tl-y { background: #D9B45C; }
.tl-g { background: #6FAE7A; }
.terminal-title {
  margin: 0 auto;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #8A8478;
}
.terminal-body {
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.75;
  color: #EAE4D6;
  white-space: pre;
  overflow-x: auto;
  tab-size: 2;
}
.tok-prompt { color: #8A8478; }
.tok-cmd { color: #D2734E; }
.tok-comment { color: #7E7868; font-style: italic; }
.terminal-copy {
  position: absolute;
  bottom: 0.6rem;
  right: 0.6rem;
  padding: 0.4rem 0.65rem;
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: #8A8478;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.terminal-copy:hover { color: #EAE4D6; background: rgba(255, 255, 255, 0.1); }
.terminal-copy.copied { color: #8FBF9E; border-color: rgba(143, 191, 158, 0.4); }

/* Staggered page-load reveal on the hero */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero > .eyebrow,
.hero > .hero-identity,
.hero > .hero-actions,
.hero > .email-addr,
.hero-pitch .lede {
  animation: rise 0.8s var(--ease) both;
}
.hero > .eyebrow { animation-delay: 0.05s; }
.hero-pitch .lede { animation-delay: 1.55s; }
.hero > .hero-identity { animation-delay: 1.7s; }
.hero > .hero-actions { animation-delay: 1.8s; }
.hero > .email-addr { animation-delay: 1.88s; }

@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Nav text links: forward-arrow affordance replaces the generic underline */
/* Nav ghost pills: same shape/min-height as the primary CTA, transparent until hover */
.links a:not(.icon-btn),
.hero-nav a {
  background-image: none;
  background: transparent;
  padding: 0.7rem 1.2rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: none;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 500;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.links a:not(.icon-btn):hover,
.hero-nav a:hover {
  background: var(--surface);
  color: var(--accent);
  transform: translateY(-1px);
}
.links a .nav-arrow,
.hero-nav a .nav-arrow {
  display: inline-block;
  width: 0;
  margin-left: 0;
  opacity: 0;
  transform: translate(-4px, 3px);
  color: var(--accent);
  vertical-align: -0.12em;
  overflow: hidden;
  transition: width 0.3s var(--ease), margin-left 0.3s var(--ease), opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.links a:hover .nav-arrow,
.hero-nav a:hover .nav-arrow {
  width: 14px;
  margin-left: 0.32rem;
  opacity: 1;
  transform: none;
}

/* Progressive scroll reveal (driven by IntersectionObserver in site.js) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.75s var(--ease), transform 0.75s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > .eyebrow,
  .hero > .hero-identity,
  .hero > .hero-actions,
  .hero > .email-addr,
  .hero-pitch .lede,
  .hero-word {
    animation: none;
    opacity: 1;
    filter: none;
    transform: none;
  }
  .hero-mark {
    animation: none;
    background-size: 100% 100%;
  }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .email-addr.revealed { animation: none; }
  .eyebrow::after { animation: none; }
  a, button, .cta, .cta-arrow, input { transition: none; }
}

/* Article (long-form) pages — docs-style layout -------------------------------- */
.article-page {
  --page-h1-size: clamp(2.1rem, 5.5vw, 3rem);
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 5vw, 2.5rem) 4rem;
}

.article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.article-breadcrumb a {
  color: var(--muted);
  background-image: none;
  padding: 0;
}
.article-breadcrumb a:hover { color: var(--ink); }
.article-breadcrumb-sep { color: var(--line); user-select: none; }
.article-breadcrumb-current { color: var(--ink); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11.5rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.article-main { min-width: 0; }

.article-header {
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
}

.article-kicker {
  margin: 0 0 0.65rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-kicker a {
  color: var(--muted);
  background-image: none;
  padding: 0;
}
.article-kicker a:hover { color: var(--accent); }

.article-header h1 {
  display: block;
  margin: 0 0 1.25rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.article-header h1::after { display: none; }

.article-lead {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.article-dek {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

.article-byline {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.article-callout {
  margin: 0 0 1.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.article-callout-label {
  margin: 0 0 0.65rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-callout p:last-child { margin-bottom: 0; }

/* Sticky right-rail table of contents */
.article-toc {
  position: sticky;
  top: 2rem;
  padding-top: 0.15rem;
}
.article-toc[hidden] { display: none; }
.article-toc-label {
  margin: 0 0 0.85rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.article-toc-copy {
  gap: 0.4rem;
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}
.article-toc-copy:hover { color: var(--ink); }
.article-toc-copy svg { width: 13px; height: 13px; flex: 0 0 auto; }
.article-toc nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.article-toc-link {
  display: block;
  padding: 0.28rem 0 0.28rem 0.65rem;
  border-left: 2px solid transparent;
  font-size: 0.82rem;
  line-height: 1.35;
  color: var(--muted);
  background-image: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.article-toc-link:hover {
  color: var(--ink);
  border-left-color: var(--line);
}
.article-toc-link.is-active {
  color: var(--ink);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Book grid + card (used by /articles/books-im-reading-in-2026) */
.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}
.book-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--bg);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.book-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.book-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.book-cover { display: block; width: 100%; height: auto; object-fit: cover; background: var(--surface); border-radius: var(--radius); transform: scale(1.04); transition: transform 0.3s var(--ease); }
.book-card:hover .book-cover { transform: scale(1.06); }
.book-cover--fallback { line-height: 0; overflow: hidden; }
.book-cover--fallback svg { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.book-card--pleasure { position: relative; }
.book-tag {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(251, 250, 246, 0.92);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.book-title {
  padding: 0.75rem 0.85rem 0.15rem;
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.book-author {
  padding: 0 0.85rem 0.85rem;
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* Book details modal */
.book-modal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink);
  padding: 0;
  max-width: 36rem;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 30px rgba(28, 26, 22, 0.18);
}
.book-modal::backdrop { background: rgba(28, 26, 22, 0.4); }
.book-modal-inner {
  position: relative;
  padding: 2rem 1.75rem 1.75rem;
}
.book-modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.book-modal-close:hover { color: var(--ink); background: var(--surface-2); }
.book-modal-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.book-modal-title {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--ink);
  padding-right: 2.5rem;
}
.book-modal-author {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
  font-style: italic;
}
.book-modal-section-label {
  margin: 1.25rem 0 0.5rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.book-modal-section-label:first-of-type { margin-top: 0; }
.book-modal-why-reading,
.book-modal-why-helps {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--body);
}

.article-body {
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--body);
}
.article-body p { margin: 0 0 1.05rem; }
.article-related {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.article-body h2 {
  margin: 2.75rem 0 0.85rem;
  padding-top: 0.5rem;
  font-size: 1.35rem;
  scroll-margin-top: 2rem;
  text-wrap: balance;
}
.article-body h2::after { display: none; }
.article-body h2:first-child { margin-top: 0; padding-top: 0; }
.article-body h3 {
  margin: 1.65rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.article-body h3::after { display: none; }
.article-body h4 {
  margin: 1.25rem 0 0.45rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.article-body ul { margin: 0 0 1.05rem; padding-left: 1.35rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body li::marker { color: var(--accent); }
.article-body blockquote {
  margin: 1.35rem 0;
  padding: 0.1rem 0 0.1rem 1rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}
.article-body blockquote p { margin: 0; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 2.25rem 0; }
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.35rem 0;
  font-size: 0.92rem;
}
.article-body th,
.article-body td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.article-body th {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
}
.article-body td { color: var(--body); }
.article-body ol { margin: 0 0 1.05rem; padding-left: 1.5rem; }
.article-body ol li { margin-bottom: 0.45rem; }
.article-visual {
  margin: clamp(2rem, 6vw, 3.4rem) 0;
}
.article-visual img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 42px rgba(24, 23, 26, 0.08);
}

.article-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.article-footer-action {
  gap: 0.45rem;
  font-size: 0.88rem;
}
.article-footer-action:hover { color: var(--ink); }
.article-footer-action svg { width: 14px; height: 14px; flex: 0 0 auto; }

/* Articles index — docs listing */
.articles-index .article-kicker { margin-bottom: 0.5rem; }
.articles-index h1 { margin: 0 0 0.75rem; }
.articles-index h1::after { display: none; }
.articles-index .index-lead {
  margin: 0 0 2rem;
  max-width: 38rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--muted);
  text-wrap: pretty;
}

@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-toc {
    position: static;
    order: -1;
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .article-toc-copy { margin-bottom: 0.6rem; }
  .article-toc nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
  }
  .article-toc-link {
    padding: 0.2rem 0;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .article-toc-link:hover,
  .article-toc-link.is-active {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }
}

/* Toast: appears in lower-left on successful copy, dismisses after 2s */
.toast {
  position: fixed;
  left: 1.25rem;
  bottom: 1.25rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--bg);
  font: 500 0.92rem var(--sans);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(20, 18, 14, 0.18), 0 1px 2px rgba(20, 18, 14, 0.08);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.toast svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: opacity 0.2s linear; transform: none; }
  .toast.is-visible { transform: none; }
}
