/* ==========================================================================
   Content interaction & images
   ========================================================================== */
body {
  user-select: text;
  -webkit-user-select: text;
}
img {
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  -webkit-touch-callout: none;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}
@media (min-width: 720px) {
  .container {
    width: min(100% - 4rem, var(--container));
  }
}
.container-narrow {
  width: min(100% - 2.5rem, var(--container-narrow));
  margin-inline: auto;
}
@media (min-width: 720px) {
  .container-narrow {
    width: min(100% - 4rem, var(--container-narrow));
  }
}

.section {
  padding-block: var(--space-section);
}
/* Anchor stops (Case studies, Work, …) land with the eyebrow about 48px under the header,
   not a whole section's top padding below it. Offsets the 16px scroll-padding in base.css. */
.section[id] {
  scroll-margin-top: calc(32px - var(--space-section));
}
.section--tight[id] {
  scroll-margin-top: calc(32px - clamp(2.5rem, 2rem + 3vw, 4.5rem));
}
.section + .section {
  border-top: none;
}

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}
/* One dot style everywhere: the eyebrow bullet and every separator (replaces "·").
   Dots are inline so long eyebrows wrap like text; each separator is glued to the next word. */
.eyebrow::before,
.sep {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.12em; /* centered on capitals */
}
.eyebrow::before {
  margin-right: 0.6rem;
}
.eyebrow::before,
.eyebrow .sep {
  background: var(--brand-orange); /* the brand dot, small */
}
.eyebrow--plain::before {
  display: none;
}
.eyebrow .sep {
  margin: 0 0.3rem;
}
.sep {
  width: 0.34em;
  height: 0.34em;
  min-width: 4px;
  min-height: 4px;
  margin: 0 0.15em;
  vertical-align: middle; /* centered on lower-case text */
}
.eyebrow .sep {
  width: 6px;
  height: 6px;
  vertical-align: 0.12em;
}
.btn .sep {
  margin: 0;
}
.nowrap {
  white-space: nowrap; /* keeps a separator dot with the word after it */
}
.eyebrow .page-lock {
  display: inline-block;
  margin-right: 0.4rem;
  vertical-align: -0.15em;
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: grid;
  gap: 1rem;
}
.section-head h2 {
  font-size: var(--fs-h2);
}
.section-head p:not(.eyebrow) {
  color: var(--color-text-muted);
  font-size: var(--fs-lede);
}

.muted {
  color: var(--color-text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease), color 0.2s;
}
.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}
.btn--ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}
.btn--sm {
  min-height: 38px;
  padding: 0.45rem 0.9rem;
  font-size: 0.9rem;
}
.btn--soon { /* a placeholder that looks like a button but isn't one: case study 04 */
  cursor: default;
  opacity: 0.6;
  pointer-events: none;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}
.link-arrow:hover {
  text-decoration: underline;
}
.link-arrow .arrow {
  transition: transform 0.2s var(--ease);
}
.link-arrow:hover .arrow {
  transform: translateX(3px);
}

/* ==========================================================================
   Header / nav
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}
/* The brand mark: the orange dot, alive in slow motion. One 12-second cycle, then it repeats:
   1. breathe (0-2.6 s): a slow inhale with a warm glow, then exhale
   2. gleam (3.6-7.2 s): a soft highlight travels once around the dot, like light across a sphere
   3. echo (7.9-10.3 s): a tiny tap sends one faint ring outward
   and rests in between. Still for visitors who prefer reduced motion. */
@property --dot-x { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --dot-y { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --dot-shine { syntax: "<number>"; inherits: false; initial-value: 0; }
.brand__dot {
  position: relative;
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  background:
    radial-gradient(circle at var(--dot-x) var(--dot-y), rgb(255 222 204 / calc(var(--dot-shine) * 0.8)) 0, rgb(255 222 204 / 0) 60%),
    var(--brand-orange);
  transition: scale 0.25s var(--ease);
  animation: dot-life 12s cubic-bezier(0.45, 0, 0.25, 1) infinite;
}
.brand__dot::after { /* the echo ring */
  content: "";
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--brand-orange);
  border-radius: 50%;
  opacity: 0;
  animation: dot-echo 12s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
.brand:hover .brand__dot {
  scale: 1.15;
}
@keyframes dot-life {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgb(232 80 26 / 0); }
  11% { transform: scale(1.16); box-shadow: 0 0 10px 1px rgb(232 80 26 / 0.3); }
  22% { transform: scale(1); box-shadow: 0 0 0 0 rgb(232 80 26 / 0); }
  30% { --dot-shine: 0; --dot-x: 30%; --dot-y: 30%; }
  36% { --dot-shine: 1; --dot-x: 70%; --dot-y: 30%; }
  44% { --dot-x: 70%; --dot-y: 70%; }
  52% { --dot-shine: 1; --dot-x: 30%; --dot-y: 70%; }
  60% { --dot-shine: 0; --dot-x: 30%; --dot-y: 30%; }
  66% { transform: scale(1); }
  68% { transform: scale(0.9); }
  71% { transform: scale(1.05); }
  74% { transform: scale(1); }
  100% { transform: scale(1); }
}
@keyframes dot-echo {
  0%, 68% { transform: scale(1); opacity: 0; }
  69% { transform: scale(1); opacity: 0.55; }
  86% { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .brand__dot,
  .brand__dot::after {
    animation: none;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav a:not(.btn) {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav a:not(.btn):hover,
.nav a[aria-current="true"],
.nav a[aria-current="page"] {
  color: var(--color-text);
  background: var(--color-surface-2);
}
.nav .btn {
  margin-left: 0.5rem;
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: 0.4rem;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
  transition: background-color 0.2s, transform 0.3s var(--ease);
}
.theme-toggle:hover {
  background: var(--color-surface);
  transform: rotate(-12deg);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  grid-area: 1 / 1;
}
:root[data-theme="light"] .theme-toggle .i-sun,
:root:not([data-theme="dark"]) .theme-toggle .i-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .i-moon {
  display: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  background: transparent;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}
.nav-toggle .i-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .i-open {
  display: none;
}
.nav-toggle[aria-expanded="true"] .i-close {
  display: block;
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-grid;
  }
  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.25s;
  }
  .nav.is-open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  .nav a:not(.btn) {
    padding: 0.85rem 0.9rem;
    font-size: 1.05rem;
  }
  .nav .btn {
    margin: 0.5rem 0 0;
  }
  .nav .theme-toggle {
    display: none; /* toggle lives beside the hamburger on mobile */
  }
}
@media (min-width: 1081px) {
  .header-actions {
    display: none; /* on desktop the theme toggle lives inside the nav */
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 2rem + 7vw, 8rem) clamp(3rem, 2rem + 4vw, 6rem);
}
.hero h1 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  margin-top: 1.4rem;
  max-width: 14ch;
}
.hero h1 em {
  font-style: normal;
  color: var(--color-accent);
}
.hero__lede {
  margin-top: 1.6rem;
  max-width: 40rem;
  font-size: var(--fs-lede);
  color: var(--color-text-muted);
}
.hero__cta {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.stats {
  margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.stats > div {
  background: var(--color-bg);
  padding: 1.25rem 1.25rem 1.35rem;
  transition: background-color 0.25s var(--ease);
}
.stats dt {
  order: 2;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.stats dd {
  margin: 0;
  order: 1;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.9rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stats > div {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
@media (min-width: 760px) {
  .stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   Cards, tags
   ========================================================================== */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  display: inline-block;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--color-border-strong);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
}
.tag--accent {
  color: var(--color-accent);
  border-color: transparent;
  background: var(--color-accent-soft);
  font-weight: 700;
}

.meta-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

/* Case-study index: 2×2 card grid — each card spans 4 of 8 columns */
.cs-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: var(--gutter, 1.5rem);
}
.cs-card {
  grid-column: span 8;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.cs-card:hover {
  border-color: var(--color-border-strong);
}
.cs-card__link {
  display: block;
  overflow: hidden;
  border-bottom: 1px solid var(--color-border);
}
.cs-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}
.cs-card__link:hover .cs-card__img {
  transform: scale(1.05);
}
.cs-card__main {
  display: grid;
  gap: 0.6rem;
  align-content: start;
  padding: clamp(1.25rem, 1rem + 1.5vw, 1.75rem);
  flex: 1;
}
.cs-card__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-accent);
}
.cs-card__main h3 {
  font-size: var(--fs-h3);
}
.cs-card__main p {
  color: var(--color-text-muted);
}
.cs-card__main .tags {
  margin-top: 0.25rem;
}
.cs-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
  align-content: start;
}
/* Confidential-work placeholder card: lock motif, no screenshot */
.cs-card--soon {
  border-style: dashed;
}
.cs-card__lock {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, transparent 0 10px, var(--color-accent-soft) 10px 11px),
    var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.cs-card__lock svg {
  width: 3rem;
  height: 3rem;
}
@media (min-width: 760px) {
  .cs-card {
    grid-column: span 4;
  }
}

/* ==========================================================================
   Impact rows (expandable)
   ========================================================================== */
.impact-list {
  display: grid;
  gap: var(--gutter, 1.5rem);
}
.impact {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.impact:hover {
  border-color: var(--color-border-strong);
}
.impact[open] {
  border-color: var(--color-border-strong);
}
.impact summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.5rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
}
.impact summary::-webkit-details-marker {
  display: none;
}
.impact__metric {
  min-width: 5.4ch;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.6rem);
  letter-spacing: -0.03em;
  color: var(--color-accent);
  line-height: 1;
}
.impact__eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}
.impact__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.25;
}
.impact__chev {
  width: 22px;
  height: 22px;
  color: var(--color-text-muted);
  transition: transform 0.25s var(--ease);
}
.impact[open] .impact__chev {
  transform: rotate(180deg);
}
.impact__body {
  display: grid;
  gap: 1.5rem;
  padding: 0.25rem 1.25rem 1.5rem;
  border-top: 1px solid var(--color-border);
  padding-top: 1.4rem;
  margin-inline: 1.25rem;
  padding-inline: 0;
}
.impact__body h3 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.4rem;
}
.impact__body p {
  color: var(--color-text-muted);
  font-size: 1rem;
}
@media (min-width: 860px) {
  .impact__body {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  .impact__body--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .impact summary {
    grid-template-columns: 1fr auto;
  }
  .impact__metric {
    grid-column: 1 / -1;
  }
}

/* Confidentiality note: every NDA or confidentiality note on the site uses this lock-icon style. */
.on-request {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem 1.25rem;
  align-items: flex-start;
  color: var(--color-text-muted);
}

/* ==========================================================================
   Experience timeline
   ========================================================================== */
.timeline {
  position: relative;
  display: grid;
  gap: 2.75rem;
}
.role {
  display: grid;
  gap: 0.6rem 3rem;
  position: relative;
}
.role__when {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-accent);
}
.role h3 {
  font-size: var(--fs-h3);
}
.role__org {
  color: var(--color-text-muted);
  font-weight: 500;
}
.role p {
  color: var(--color-text-muted);
  max-width: 46rem;
}
.role p + p {
  margin-top: 0.75rem;
}
@media (min-width: 860px) {
  .role {
    grid-template-columns: 13rem 1fr;
  }
  .role__when {
    padding-top: 0.35rem;
  }
}

/* ==========================================================================
   About + skills
   ========================================================================== */
.about-grid {
  display: grid;
  gap: 2.5rem;
}
.about-copy {
  display: grid;
  gap: 1.1rem;
  font-size: var(--fs-lede);
  color: var(--color-text-muted);
  max-width: 40rem;
}
.about-copy strong {
  color: var(--color-text);
  font-weight: 700;
}
.facts {
  padding: 1.5rem;
  align-self: start;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}
.facts div {
  display: grid;
  gap: 0.15rem;
}
.facts dd {
  margin: 0;
}
@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
  }
}

.skills-list {
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  border-top: 1px solid var(--color-border);
}
.skills-list > div {
  display: grid;
  gap: 0.35rem 2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.skills-list dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.skills-list dd {
  color: var(--color-text-muted);
  font-size: 1rem;
}
@media (min-width: 760px) {
  .skills-list > div {
    grid-template-columns: 15rem 1fr;
  }
}

/* ==========================================================================
   Resume downloads
   ========================================================================== */
.resume-grid {
  display: grid;
  gap: 1.25rem;
}
.resume-card {
  padding: clamp(1.4rem, 1rem + 1.5vw, 2rem);
  display: grid;
  gap: 1.1rem;
  align-content: start;
}
.resume-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.resume-card__icon svg {
  width: 24px;
  height: 24px;
}
.resume-card h3 {
  font-size: var(--fs-h3);
}
.resume-card p {
  color: var(--color-text-muted);
}
.resume-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
}
.resume-grid--one .resume-card {
  max-width: 44rem;
}
.file-meta {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}
@media (min-width: 800px) {
  .resume-grid:not(.resume-grid--one) {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact {
  padding: clamp(2rem, 1.5rem + 3vw, 4.5rem);
  display: grid;
  gap: 2rem;
  text-align: left;
}
.contact h2 {
  font-size: var(--fs-h1);
  max-width: 18ch;
}
.contact p:not(.eyebrow) {
  color: var(--color-text-muted);
  font-size: var(--fs-lede);
  max-width: 36rem;
}
.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact__social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact__text {
  display: grid;
  gap: 2rem;
  align-content: start;
}
/* Headshot: a rounded square, 250px beside the text on desktop; on smaller screens it sits above the
   text. Hidden until the photo has loaded. */
.contact__photo {
  display: none;
  margin: 0;
}
.contact.has-photo .contact__photo {
  display: block;
}
.contact__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: 22px;
  box-shadow: var(--shadow-image);
}
@media (min-width: 1200px) {
  .contact.has-photo {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: start;
  }
  .contact.has-photo .contact__photo {
    width: 250px;
    height: 250px;
  }
}
@media (max-width: 1199px) {
  .contact.has-photo .contact__photo {
    order: -1;
    width: min(80px, 40vw);
    aspect-ratio: 1;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.section--band { /* secondary color: a sky-tinted band behind a whole section */
  background: var(--color-band);
}
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: 2.25rem;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
}
.site-footer__legal {
  flex: 0 1 auto;
}
.site-footer__links {
  flex: 1 1 auto;
  text-align: right;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

/* ==========================================================================
   Case study pages
   ========================================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  text-decoration: none;
}
.back-link:hover {
  color: var(--color-text);
}
.cs-hero {
  padding-block: clamp(2.5rem, 2rem + 4vw, 5.5rem) clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.cs-hero__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}
.cs-hero h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.03em;
  margin-top: 1.5rem;
}
.cs-hero__lede {
  margin-top: 1.4rem;
  max-width: 42rem;
  font-size: var(--fs-lede);
  color: var(--color-text-muted);
}
/* Case-study type subtitle: "B2B2C client app • Single sign-on for ..." */
.cs-type,
.cs-row__main .cs-type {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
}
.cs-type strong {
  font-weight: 700;
  color: var(--color-accent);
}
.cs-hero .cs-type {
  margin-top: 0.75rem;
  font-size: 1.15rem;
}
.cs-hero__cta {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.meta-strip {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}
.meta-strip dd {
  margin: 0;
  font-weight: 500;
}
@media (min-width: 760px) {
  .meta-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

.prose {
  max-width: 44rem;
  display: grid;
  gap: 1.25rem;
  color: var(--color-text-muted);
  font-size: 1.125rem;
}
.prose a {
  color: var(--color-accent);
  font-weight: 500;
}
.prose strong {
  color: var(--color-text);
}
.pull {
  margin-top: 0.5rem;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--color-accent);
  background: var(--color-accent-soft);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.65rem);
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.constraints {
  margin-top: 2rem;
  display: grid;
  gap: 1rem;
}
.constraints h3 {
  font-size: 1.05rem;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
}
.constraints li {
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  font-size: 1rem;
}
.constraints li strong {
  color: var(--color-text);
}
@media (min-width: 760px) {
  .constraints ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}
.constraints ul {
  display: grid;
  gap: 0.85rem;
}

.principles {
  display: grid;
  gap: 1rem;
  counter-reset: p;
}
.principle {
  padding: 1.35rem 1.5rem;
  display: grid;
  gap: 0.4rem;
  counter-increment: p;
}
.principle h3 {
  font-size: 1.15rem;
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
}
.principle h3::before {
  content: counter(p, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-accent);
}
.principle p {
  color: var(--color-text-muted);
  padding-left: 2.15rem;
  font-size: 1rem;
}
@media (min-width: 860px) {
  .principles {
    grid-template-columns: repeat(2, 1fr);
  }
  .principle:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

.split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}
.source-list {
  display: grid;
  gap: 0.5rem;
}
.source-list a {
  display: inline-flex;
  gap: 0.5rem;
  color: var(--color-accent);
  font-size: 1rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
  font-size: 0.98rem;
}
th,
td {
  padding: 0.85rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
th {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: var(--color-surface-2);
}
td:first-child {
  font-family: var(--font-mono);
  color: var(--color-accent);
  width: 3.5rem;
}
tbody tr:hover td {
  background: var(--color-accent-soft);
}

/* Screens walkthrough */
.screens {
  display: grid;
  gap: clamp(3rem, 2rem + 4vw, 6rem);
}
.screen {
  display: grid;
  gap: 1.5rem;
}
.screen__num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--color-accent);
}
.screen h3 {
  font-size: var(--fs-h2);
  margin: 0.4rem 0 0.9rem;
}
.screen p {
  color: var(--color-text-muted);
  margin-bottom: 1.1rem;
}
.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #0a0f1a;
  box-shadow: var(--shadow-image);
  cursor: zoom-in;
}
.shot img {
  width: 100%;
  transition: transform 0.6s var(--ease);
}
.shot:hover img {
  transform: scale(1.015);
}
.shot__hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(10, 15, 26, 0.82);
  color: #e7eaf0;
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
}
.shot:hover .shot__hint,
.shot:focus-visible .shot__hint {
  opacity: 1;
}
.shot__hint svg {
  width: 14px;
  height: 14px;
}
@media (min-width: 1000px) {
  .screen {
    grid-template-columns: 0.8fr 1.4fr;
    gap: 3.5rem;
    align-items: center;
  }
  .screen:nth-child(even) {
    grid-template-columns: 1.4fr 0.8fr;
  }
  .screen:nth-child(even) .screen__text {
    order: 2;
  }
}

/* Interactive prototype frame */
.proto {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-image);
  background: #0a0f1a;
}
.proto__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border-strong);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.proto__dots {
  display: flex;
  gap: 6px;
}
.proto__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border-strong);
}
.proto__url {
  flex: 1;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.proto__bar a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.proto__bar a:hover {
  text-decoration: underline;
}
/* The prototype is a fixed 1440x900 canvas; scale it to fit the frame (--s set in main.js) */
.proto__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1440 / 900;
  overflow: hidden;
  background: #0a0f1a;
}
.proto__stage iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: 0;
  background: #0a0f1a;
  transform: scale(var(--s, 0.7));
  transform-origin: 0 0;
}
.proto__fallback {
  display: none;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--color-surface);
  gap: 1rem;
  justify-items: center;
}
.proto__fallback p {
  color: var(--color-text-muted);
  max-width: 28rem;
}
@media (max-width: 699px) {
  .proto__stage,
  .proto__bar {
    display: none;
  }
  .proto__fallback {
    display: grid;
  }
}

.note {
  padding: 1.5rem 1.75rem;
  display: grid;
  gap: 0.6rem;
  max-width: 46rem;
}
.note h3 {
  font-size: 1.1rem;
}
.note p {
  color: var(--color-text-muted);
  font-size: 1rem;
}

/* Quick peek */
.summary-grid {
  display: grid;
  gap: 1.25rem;
}
.summary-block {
  padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.summary-block h2 {
  font-size: var(--fs-h3);
}
.summary-block p {
  color: var(--color-text-muted);
}
.impact-grid {
  display: grid;
  gap: 1.25rem;
}
.impact-item {
  padding: 1.5rem;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.impact-item h3 {
  font-size: 1.2rem;
}
.impact-item p {
  color: var(--color-text-muted);
  font-size: 1rem;
}
@media (min-width: 860px) {
  .impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.centerpiece {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 960px) {
  .centerpiece {
    grid-template-columns: 1fr 1.4fr;
    gap: 3.5rem;
    align-items: center;
  }
}

/* CTA band */
.cta-band {
  padding: clamp(1.75rem, 1.25rem + 2.5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.cta-band h2 {
  font-size: var(--fs-h2);
}
.cta-band p {
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  width: min(96vw, 1500px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: #0a0f1a;
  color: #e7eaf0;
  overflow: hidden;
}
.lightbox::backdrop {
  background: rgba(5, 8, 14, 0.82);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.lightbox__img {
  width: 100%;
  max-height: calc(94vh - 4.5rem);
  object-fit: contain;
  background: #0a0f1a;
}
.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid #263252;
  font-size: 0.92rem;
}
.lightbox__btns {
  display: flex;
  gap: 0.4rem;
}
.lightbox button {
  min-width: 40px;
  height: 40px;
  padding: 0 0.7rem;
  border-radius: 8px;
  border: 1px solid #3a4a75;
  background: transparent;
  color: #e7eaf0;
}
.lightbox button:hover {
  background: #172038;
}

/* ==========================================================================
   Scroll reveal (only when JS is active)
   ========================================================================== */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* 404 */
.not-found {
  min-height: calc(100vh - var(--header-h) - 120px);
  display: grid;
  align-content: center;
  gap: 1.25rem;
  padding-block: 4rem;
}
.not-found h1 {
  font-size: var(--fs-hero);
}

/* ==========================================================================
   Journey strip (case study deep dive)
   ========================================================================== */
.loop {
  counter-reset: step;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}
.loop li {
  counter-increment: step;
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
}
.loop li:last-child {
  border-bottom: 0;
}
.loop__stage {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.loop__stage::before {
  content: counter(step);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-accent);
}
.loop p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
}
.loop__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin-top: 0.25rem;
}
.loop__links a {
  color: var(--color-accent);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}
.loop__links a:hover {
  text-decoration: underline;
}
@media (min-width: 960px) {
  .loop {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }
  .loop li {
    border-bottom: 0;
    border-right: 1px solid var(--color-border);
  }
  .loop li:last-child {
    border-right: 0;
  }
}

.cs-hero__sub {
  margin-top: 0.9rem;
  max-width: 42rem;
  font-size: 1.05rem;
  color: var(--color-text);
}
.section-head--sub {
  margin-bottom: 1.5rem;
}
.h3-lg {
  font-size: var(--fs-h3);
}
.impact-grid--2 {
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .impact-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.impact-grid--4 {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .impact-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .impact-grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* Case study: section index + design process band */
.cs-index {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}
.cs-index a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-surface);
}
.cs-index a:hover,
.cs-index a:focus-visible {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.cs-index span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-accent);
}
.process-band {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  border-left: 4px solid var(--color-accent);
}
.process-band h2 {
  font-size: var(--fs-h2);
  margin: 0.5rem 0 0.75rem;
}
.process-band p {
  color: var(--color-text-muted);
  max-width: 44rem;
}
.process-band__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}
.process-band__list li {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.process-band__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
@media (min-width: 900px) {
  .process-band {
    grid-template-columns: 1.6fr auto;
    align-items: center;
  }
  .process-band__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Home: confidentiality note */

/* Home: designing with AI */
.ai-era {
  display: grid;
  gap: 1.5rem;
}
.ai-era__table {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.ai-era .tbl a {
  color: var(--color-accent);
  font-weight: 700;
}
.ai-era__list {
  padding: clamp(1.4rem, 1rem + 1.2vw, 2rem);
}
.ai-era__list ul {
  display: grid;
  gap: 1.25rem;
}
.ai-era__list strong {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-text);
}
.ai-era__list li {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}
.ai-era .meta-label {
  margin: 0;
}
@media (max-width: 699px) {
  .ai-era .tbl {
    background: transparent;
    border: 0;
    overflow: visible;
  }
  .ai-era .tbl table,
  .ai-era .tbl tbody,
  .ai-era .tbl tr,
  .ai-era .tbl td {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .ai-era .tbl thead {
    display: none;
  }
  .ai-era .tbl tr {
    margin-bottom: var(--gutter, 1.5rem);
    padding: 1rem 1.15rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
  }
  .ai-era .tbl td {
    padding: 0.15rem 0;
    border: 0;
  }
  .ai-era .tbl tbody tr:hover td {
    background: transparent;
  }
  .tbl--compare th[scope="row"] {
    display: block;
    padding: 0 0 0.4rem;
    border: 0;
    background: transparent;
  }
  .tbl--compare td[data-label] {
    padding: 0.35rem 0;
  }
  .tbl--compare td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
  }
}
/* Workflow vs agentic comparison: row labels read as labels, the two columns share the width */
.tbl--compare tbody th[scope="row"] {
  font-weight: 700;
  color: var(--color-text);
  text-align: left;
  white-space: nowrap;
}
@media (min-width: 700px) {
  .tbl--compare thead th:nth-child(n + 2) {
    width: 40%;
  }
}
@media (min-width: 1000px) {
  .ai-era {
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: start;
  }
}
/* Outcomes, business impact & learnings */
.oil {
  display: grid;
  gap: 1rem;
}
.oil__col {
  padding: 1.5rem;
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.oil__col h3 {
  font-size: 1.35rem;
}
.oil__col .oil__sub {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: -0.4rem;
}
.oil__col ul {
  display: grid;
  gap: 0.75rem;
}
.oil__col li {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  padding-left: 1.1rem;
  position: relative;
}
.oil__col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.oil__col li strong {
  color: var(--color-text);
}
@media (min-width: 960px) {
  .oil {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Agentic AI section (case study 02) */
.mm {
  display: grid;
  gap: 1rem;
  counter-reset: mm;
}
.mm__step {
  counter-increment: mm;
  padding: 1.5rem;
  display: grid;
  gap: 0.55rem;
  align-content: start;
  position: relative;
}
.mm__step h3 {
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}
.mm__step h3::before {
  content: counter(mm);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-accent);
}
.mm__step p {
  color: var(--color-text-muted);
  font-size: 1rem;
}
.mm__step .mm__when {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text);
}
@media (min-width: 860px) {
  .mm {
    grid-template-columns: repeat(3, 1fr);
  }
  .mm--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .mm--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}
.signals {
  display: grid;
  gap: 0.75rem;
}
.signals li {
  padding: 1rem 1.15rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 0.98rem;
  color: var(--color-text-muted);
}
.signals strong {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}
@media (min-width: 760px) {
  .signals {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1100px) {
  .signals {
    grid-template-columns: repeat(4, 1fr);
  }
}
.tbl td:first-child {
  font-family: inherit;
  color: var(--color-text);
  width: auto;
  font-weight: 700;
}
.tbl td {
  color: var(--color-text-muted);
}
.tbl td:first-child,
.tbl td strong {
  color: var(--color-text);
}
.tbl-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  max-width: 46rem;
}
.shots-grid {
  display: grid;
  gap: 1.75rem 1.25rem;
}
.shots-grid figure {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.shots-grid figcaption {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.shots-grid figcaption strong {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.shots-grid figcaption .screen__num {
  margin-right: 0.4rem;
}
@media (min-width: 700px) {
  .shots-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.scen-grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.scen {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.scen:hover,
.scen:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.scen strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
}
.scen span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
@media (min-width: 700px) {
  .scen-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.model {
  display: grid;
  gap: 1.5rem;
}
.model__hero {
  padding: 1.5rem 1.75rem;
  display: grid;
  gap: 0.3rem;
  align-content: start;
}
.model__big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 2rem + 3vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.model__hero p {
  color: var(--color-text-muted);
  font-size: 1rem;
}
@media (min-width: 960px) {
  .model {
    grid-template-columns: 1fr 1.2fr;
    gap: 2.5rem;
    align-items: start;
  }
}

/* ==========================================================================
   Layout system: 12 columns, equal groups
   Containers in a row always share the width equally (1, 2, 3, 4 or 6 up),
   with one gutter, and collapse to a single column on phones.
   ========================================================================== */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter, 1.5rem);
}
.stats,
.impact__body,
.meta-strip,
.summary-grid,
.impact-grid,
.oil,
.mm,
.signals,
.shots-grid,
.scen-grid,
.model,
.centerpiece,
.about-grid,
.ai-era__cards,
.project-list,
.form__row,
.cs-index {
  gap: var(--gutter, 1.5rem);
}
.stats {
  gap: 1px; /* hairline dividers */
}
.section-head {
  max-width: 48rem;
}
.note,
.resume-grid--one .resume-card,
.process-band p,
.cs-row__main p {
  max-width: none;
}
@media (min-width: 760px) {
  .summary-grid,
  .about-grid,
  .model,
  .form__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ai-era__cards,
  .project-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .role {
    grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
    column-gap: var(--gutter, 1.5rem);
  }
}
@media (min-width: 960px) {
  .centerpiece {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--gutter, 1.5rem);
  }
}
@media (min-width: 1000px) {
  .screen {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: calc(var(--gutter, 1.5rem) * 2);
  }
  .screen:nth-child(even) {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}
@media (min-width: 1100px) {
  .shots-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
/* Problem lists: one clean column instead of uneven rows */
.constraints ul {
  grid-template-columns: 1fr !important;
  gap: var(--gutter, 1.5rem);
}
/* About: facts beside the copy, equal halves */
.about-copy {
  max-width: none;
}
.facts {
  align-self: stretch;
}
/* Skills: equal thirds on desktop */
.skills-list {
  display: grid;
  gap: 0 var(--gutter, 1.5rem);
  border-top: 0;
}
.skills-list > div {
  align-content: start;
  grid-template-columns: 1fr !important;
  gap: 0.5rem;
  padding: 1.25rem var(--gutter, 1.5rem) 1.5rem 0; /* right padding keeps each column's text clear of the next */
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
}
@media (min-width: 760px) {
  .skills-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .skills-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Resume: one full-width card; the download button sits left, below the text */
.resume-grid--one .resume-card {
  justify-items: start;
}
/* Designing with AI */
.ai-era {
  display: grid;
  gap: 1rem;
}
.ai-era .meta-label + .table-wrap,
.ai-era .meta-label + .ai-era__cards {
  margin-bottom: 1.5rem;
}
.ai-era__cards {
  display: grid;
  list-style: none;
  padding: 0;
}
@media (min-width: 1000px) {
  .ai-era {
    grid-template-columns: 1fr;
  }
}
.ai-era__cards li {
  padding: 1.25rem 1.35rem;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}
.ai-era__cards strong {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.on-request svg {
  width: 20px;
  height: 20px;
  margin-top: 0.2rem;
  color: var(--color-accent);
  flex: none;
}
.on-request span {
  color: var(--color-text);
  font-weight: 500;
}
.on-request--lead { /* read before the cards and rows it is about */
  margin: 0 0 1.75rem;
}
.nav a:not(.btn),
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav__lock {
  width: 14px;
  height: 14px;
  flex: none;
}
.page-lock {
  width: 14px;
  height: 14px;
}
.section--tight {
  padding-top: clamp(2.5rem, 2rem + 3vw, 4.5rem);
}
.section--tight h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.03em;
}

/* ==========================================================================
   Forms, dialog, confidential projects
   ========================================================================== */
.form {
  display: grid;
  gap: 1.1rem;
}
.form__row {
  display: grid;
}
.field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}
.field label {
  font-weight: 700;
  font-size: 0.95rem;
}
.field .req {
  color: var(--color-error);
}
.field .opt {
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.field input,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.85rem;
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea {
  resize: vertical;
  min-height: 7.5rem;
}
.field input:hover,
.field textarea:hover {
  border-color: var(--color-text-muted);
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}
.field [aria-invalid="true"] {
  border-color: var(--color-error);
  box-shadow: 0 0 0 1px var(--color-error);
}
.field__hint {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.field__error {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-error);
}
.field__error::before {
  content: "! ";
  font-weight: 700;
}
.input-code {
  max-width: 12rem;
  font-family: var(--font-mono) !important;
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.captcha {
  min-height: 65px;
}
.captcha[hidden] {
  display: none;
}
.form__status:empty {
  display: none;
}
.form__status {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}
.form__status.is-error {
  background: var(--color-error-soft);
  color: var(--color-error);
}
.form__status.is-info {
  background: var(--color-accent-soft);
  color: var(--color-text);
}
.form__status a {
  color: inherit;
  font-weight: 700;
}
.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}
.form__hint {
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn-link {
  min-height: 44px;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  color: var(--color-accent);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-done {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0;
}
.form-done h3 {
  font-size: var(--fs-h3);
}
.form-done p {
  color: var(--color-text-muted);
}
.form-done__icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  color: var(--color-accent);
}
.form-done__icon svg {
  width: 100%;
  height: 100%;
}
.modal {
  width: min(38rem, 100% - 2rem);
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
}
.modal::backdrop {
  background: rgba(10, 15, 26, 0.55);
}
.modal__panel {
  display: grid;
  gap: 1rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45);
}
.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.modal__head h2 {
  font-size: var(--fs-h3);
}
.modal__panel--done .modal__head {
  justify-content: flex-end;
}
.modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
}
.modal__close:hover {
  background: var(--color-surface);
}
.modal__close svg {
  width: 18px;
  height: 18px;
}
.modal__lede {
  margin-top: -0.5rem;
  color: var(--color-text-muted);
}
/* PDF preview: large dialog with the browser's own PDF viewer inside */
html:has(.modal[open]) {
  overflow: hidden;
}
.modal--pdf {
  width: min(76rem, 100% - 2rem);
  height: calc(100dvh - 2rem);
}
.modal--pdf .modal__panel {
  height: 100%;
  grid-template-columns: minmax(0, 1fr); /* a long title never widens the viewer */
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.75rem;
  overflow: hidden;
  padding: 0.75rem 0.75rem 0.75rem 1.25rem;
}
.pdf-viewer .modal__head h2 {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pdf-viewer__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
}
.pdf-viewer__count {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pdf-viewer__deck { /* case study slides, view only */
  display: grid;
  gap: 0.9rem;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-2);
}
.pdf-viewer__deck:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.pdf-viewer__deck img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 15, 26, 0.14);
}
.pdf-viewer__note {
  margin: 0;
  padding: 0.25rem 0 0.5rem;
  text-align: center;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
}
@media (max-width: 599px) {
  .modal--pdf {
    width: calc(100% - 1rem);
    height: calc(100dvh - 1rem);
  }
  .pdf-viewer--deck .modal__head h2 {
    font-size: 1rem;
    white-space: normal;
    line-height: 1.25;
  }
  .pdf-viewer__count {
    font-size: 0.8rem;
  }
  .pdf-viewer__deck {
    padding: 0.5rem;
    gap: 0.6rem;
  }
}
.pdf-viewer__frame {
  width: 100%;
  height: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.contact-page {
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.access__card {
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}
.access__card h2 {
  font-size: var(--fs-h3);
}
.access__card > p {
  color: var(--color-text-muted);
  max-width: 48rem;
}
.access__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.access__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.access__bar h2 {
  flex: 1 1 auto;
}
.access__timer {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.project-list {
  display: grid;
  list-style: none;
  padding: 0;
}
.project {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding: 1.25rem;
  background: var(--color-bg);
}
.project h3 {
  font-size: 1.15rem;
}
.project p:not(.meta-label) {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   Print (used to generate the downloadable PDFs)
   ========================================================================== */
.print-only {
  display: none;
}
@media print {

  .oil {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }
  .oil__col {
    padding: 0.6rem 0.8rem;
    gap: 0.35rem;
    break-inside: avoid;
  }
  .oil__col h3 {
    font-size: 1.05rem;
  }
  .oil__col li {
    font-size: 0.8rem;
  }
  .oil__col ul {
    gap: 0.35rem;
  }
  .mm {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    break-inside: avoid;
  }
  .mm--4 {
    grid-template-columns: repeat(4, 1fr);
  }
  .mm__step {
    padding: 0.7rem 0.85rem;
  }
  .mm__step h3 {
    font-size: 1.1rem;
  }
  .signals {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }
  .signals li {
    padding: 0.55rem 0.7rem;
    font-size: 0.8rem;
    break-inside: avoid;
  }
  .shots-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
  }
  .impact-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .shots-grid figure {
    break-inside: avoid;
  }
  .shots-grid figcaption {
    font-size: 0.66rem;
    line-height: 1.3;
  }
  .shots-grid figcaption strong {
    font-size: 0.8rem;
  }
  .table-wrap table {
    min-width: 0;
    font-size: 0.8rem;
  }
  .table-wrap th,
  .table-wrap td {
    padding: 0.4rem 0.6rem;
  }
  .model {
    grid-template-columns: 1fr 1.2fr;
    gap: 1rem;
    break-inside: avoid;
  }
  .model__hero {
    padding: 0.8rem 1rem;
  }
  .model__big {
    font-size: 2.2rem;
  }
  @page {
    size: A4;
    margin: 12mm 13mm 13mm;
  }
  :root {
    color-scheme: light;
    --color-bg: #ffffff;
    --color-surface: #ffffff;
    --color-surface-2: #f1f1f1;
    --color-border: #d4d4d4;
    --color-border-strong: #b4b4b4;
    --color-text: #15181e;
    --color-text-muted: #444b5a;
    --color-accent: #0a6b75;
    --color-accent-soft: rgba(10, 107, 117, 0.1);
    --fs-body: 0.95rem;
    --fs-lede: 1.05rem;
    --fs-h1: 2.2rem;
    --fs-h2: 1.5rem;
    --fs-h3: 1.15rem;
    --shadow-image: none;
  }
  html {
    font-size: 13.5px;
  }
  body {
    background: #fff;
  }
  .site-header,
  .site-footer,
  .skip-link,
  .back-link,
  .cs-hero__cta,
  .no-print,
  .shot__hint,
  .lightbox {
    display: none !important;
  }
  .print-only {
    display: block;
  }
  .print-head {
    padding-bottom: 0.6rem;
    margin-bottom: 0.4rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.8rem;
    color: var(--color-text-muted);
  }
  .print-note {
    margin-top: 0.5rem;
    color: var(--color-text-muted);
  }
  .js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .section {
    padding-block: 1.6rem;
  }
  .section + .section {
    border-top: 0;
  }
  .cs-hero {
    padding-block: 1rem 1.2rem;
  }
  .cs-hero h1 {
    margin-top: 0.75rem;
  }
  .section-head {
    margin-bottom: 1.1rem;
  }
  .screens {
    gap: 1.6rem;
  }
  .screen {
    grid-template-columns: 1fr 1.25fr !important;
    gap: 1rem;
    align-items: center;
    break-inside: avoid;
  }
  .screen:nth-child(even) .screen__text {
    order: 0;
  }
  .screen p {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
  }
  .screen h3 {
    font-size: 1.2rem;
    margin: 0.2rem 0 0.4rem;
  }
  .shot {
    border-radius: 6px;
  }
  .loop {
    display: block;
    break-inside: avoid;
  }
  .loop li {
    display: grid;
    grid-template-columns: 6.5rem 1fr 11rem;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0.9rem;
    border-right: 0 !important;
    border-bottom: 1px solid var(--color-border) !important;
    break-inside: avoid;
  }
  .loop li:last-child {
    border-bottom: 0 !important;
  }
  .loop__stage {
    font-size: 1.05rem;
  }
  .loop p {
    font-size: 0.85rem;
  }
  .loop__links {
    margin-top: 0;
    gap: 0.1rem 0.6rem;
  }
  .loop__links a {
    font-size: 0.78rem;
  }

  /* Compact everything else so the PDFs stay short */
  h2,
  h3,
  h4,
  .eyebrow,
  .section-head {
    break-after: avoid;
  }
  .container {
    width: 100%;
  }
  .section {
    padding-block: 0.75rem;
  }
  .section-head {
    margin-bottom: 0.7rem;
    gap: 0.4rem;
    break-inside: avoid;
    break-after: avoid;
  }
  .cs-hero {
    padding-block: 0.4rem 0.4rem;
  }
  .meta-strip {
    margin-top: 0.9rem;
    padding-top: 0.8rem;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem 1rem;
    font-size: 0.85rem;
  }
  .principle,
  .impact-item,
  .summary-block,
  .constraints li,
  .note {
    padding: 0.65rem 0.9rem !important;
    gap: 0.25rem;
  }
  .principle p {
    padding-left: 0;
  }
  .note {
    margin-top: 0.5rem !important;
  }
  .principles,
  .impact-grid,
  .summary-grid,
  .constraints ul {
    gap: 0.5rem;
  }
  .principles {
    grid-template-columns: 1fr 1fr;
  }
  .impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .prose {
    font-size: 0.98rem;
    gap: 0.75rem;
  }
  .pull {
    padding: 0.8rem 1rem;
  }
  .shot {
    max-width: 120mm;
  }
  .screen {
    gap: 0.5rem;
  }
  .screen h3 {
    margin: 0.2rem 0 0.4rem;
  }
  .screen p {
    margin-bottom: 0.5rem;
  }
  /* Quick peek: text only, so it stays on one page */
  .centerpiece {
    grid-template-columns: 1fr;
  }
  .centerpiece .shot {
    display: none;
  }
  .cs-hero__lede {
    margin-top: 0.7rem;
  }
  .principle,
  .impact-item,
  .summary-block,
  .constraints li,
  .note,
  .role {
    break-inside: avoid;
  }
  a {
    color: inherit;
  }
  .prose a,
  .source-list a {
    color: var(--color-accent);
  }
}

/* Case study "at a glance": the seven questions every case study answers (4/8 of the 12 columns) */
.qa {
  border-top: 1px solid var(--color-border);
}
.qa > div {
  display: grid;
  gap: 0.35rem var(--gutter, 1.5rem);
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.qa dt {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}
.qa dd {
  color: var(--color-text-muted);
}
@media (min-width: 760px) {
  .qa > div {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  }
}

/* ==========================================================================
   "How I developed this site with AI": the build record (built-with-ai.html)
   ========================================================================== */
.site-footer__legal {
  display: grid;
  gap: 0.3rem;
}
.made-with { /* small links under the copyright line */
  margin: 0;
  font-size: 0.75rem;
}
.site-footer .made-with a { /* small text, but a 44px-tall click area; the negative margin keeps the line where it was */
  padding-block: 0.8rem;
  margin-block: -0.8rem;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
}
.record-hero h1 {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  margin-top: 1rem;
  max-width: 16ch;
}
.record-lede {
  margin-top: 1.25rem;
  font-size: var(--fs-lede);
  color: var(--color-text-muted);
}
.record-thesis {
  margin-top: 1.5rem;
  padding: 1.1rem 1.25rem;
  border-left: 4px solid var(--brand-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-surface);
}
.record-thesis strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.record-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.75rem;
}
.record-toc a {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  color: var(--color-text);
  font-size: 0.88rem;
  text-decoration: none;
}
.record-toc a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- The team: infographic on How I developed this site ----------
   Rules as handed off with the graphic; only the font stack uses the site fonts. */
.infographic {
  --bg: #ffffff;
  --ink: #171a21;
  --muted: #5d6675;
  --line: #e2e6ec;
  --line-strong: #c3cad4;
  --accent: #E8501A;
  --accent-soft: #fdeee6;
  --chip: #f3f5f8;
  --arrow: #9aa3b2;
  margin: 0;
  overflow-x: auto; /* phones scroll the graphic sideways instead of shrinking its text */
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(20px, 4vw, 40px);
  font-family: var(--font-body);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  .infographic { --bg:#101318; --ink:#eef1f6; --muted:#9aa3b2; --line:#262d38;
    --line-strong:#39424f; --accent:#ff6a2b; --accent-soft:#2a1a12; --chip:#1a2029; --arrow:#5d6675; }
}
html[data-theme="dark"] .infographic { --bg:#101318; --ink:#eef1f6; --muted:#9aa3b2; --line:#262d38;
  --line-strong:#39424f; --accent:#ff6a2b; --accent-soft:#2a1a12; --chip:#1a2029; --arrow:#5d6675; }
html[data-theme="light"] .infographic { --bg:#ffffff; --ink:#171a21; --muted:#5d6675; --line:#e2e6ec;
  --line-strong:#c3cad4; --accent:#E8501A; --accent-soft:#fdeee6; --chip:#f3f5f8; --arrow:#9aa3b2; }
.infographic svg { display: block; width: 100%; height: auto; }
.infographic .eyebrow { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; fill: var(--muted); font-weight: 700; }
.infographic .title { font-size: 29px; font-weight: 700; fill: var(--ink); }
.infographic .sub { font-size: 16.5px; fill: var(--muted); }
.infographic .node { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1.2; }
.infographic .node--human { stroke: var(--accent); stroke-width: 1.6; }
.infographic .node--agent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.4; }
.infographic .kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); font-weight: 700; }
.infographic .node-name { font-size: 19px; font-weight: 700; fill: var(--ink); }
.infographic .node-desc { font-size: 15px; fill: var(--muted); }
.infographic .mini-name { font-size: 16.5px; font-weight: 700; fill: var(--ink); }
.infographic .mini-desc { font-size: 14px; fill: var(--muted); }
.infographic .flow { stroke: var(--arrow); stroke-width: 1.6; fill: none; }
.infographic .flow--return { stroke-dasharray: 7 5; }
.infographic .marker-arrow { fill: var(--arrow); }
.infographic .section-label { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; fill: var(--muted); font-weight: 700; }
.infographic .pill { fill: var(--chip); stroke: var(--line-strong); stroke-width: 1.1; }
.infographic .pill-text { font-size: 15px; font-weight: 600; fill: var(--ink); }
.infographic .chip { fill: var(--chip); stroke: var(--line); stroke-width: 1; }
.infographic .chip-text { font-size: 14.5px; fill: var(--muted); font-weight: 600; }
.infographic .closing { font-size: 18.5px; fill: var(--ink); font-style: italic; }
.infographic .closing .closing-strong { font-style: normal; font-weight: 700; } /* a tspan: an HTML <strong> inside inline SVG breaks out of the graphic */
.infographic .return-label { font-size: 14px; fill: var(--muted); font-weight: 600; }
.infographic .stack-note { font-size: 15px; fill: var(--muted); }
.infographic .divider { stroke: var(--line); stroke-width: 1; }
.infographic .title,
.infographic .node-name,
.infographic .mini-name {
  font-family: var(--font-display);
}
.team-more {
  margin-top: 1.5rem;
}
/* How I developed this site: the hero, the team, the record toggle and the closing card sit closer together */
.record-hero {
  padding-bottom: 0;
}
.record-team { /* the infographic sits right under the one-line intro */
  margin-top: clamp(2rem, 1.5rem + 2vw, 3rem);
}
.record-close {
  padding-top: calc(var(--space-section) * 0.8);
}
.record-toc-wrap { /* the build record's contents, shown once it is open */
  padding-top: 0.5rem;
}
.record-intro {
  margin-top: 1rem;
  color: var(--color-text-muted);
}
.record-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  cursor: pointer;
}
.record-toggle:hover {
  color: var(--color-text);
}
.record-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s var(--ease);
}
.record-toggle[aria-expanded="true"] svg { /* up while the record is closed, down once it is open */
  transform: rotate(180deg);
}
@media (max-width: 767px) {
  .infographic svg {
    width: 820px;
    max-width: none;
  }
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}
.chip--verified {
  background: var(--color-accent-soft);
  color: #075985; /* sky 800: 5.5:1 on its tint over the gray page */
}
:root[data-theme="dark"] .chip--verified {
  color: var(--color-accent);
}
.chip--estimate {
  background: rgba(232, 80, 26, 0.12);
  color: #a8380a;
}
:root[data-theme="dark"] .chip--estimate {
  color: #ffb28f;
}
.record-stats {
  display: grid;
  gap: var(--gutter, 1.5rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
}
.record-stat {
  padding: 1.1rem 1.2rem 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}
.record-stat__n {
  margin-top: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.record-stat__l {
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--color-text-muted);
}
.record-sub {
  margin: 2.5rem 0 1rem;
}
.record-roles,
.record-turns,
.record-method__grid {
  display: grid;
  gap: var(--gutter, 1.5rem);
}
@media (min-width: 900px) {
  .record-roles,
  .record-method__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .record-turns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.record-role,
.record-turn {
  padding: clamp(1.25rem, 1rem + 1vw, 1.75rem);
}
.record-role h3,
.record-turn h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--fs-h3);
  margin-bottom: 1rem;
}
.record-role__dot {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
}
.record-role__dot--human {
  background: var(--brand-orange);
}
.record-role__dot--ai {
  background: var(--color-accent);
}
.record-role ul,
.record-turn ul,
.record-method ul {
  display: grid;
  gap: 0.7rem;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}
.record-role li strong,
.record-method li strong {
  color: var(--color-text);
}
.commits {
  display: grid;
  gap: var(--gutter, 1.5rem);
  list-style: none;
  padding: 0;
  margin: 0;
}
/* Each record is an accordion, built like the homepage ones (.impact): date and title closed, the rest open */
.commit__acc summary {
  grid-template-columns: minmax(0, 1fr) auto;
}
.commit__head {
  display: grid;
  gap: 0.35rem;
}
.commit__acc h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}
.commit__body {
  margin-inline: 1.25rem;
  padding: 1.4rem 0 1.5rem;
  border-top: 1px solid var(--color-border);
}
.commit__body > .commit__prompt:first-child {
  margin-top: 0;
}
/* Inside the build record the sections sit closer together (40% less than elsewhere) */
#build-record .section {
  padding-bottom: calc(var(--space-section) * 0.6);
}
#build-record .section--tight {
  padding-top: calc(clamp(2.5rem, 2rem + 3vw, 4.5rem) * 0.6);
}
#build-record .section--tight[id] {
  scroll-margin-top: calc(32px - clamp(2.5rem, 2rem + 3vw, 4.5rem) * 0.6);
}
.commit__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.commit__id {
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  background: var(--color-surface-2);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--color-text);
}
.commit__prompt {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--brand-orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--color-bg);
  font-size: 0.98rem;
}
.commit__prompt p {
  margin: 0;
}
.commit__prompt p + ul,
.commit__prompt ul + p {
  margin-top: 0.5rem;
}
.commit__prompt ul {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding-left: 1.2rem;
  list-style: disc;
  color: var(--color-text-muted);
}
.commit__prompt li::marker,
.ds-rules li::marker {
  color: var(--brand-orange);
}
.ds-rules {
  list-style: disc;
}
.commit__steps {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}
.commit__steps > div {
  display: grid;
  gap: 0.2rem 1.25rem;
}
@media (min-width: 720px) {
  .commit__steps > div {
    grid-template-columns: 10.5rem minmax(0, 1fr);
  }
}
.commit__steps dt {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding-top: 0.2rem;
}
.commit__steps dd {
  margin: 0;
  color: var(--color-text-muted);
}
.record-method .meta-label {
  margin: 0 0 0.75rem;
}
.record-method__grid > div > .meta-label ~ .meta-label {
  margin-top: 1.75rem;
}
.record-closing { /* left-aligned like the contact card */
  padding: clamp(1.75rem, 1.25rem + 2vw, 3rem);
}
.record-closing h2 {
  font-size: var(--fs-h2);
  max-width: 24ch;
}
.record-closing p {
  max-width: 44rem;
  margin: 1rem 0 0;
  color: var(--color-text-muted);
}
.record-closing__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.75rem;
}

/* ==========================================================================
   Design system page (design-system.html)
   ========================================================================== */
.ds-title {
  font-size: var(--fs-hero);
  letter-spacing: -0.03em;
  margin-top: 1rem;
}
.ds code {
  font-family: var(--font-mono);
  font-size: 0.85em;
}
.ds-ratio {
  display: grid;
  grid-template-columns: 60fr 30fr 10fr;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-border);
  font-size: 0.85rem;
  font-weight: 700;
}
.ds-ratio > span {
  display: flex;
  align-items: flex-end;
  padding: 0.6rem 0.8rem;
}
.ds-ratio__p { background: var(--color-bg); color: var(--color-text); }
.ds-ratio__s { background: #7dd3fc; color: #0c4a6e; }
.ds-ratio__a { background: var(--brand-orange); color: #15181e; justify-content: center; }
.ds-roles,
.ds-comps {
  display: grid;
  gap: var(--gutter, 1.5rem);
  margin-top: var(--gutter, 1.5rem);
}
@media (min-width: 900px) {
  .ds-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ds-comps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ds-role,
.ds-comp {
  padding: 1.25rem 1.3rem 1.4rem;
}
.ds-role h3 {
  margin: 0.35rem 0 0.5rem;
  font-size: var(--fs-h3);
}
.ds-role > p:not(.meta-label) {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
.ds-swatches {
  display: grid;
  gap: 0.7rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}
.ds-swatches li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.75rem;
  align-items: center;
}
.ds-sw {
  grid-row: span 2;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.ds-swatches b { font-size: 0.95rem; }
.ds-swatches code { justify-self: end; color: var(--color-text-muted); }
.ds-swatches li > span:last-child {
  grid-column: 2 / -1;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.ds-scale {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--color-border);
}
.ds-scale li {
  display: flex;
  align-items: flex-end;
  height: 72px;
  padding: 0.5rem;
  font-size: 1.2rem; /* large text, so every step's label passes contrast */
  font-weight: 700;
}
.ds-rules {
  display: grid;
  gap: 0.6rem;
  max-width: 50rem;
  padding-left: 1.1rem;
  color: var(--color-text-muted);
}
.ds-rules strong { color: var(--color-text); }
.ds-chip {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.5rem;
  vertical-align: -2px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px rgba(128, 128, 128, 0.4);
}
.ds-type {
  display: grid;
  gap: 1.1rem;
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
}
.ds-type > div {
  display: grid;
  gap: 0.25rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--color-border);
}
.ds-type > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ds-type__tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.ds-type__hero { font-family: var(--font-display); font-size: var(--fs-hero); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
.ds-type__h1 { font-family: var(--font-display); font-size: var(--fs-h1); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; }
.ds-type__h2 { font-family: var(--font-display); font-size: var(--fs-h2); font-weight: 700; line-height: 1.1; }
.ds-type__h3 { font-family: var(--font-display); font-size: var(--fs-h3); font-weight: 700; }
.ds-type__lede { font-size: var(--fs-lede); color: var(--color-text-muted); }
.ds-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter, 1.5rem);
  height: 72px;
}
.ds-grid span {
  border-radius: 6px;
  background: var(--color-accent-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-accent) 35%, transparent);
}
.ds-radii {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: var(--gutter, 1.5rem);
  margin-top: 2rem;
}
.ds-radii > div {
  display: grid;
  gap: 0.2rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.ds-radii b { color: var(--color-text); font-size: 0.95rem; }
.ds-radius {
  width: 64px;
  height: 64px;
  margin-bottom: 0.5rem;
  border: 2px solid var(--color-accent);
  background: var(--color-surface);
}
.ds-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
}
.ds-row--center { gap: 1.5rem; }
.ds-row .brand__dot { width: 24px; height: 24px; }
.ds-play {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-orange);
  color: #fff;
}
.ds-play svg { width: 18px; height: 18px; margin-left: 2px; }
.ds-note {
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.ds-comp .record-stat__n { margin-top: 0.5rem; }
.record-thesis.ds-flat { margin-top: 0.9rem; font-size: 0.95rem; }
.ds-comp .field { margin-top: 0.9rem; }
.ds-comp .on-request { margin-top: 0.9rem; }

/* PDF Download Dropdown */
.btn-dropdown {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  display: inline-block;
  position: relative;
}
.btn-dropdown summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  font-size: var(--fs-base);
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s;
}
.btn-dropdown summary:hover {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}
.btn-dropdown[open] summary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
}
.btn-dropdown a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.btn-dropdown a:hover {
  background: var(--color-surface);
}
.btn-dropdown svg {
  width: 18px;
  height: 18px;
}
