/* ==========================================================================
   Portfolio: global styles
   Edit the tokens in :root to re-theme the whole site.
   ========================================================================== */

:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --ink: #1c1917;
  --ink-2: #44403c;
  --muted: #78716c;
  --faint: #a8a29e;
  --line: #e7e5e4;
  --accent: #1f5f4a;
  --accent-soft: #e8efe9;

  /* Cover tints */
  --tint-sage: #e6eee8;
  --tint-sand: #f4eadf;
  --tint-mist: #e5eaf4;
  --tint-rose: #f3e7ea;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --container: 1160px;
  --reading: 720px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.nav.is-scrolled {
  border-bottom-color: var(--line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand__mark {
  color: var(--accent);
  font-size: 18px;
  transition: transform 0.6s var(--ease);
}

.brand:hover .brand__mark {
  transform: rotate(90deg);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 32px);
  font-size: 15px;
  color: var(--muted);
}

.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--ink);
}

.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--ink);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  padding-top: clamp(72px, 14vh, 150px);
  padding-bottom: clamp(64px, 11vh, 120px);
}

.hero__top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted);
}

.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a06b;
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #22a06b;
  opacity: 0.35;
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.45;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.display {
  max-width: 17em;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.3vw, 56px);
  line-height: 1.14;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.display em {
  font-style: italic;
  color: var(--accent);
}

.display .muted {
  color: var(--faint);
}

.hero__sub {
  margin-top: 20px;
  max-width: 30em;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 32px;
  font-size: 17px;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

/* --------------------------------------------------------------------------
   Buttons & links
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.link {
  color: var(--ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.35s var(--ease), color 0.2s;
}

.link:hover {
  color: var(--accent);
  background-size: 0 1px;
  background-position: 100% 100%;
}

.arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

a:hover > .arrow,
.btn:hover > .arrow {
  transform: translateX(4px);
}

a:hover > .arrow--up {
  transform: translate(3px, -3px);
}

/* --------------------------------------------------------------------------
   Section scaffolding
   -------------------------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 9vh, 96px);
  border-top: 1px solid var(--line);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(40px, 7vh, 72px);
}

.eyebrow {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section__note {
  font-size: 14px;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Selected work
   -------------------------------------------------------------------------- */

.work-list {
  display: grid;
  gap: clamp(72px, 12vh, 128px);
}

.work {
  display: block;
}

.work__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 48px;
  align-items: start;
  margin-bottom: 32px;
}

.work__title {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.work__meta {
  margin-top: 8px;
  font-size: 14px;
  color: var(--accent);
}

.work__summary {
  max-width: 34em;
  color: var(--ink-2);
}

.cover {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--tint-sage);
  aspect-ratio: 20 / 9;
  isolation: isolate;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.work:hover .cover img,
a.card:hover .cover img {
  transform: scale(1.025);
}

.cover__cta {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.work--soon {
  cursor: default;
}

.work--soon:hover .cover img {
  transform: none;
}

.work:hover .cover__cta,
.work:focus-visible .cover__cta {
  opacity: 1;
  transform: none;
}

.impact {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.impact div {
  display: flex;
  flex-direction: column-reverse;
  gap: 2px;
}

.impact dd {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.impact dt {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Archive cards
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(40px, 6vw, 64px) clamp(24px, 4vw, 48px);
}

.card .cover {
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.card__title {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.card__meta {
  margin-top: 4px;
  font-size: 14px;
  color: var(--accent);
}

.card__text {
  margin-top: 12px;
  font-size: 17px;
  max-width: 30em;
}

/* --------------------------------------------------------------------------
   Experience list (home + about)
   -------------------------------------------------------------------------- */

.xp {
  border-top: 1px solid var(--line);
}

.xp__row {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 8px 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
}

.xp__row--simple {
  grid-template-columns: 1fr 1fr;
}

.xp__row--vote {
  grid-template-columns: 1fr auto;
}

.xp__when {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.xp__role {
  color: var(--ink);
  font-weight: 500;
}

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

/* --------------------------------------------------------------------------
   Footer / contact
   -------------------------------------------------------------------------- */

.footer {
  margin-top: clamp(48px, 8vh, 96px);
  padding-block: clamp(64px, 10vh, 112px) 40px;
  border-top: 1px solid var(--line);
}

.footer__title {
  max-width: 16em;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.footer__title em {
  color: var(--accent);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 40px;
  font-size: 18px;
  color: var(--ink-2);
}

.footer__links a {
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--accent);
}

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(56px, 9vh, 96px);
  font-size: 14px;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: clamp(32px, 6vh, 64px);
  font-size: 15px;
  color: var(--muted);
  transition: color 0.2s;
}

.back:hover {
  color: var(--ink);
}

.back .arrow {
  transition: transform 0.3s var(--ease);
}

.back:hover .arrow {
  transform: translateX(-4px);
}

.cs-head {
  padding-top: clamp(32px, 5vh, 56px);
  padding-bottom: clamp(40px, 7vh, 72px);
}

.cs-head .work__head {
  margin-bottom: 40px;
}

.cs-head .work__title {
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.1;
}

.cs-head .work__summary {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 32px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.facts dt {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
}

.facts dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}

.prose {
  padding-bottom: clamp(32px, 6vh, 64px);
}

.prose > * {
  max-width: var(--reading);
  margin-inline: auto;
}

.prose > * + * {
  margin-top: 1.2em;
}

.prose h2 {
  margin-top: clamp(72px, 11vh, 120px);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin-top: 2.4em;
  color: var(--ink);
  font-size: 18px;
  font-weight: 600;
}

.prose .kicker {
  margin-top: clamp(72px, 11vh, 120px);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose .kicker + h2 {
  margin-top: 12px;
}

.prose ul.bullets {
  display: grid;
  gap: 10px;
}

.prose ul.bullets li {
  position: relative;
  padding-left: 26px;
}

.prose ul.bullets li::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 0.35em;
  font-size: 11px;
  color: var(--accent);
}

.prose blockquote {
  margin-block: clamp(40px, 6vh, 64px);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(22px, 2.3vw, 28px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.prose blockquote cite {
  display: block;
  margin-top: 16px;
  font-family: var(--sans);
  font-size: 14px;
  font-style: normal;
  color: var(--muted);
}

.prose .wide {
  max-width: 1000px;
}

.prose .full {
  max-width: none;
}

.prose figure {
  margin-block: clamp(40px, 7vh, 72px);
}

.prose figcaption {
  margin-top: 16px;
  font-size: 14px;
  text-align: center;
  color: var(--muted);
}

.prose figure img {
  width: 100%;
  border-radius: var(--radius-md);
}

.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* A wide screen beside a narrow crop (a menu, a phone): the crop keeps its own width */
.two-up--aside {
  grid-template-columns: 1fr 300px;
  align-items: start;
}

@media (max-width: 720px) {
  .two-up--aside {
    grid-template-columns: 1fr;
  }

  .two-up--aside .shot:last-child {
    max-width: 300px;
  }
}

.three-up {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

/* Before/after diagram */
.flow {
  display: grid;
  grid-template-columns: 1fr auto 1.25fr;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--tint-rose);
}

.flow__col {
  display: grid;
  gap: 12px;
}

.flow__label {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}

.flow__box,
.flow__target {
  padding: 18px 20px;
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.flow__box strong,
.flow__tier strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.flow__box span {
  display: block;
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.flow__arrow {
  font-family: var(--serif);
  font-size: 32px;
  color: var(--ink);
}

.flow__target {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.flow__tier {
  width: var(--w, 100%);
  min-width: max-content;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--tint-rose);
}

.flow__tier:nth-child(4),
.flow__tier:nth-child(5) {
  background: var(--ink);
}

.flow__tier:nth-child(4) strong,
.flow__tier:nth-child(5) strong {
  color: #fff;
}

.flow__tier:nth-child(5) {
  background: var(--accent);
}

.flow__base {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

@media (max-width: 720px) {
  .flow {
    grid-template-columns: 1fr;
  }

  .flow__arrow {
    justify-self: center;
    transform: rotate(90deg);
  }
}

/* Statement panel (problem / opportunity / objective) */
.statement {
  margin-block: clamp(32px, 5vh, 56px);
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}

.statement__label {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.statement__text {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 26px);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

/* Tier journey cards */
.tiers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-block: clamp(32px, 5vh, 56px);
}

.tier {
  display: flex;
  flex-direction: column;
  padding: 28px 24px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tier__name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.tier__sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.tier__quote {
  margin-top: 24px;
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
}

.tier__flow {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

.tier__list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  margin-bottom: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  line-height: 1.45;
}

.tier__kpi {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.tier__kpi span {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.tier--dark {
  border-color: var(--ink);
  background: var(--ink);
  color: #d6d3d1;
}

.tier--dark .tier__name,
.tier--dark .tier__quote {
  color: #fff;
}

.tier--dark .tier__sub {
  color: #a8a29e;
}

.tier--dark .tier__flow {
  color: #9fd3bf;
}

.tier--dark .tier__list {
  border-top-color: #44403c;
}

.tier--dark .tier__kpi {
  background: #292524;
  color: #fff;
}

.tier--dark .tier__kpi span {
  color: #a8a29e;
}

/* Decision moments */
.moments {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-block: clamp(32px, 5vh, 56px);
  padding: 0;
  border-top: 1px solid var(--line);
  counter-reset: none;
}

.moments li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 16px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.moments strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.moments__n {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
}

/* SWOT grid */
.swot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-block: clamp(32px, 5vh, 56px);
}

.swot__cell {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 30px;
  border-radius: var(--radius-md);
  background: var(--tint-sage);
}

.swot__cell--w {
  background: var(--tint-rose);
}

.swot__cell--o {
  background: var(--tint-mist);
}

.swot__cell--t {
  background: var(--tint-sand);
}

.swot__letter {
  position: absolute;
  top: 6px;
  right: 24px;
  font-family: var(--serif);
  font-size: 96px;
  font-weight: 500;
  line-height: 1;
  color: rgba(28, 25, 23, 0.08);
}

.swot__cell h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.swot__cell ul {
  position: relative;
  display: grid;
  gap: 8px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-2);
}

.swot__cell li {
  padding-left: 18px;
  background: radial-gradient(circle, currentColor 2px, transparent 2.5px) 0 0.6em / 6px 6px no-repeat;
}

/* Competitor landscape map */
.landscape {
  overflow-x: auto;
  padding: clamp(12px, 2vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.landscape svg {
  display: block;
  width: 100%;
  min-width: 760px;
  height: auto;
  font-family: var(--sans);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-2);
}

/* Comparison table */
.matrix {
  overflow-x: auto;
  margin-block: clamp(32px, 5vh, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.matrix table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.4;
}

.matrix th,
.matrix td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.matrix tbody tr:last-child th,
.matrix tbody tr:last-child td {
  border-bottom: 0;
}

.matrix thead th {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.matrix th[scope="row"] {
  color: var(--ink-2);
  font-weight: 400;
  text-align: left;
}

.matrix__group th {
  padding-top: 20px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.matrix .yes {
  color: var(--accent);
}

.matrix .no {
  color: #d6d3d1;
}

.matrix small {
  font-size: 12px;
  color: var(--muted);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.tile--nav ul {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-2);
}

/* Single-series bar chart with a benchmark line */
.bars {
  padding: clamp(20px, 3vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.bars__title {
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.bars__title span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.bars ul {
  display: grid;
  gap: 2px;
}

.bars__row {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr 48px;
  gap: 16px;
  align-items: center;
  padding: 8px;
  margin-inline: -8px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.35;
}

.bars__row:hover {
  background: var(--bg);
}

.bars__label {
  color: var(--ink-2);
}

.bars__track {
  position: relative;
  height: 14px;
  border-radius: 4px;
  background: #f5f4f2;
}

.bars__track::after {
  content: "";
  position: absolute;
  left: 70%;
  top: -6px;
  bottom: -6px;
  border-left: 2px dashed var(--ink);
  opacity: 0.55;
}

.bars__fill {
  display: block;
  width: var(--v);
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--accent);
}

.bars__value {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 720px) {
  .bars__row {
    grid-template-columns: 1fr 48px;
    gap: 6px 12px;
  }

  .bars__label {
    grid-column: 1 / -1;
  }
}

.moments--steps {
  grid-template-columns: repeat(8, 1fr);
}

.moments--steps li {
  padding-right: 12px;
  font-size: 13px;
}

.moments--steps strong {
  font-size: 14px;
}

@media (max-width: 900px) {
  .glance {
    grid-template-columns: 1fr;
  }

  .moments--steps {
    grid-template-columns: repeat(4, 1fr);
    row-gap: 8px;
  }
}

@media (max-width: 720px) {
  .moments--steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

.xp__row--stage {
  grid-template-columns: 48px 180px 1fr;
}

.xp__row--stage .xp__when {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--accent);
}

.xp__row--stage .xp__where {
  font-size: 16px;
}

.matrix--text th,
.matrix--text td {
  text-align: left;
  vertical-align: top;
}

.matrix--text td {
  color: var(--ink-2);
}

.matrix--text td:last-child {
  color: var(--ink);
  font-weight: 500;
}

.matrix--text table {
  min-width: 640px;
}

@media (max-width: 900px) {
  .xp__row--stage {
    grid-template-columns: 40px 1fr;
  }

  .xp__row--stage .xp__where {
    grid-column: 2;
  }
}

/* At a glance */
.glance {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-bottom: clamp(72px, 11vh, 120px);
  padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: #d6d3d1;
}

.glance__eyebrow {
  margin-bottom: 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd3bf;
}

.glance dl {
  display: grid;
  gap: 22px;
  margin: 0;
}

.glance dt {
  margin-bottom: 4px;
  color: #fff;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.glance dd {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.glance__nums {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  align-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #44403c;
}

.glance__nums li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 22px 24px;
  background: #292524;
  font-size: 14px;
  line-height: 1.4;
  color: #a8a29e;
}

.glance__nums strong {
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

@media (max-width: 900px) {
  .glance {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .glance__nums {
    grid-template-columns: 1fr;
  }

  .glance__nums li {
    padding: 18px 20px;
  }
}

/* Chapter navigation */
.chapters {
  position: sticky;
  top: 72px;
  z-index: 40;
  margin-bottom: clamp(40px, 6vh, 64px);
  border-block: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.chapters__inner {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding-block: 10px;
  scrollbar-width: none;
}

.chapters__inner::-webkit-scrollbar {
  display: none;
}

.chapters a {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.chapters a:hover {
  color: var(--ink);
}

.chapters a.is-active {
  background: var(--ink);
  color: #fff;
}

.prose .kicker[id] {
  scroll-margin-top: 150px;
}

/* Folded detail */
.fold {
  margin-block: clamp(24px, 4vh, 40px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.fold summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.fold summary::-webkit-details-marker {
  display: none;
}

.fold__plus {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
}

.fold__plus::before,
.fold__plus::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease);
}

.fold__plus::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.fold[open] .fold__plus::after {
  transform: translate(-50%, -50%) rotate(0deg);
}

.fold summary:hover .fold__plus {
  background: #d7e6dc;
}

.fold__body {
  padding: 4px 24px 28px;
}

.fold__body > * {
  max-width: var(--reading);
  margin-inline: auto;
}

.fold__body > * + * {
  margin-top: 1.2em;
}

.fold__body > .wide,
.fold__body > figure,
.fold__body > .tiles,
.fold__body > .xp {
  max-width: none;
}

.fold__body > .tiles,
.fold__body > .xp,
.fold__body > figure {
  margin-block: 8px 0;
}

.fold__body h3 {
  margin-top: 1.6em;
}

.fold__body h3:first-child {
  margin-top: 0.4em;
}

.matrix--decisions th[scope="row"] {
  width: 130px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.bars--plain .bars__track::after {
  display: none;
}

.bars--plain .bars__fill {
  background: #a8a29e;
}

.bars--plain .is-focus .bars__fill {
  background: var(--accent);
}

.bars--plain .is-focus .bars__label {
  color: var(--ink);
  font-weight: 600;
}

.bars--compact {
  padding: clamp(20px, 2.4vw, 28px);
}

.bars--compact .bars__row {
  grid-template-columns: minmax(0, 150px) 1fr 52px;
  gap: 12px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .bars--compact .bars__row {
    grid-template-columns: 1fr 52px;
    gap: 6px 12px;
  }
}

.xp__role small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* Screen gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 20px;
  align-items: start;
}

.gallery--3 {
  grid-template-columns: repeat(3, 1fr);
}

.gallery__label {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

.gallery__label strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 720px) {
  .gallery,
  .gallery--3 {
    grid-template-columns: 1fr;
  }
}

/* Level matrix: tools in rows, membership levels in columns */
.levels {
  overflow-x: auto;
  padding: clamp(16px, 2vw, 28px);
  border-radius: var(--radius-lg);
  background: var(--tint-mist);
}

.levels__grid {
  display: grid;
  grid-template-columns: 84px repeat(5, minmax(0, 1fr));
  gap: 14px 12px;
  align-items: center;
  min-width: 880px;
}

.levels__head {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.levels__tool {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.levels .shot {
  border-radius: 8px;
}

.gallery--4 {
  grid-template-columns: repeat(4, 1fr);
}

.gallery--5 {
  grid-template-columns: repeat(5, 1fr);
}

.gallery--5 .shot {
  border-radius: 14px;
}

@media (max-width: 900px) {
  .gallery--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery--5 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 720px) {
  .gallery--4,
  .gallery--5 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Story page: the point of each chapter */
.prose .sowhat {
  margin-top: clamp(32px, 5vh, 56px);
  padding: 22px 28px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: #fff;
  font-family: var(--serif);
  font-size: clamp(19px, 1.9vw, 24px);
  line-height: 1.4;
  letter-spacing: -0.015em;
}

.sowhat span {
  display: block;
  margin-bottom: 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9fd3bf;
}

.prose .finding {
  margin-top: clamp(56px, 8vh, 88px);
}

.finding span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.prose .finding__title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose .note {
  margin-bottom: clamp(40px, 6vh, 64px);
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  color: var(--muted);
}

/* Story page: found, decided, designed */
.prose .step {
  margin-top: clamp(48px, 7vh, 72px);
}

.step span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.step--decided span {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.step--designed span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.prose .step__title {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(23px, 2.3vw, 29px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.prose h2 + .step {
  margin-top: clamp(28px, 4vh, 40px);
}

.prose .bridge {
  margin-top: clamp(48px, 7vh, 72px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(19px, 1.9vw, 23px);
  line-height: 1.4;
}

.prose .bridge + .kicker {
  margin-top: clamp(40px, 6vh, 64px);
}

.questions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-block: clamp(28px, 4vh, 48px);
  padding: 0;
}

.questions a {
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  transition: border-color 0.2s, transform 0.3s var(--ease);
}

.questions a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.questions span {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}

@media (max-width: 900px) {
  .questions {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* One row of equal, cropped tiles */
.gallery--strip {
  grid-template-columns: repeat(7, 1fr);
  gap: 20px 12px;
}

.gallery--strip .shot {
  aspect-ratio: 1;
}

.gallery--strip .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}

.gallery--strip .gallery__label {
  margin-top: 10px;
  font-size: 13px;
}

@media (max-width: 900px) {
  .gallery--strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 720px) {
  .gallery--strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Coming soon tag */
.badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
  transform: translateY(-3px);
}

.note strong {
  color: var(--ink);
  font-weight: 600;
}

.card__title .badge {
  font-size: 11px;
  transform: translateY(-2px);
}

.split__lead {
  max-width: var(--reading);
}

.split__note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.tile--recipe ol {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  counter-reset: step;
  font-size: 15px;
  color: var(--ink-2);
}

.tile--recipe li {
  display: flex;
  gap: 10px;
  counter-increment: step;
}

.tile--recipe li::before {
  content: counter(step);
  flex: none;
  width: 20px;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--accent);
}

.workshop {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.workshop:first-of-type {
  margin-top: 24px;
}

.workshop .shot {
  margin-bottom: 20px;
}

.workshop .shot img {
  width: 100%;
  height: auto;
}

.workshop h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.workshop p {
  max-width: var(--reading);
  margin-top: 6px;
  font-size: 16px;
  color: var(--ink-2);
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  counter-reset: step;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  color: var(--ink-2);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 14px;
  color: var(--accent);
}

.tile--recipe .shot {
  margin: -4px -4px 18px;
  border-radius: 12px;
}

.tile--recipe .shot img {
  width: 100%;
  height: auto;
}

.panel {
  margin-top: 24px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.panel--3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}

.panel__col h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.panel__col p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.panel__col .shot {
  margin-bottom: 18px;
  border-radius: 12px;
}

.panel__col .shot img {
  width: 100%;
  height: auto;
}

@media (max-width: 720px) {
  .panel--3 {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* Writing prompt: delete once the section is written */
.draft {
  padding: 16px 20px;
  border: 1px dashed #d6d3d1;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.draft::before {
  content: "To write";
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Board screenshots and photos: click to open full size */
.shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: zoom-in;
  transition: border-color 0.2s, box-shadow 0.3s var(--ease);
}

.shot:hover {
  border-color: #d6d3d1;
  box-shadow: 0 18px 40px -24px rgba(28, 25, 23, 0.25);
}

.prose figure .shot img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.shot--tall,
.shot--mid {
  max-width: none;
}

/* Long images are capped; the full image opens in the viewer */
.shot {
  position: relative;
}

.shot.is-clipped {
  max-height: var(--shot-max, 420px);
}

.shot.is-clipped::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--surface) 85%);
  pointer-events: none;
}

.shot__more {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transform: translateX(-50%);
  transition: transform 0.3s var(--ease);
}

.shot .shot__more {
  opacity: 0;
  transform: translateX(-50%) translateY(6px);
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease);
}

.shot:hover .shot__more,
.shot:focus-visible .shot__more {
  opacity: 1;
  transform: translateX(-50%);
}

@media (hover: none) {
  .shot .shot__more {
    opacity: 1;
    transform: translateX(-50%);
  }
}

/* Image viewer */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  flex-direction: column;
  background: rgba(20, 18, 17, 0.92);
}

.lightbox.is-open {
  display: flex;
}

.lightbox__bar {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 3vw, 32px);
  color: #e7e5e4;
  font-size: 14px;
  line-height: 1.4;
}

.lightbox__actions {
  display: flex;
  flex: none;
  gap: 8px;
}

.lightbox__btn {
  padding: 9px 16px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox__btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

.lightbox__btn:focus-visible {
  outline-color: #fff;
}

.lightbox__stage {
  flex: 1;
  overflow: auto;
  padding: 0 clamp(12px, 3vw, 32px) 32px;
  overscroll-behavior: contain;
}

.lightbox__img {
  display: block;
  width: auto;
  max-width: min(100%, 1400px);
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: zoom-in;
}

.lightbox.is-zoomed .lightbox__img {
  max-width: none;
  margin-inline: 0;
  cursor: zoom-out;
}

body.has-lightbox {
  overflow: hidden;
}

/* Image placeholder: replace with <img src="…" alt="…"> */
.ph {
  display: grid;
  place-items: center;
  gap: 6px;
  aspect-ratio: 16 / 9;
  padding: 24px;
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 1px 1px, rgba(28, 25, 23, 0.07) 1px, transparent 0) 0 0 / 22px 22px,
    var(--tint-sage);
  color: var(--ink-2);
  font-size: 14px;
  text-align: center;
}

.ph span {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
}

.ph--tall {
  aspect-ratio: 4 / 5;
}

.ph--sand {
  background-color: var(--tint-sand);
}

.ph--mist {
  background-color: var(--tint-mist);
}

.ph--rose {
  background-color: var(--tint-rose);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-block: clamp(40px, 6vh, 64px);
  padding-block: 36px;
  border-block: 1px solid var(--line);
}

.stat__num {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(40px, 4.2vw, 52px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}

.stat__label {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-block: clamp(32px, 5vh, 56px);
}

.tiles--3 {
  grid-template-columns: repeat(3, 1fr);
}

.tiles--4 {
  grid-template-columns: repeat(4, 1fr);
}

.tile {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.tile__num {
  margin-bottom: 24px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  color: var(--accent);
}

.tile h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
}

.tile h3:last-child {
  margin-bottom: 0;
}

.tile p:empty {
  display: none;
}

.tile p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.next {
  display: block;
  padding-block: clamp(56px, 9vh, 96px);
  border-top: 1px solid var(--line);
}

.next__label {
  font-size: 14px;
  color: var(--muted);
}

.next__title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  transition: color 0.2s;
}

.next:hover .next__title {
  color: var(--accent);
}

.next:hover .arrow {
  transform: translateX(10px);
}

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */

.about-hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding-block: clamp(56px, 10vh, 120px);
}

.about-hero .display {
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.2;
}

.portrait {
  overflow: hidden;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background: var(--tint-sand);
  transform: rotate(2deg);
  transition: transform 0.8s var(--ease);
}

.portrait:hover {
  transform: rotate(0deg);
}

.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px 48px;
}

.split__body {
  max-width: var(--reading);
}

.split__body > * + * {
  margin-top: 1.2em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 15px;
  line-height: 1.3;
  color: var(--ink-2);
}

.skill-groups {
  display: grid;
  gap: 32px;
}

.skill-groups h3 {
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Scroll reveal (only active when JS is available)
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .tiers {
    grid-template-columns: repeat(2, 1fr);
  }

  .moments {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 8px;
  }

  .tiles--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-hero {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 360px;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .xp__row {
    grid-template-columns: 140px 1fr;
  }

  .xp__where {
    grid-column: 2;
  }

  .xp__row--simple {
    grid-template-columns: 1fr 1fr;
  }

  .xp__row--vote {
    grid-template-columns: 1fr auto;
  }

  .xp__row--vote .xp__where,
  .xp__row--simple .xp__where {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .chapters {
    top: 64px;
  }

  body {
    font-size: 17px;
  }

  .nav__inner {
    height: 64px;
  }

  .nav__links {
    font-size: 14px;
  }

  .nav__links .hide-sm {
    display: none;
  }

  .work__head {
    grid-template-columns: 1fr;
  }

  .cover {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
  }

  .cover__cta {
    display: none;
  }

  .card-grid,
  .three-up,
  .two-up,
  .swot,
  .tiers,
  .moments,
  .tiles,
  .tiles--3,
  .tiles--4 {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .xp__row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .xp__where {
    grid-column: auto;
  }

  .xp__row--simple {
    grid-template-columns: 1fr;
  }

  .xp__row--vote {
    grid-template-columns: 1fr auto;
    gap: 16px;
  }

  .xp__row--vote .xp__where,
  .xp__row--simple .xp__where {
    grid-column: auto;
  }

  .section__head {
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .chapters,
  .nav,
  .next,
  .footer__links {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* All the boards from a project in one grid; each tile is a whole board and opens it full size */
.board-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.board-grid .shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.board-grid .shot img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: left top;
}

@media (max-width: 720px) {
  .board-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.board-grid__item span {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.board-grid--7 {
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.board-grid--7 .board-grid__item span {
  font-size: 11px;
}

@media (max-width: 900px) {
  .board-grid--7 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 720px) {
  .board-grid--7 {
    grid-template-columns: repeat(2, 1fr);
  }

  .board-grid--7 .board-grid__item span {
    font-size: 12px;
  }
}
