/* reda980.me
   Full-screen folds that snap, with the header fixed on top of
   every fold. One calm surface per theme (light now, dark ready), tonal cards,
   one red accent. Logical properties so the layout can flip to Arabic later.
   Type: Space Grotesk, Space Mono. */

:root,
[data-theme='light'] {
  --bg: #ececec;
  --panel: #e2e2e3;
  --card: #f6f6f6;
  --text: #161616;
  --muted: #727272;
  --line: #d2d2d3;
}
[data-theme='dark'] {
  --bg: #161616;
  --panel: #1f1f1f;
  --card: #272727;
  --text: #ececec;
  --muted: #9a9a9a;
  --line: #303030;
}

/* One red accent, about a tenth of the page, the same in both themes.
   --menu is the accent used as text: the header menu and text links. */
:root {
  --accent: #f41c10;
  --accent-deep: #9e120a;
  /* Text and arrows on the accent take the page colour: grey in light, black in dark. */
  --on-accent: var(--bg);
  --menu: var(--accent);
  --card-bg: var(--accent);
  --card-fg: var(--on-accent);
}

:root {
  --sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --pad: clamp(18px, 2.4vw, 40px);
  --hdr-h: 236px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}
html {
  scroll-snap-type: y mandatory;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition:
    background 0.4s,
    color 0.4s;
}
body.locked {
  overflow: hidden;
}
[hidden] {
  display: none !important;
}
a {
  color: inherit;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
button {
  font: inherit;
  color: inherit;
}
/* Selected text: one step off the page, not the browser blue. */
::selection {
  background: var(--line);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ---------- Small text and shared pieces ---------- */

.k {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-block-end: 6px;
}
.v {
  display: block;
  font-size: 13px;
  line-height: 1.5;
}
.v-list li {
  font-size: 13px;
  line-height: 1.6;
}
.small {
  font-size: 14px;
  line-height: 1.55;
  max-width: 40ch;
}
.muted {
  color: var(--muted);
}
.big {
  font-size: clamp(36px, 4.4vw, 76px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.g {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 20px;
  border-radius: 20px;
  border: 0;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  width: max-content;
  transition: transform 0.16s var(--ease);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-line {
  height: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  color: var(--text);
}
.btn-line:hover {
  transform: translateX(4px);
}
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.2s var(--ease);
}
.ctrl-btn:hover {
  color: var(--text);
}
/* The theme switch lives in the header, in its own column. */
.hdr-col.hdr-mode {
  grid-column: 11 / span 1;
}
.hdr-mode .theme {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.hdr-mode .theme:hover .theme-label {
  color: var(--menu);
}
.fold.contact {
  padding-block-end: 70px;
}
.theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 0;
  padding: 0;
  font-size: 13px;
  cursor: pointer;
}
.theme-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--text);
  background: linear-gradient(90deg, var(--text) 50%, transparent 50%);
}

/* ---------- Fixed header ---------- */

.hdr {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  padding: 22px var(--pad) 0;
  align-items: start;
  pointer-events: none;
}
.hdr > * {
  grid-row: 1;
  pointer-events: auto;
}
.hdr-name {
  grid-column: 1 / span 2;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
}
.hdr-menu {
  grid-column: 3 / span 3;
}
.hdr-menu a {
  display: inline-block;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.16s var(--ease),
    color 0.2s;
}
.hdr-menu li {
  line-height: 1.1;
}
.hdr-menu a:hover {
  transform: translateX(4px);
}
.hdr-menu {
  color: var(--menu);
}
.hdr-menu .k {
  color: var(--menu);
}
.hdr-menu .arrow {
  display: none;
  font-weight: 400;
}
.hdr-menu a.on .arrow,
.hdr-menu a:hover .arrow {
  display: inline;
}
/* Hover goes to a deeper red, never full black or white. */
.hdr-menu a:hover {
  color: var(--accent-deep);
}
.hdr-col {
  grid-column: span 2;
}
.hdr-col:nth-of-type(1) {
  grid-column: 6 / span 1;
}
.hdr-links .hl {
  display: block;
  width: max-content;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  text-align: start;
  font: inherit;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.2s var(--ease);
}
.hdr-links .hl:hover {
  color: var(--menu);
  transform: translateX(4px);
}
.hdr-links .copy.done {
  color: var(--menu);
}
.socials {
  display: flex;
  gap: 12px;
  margin-block-start: 8px;
}
.socials a {
  display: inline-flex;
  color: var(--text);
  transition:
    color 0.2s,
    transform 0.2s var(--ease);
}
.socials a:hover {
  color: var(--menu);
  transform: translateY(-2px);
}
.socials .ic {
  width: 18px;
  height: 18px;
  margin: 0;
}
.hdr-theme {
  grid-column: 12 / span 1;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: end;
}
/* A still image: no hover, no link. */
.qr {
  display: block;
  width: 96px;
  height: 96px;
  margin-block-start: 2px;
}
.qr img,
.qr canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
.menu-btn {
  display: none;
}

/* ---------- Folds ---------- */

.fold {
  position: relative;
  height: 100svh;
  min-height: 640px;
  padding: var(--hdr-h) var(--pad) 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  scroll-snap-align: start;
  overflow: hidden;
}
.fold-head {
  align-items: end;
}
.fold-head > .big {
  grid-column: 1 / span 7;
}
.head-r {
  grid-column: 9 / span 4;
  justify-self: end;
  text-align: end;
}

/* Next-fold hook, under the section number in the header */
.next {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-block-start: 14px;
  background: none;
  border: 0;
  padding: 0;
  text-align: start;
  cursor: pointer;
  transition: opacity 0.3s;
}
.next .k {
  margin-block-end: 2px;
}
.next #next-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition:
    color 0.2s,
    transform 0.2s var(--ease);
}
.next #next-label::before {
  content: '↓ ';
}
.next:hover #next-label {
  color: var(--menu);
  transform: translateY(2px);
}
.next-arrow {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 18px;
  height: 30px;
  border-radius: 9px;
  border: 1.5px solid var(--text);
  position: relative;
}
.next-arrow::after {
  content: '';
  position: absolute;
  inset-inline-start: 50%;
  top: 6px;
  width: 4px;
  height: 7px;
  margin-inline-start: -2px;
  border-radius: 2px;
  background: var(--text);
  animation: nudge 1.8s var(--ease) infinite;
}
@keyframes nudge {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: translateY(10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 0;
  }
}
.next.hide {
  opacity: 0;
  pointer-events: none;
}

/* ---------- 01 · Home ---------- */

.intro-title {
  font-size: clamp(48px, 7.6vw, 140px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-block-start: -6px;
}
.intro-title .line {
  display: block;
  overflow: hidden;
}
.intro-title .line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease);
}
.intro-title .line:nth-child(2) > span {
  transition-delay: 0.08s;
}
.intro-title .line:nth-child(3) > span {
  transition-delay: 0.16s;
}
.is-loaded .intro-title .line > span {
  transform: none;
}
.fold-foot {
  align-items: start;
  padding-block-end: 46px;
}
.fold-foot .col:nth-child(1) {
  grid-column: 1 / span 2;
}
.fold-foot .col:nth-child(2) {
  grid-column: 3 / span 3;
}
.fold-foot .col:nth-child(3) {
  grid-column: 6 / span 2;
}
.statement {
  grid-column: 9 / span 4;
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ---------- 02 · Story ---------- */

.story-meta > div {
  grid-column: span 3;
}
.story-meta .v,
.story-body,
.story-media img {
  transition:
    opacity 0.35s var(--ease),
    transform 0.35s var(--ease);
}
.story.swap .story-meta .v,
.story.swap .story-body,
.story.swap .story-media img {
  opacity: 0;
  transform: translateY(8px);
}
.story-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}
.story-year {
  font-size: clamp(64px, 8.6vw, 170px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.story-title {
  font-size: clamp(22px, 2.2vw, 36px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-block-end: 12px;
}
.story-text {
  font-size: 15px;
  color: var(--muted);
  max-width: 44ch;
}
.story-media {
  height: 100%;
  max-height: 340px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
}
.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.story-media:empty {
  background: transparent;
}
.story-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-block-end: 64px;
}
.ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Prev, play or pause, next: three icons under the big year. */
.ctrl {
  gap: 6px;
  justify-content: flex-start;
  margin-block-start: 24px;
  margin-inline-start: -10px;
}
.ctrl-ic {
  width: 40px;
  height: 40px;
  justify-content: center;
  padding: 0;
  color: var(--text);
}
.ctrl-ic svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.ctrl-ic:hover {
  color: var(--accent);
}
.ruler {
  position: relative;
  height: 56px;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}
.ticks {
  position: absolute;
  inset: 0;
  border-block-end: 1px solid var(--line);
}
.tick {
  position: absolute;
  bottom: 0;
  width: 1px;
  height: 10px;
  background: var(--line);
}
.tick.ch {
  height: 20px;
  background: var(--muted);
}
.tick-label {
  position: absolute;
  bottom: 26px;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  background: none;
  border: 0;
  padding: 2px 4px;
  cursor: pointer;
}
.tick-label.on {
  color: var(--text);
  font-weight: 700;
}
/* The end labels line up with the page edges, like the controls above. */
.tick-label.first {
  transform: none;
  padding-inline-start: 0;
}
.tick-label.last {
  transform: translateX(-100%);
  padding-inline-end: 0;
}
.progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 3px;
  width: 0;
  background: var(--text);
  border-radius: 2px;
}
.handle {
  position: absolute;
  inset-block: 0;
  width: 0;
  transition: left 0.4s var(--ease);
}
.handle span {
  position: absolute;
  bottom: 0;
  left: -1px;
  width: 2px;
  height: 22px;
  background: var(--text);
}
.handle span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: -4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
}
/* While playing or dragging the dot follows every frame, so no easing on top. */
.ruler.dragging .handle,
.story.playing .handle {
  transition: none;
}

/* ---------- 03 · Work ---------- */

.work-g {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
}
.work-list-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.work-list {
  border-block-start: 1px solid var(--line);
}
.work-item {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  column-gap: 8px;
  align-items: baseline;
  padding-block: 12px;
  border: 0;
  border-block-end: 1px solid var(--line);
  background: none;
  text-align: start;
  cursor: pointer;
}
.wi-n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.wi-t {
  font-size: clamp(22px, 2.3vw, 38px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--muted);
  transition:
    color 0.25s,
    transform 0.3s var(--ease);
}
.wi-m {
  grid-column: 2;
  font-size: 12px;
  color: var(--muted);
  margin-block-start: 4px;
}
.work-item.on .wi-t {
  color: var(--text);
  transform: translateX(8px);
}
.work-preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.wp-media {
  flex: 1;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  transition: opacity 0.16s;
}
.wp-media.swap {
  opacity: 0;
}
.wp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wp-lock {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}
.wp-lock p {
  font-size: clamp(28px, 3vw, 48px);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.wp-foot {
  display: flex;
  justify-content: flex-start;
  align-items: baseline;
  gap: 28px;
}
/* Leaves room for the Next hook in the bottom corner. */
.fold.work {
  padding-block-end: 80px;
}
.text-link {
  background: none;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--menu);
  cursor: pointer;
  transition:
    color 0.2s,
    transform 0.2s var(--ease);
}
.text-link-lg {
  font-size: clamp(18px, 1.6vw, 24px);
  text-decoration: none;
}
.text-link:hover {
  color: var(--text);
  transform: translateX(4px);
}
.wp-line {
  font-size: 16px;
  font-weight: 500;
}
.also {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 13px;
  padding-inline-end: 260px;
  margin-block-end: 50px;
}
.also .k {
  margin: 0;
  flex: none;
}

/* ---------- 04 · How I lead ---------- */

.acc {
  flex: 1;
  min-height: 0;
  max-height: 460px;
  display: flex;
  gap: 10px;
  margin-block-end: 46px;
}
.acc-item {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
  transition:
    flex-grow 0.6s var(--ease),
    background 0.4s;
}
.acc-item.on {
  flex-grow: 3.8;
  background: var(--text);
  color: var(--bg);
}
.acc-item button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px;
  border: 0;
  background: none;
  text-align: start;
  cursor: pointer;
}
.acc-n {
  font-size: clamp(56px, 6vw, 110px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.05em;
}
.acc-t {
  font-size: clamp(15px, 1.3vw, 20px);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  max-width: 14ch;
  margin-block-end: 0;
  transition: margin 0.5s var(--ease);
}
.acc-item.on .acc-t {
  max-width: 16ch;
  font-size: clamp(28px, 3vw, 52px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin-block-end: auto;
  margin-block-start: 20px;
}
.acc-d {
  position: absolute;
  inset-inline: 24px;
  inset-block-end: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 32px;
  align-items: end;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
  pointer-events: none;
}
.acc-item.on .acc-d {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}
/* The open card keeps its title and text in the normal flow, so a title that
   wraps pushes the text down instead of running into it. Both are sized to
   the open card's final width, so nothing reflows while the cards resize. */
.acc {
  container-type: inline-size;
  --acc-open: calc((100cqi - 40px) * 3.8 / 7.8);
}
.acc-item.on button {
  position: relative;
  inset: auto;
  flex: 1 0 auto;
  justify-content: flex-start;
}
.acc-item.on .acc-t {
  width: calc(var(--acc-open) - 40px);
}
.acc-item.on .acc-d {
  position: relative;
  inset: auto;
  width: calc(var(--acc-open) - 48px);
  margin: 0 24px 24px;
}
.acc-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.acc-lead {
  font-size: clamp(17px, 1.35vw, 22px);
  font-weight: 500;
  line-height: 1.3;
}
.acc-more {
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.6;
}
.acc-ex {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  line-height: 1.5;
}
.acc-ex .k {
  margin: 0;
  font-size: 11px;
  color: inherit;
  opacity: 0.55;
}

/* ---------- 05 · AI: a pipeline, not cards ---------- */

.flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding-block: 10px;
}
.flow::before {
  content: '';
  position: absolute;
  inset-inline: calc(100% / 12);
  top: 42px;
  height: 1px;
  background: var(--text);
  opacity: 0.35;
}
.node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.node .n {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  transition:
    background 0.3s,
    transform 0.4s var(--ease);
}
.node .t {
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 500;
  text-transform: uppercase;
  line-height: 1;
  color: var(--muted);
  transition: color 0.3s;
}
.node:hover .n {
  transform: scale(1.08);
}
.node[aria-selected='true'] .n {
  background: var(--accent);
  color: var(--on-accent);
  transform: scale(1.18);
}
.node[aria-selected='true'] .t {
  color: var(--text);
}
.flow-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 20px;
  padding-block: 20px 46px;
  border-block-start: 1px solid var(--line);
}
.flow-detail .k {
  font-size: 13px;
  color: var(--text);
}
.flow-detail p {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.35;
  max-width: 48ch;
}
.flow-detail.swap p,
.flow-detail.swap .k {
  animation: rise 0.45s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ---------- 06 · Thinking ---------- */

.follow {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.follow-n {
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
}
.posts {
  flex: 1;
  min-height: 0;
  max-height: 440px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  margin-block-end: 46px;
}
.posts li:first-child {
  grid-column: span 2;
  grid-row: span 2;
}
.post {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: var(--panel);
  text-decoration: none;
  transition:
    transform 0.3s var(--ease),
    background 0.3s;
}
.post:hover {
  transform: translateY(-4px);
  background: var(--card);
}
.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.post-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 20%;
  flex: none;
}
.post-who {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
}
.post-who b {
  font-weight: 500;
}
.post-who span {
  color: var(--muted);
}
.post-in {
  width: 20px;
  height: 20px;
  margin: 0;
  color: var(--muted);
}
.post-t {
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 500;
  line-height: 1.2;
}
.lead-post .post-t {
  font-size: clamp(28px, 2.8vw, 48px);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.post-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 12px;
  color: var(--muted);
}
.post-foot .ic {
  width: 14px;
  height: 14px;
  margin-inline-end: 5px;
  vertical-align: -3px;
}
.post-pages {
  margin-inline-start: auto;
}

/* Carousel covers: five portrait covers in one row, stats underneath. */
.posts.covers {
  max-height: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: none;
}
.posts.covers li:first-child {
  grid-column: auto;
  grid-row: auto;
}
.post-c {
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 8px 12px;
}
.post-cover {
  display: block;
  aspect-ratio: 4 / 5;
  max-height: 46vh;
  border-radius: 14px;
  overflow: hidden;
}
.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.5s var(--ease);
}
.post-c:hover .post-cover img {
  scale: 1.03;
}
.post-c .post-foot {
  padding-inline: 6px;
}
@media (max-width: 900px) {
  .posts.covers {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 62%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-block-end: 6px;
  }
  .posts.covers li {
    scroll-snap-align: start;
  }
  .post-cover {
    max-height: none;
  }
}

/* ---------- 07 · Credentials ---------- */

.creds-g {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: end;
  padding-block-end: 46px;
}
.table {
  border-block-start: 1px solid var(--text);
}
.t-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 16px;
  align-items: baseline;
  padding-block: 12px;
  border-block-end: 1px solid var(--line);
}
.t-t {
  font-size: clamp(16px, 1.35vw, 20px);
  font-weight: 500;
  line-height: 1.2;
}
.t-x {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.t-x a {
  color: var(--text);
  font-weight: 500;
}

/* ---------- 08 · Contact ---------- */

.contact-title {
  font-size: clamp(44px, 6.4vw, 116px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.contact-g {
  align-items: end;
}
.links {
  grid-column: 1 / span 8;
  border-block-start: 1px solid var(--text);
}
.links a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 4fr);
  align-items: baseline;
  gap: 20px;
  padding-block: 14px;
  border-block-end: 1px solid var(--line);
  text-decoration: none;
}
.links .k {
  margin: 0;
  font-size: 12px;
}
.link-v {
  font-size: clamp(22px, 2.5vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: transform 0.3s var(--ease);
}
.links a:hover .link-v {
  transform: translateX(10px);
}
.contact-side {
  grid-column: 10 / span 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

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

.case {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.55s var(--ease);
}
.case.open {
  transform: none;
}
.case-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px var(--pad);
  border-block-end: 1px solid var(--line);
}
.case-bar .k {
  margin: 0;
}
.case-nav {
  display: flex;
  gap: 8px;
}
.case-body {
  flex: 1;
  overflow-y: auto;
  padding: 40px var(--pad) 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.cb-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: end;
}
.cb-title {
  font-size: clamp(44px, 6.4vw, 116px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.cb-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.cb-meta dt {
  font-size: 11px;
  color: var(--muted);
}
.cb-meta dd {
  font-size: 14px;
  margin-block-start: 4px;
}
.cb-story {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  border-block-start: 1px solid var(--text);
  padding-block-start: 22px;
}
.cb-story p {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.45;
}
.cb-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}
.cb-gallery img {
  width: 100%;
  height: 100%;
  max-height: 70svh;
  object-fit: cover;
  border-radius: 20px;
}


/* ---------- Icons and column lines (from the old portfolio) ---------- */

.ic {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -2px;
  margin-inline-end: 6px;
}
/* Profile picture: the cut-out portrait in black and white on a tone one step off the page. */
.hdr-av {
  display: block;
  width: 52px;
  height: 52px;
  margin-block-end: 10px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--panel);
}
.hdr-av img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  filter: grayscale(1) contrast(1.08);
  transition: transform 0.4s var(--ease);
}
.hdr-name:hover .hdr-av img {
  transform: scale(1.06);
}
.icon-row {
  margin-block-start: auto;
  display: flex;
  gap: clamp(18px, 3vw, 44px);
  align-items: center;
  color: var(--muted);
}
.icon-row .ic {
  width: 24px;
  height: 24px;
  stroke-width: 1.3;
  margin: 0;
}
.icon-num {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
/* Five lines on the same 12-column grid as the header. Each sits in the middle
   of a column gap (half a gap outside the page edges), between header blocks:
   after the name, after the menu and after Now. They line up with the content
   and keep 10px clear of it. */
.gridlines {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  padding-inline: var(--pad);
  pointer-events: none;
}
.gridlines i {
  grid-row: 1;
  width: 1px;
  margin-inline-start: -10.5px;
  background: var(--line);
  opacity: 0.55;
}
.gridlines i:nth-child(1) {
  grid-column: 1;
  margin-inline-start: -10px;
}
.gridlines i:nth-child(2) {
  grid-column: 3;
}
.gridlines i:nth-child(3) {
  grid-column: 6;
}
.gridlines i:nth-child(4) {
  grid-column: 9;
}
.gridlines i:nth-child(5) {
  grid-column: 12;
  justify-self: end;
  margin-inline: 0 -10px;
}
/* Reading progress: runs along the top from the first column line to the last. */
.scroll-bar {
  position: fixed;
  top: 0;
  inset-inline: calc(var(--pad) - 10px);
  z-index: 45;
  height: 3px;
  background: var(--accent);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
  pointer-events: none;
}
main,
.hdr {
  position: relative;
  z-index: 1;
}
.hdr {
  position: fixed;
  z-index: 40;
}

/* ---------- Designing since ---------- */

.since-g {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 32px;
  align-items: end;
  padding-block-end: 46px;
}
.since-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.since-title {
  display: flex;
  flex-direction: column;
  font-size: clamp(48px, 6.4vw, 120px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}
.since-sub {
  font-size: clamp(18px, 1.6vw, 26px);
  font-weight: 500;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--muted);
  margin-block-end: 8px;
}
.since-media {
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s var(--ease);
  will-change: transform;
}
.since-media img {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.18));
}
.since-nums {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.since-nums li {
  border-block-start: 1px solid var(--line);
  padding-block-start: 10px;
}
.sn {
  display: block;
  font-size: clamp(40px, 4.2vw, 72px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Notable brands ---------- */

.logo-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-block-start: auto;
  /* Two rows of squares always fit under the header and the title. */
  width: min(100%, calc((100svh - 520px) * 4));
}
.logo-grid li {
  aspect-ratio: 1;
}
/* One row that drifts sideways and pauses under the pointer. */
.logo-marquee {
  margin-block-start: auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.logo-marquee .logo-grid {
  display: flex;
  width: max-content;
  margin: 0;
  animation: logo-run 70s linear infinite;
}
.logo-marquee:hover .logo-grid,
.logo-marquee:focus-within .logo-grid {
  animation-play-state: paused;
}
.logo-marquee .logo-grid li {
  flex: none;
  width: clamp(140px, 14vw, 230px);
}
@keyframes logo-run {
  to {
    transform: translateX(calc(-50% - 5px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .logo-marquee {
    overflow-x: auto;
  }
  .logo-marquee .logo-grid {
    animation: none;
  }
}
.wordmark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(16px, 1.5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}
.logo-card:hover .wordmark {
  opacity: 0;
}
.logo-card {
  position: relative;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 20px;
  background: var(--panel);
  overflow: hidden;
  cursor: default;
  text-align: start;
  isolation: isolate;
}
.logo-card.has-case {
  cursor: pointer;
}
.logo-card img {
  position: absolute;
  inset: 0;
  margin: auto;
  max-width: 70%;
  max-height: 46%;
  object-fit: contain;
  filter: invert(1);
  mix-blend-mode: multiply;
  transition:
    transform 0.5s var(--ease),
    opacity 0.4s;
}
[data-theme='dark'] .logo-card img {
  filter: none;
  mix-blend-mode: screen;
}
.logo-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  padding: 14px;
  background: var(--card);
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.35s var(--ease),
    transform 0.4s var(--ease);
}
.logo-card:hover .logo-info,
.logo-card:focus-visible .logo-info {
  opacity: 1;
  transform: none;
}
.logo-card:hover img {
  transform: scale(0.9);
  opacity: 0;
}
.logo-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
}
.logo-d {
  display: none;
}
.logo-d,
.logo-did {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.logo-did {
  color: var(--text);
}
.logo-cta {
  align-self: flex-start;
  margin-block-start: 6px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
}
.logo-cta::before {
  content: '→ ';
}

/* ---------- Five pillars: list and story panel ---------- */

.pl-g {
  flex: 1;
  min-height: 0;
  max-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px;
  margin-block-end: 46px;
}
.pl-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-block-start: 1px solid var(--line);
}
.pl-tab {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: baseline;
  padding-block: 14px;
  border: 0;
  border-block-end: 1px solid var(--line);
  background: none;
  text-align: start;
  cursor: pointer;
}
.pl-n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.pl-t {
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--muted);
  transition:
    color 0.25s,
    transform 0.35s var(--ease);
}
.pl-tab[aria-selected='true'] .pl-t {
  color: var(--text);
  transform: translateX(8px);
}
.pl-tab[aria-selected='true'] .pl-n {
  color: var(--text);
}
.pl-panel {
  border-radius: 28px;
  background: var(--panel);
  padding: clamp(24px, 3vw, 44px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
}
.pl-text {
  order: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.pl-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.pl-text h3 {
  margin-block-end: auto;
  font-size: clamp(28px, 2.8vw, 50px);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.pl-text > p:not(.pl-proof) {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  max-width: 46ch;
}
.pl-proof {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 46ch;
}
.pl-proof .k {
  margin: 0;
  color: var(--text);
}
.pl-art {
  order: 2;
  display: grid;
  place-items: center;
  min-height: 0;
}
.pl-art svg {
  width: 100%;
  max-width: 300px;
  max-height: 100%;
}

/* Line drawings: they draw themselves in */
.pl-art svg,
.tk-icon svg {
  fill: none;
  stroke: var(--text);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pl-art .thin,
.tk-icon .thin {
  opacity: 0.35;
}
.pl-art .dot,
.tk-icon .dot {
  fill: var(--accent);
  stroke: none;
  opacity: 0;
  animation: pop 0.5s var(--ease) 0.9s forwards;
}
.pl-art :is(path, rect, circle):not(.dot),
.tk-icon :is(path, rect, circle):not(.dot) {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.3s var(--ease);
}
.pl-art.drawn :is(path, rect, circle):not(.dot),
.marquee.in .tk-icon :is(path, rect, circle):not(.dot) {
  stroke-dashoffset: 0;
}
.pl-art.drawn :is(path, rect, circle):nth-child(2n) {
  transition-delay: 0.12s;
}
.pl-art.drawn :is(path, rect, circle):nth-child(3n) {
  transition-delay: 0.24s;
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.pl-art .dot,
.tk-icon .dot {
  transform-box: fill-box;
  transform-origin: center;
}
.pl-panel.swap .pl-text {
  animation: rise 0.5s var(--ease);
}

/* ---------- Knowledge and tools ---------- */

.pill-wall {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  gap: 10px;
  max-width: 1100px;
  margin: 0 auto 46px;
}
.pw {
  font-size: clamp(13px, 1vw, 15px);
  padding: 12px 22px;
  border-radius: 26px;
  background: var(--panel);
  white-space: nowrap;
  cursor: default;
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    background 0.25s,
    color 0.25s;
  transition-delay: calc(var(--i) * 18ms), calc(var(--i) * 18ms), 0s, 0s;
}
.pill-wall.in .pw {
  opacity: 1;
  transform: none;
}
.pill-wall.in .pw:hover {
  background: var(--accent);
  color: var(--on-accent);
  transform: translateY(-4px);
  transition-delay: 0s;
}

/* ---------- Certificates ---------- */

.cert-list {
  border-block-start: 1px solid var(--text);
  margin-block-end: 46px;
}
.cert-r {
  display: grid;
  grid-template-columns: 44px minmax(0, 3.2fr) minmax(0, 3fr) minmax(0, 2fr) auto;
  gap: 20px;
  align-items: center;
  padding-block: 18px;
  border-block-end: 1px solid var(--line);
}
.cert-n {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cert-main h3 {
  font-size: clamp(20px, 2vw, 32px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
}
.cert-kind {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-block-start: 4px;
}
.cert-where,
.cert-when {
  font-size: 14px;
  line-height: 1.45;
}
.cert-when {
  color: var(--muted);
}
.cert-act {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 150px;
}
.cert-act a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad) 30px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.3s;
}
.viewer.open {
  opacity: 1;
}
.viewer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.viewer-bar .k {
  margin: 0;
  font-family: var(--mono);
}
.viewer-nav {
  display: flex;
  gap: 24px;
}
.viewer-nav .ctrl-btn {
  color: var(--text);
}
.viewer-fig {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  transform: scale(0.97);
  transition: transform 0.4s var(--ease);
}
.viewer.open .viewer-fig {
  transform: none;
}
.viewer-media {
  min-height: 0;
  display: flex;
  justify-content: center;
}
.viewer-media img,
.viewer-media video {
  max-width: min(1100px, 84vw);
  max-height: calc(100svh - 170px);
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.35);
}
.viewer-fig figcaption {
  max-width: 60ch;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}


/* ---------- AI and systems: the team board ---------- */

.board {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: 340px;
}
.board-cols {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.stage {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border: 0;
  border-radius: 20px;
  background: var(--panel);
  text-align: start;
  cursor: pointer;
  transition: background 0.3s;
}
.stage-n {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.stage-t {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}
.stage-tools {
  font-size: 12px;
  color: var(--muted);
}
.stage.done .stage-n::after {
  content: '  Done';
}
.stage[aria-selected='true'] {
  background: var(--card);
}
.ticket {
  position: absolute;
  left: 0;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 14px;
  background: var(--bg);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.8s var(--ease),
    width 0.8s var(--ease),
    background 0.4s;
  pointer-events: none;
}
.ticket .k {
  margin: 0;
}
.ticket-t {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
}
.ticket-s {
  font-size: 12px;
  color: var(--muted);
  min-height: 2.6em;
}
.ticket-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--panel);
  overflow: hidden;
}
.ticket-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--text);
  transition: width 0.8s var(--ease);
}
.ticket.live {
  background: var(--accent);
  color: var(--on-accent);
}
.ticket.live .ticket-s,
.ticket.live .k {
  color: var(--on-accent);
}
.board-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 20px;
  padding-block: 18px 46px;
  border-block-start: 1px solid var(--line);
}
.board-detail .k {
  font-size: 13px;
  color: var(--text);
}
.board-detail p {
  font-size: clamp(17px, 1.5vw, 22px);
  line-height: 1.35;
  max-width: 48ch;
}

/* ---------- Knowledge and tools: three matching cards ---------- */

.marquee {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-block: auto 50px;
}
.tk-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2vw, 30px);
  border-radius: 28px;
  background: var(--panel);
}
.tk-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tk-icon svg {
  width: 44px;
  height: 44px;
}
.tk-count {
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--muted);
}
.tk-h {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.1;
  text-transform: uppercase;
  padding-block-end: 12px;
  border-block-end: 1px solid var(--line);
}
.tk-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}
.tk-list li {
  padding-block: 5px;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease),
    color 0.2s;
  transition-delay: calc(var(--i) * 30ms), calc(var(--i) * 30ms), 0s;
}
.marquee.in .tk-list li {
  opacity: 1;
  transform: none;
}
.marquee.in .tk-list li:hover {
  color: var(--menu);
  transform: translateX(4px);
  transition-delay: 0s;
}


/* ---------- Five pillars: one sentence with pictures ---------- */

.pl-statement {
  margin-block-start: auto;
  font-size: clamp(32px, 4.4vw, 82px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 22ch;
}
.pl-word {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.3s var(--ease);
}
.pl-word sup {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  vertical-align: super;
  line-height: 0;
  margin-inline-end: 6px;
}
.pl-statement.picked .pl-word:not(.on) {
  opacity: 0.22;
}
.pl-word.on {
  color: var(--menu);
}
.pl-pic {
  display: inline-block;
  width: 1.7em;
  height: 0.78em;
  border-radius: 0.39em;
  overflow: hidden;
  vertical-align: -0.04em;
  background: var(--panel);
}
.pl-pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.pl-pic:hover img {
  transform: scale(1.12);
}
.pl-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 2fr);
  gap: 28px;
  padding-block-start: 18px;
  border-block-start: 1px solid var(--line);
  margin-block-end: 50px;
  font-size: 15px;
  line-height: 1.5;
}
.pl-info .pl-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.pl-info .pl-proof {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}
.pl-info .pl-proof .k {
  margin: 0;
  color: var(--text);
}

/* ---------- Knowledge and tools: a typeset paragraph ---------- */

.sk-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin-block-start: auto;
}
.sk-btn {
  background: none;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.sk-btn .arrow {
  display: none;
}
.sk-btn[aria-pressed='true'] {
  color: var(--menu);
}
.sk-btn[aria-pressed='true'] .arrow {
  display: inline;
}
.sk-btn:hover {
  color: var(--text);
}
.sk-text {
  font-size: clamp(22px, 2.3vw, 40px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-block-end: 50px;
}
.sk {
  transition:
    opacity 0.35s var(--ease),
    color 0.2s;
}
.sk.dim {
  opacity: 0.16;
}
.sk:hover {
  color: var(--menu);
  opacity: 1;
}
.sk-sep {
  color: var(--muted);
}


/* ---------- Five pillars: five columns ---------- */

/* Title and columns sit together, centred in the fold. */
.fold.pillars {
  justify-content: center;
  gap: 56px;
  padding-block-end: 90px;
}
.pl-cols {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: auto auto auto auto;
  column-gap: 28px;
}
/* Subgrid keeps every title, text and proof on the same line across columns. */
.pl-col {
  grid-row: span 4;
  display: grid;
  grid-template-rows: subgrid;
  row-gap: 10px;
  cursor: default;
}
.pl-big {
  font-size: clamp(60px, 6.6vw, 124px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: -0.05em;
  transition:
    color 0.3s,
    transform 0.6s var(--ease),
    opacity 0.6s var(--ease);
}
.pl-cols:not(.in) .pl-big {
  opacity: 0;
  transform: translateY(30px);
}
.pl-cols.in .pl-big {
  transition-delay: calc(var(--i) * 90ms), calc(var(--i) * 90ms), calc(var(--i) * 90ms);
}
.pl-col:hover .pl-big {
  color: var(--menu);
  transition-delay: 0s;
}
.pl-big {
  align-self: start;
}
.pl-col h3 {
  margin-block: 18px 8px;
  font-size: clamp(19px, 1.75vw, 30px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}
.pl-col p {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.55;
}
.pl-col .pl-proof {
  margin-block-start: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.pl-col .pl-proof .k {
  margin-block-end: 4px;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- Knowledge and tools: app tiles and two short lines ---------- */

/* Title, tiles and lines sit together, centred in the fold, like the pillars. */
.fold.tools {
  justify-content: center;
  gap: 48px;
  padding-block-end: 90px;
}
.apps {
  display: grid;
  grid-template-columns: repeat(15, minmax(0, 1fr));
  gap: 22px 14px;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  cursor: default;
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.apps:not(.in) .app {
  opacity: 0;
  transform: translateY(16px);
}
.apps.in .app {
  transition-delay: calc(var(--i) * 40ms);
}
.app-ico {
  width: 100%;
  max-width: 88px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--panel);
  font-family: var(--mono);
  font-size: clamp(16px, 1.5vw, 24px);
  letter-spacing: -0.02em;
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.3s var(--ease);
}
.app-ico svg {
  width: 1.4em;
  height: 1.4em;
  fill: currentColor;
}
.app:hover .app-ico {
  background: var(--text);
  color: var(--bg);
  transform: translateY(-4px);
}
.app-nm {
  font-size: 12px;
  line-height: 1.25;
  color: var(--muted);
  transition: color 0.3s;
}
.app:hover .app-nm {
  color: var(--text);
}
.skill-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  border-block-start: 1px solid var(--line);
  padding-block-start: 18px;
}
.skill-lines dd {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 500;
  line-height: 1.35;
}

/* Fewer tiles a row on narrower laptops. */
@media (max-width: 1200px) and (min-width: 901px) {
  .apps {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

/* ---------- AI: ask the portfolio ---------- */

.ask {
  margin-block: auto 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.cmd {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding-inline: 20px 8px;
  border-radius: 20px;
  background: var(--panel);
  max-width: 880px;
  transition: box-shadow 0.2s;
}
.cmd:focus-within {
  box-shadow: 0 0 0 1.5px var(--menu);
}
.cmd-key {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.cmd input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: clamp(16px, 1.4vw, 20px);
  color: var(--text);
}
.cmd input::placeholder {
  color: var(--muted);
}
.cmd-go {
  height: 48px;
  padding-inline: 20px;
  border: 0;
  border-radius: 14px;
  background: var(--bg);
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s;
}
.cmd-go:hover {
  color: var(--menu);
}
.cmd-sug {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1000px;
}
.cmd-sug button {
  background: none;
  border: 0;
  padding: 4px 0;
  margin-inline-end: 16px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.cmd-sug button::before {
  content: '→ ';
  opacity: 0;
  transition: opacity 0.2s;
}
.cmd-sug button:hover,
.cmd-sug button.on {
  color: var(--menu);
}
.cmd-sug button:hover::before,
.cmd-sug button.on::before {
  opacity: 1;
}
.cmd-a {
  /* Fixed room for four lines, so the box and questions above never move. */
  min-height: 4.1em;
  max-width: 24ch;
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
  margin-block-start: 10px;
  font-size: clamp(28px, 3.6vw, 64px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.cmd-a.out {
  opacity: 0;
  transform: translateY(6px);
}
.cmd-a.typing::after {
  content: '';
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  margin-inline-start: 4px;
  vertical-align: -0.08em;
  background: var(--menu);
  animation: blink 0.8s steps(1) infinite;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}


/* ---------- Thinking: LinkedIn and Instagram tabs ---------- */

.th-tabs {
  display: flex;
  gap: 24px;
}
.th-tab {
  background: none;
  border: 0;
  padding: 0;
  font-size: 15px;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
}
.th-tab .arrow {
  display: none;
}
.th-tab[aria-selected='true'] {
  color: var(--menu);
}
.th-tab[aria-selected='true'] .arrow {
  display: inline;
}
.th-tab:hover {
  color: var(--text);
}
.th-pane {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.th-pane.in {
  animation: rise 0.45s var(--ease);
}
.th-pane .posts {
  margin-block-end: 0;
}
.th-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
  margin-block-end: 50px;
}
.th-foot b {
  color: var(--text);
  font-weight: 500;
}
.ig {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, calc((100svh - 470px) * 4));
  gap: 10px;
  margin-block-start: auto;
}
.ig-tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
}
.ig-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.ig-tile:hover img {
  transform: scale(1.05);
}
.ig-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  font-size: 13px;
  line-height: 1.35;
  color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.3s,
    transform 0.3s var(--ease);
}
.ig-tile:hover .ig-cap {
  opacity: 1;
  transform: none;
}

/* ---------- Folds that grow instead of clipping ---------- */

/* These folds are text first. On a small or short screen they grow taller
   than the window rather than cutting off or overlapping their text. */
@media (min-width: 901px) {
  .fold.lead,
  .fold.pillars,
  .fold.tools,
  .fold.thinking {
    height: auto;
    min-height: max(100svh, 640px);
  }
  .acc,
  .th-pane,
  .posts {
    min-height: auto;
  }
  /* Centred with auto margins, so a tall block can never slide up under the header. */
  .fold.pillars,
  .fold.tools {
    justify-content: flex-start;
  }
  .fold.pillars > :first-child,
  .fold.tools > :first-child {
    margin-block-start: auto;
  }
  .fold.pillars > :last-child,
  .fold.tools > :last-child {
    margin-block-end: auto;
  }
}

/* ---------- Shorter laptop screens ---------- */

@media (max-height: 820px) and (min-width: 901px) {
  :root {
    --hdr-h: 206px;
  }
  .hdr-menu a {
    font-size: 15px;
  }
  .intro-title {
    font-size: clamp(44px, 6.6vw, 112px);
  }
  /* The open step keeps its main line and example; the longer note waits for a taller screen. */
  .acc-n {
    font-size: clamp(44px, 5vw, 80px);
  }
  .acc-item.on .acc-t {
    font-size: clamp(24px, 2.5vw, 40px);
    min-height: 1.9em;
    margin-block-start: 14px;
  }
  .acc-more {
    display: none;
  }
  .fold.lead {
    gap: 20px;
  }
  .fold.tools {
    gap: 32px;
    padding-block-end: 64px;
  }
  .apps {
    gap: 16px 14px;
  }
  .app-ico {
    max-width: 64px;
    border-radius: 16px;
  }
  .acc {
    margin-block-end: 36px;
  }
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 1100px) and (min-width: 901px) {
  .hdr-now {
    display: none;
  }
  .hdr-links {
    grid-column: 8 / span 3;
  }
  .hdr-col.hdr-mode {
    grid-column: 7 / span 1;
  }
  /* Here Now is hidden and Get in touch starts a column earlier. */
  .gridlines i:nth-child(4) {
    grid-column: 8;
  }
  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .node {
    min-height: 90px;
  }
}

@media (max-width: 900px) {
  :root {
    --pad: 18px;
  }
  html {
    scroll-snap-type: none;
  }
  .hdr {
    position: sticky;
    top: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 12px var(--pad);
    background: var(--bg);
    border-block-end: 1px solid var(--line);
  }
  .hdr-name {
    flex-direction: row;
    align-items: center;
    gap: 5px;
  }
  .hdr-av {
    width: 32px;
    height: 32px;
    margin: 0 6px 0 0;
  }
  .hdr-col {
    display: none;
  }
  .menu-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding-inline: 16px;
    border-radius: 18px;
    border: 1.5px solid var(--text);
    background: none;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
  }
  .hdr-menu {
    order: 3;
    flex-basis: 100%;
    display: none;
    padding-block: 18px 8px;
  }
  .hdr.open .hdr-menu {
    display: block;
  }
  .hdr-menu .k {
    display: none;
  }
  .hdr-menu a {
    font-size: 26px;
    line-height: 1.25;
  }
  .fold {
    height: auto;
    min-height: 0;
    padding-block: 56px;
    overflow: visible;
  }
  .next {
    display: none;
  }
  /* On phones the theme switch sits in the top bar, beside Menu. */
  .hdr .hdr-mode {
    display: block;
    margin-inline: auto 14px;
  }
  .hdr-mode .k {
    display: none;
  }
  .g > *,
  .fold-head > .big,
  .head-r {
    grid-column: 1 / -1 !important;
    justify-self: start !important;
    text-align: start;
  }
  .fold-foot .col {
    grid-column: span 6 !important;
  }
  .fold-foot {
    padding-block-end: 0;
  }
  .intro {
    padding-block-start: 40px;
  }
  .story-meta > div {
    grid-column: span 6 !important;
  }
  .story-stage {
    grid-template-columns: 1fr;
  }
  .story-media {
    height: 220px;
  }
  .story-media:empty {
    display: none;
  }
  .story-controls {
    padding-inline-end: 0;
  }
  .work-g {
    grid-template-columns: 1fr;
  }
  .wp-media {
    height: 240px;
    flex: none;
  }
  .wp-foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .also {
    flex-direction: column;
    gap: 4px;
    padding-inline-end: 0;
  }
  .acc {
    flex-direction: column;
    max-height: none;
    margin-block-end: 0;
  }
  .acc-item {
    min-height: 64px;
  }
  /* Closed steps are one row: number, then title. */
  .acc-item:not(.on) button {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    padding-block: 12px;
  }
  .acc-item:not(.on) .acc-n {
    font-size: 32px;
    min-width: 1ch;
  }
  .acc-item:not(.on) .acc-t {
    max-width: none;
  }
  .acc-item.on .acc-t,
  .acc-item.on .acc-d {
    width: auto;
  }
  .acc-d {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .flow {
    grid-template-columns: 1fr 1fr;
  }
  .node {
    min-height: 80px;
  }
  .flow-detail {
    grid-template-columns: 1fr;
    padding-block-end: 0;
  }
  .follow {
    align-items: flex-start;
  }
  .posts {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    max-height: none;
    margin-block-end: 0;
  }
  .posts li:first-child {
    grid-column: auto;
    grid-row: auto;
  }
  .lead-post {
    min-height: 220px;
  }
  .creds-g {
    grid-template-columns: 1fr;
    padding-block-end: 0;
  }
  .t-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .links a {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .link-v {
    font-size: 22px;
    word-break: break-word;
  }
  .cb-head,
  .cb-story {
    grid-template-columns: 1fr;
  }
  .gridlines {
    display: none;
  }
  .icon-row {
    flex-wrap: wrap;
    gap: 16px;
  }
  .since-g {
    grid-template-columns: 1fr;
    padding-block-end: 0;
  }
  .since-media img {
    max-width: 320px;
  }
  .logo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
  .also {
    margin-block-end: 0;
  }
  .pl-g {
    grid-template-columns: 1fr;
    margin-block-end: 0;
  }
  .pl-panel {
    min-height: 320px;
  }
  .flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 24px;
  }
  .flow::before {
    display: none;
  }
  .cert-r {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cert-n {
    display: none;
  }
  .cert-act {
    justify-content: flex-start;
  }
  .pill-wall {
    justify-content: flex-start;
    margin-block-end: 0;
  }
  .cert-list {
    margin-block-end: 0;
  }
  .board {
    max-height: none;
  }
  .board-cols {
    grid-template-columns: 1fr 1fr;
  }
  .ticket {
    display: none;
  }
  .board-detail {
    grid-template-columns: 1fr;
    padding-block-end: 0;
  }
  .marquee {
    grid-template-columns: 1fr;
    margin-block-end: 0;
  }
  .ask {
    margin-block-end: 0;
  }
  .ig {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .th-foot {
    flex-direction: column;
    margin-block-end: 0;
  }
  .cmd-key {
    display: none;
  }
  .tk-list li {
    opacity: 1;
    transform: none;
  }
  .story-controls {
    margin-block-end: 0;
  }
  .pl-cols {
    grid-template-columns: 1fr;
    max-height: none;
    margin-block-end: 0;
  }
  .pl-cols {
    grid-template-rows: none;
  }
  .pl-col {
    grid-row: auto;
    display: flex;
    flex-direction: column;
    padding: 18px 0;
    border-inline-start: 0;
    border-block-start: 1px solid var(--line);
  }
  .pl-big {
    font-size: 56px;
    min-width: 50px;
  }
  .apps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px 10px;
  }
  .app-ico {
    border-radius: 16px;
    font-size: 18px;
  }
  .app-nm {
    font-size: 11px;
  }
  .skill-lines {
    grid-template-columns: 1fr;
  }
  .sk-text {
    margin-block-end: 0;
  }
  .pl-g {
    max-height: none;
  }
  .pl-panel {
    grid-template-columns: 1fr;
  }
  .pl-art svg {
    max-width: 200px;
  }
}

/* ---------- Accent: where the colour shows ----------
   Fills only, with --on-accent on top, so any accent stays readable. */

/* Header: the Next arrow. The menu keeps its own colours, with nothing behind the words. */
.next #next-label::before {
  content: '↓';
  display: inline-grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  margin-inline-end: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
}
/* Home: the 20+ chip. */
.icon-num {
  padding: 2px 10px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--on-accent);
}
/* Since: the lines that draw over the counting figures. */
.since-nums li::before {
  height: 3px;
  top: -2px;
  background: var(--accent);
}
/* Story: progress and handle. */
.progress,
.handle span,
.handle span::after {
  background: var(--accent);
}
.progress {
  height: 4px;
  bottom: -2px;
}
.tick-label.on {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 4px;
}
/* Work: the open case number. */
.work-item.on .wi-n {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: 4px;
  padding-inline: 4px;
  justify-self: start;
}
/* How I lead: the open step is the accent card. */
.acc-item.on {
  background: var(--card-bg);
  color: var(--card-fg);
}
/* AI: the Ask button. */
.cmd-go {
  background: var(--accent);
  color: var(--on-accent);
}
.cmd-go:hover {
  color: var(--on-accent);
  filter: brightness(1.05);
}
/* Tools: the tile under the pointer. */
.app:hover .app-ico {
  background: var(--accent);
  color: var(--on-accent);
}
/* Thinking: the open tab. */
.th-tab[aria-selected='true'] {
  color: var(--text);
  box-shadow: inset 0 -3px var(--accent);
}
/* Contact: Download CV, a full accent block with the file details under the label. */
.cv-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 380px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--accent);
  color: var(--on-accent);
  text-decoration: none;
  transition: transform 0.25s var(--ease);
}
.cv-t {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.cv-m {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.75;
}
.cv-arrow {
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1;
  transition: transform 0.3s var(--ease);
}
.cv-btn:hover {
  transform: translateY(-2px);
}
.cv-btn:hover .cv-arrow {
  transform: translateY(4px);
}

/* ---------- Motion: light entrances and small interactions ----------
   Only transform and opacity animate. Each fold plays once when it is first
   reached (.seen). Hidden starting states sit behind .motion, which the script
   sets, so the page reads fine without it or with reduced motion. */

/* Fold headings rise line by line. */
.rv .line {
  display: block;
  overflow: hidden;
  padding-block-end: 0.08em;
  margin-block-end: -0.08em;
}
.rv .line > span {
  display: block;
  transition: transform 0.9s var(--ease);
}
.rv .line:nth-child(2) > span {
  transition-delay: 0.08s;
}
.rv .line:nth-child(3) > span {
  transition-delay: 0.16s;
}
.motion .fold:not(.seen) .rv .line > span {
  transform: translateY(105%);
}
.head-r {
  transition:
    opacity 0.6s var(--ease) 0.3s,
    transform 0.6s var(--ease) 0.3s;
}
.motion .fold:not(.seen) .head-r {
  opacity: 0;
  transform: translateY(10px);
}

/* Everything that arrives one after another shares this. */
.since-nums li,
.logo-grid li,
.cmd-sug button,
.posts li,
.cert-r,
.links li {
  transition:
    opacity 0.6s var(--ease) calc(0.15s + var(--i, 0) * 60ms),
    transform 0.7s var(--ease) calc(0.15s + var(--i, 0) * 60ms),
    color 0.2s;
}
.motion .fold:not(.seen) :is(.since-nums li, .logo-grid li, .cmd-sug button, .posts li, .cert-r, .links li) {
  opacity: 0;
  transform: translateY(18px);
}
.motion .fold:not(.seen) .logo-grid li {
  transform: translateY(18px) scale(0.94);
}
/* The steps keep their own open and close timing. */
.acc-item {
  transition:
    flex-grow 0.6s var(--ease),
    background 0.4s,
    opacity 0.6s var(--ease) calc(0.15s + var(--i, 0) * 70ms),
    transform 0.8s var(--ease) calc(0.15s + var(--i, 0) * 70ms);
}
.motion .fold:not(.seen) .acc-item {
  opacity: 0;
  transform: translateY(30px);
}

/* Home: the icons follow the title in, and nod when hovered. */
.icon-row li {
  transition:
    color 0.2s,
    transform 0.3s var(--ease);
}
.motion .icon-row li {
  animation: rise 0.7s var(--ease) calc(0.5s + var(--i, 0) * 50ms) backwards;
}
.icon-row li:hover {
  color: var(--text);
  transform: translateY(-3px) rotate(-8deg);
}

/* Header: the section number rolls in. */
#sec-n {
  display: inline-block;
}
#sec-n.roll {
  animation: roll 0.45s var(--ease);
}
@keyframes roll {
  from {
    opacity: 0;
    transform: translateY(70%);
  }
}

/* Designing since: a dark line draws over each figure as it counts. */
.since-nums li {
  position: relative;
}
.since-nums li::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: -1px;
  height: 1px;
  background: var(--text);
  transform-origin: left;
  transition: transform 1.4s var(--ease) calc(0.3s + var(--i, 0) * 120ms);
}
.motion .fold:not(.seen) .since-nums li::before {
  transform: scaleX(0);
}

/* Story: the big year settles in on each new chapter. */
.story-year.bump {
  animation: bump 0.5s var(--ease);
}
@keyframes bump {
  from {
    opacity: 0.2;
    transform: translateY(8%);
  }
}

/* Work: each preview arrives with a slow zoom, then drifts against the pointer. */
.wp-media img {
  scale: 1.05;
  translate: calc(var(--mx, 0) * -14px) calc(var(--my, 0) * -14px);
  transition: translate 0.6s var(--ease);
  animation: wp-in 0.8s var(--ease);
}
@keyframes wp-in {
  from {
    opacity: 0;
    transform: scale(1.08);
  }
}

/* Certificates: the title steps aside when its row is hovered. */
.cert-main h3 {
  transition: transform 0.3s var(--ease);
}
.cert-r:hover .cert-main h3 {
  transform: translateX(8px);
}

/* Tools: tiles swell near the pointer, growing from their base like a dock. */
.app-ico {
  transform-origin: 50% 100%;
  transition:
    background 0.3s,
    color 0.3s,
    transform 0.3s var(--ease),
    scale 0.2s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-snap-type: none;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
  .intro-title .line > span {
    transform: none;
  }
  .tk-list li {
    opacity: 1;
    transform: none;
  }
}
