/* ============================================================
   Kevin Charboneau — Portfolio
   SECTIONS: work (pinned vertical carousel) · about · contact · case study
   ============================================================ */

/* ============================================================
   WORK  —  pinned vertical carousel of 6 projects
   The .work-track is tall; .work-stage is sticky & full-height.
   Scroll progress through the track drives the active project.
   ============================================================ */
.work {
  background: var(--ink-2);
  position: relative;
  box-shadow: 0 -1px 0 var(--line-soft);
}
.work-track { position: relative; }
.work-stage {
  position: sticky; top: 0;
  height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.work-stage__head {
  flex: 0 0 auto;
  padding: 24px var(--margin) 6px;
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter);
  align-items: baseline;
}
.work-stage__eyebrow { grid-column: 1 / 7; display: flex; align-items: center; gap: 14px; font-family: var(--font-mono); font-size: var(--t-eyebrow); font-weight: 400; letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--steel-soft); }
.work-stage__eyebrow::before { content:""; width:34px; height:1px; background: var(--line-2); }
.work-stage__count {
  grid-column: 10 / 13; text-align: right; white-space: nowrap;
  font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2);
  letter-spacing: var(--tr-caps-sm);
}
.work-stage__count b { color: var(--ice); font-weight: 500; }

.work-body {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  column-gap: var(--gutter);
  align-items: stretch;
  padding: clamp(12px, 2vh, 24px) var(--margin) clamp(28px, 5vh, 56px);
}

/* ---- Left: project details (stacked, only active shown) ---- */
.work-detail {
  grid-column: 1 / 6;
  position: relative;
  top: 0;
  align-self: start;
  padding-right: clamp(8px, 2vw, 36px);
}
.wd {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-start;
  opacity: 0; visibility: hidden;
  transform: translateY(calc(20px * var(--motion)));
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-3) var(--ease-emph), visibility var(--dur-2);
  pointer-events: none;
}
.wd.is-active {
  position: relative;
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
}
.wd__meta {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: calc(var(--t-meta) * var(--wk-meta-scale, 1)); color: var(--fg-2);
  letter-spacing: var(--wk-meta-tr, var(--tr-caps-sm)); text-transform: uppercase;
  margin: 0 0 18px;
}
.wd__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--steel-soft); }
.wd__eyebrow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-family: var(--font-mono); font-size: calc(var(--t-eyebrow) * var(--wk-eyebrow-scale, 1)); color: var(--steel-soft); letter-spacing: var(--wk-eyebrow-tr, var(--tr-caps)); text-transform: uppercase; margin: 0 0 22px; }
.wd__title {
  font-family: var(--font-display);
  font-weight: var(--wk-title-weight, 800);
  font-size: calc(var(--t-h1) * 0.8 * var(--wk-title-scale, 1));
  line-height: var(--wk-title-lh, var(--lh-tight));
  letter-spacing: var(--wk-title-tr, var(--tr-head));
  color: var(--fg);
  margin: 0 0 20px;
  text-wrap: balance;
}
.wd__desc {
  font-size: calc(var(--t-body-lg) * 0.8 * var(--wk-desc-scale, 1));
  line-height: var(--wk-desc-lh, 1.5);
  color: var(--fg-1);
  max-width: 46ch;
  margin: 0 0 26px;
}
.wd__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.wd__tag {
  font-family: var(--font-mono); font-size: calc(12px * var(--wk-tags-scale, 1)); letter-spacing: var(--wk-tags-tr, var(--tr-caps-sm));
  color: var(--fg-1); white-space: nowrap;
  padding: 6px 11px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: rgba(224,244,255,0.03);
}
.wd__open {
  appearance: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 12px;
  align-self: flex-start;
  padding: 12px 16px 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(224,244,255,0.04);
  color: var(--ice);
  font-family: var(--font-mono); font-size: calc(var(--t-meta) * var(--wk-cta-scale, 1)); letter-spacing: var(--wk-cta-tr, var(--tr-caps-sm));
  text-transform: uppercase; white-space: nowrap;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), gap var(--dur-2) var(--ease);
}
.wd__open:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); gap: 18px; }
.wd__open .ico { width: 16px; height: 16px; }

/* ---- Work detail: per-project achievements (compact inline rows) ---- */
.wd__ach { margin: 0 0 26px; }
.wd__ach .eyebrow { display: block; margin-bottom: 9px; }
.wd__ach-list { display: flex; flex-direction: column; gap: 8px; }
.wd__ach-item {
  display: flex; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--line); padding-top: 8px;
}
.wd__ach-metric {
  flex: none;
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.1rem; line-height: 1.1; color: var(--ice);
  letter-spacing: var(--tr-display);
}
.wd__ach-label {
  font-size: var(--t-meta); line-height: 1.35;
  color: var(--fg-1); max-width: 42ch;
}
.wd__ach-list.is-placeholder .wd__ach-metric,
.wd__ach-list.is-placeholder .wd__ach-label { opacity: 0.55; }

/* ---- Work detail: per-project "Features I led" (compact 2-col list) ---- */
.wd__feat { margin: 0 0 26px; }
.wd__feat .eyebrow { display: block; margin-bottom: 14px; }
.wd__feat-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px 28px;
}
.wd__feat-item {
  display: flex; align-items: baseline; gap: 10px;
  border-top: 1px solid var(--line); padding-top: 8px;
  min-width: 0;
}
.wd__feat-n {
  flex: none; font-family: var(--font-mono);
  font-size: var(--t-eyebrow); color: var(--steel-soft);
  letter-spacing: var(--tr-caps-sm);
}
.wd__feat-name { font-size: var(--t-meta); line-height: 1.35; color: var(--fg-1); text-wrap: pretty; }

/* Feature rows that have a media preview: subtle affordance + play glyph. */
.wd__feat-item--media { cursor: pointer; }
.wd__feat-item--media .wd__feat-name { transition: color 0.18s var(--ease); }
.wd__feat-item--media:hover .wd__feat-name,
.wd__feat-item--media:focus-visible .wd__feat-name { color: var(--fg); }
.wd__feat-play {
  flex: none; width: 12px; height: 12px; margin-left: auto;
  color: var(--steel-soft); opacity: 0.42;
  transform: translateX(-3px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), color 0.18s var(--ease);
}
.wd__feat-item--media:hover .wd__feat-play,
.wd__feat-item--media:focus-visible .wd__feat-play { opacity: 1; transform: none; color: var(--ice); }

/* ---- Feature media preview: centered lightbox over a dark scrim ---- */
.feat-take {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(12px, 2vh, 20px);
  padding: clamp(24px, 5vh, 60px);
  background: rgba(6,11,17,0.72);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
  animation: featTakeIn 0.22s var(--ease) both;
}
@keyframes featTakeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes featCardIn { from { opacity: 0; transform: scale(0.96) translateY(8px); } to { opacity: 1; transform: none; } }
.feat-take__card {
  position: relative;
  border-radius: 16px; overflow: hidden;
  background: #000;
  line-height: 0;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(224,244,255,0.10);
  animation: featCardIn 0.28s var(--ease-emph, var(--ease)) both;
}
.feat-take__video {
  display: block;
  max-width: min(92vw, 1100px);
  max-height: 74vh;
  width: auto; height: auto;
  object-fit: contain;
}
.feat-take__bar {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 0;
  height: 3px; background: rgba(224,244,255,0.16);
}
.feat-take__bar span {
  display: block; height: 100%; width: 0;
  background: var(--ice);
  box-shadow: 0 0 10px rgba(224,244,255,0.5);
  transition: width 0.14s linear;
}
.feat-take__caption {
  display: flex; align-items: center; gap: 12px;
  color: var(--fg-1);
}
.feat-take__caption .eyebrow { color: var(--steel-soft); }
.feat-take__caption .eyebrow::after {
  content: ""; display: inline-block; width: 4px; height: 4px; margin-left: 12px;
  border-radius: 50%; background: var(--steel-soft); vertical-align: middle;
}
.feat-take__name {
  font-family: var(--font-display); font-weight: 700;
  font-size: var(--t-h5); color: var(--fg); letter-spacing: -0.01em;
}
.feat-take__close {
  position: absolute; z-index: 3;
  top: clamp(16px, 2.4vw, 30px); right: clamp(16px, 2.4vw, 30px);
  width: 42px; height: 42px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--fg); cursor: pointer;
  border: 1px solid rgba(224,244,255,0.24);
  background: rgba(8,14,22,0.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease);
}
.feat-take__close:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.feat-take__close:active { transform: scale(0.94); }
.feat-take__close .ico { width: 18px; height: 18px; }
.feat-take__nav {
  position: absolute; z-index: 3; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--ice); background: rgba(12,18,26,0.55);
  border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer;
  transition: background 0.16s var(--ease), border-color 0.16s var(--ease), transform 0.16s var(--ease), color 0.16s var(--ease);
}
.feat-take__nav--prev { left: clamp(12px, 3vw, 40px); }
.feat-take__nav--next { right: clamp(12px, 3vw, 40px); }
.feat-take__nav:hover { background: var(--ice); color: var(--ink); border-color: var(--ice); }
.feat-take__nav:active { transform: translateY(-50%) scale(0.94); }
.feat-take__nav .ico { width: 22px; height: 22px; }
.feat-take__count {
  font-family: var(--font-mono); font-size: var(--t-body-sm);
  color: var(--steel-soft); letter-spacing: 0.06em;
}
.feat-take__count::before {
  content: ""; display: inline-block; width: 4px; height: 4px; margin-right: 12px;
  border-radius: 50%; background: var(--steel-soft); vertical-align: middle;
}
@media (prefers-reduced-motion: reduce) {
  .feat-take, .feat-take__card { animation: none; }
}

/* Short windows: the stage is pinned to 100svh with overflow hidden, so on a
   short viewport the big title + 9-item list can push the CTA past the edge.
   Compact the feature card's spacing only when height is tight — normal/tall
   windows keep the roomy layout above. */
@media (max-height: 860px) {
  .wd--feat .wd__eyebrow { margin-bottom: 10px; }
  .wd--feat .wd__title { margin-bottom: 8px; }
  .wd--feat .wd__desc { margin-bottom: 10px; }
  .wd__feat { margin-bottom: 10px; }
  .wd__feat .eyebrow { margin-bottom: 7px; }
  .wd__feat-list { gap: 5px 24px; }
  .wd__feat-item { padding-top: 5px; }
  .wd__feat-name { font-size: 0.8125rem; line-height: 1.25; }
}
@media (max-height: 760px) {
  .wd--feat .wd__desc { margin-bottom: 8px; }
  .wd__feat { margin-bottom: 8px; }
  .wd__feat-list { gap: 4px 22px; }
  .wd__feat-item { padding-top: 4px; }
  .wd__feat-name { font-size: 0.78rem; line-height: 1.2; }
}

/* ---- Work detail: "Before Meta" companies table ---- */
.wd--before .wd__desc { margin-bottom: 22px; }
.wd__firms { display: flex; flex-direction: column; }
.wd__firms-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 2.2fr) minmax(0, 1fr);
  align-items: start; gap: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}
.wd__firms-row--head { border-top: none; padding: 0 0 10px; }
.wd__firms-row--head .wd__firms-cell {
  font-family: var(--font-mono); font-size: var(--t-eyebrow);
  letter-spacing: var(--tr-caps); text-transform: uppercase; color: var(--steel-soft);
}
.wd__firms-cell { font-size: var(--t-body); color: var(--fg-1); min-width: 0; }
.wd__firms-cell--logo {
  width: 24px; height: 24px; align-self: start; margin-top: 6px;
}
.wd__firms-cell--logo image-slot { display: block; width: 24px; height: 24px; }
.wd__firms-cell--name { font-weight: 600; color: var(--fg); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 52px; }
.wd__firms-sub { display: block; font-weight: 400; font-size: 12px; color: var(--fg-2); white-space: normal; margin-top: 2px; }
.wd__firms-cell--muted { color: var(--fg-2); font-size: 14px; }
.wd__firms-head-co { grid-column: 1 / 3; }
.wd__firms-head-role { grid-column: 3; margin-left: -48px; }
.wd__firms-row .wd__firms-cell--muted { white-space: nowrap; margin-left: -48px; }
.wd__firms-cell--yr {
  text-align: right; font-family: var(--font-mono);
  font-size: var(--t-meta); white-space: nowrap;
}

/* "Before Meta" film-strip tile (no media) */
.work-frame--before { cursor: default; }
.work-frame__before {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(130% 120% at 50% 0%, var(--ink-3), var(--ink-2));
  text-align: center; padding: 24px;
}
.work-frame__before .eyebrow { color: var(--steel-soft); }
.work-frame__before-t {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.6rem); color: var(--fg); letter-spacing: var(--tr-display);
}

/* ---- Right: vertical FILM STRIP ---- */
.work-strip {
  grid-column: 6 / 13;
  position: relative;
  height: 100%;
  overflow: hidden;
}
.work-strip__track {
  position: absolute; left: 0; right: 0; top: 0;
  z-index: 3;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--dur-3) var(--ease-emph);
  will-change: transform;
}
.work-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--ink-3);
  border: 1px solid var(--line);
  cursor: pointer;
  opacity: 0.1;
  filter: saturate(0.8);
  transform: scale(0.965);
  transform-origin: right center;
  transition: opacity var(--dur-3) var(--ease), filter var(--dur-3) var(--ease),
              transform var(--dur-3) var(--ease-emph), border-color var(--dur-2) var(--ease);
}
.work-frame.is-active {
  opacity: 1;
  filter: none;
  transform: scale(1);
  border-color: var(--line-2);
  box-shadow: var(--shadow-float);
  cursor: default;
}
.work-frame__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work-frame__play {
  position: absolute; inset: 0; display: grid; place-items: center;
  opacity: 0; transition: opacity var(--dur-2) var(--ease);
}
.work-frame.is-active .work-frame__play { opacity: 0; }
.work-frame__play span {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); backdrop-filter: blur(12px) saturate(1.4);
  border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  transition: transform var(--dur-1) var(--ease);
}
.work-frame__play span::after {
  content: ""; width: 0; height: 0;
  border-style: solid; border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent #fff;
  margin-left: 3px;
}
.work-frame.is-active:hover .work-frame__play span { transform: scale(1.09); }
.work-frame__bar {
  position: absolute; left: 16px; right: 16px; bottom: 14px; height: 2px;
  background: rgba(255,255,255,0.22); border-radius: 2px; overflow: hidden;
  opacity: 0; transition: opacity var(--dur-2) var(--ease);
}
.work-frame.is-active .work-frame__bar { opacity: 1; }
.work-frame__bar i { display: block; height: 100%; width: 34%; background: var(--ice); border-radius: 2px; }

/* soft fades so neighbours bleed off top/bottom like a film strip */
.work-strip__fade { position: absolute; left: 0; right: 0; height: 14%; pointer-events: none; z-index: 2; }
.work-strip__fade--top { top: 0; background: linear-gradient(180deg, var(--ink-2), transparent); }
.work-strip__fade--bot { bottom: 0; background: linear-gradient(0deg, var(--ink-2), transparent); }

/* Mobile: collapse the pinned carousel into a stacked list */
@media (max-width: 860px) {
  .work-track { height: auto !important; }
  .work-stage { position: static; height: auto; overflow: visible; }
  .work-stage__head { padding-top: clamp(80px, 14vw, 120px); }
  .work-body { display: block; padding-bottom: 0; }
  .work-detail, .work-strip { display: none; }
}

/* ---- Mobile stacked project cards (hidden on desktop) ---- */
.work-mobile { display: none; }
@media (max-width: 860px) {
  .work-mobile { display: grid; gap: clamp(72px, 16vw, 120px); padding: clamp(44px, 11vw, 76px) var(--margin) clamp(60px, 12vw, 90px); }
  /* No card box — video, then content stacked beneath it. */
  .wm-card { display: grid; gap: clamp(22px, 5vw, 32px); }
  .wm-card__media {
    position: relative; aspect-ratio: 16/9;
    border-radius: var(--r-md); overflow: hidden;
    background: transparent;
  }
  .wm-card__media img,
  .wm-card__media video,
  .wm-card__media .work-frame__img { position: absolute; inset: 0; width:100%; height:100%; object-fit: cover; display: block; }
  .wm-card__media .work-media__ph { position: absolute; inset: 0; }
  /* Detail: reuse the desktop wd__* element styles, resized for mobile. */
  .wm-card__detail { display: flex; flex-direction: column; }
  .wm-card__detail .wd__eyebrow { margin: 0 0 12px; }
  .wm-card__detail .wd__title { font-size: var(--t-h3); margin: 0 0 14px; }
  .wm-card__detail .wd__desc { font-size: var(--t-body); max-width: none; margin: 0 0 20px; }
  .wm-card__detail .wd__firms-cell--name { white-space: normal; padding-right: 0; }
  .wm-card__detail .wd__firms-head-role,
  .wm-card__detail .wd__firms-row .wd__firms-cell--muted { margin-left: 0; }
}

/* ============================================================
   ABOUT
   ============================================================ */
.about { background: var(--ink); }
.about__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter);
  row-gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
.about__portrait {
  grid-column: 1 / 5;
  position: sticky; top: clamp(96px, 14vh, 140px);
}
.about__portrait-alt {
  position: absolute; top: 0; left: 0; width: 100%;
  aspect-ratio: 4/5; object-fit: cover; object-position: 50% 42%;
  border-radius: var(--r-md);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-3) var(--ease);
}
.about__portrait.is-alt .about__portrait-alt { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .about__portrait-alt { transition: none; }
}
.about__portrait image-slot,
.about__portrait .ph {
  display: block; width: 100%; height: auto; aspect-ratio: 4/5;
  border-radius: var(--r-md);
  background: var(--ink-3);
  border: 1px solid var(--line);
  overflow: hidden;
}
.about__id { margin-top: 18px; }
.about__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-h5); color: var(--fg); }
.about__loc { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); letter-spacing: var(--tr-caps-sm); margin-top: 4px; }
.about__mail { display: inline-block; margin-top: 14px; font-family: var(--font-mono); font-size: var(--t-meta); color: var(--ice); border-bottom: 1px solid var(--line-2); padding-bottom: 3px; transition: border-color var(--dur-1) var(--ease); }
.about__mail:hover { border-color: var(--ice); }

.about__main { grid-column: 6 / 13; }
.about__lead {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--t-h2);
  line-height: var(--lh-snug);
  letter-spacing: var(--tr-head);
  color: var(--fg);
  margin: 0 0 clamp(36px, 4vw, 56px);
  text-wrap: balance;
}
.about__lead em { font-style: normal; color: var(--fg); }
/* Hand-drawn highlighter swipe behind "scale of billions".
   Rough-edged SVG marker in saturated iris pink->violet for contrast
   against the white headline; wipes in like it's being drawn. */
.hl-sweep {
  position: relative;
  display: inline-block;
  isolation: isolate;
  padding: 0 0.08em;
}
.hl-sweep::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.16em; right: -0.16em;
  top: 65%; bottom: -4%;
  transform: rotate(-1.1deg);
  background-image: linear-gradient(100deg, #6e8798 0%, #5e7585 60%, #506574 100%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 56' preserveAspectRatio='none'%3E%3Cpath d='M6.5 14.4 C60 7.5 140 5.2 210 6.8 C258 7.9 302 10.4 314 16.8 C319 25 317 36 312 44.6 C300 50.8 250 52.6 196 53 C132 53.4 66 51.2 18 47.5 C7.5 43.5 3 33 3.8 24.2 C4.2 19.4 5.2 16.4 6.5 14.4 Z' fill='%23000'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 56' preserveAspectRatio='none'%3E%3Cpath d='M6.5 14.4 C60 7.5 140 5.2 210 6.8 C258 7.9 302 10.4 314 16.8 C319 25 317 36 312 44.6 C300 50.8 250 52.6 196 53 C132 53.4 66 51.2 18 47.5 C7.5 43.5 3 33 3.8 24.2 C4.2 19.4 5.2 16.4 6.5 14.4 Z' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.72s cubic-bezier(0.6, 0.02, 0.32, 1) 0.35s;
  opacity: 0.95;
}
.about__lead.is-in .hl-sweep::before { clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  .hl-sweep::before { transition: none; clip-path: inset(0 0 0 0); }
}
.about__points { display: grid; gap: 0; }
.about__point {
  display: grid; grid-template-columns: 40px 1fr; gap: 14px;
  padding: clamp(16px, 2vw, 22px) 0;
  border-top: 1px solid var(--line);
  font-size: var(--t-body-lg);
  line-height: 1.5;
  color: var(--fg-1);
  transition: color var(--dur-1) var(--ease);
}
.about__point:hover {
  color: var(--ice);
}
/* Shift the inner content on hover via transform (not padding) so the text
   column width never changes and wrapping stays put. */
.about__point .about__point-ic, .about__point .about__point-c {
  transition: transform var(--dur-2) var(--ease), color var(--dur-1) var(--ease);
}
.about__point:hover .about__point-ic, .about__point:hover .about__point-c {
  transform: translateX(12px);
}
/* Once revealed, .reveal.is-in's transition shorthand would otherwise clobber
   the point's color/padding-left transition (making hover snap). Re-declare it
   here at higher specificity: keep the staggered entrance on opacity/transform,
   and restore eased color/padding-left to match .contact__link. */
.about__point.reveal.is-in {
  transition: opacity var(--dur-4) var(--ease-emph) var(--rd, 0ms),
              transform var(--dur-4) var(--ease-emph) var(--rd, 0ms),
              color var(--dur-1) var(--ease);
}
.about__point:last-child { border-bottom: 1px solid var(--line); }
.about__point b { color: var(--fg); font-weight: 600; }
.about__point-ic {
  width: 24px; height: 24px;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 2px;
  color: var(--steel-soft);
}
.about__point-ic svg { width: 22px; height: 22px; display: block; }
.about__point:hover .about__point-ic { color: var(--ice); }

/* Intro bio line above the points */
.about__intro {
  font-size: var(--t-body-lg);
  line-height: 1.55;
  color: var(--fg-1);
  max-width: 60ch;
  margin: 0 0 clamp(24px, 3vw, 36px);
  text-wrap: pretty;
}

/* Each point: headline + supporting paragraph */
.about__point-c { display: grid; gap: 6px; align-content: start; }
.about__point-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--fg);
}
.about__point-b {
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--fg-1);
  text-wrap: pretty;
}
.about__point:hover .about__point-h { color: var(--ice); }

/* ---- About: compact achievements block (left column) ---- */
.about__ach { margin-top: clamp(28px, 3vw, 40px); }
.about__ach .eyebrow { display: block; margin-bottom: 16px; }
.about__ach-list { display: grid; gap: 18px; }
.about__ach-item { border-top: 1px solid var(--line); padding-top: 14px; }
.about__ach-metric {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 2vw, 1.9rem); line-height: 1; color: var(--ice);
  letter-spacing: var(--tr-display);
}
.about__ach-label {
  margin-top: 8px; font-size: var(--t-body); line-height: var(--lh-body);
  color: var(--fg-1); max-width: 34ch;
}
.about__ach-list.is-placeholder .about__ach-metric,
.about__ach-list.is-placeholder .about__ach-label { opacity: 0.55; }

@media (max-width: 820px) {
  .about__portrait { grid-column: 1/13; position: static; max-width: 360px; }
  .about__main { grid-column: 1/13; }
}
@media (max-width: 480px) {
  /* Tighten the point rows on small phones so the icon column doesn't eat the
     text width, and pull the lead in line with body margins. */
  .about__point { grid-template-columns: 30px 1fr; gap: 12px; }
  .about__point-ic, .about__point-ic svg { width: 20px; height: 20px; }
}

/* ============================================================
   CONTACT / FOOTER
   ============================================================ */
.contact { background: var(--ink-2); border-top: 1px solid var(--line-soft); position: relative; isolation: isolate; overflow: hidden; }
.contact__sparkles { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.contact .wrap { position: relative; z-index: 1; }
.contact__grid {
  display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter);
  row-gap: clamp(40px, 6vw, 64px); align-items: end;
}
.contact__lead { grid-column: 1 / 8; }
.contact__title {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--t-h1); line-height: var(--lh-tight); letter-spacing: var(--tr-display);
  color: var(--fg); margin: 16px 0 0;
}
.contact__title .ice { color: var(--ice); }
.contact__email {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(24px, 3vw, 36px);
  font-family: var(--font-display); font-weight: 600; font-size: var(--t-h4);
  color: var(--fg); border-bottom: 1px solid var(--line-2); padding-bottom: 8px;
  transition: gap var(--dur-2) var(--ease), border-color var(--dur-1) var(--ease);
}
.contact__email:hover { gap: 20px; border-color: var(--ice); color: var(--ice); }
.contact__email .ico { width: 22px; height: 22px; }
.contact__links { grid-column: 9 / 13; display: flex; flex-direction: column; }
.contact__link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 2px;
  border-top: 1px solid var(--line);
  color: var(--fg-1);
  font-size: var(--t-body); font-weight: 500;
  transition: color var(--dur-1) var(--ease), padding-left var(--dur-2) var(--ease);
}
.contact__link:last-child { border-bottom: 1px solid var(--line); }
.contact__link:hover { color: var(--ice); padding-left: 12px; }
.contact__link-l { display: inline-flex; align-items: center; gap: 12px; }
.contact__link-l .ico { width: 20px; height: 20px; flex: 0 0 auto; color: var(--fg-2); transition: color var(--dur-1) var(--ease); }
.contact__link:hover .contact__link-l .ico { color: var(--ice); }
.contact__link .h { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .contact__lead { grid-column: 1/13; }
  .contact__links { grid-column: 1/13; }
}

/* ============================================================
   CASE STUDY PAGE
   ============================================================ */
.cs { min-height: 100svh; background: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .cs { animation: csEnter 0.6s var(--ease-emph) both; }
}
@keyframes csEnter {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cs__hero { position: relative; padding-top: clamp(120px, 18vh, 200px); }
.cs__back {
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: clamp(28px, 4vw, 44px);
  font-family: var(--font-mono); font-size: var(--t-meta); letter-spacing: var(--tr-caps-sm);
  text-transform: uppercase; color: var(--fg-1); cursor: pointer;
  appearance: none; border: 0; background: none; padding: 0;
  transition: color var(--dur-1) var(--ease), gap var(--dur-2) var(--ease);
}
.cs__back:hover { color: var(--ice); gap: 14px; }
.cs__back .ico { width: 16px; height: 16px; }

.cs__top { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: 28px; align-items: end; }
.cs__intro { grid-column: 1 / 9; }
.cs__meta { display: flex; align-items: center; gap: 12px; font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); letter-spacing: var(--tr-caps-sm); text-transform: uppercase; margin-bottom: 18px; }
.cs__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--steel-soft); }
.cs__title { font-family: var(--font-display); font-weight: 800; font-size: var(--t-h1); line-height: var(--lh-snug); letter-spacing: var(--tr-head); color: var(--fg); margin: 0; text-wrap: balance; }
.cs__lede { grid-column: 9 / 13; font-size: var(--t-body-lg); line-height: 1.55; color: var(--fg-1); }

.cs__cover {
  margin-top: clamp(40px, 6vw, 72px);
  border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--line); background: var(--ink-3);
  aspect-ratio: 16/9; position: relative;
}
.cs__cover img { width: 100%; height: 100%; object-fit: cover; }

.cs__facts { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); row-gap: 24px; margin-top: clamp(40px, 5vw, 64px); }
.cs__fact { grid-column: span 3; }
.cs__fact .k { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); letter-spacing: var(--tr-caps-sm); text-transform: uppercase; }
.cs__fact .v { margin-top: 8px; font-size: var(--t-body); color: var(--fg); line-height: 1.4; }
@media (max-width: 760px) { .cs__intro,.cs__lede { grid-column: 1/13; } .cs__fact { grid-column: span 6; } }

.cs__body { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gutter); margin-top: clamp(56px, 8vw, 110px); }
.cs__section { grid-column: 3 / 11; margin-bottom: clamp(40px, 5vw, 72px); }
.cs__h { font-family: var(--font-display); font-weight: 700; font-size: var(--t-h3); letter-spacing: var(--tr-head); color: var(--fg); margin: 0 0 16px; }
.cs__p { font-size: var(--t-body-lg); line-height: var(--lh-body); color: var(--fg-1); margin: 0 0 16px; max-width: 62ch; }
.cs__list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 12px; }
.cs__list li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; font-size: var(--t-body); color: var(--fg-1); }
.cs__list li::before { content: ""; width: 6px; height: 6px; margin-top: 0.6em; border-radius: 50%; background: var(--steel-soft); }
@media (max-width: 760px) { .cs__section { grid-column: 1/13; } }

/* ---- Features table ---- */
.cs__ftable { margin-top: 20px; border-top: 1px solid var(--line); }
.cs__ftrow {
  display: grid;
  grid-template-columns: 40px minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px; align-items: baseline;
  padding: clamp(14px, 1.6vw, 18px) 0;
  border-bottom: 1px solid var(--line);
  transition: color var(--dur-1) var(--ease), padding-left var(--dur-2) var(--ease);
}
.cs__ftrow:not(.cs__ftrow--head):hover { color: var(--ice); padding-left: 10px; }
.cs__ftrow--head {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line-soft);
}
.cs__ftrow--head .cs__ftcell {
  font-family: var(--font-mono); font-size: var(--t-meta);
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--fg-2);
}
.cs__ftcell { font-size: var(--t-body); line-height: 1.45; color: var(--fg-1); }
.cs__ftcell--n { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); }
.cs__ftcell--feat { color: var(--fg); font-weight: 600; }
.cs__ftcell--muted { color: var(--fg-2); }
/* Dim the whole table slightly while it still holds placeholder rows. */
.cs__ftable.is-placeholder .cs__ftcell--feat,
.cs__ftable.is-placeholder .cs__ftcell--muted { opacity: 0.55; }
@media (max-width: 640px) {
  .cs__ftrow { grid-template-columns: 28px 1fr; gap: 4px 12px; }
  .cs__ftrow .cs__ftcell--muted { grid-column: 2; }
  .cs__ftrow--head .cs__ftcell:nth-child(3),
  .cs__ftrow--head .cs__ftcell:nth-child(4) { display: none; }
}

/* ---- Achievements ---- */
.cs__ach {
  margin-top: 20px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}
.cs__ach-item {
  padding: clamp(22px, 2.6vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--ink-2);
  transition: border-color var(--dur-1) var(--ease), transform var(--dur-2) var(--ease);
}
.cs__ach-item:hover { border-color: var(--steel-soft); transform: translateY(-3px); }
.cs__ach-metric {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1; color: var(--ice);
  letter-spacing: var(--tr-display);
}
.cs__ach-label {
  margin-top: 14px; font-size: var(--t-body); line-height: var(--lh-body);
  color: var(--fg-1); max-width: 40ch;
}
.cs__ach.is-placeholder .cs__ach-metric,
.cs__ach.is-placeholder .cs__ach-label { opacity: 0.55; }
@media (max-width: 640px) { .cs__ach { grid-template-columns: 1fr; } }

.cs__next {
  grid-column: 1 / 13;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: clamp(40px, 6vw, 80px); padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}
.cs__next .lbl { font-family: var(--font-mono); font-size: var(--t-meta); color: var(--fg-2); letter-spacing: var(--tr-caps-sm); text-transform: uppercase; }
.cs__next .ttl { font-family: var(--font-display); font-weight: 800; font-size: var(--t-h2); letter-spacing: var(--tr-head); color: var(--fg); margin-top: 8px; transition: color var(--dur-1) var(--ease); }
.cs__next:hover .ttl { color: var(--ice); }
.cs__next .arrow { width: 54px; height: 54px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--ice); flex: 0 0 auto; transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease); }
.cs__next:hover .arrow { background: var(--ice); color: var(--ink); }
