/* ===========================
   Design tokens
   =========================== */
:root {
  --color-bg: #fcfcf8;
  --color-text-darkest: #311c0a;
  --color-text-dark: #422d18;
  --color-text-mid: #6b5f48;
  --color-border: #d9d9d9;
  --color-green: #576f00;
  --color-btn-text: #fcfbf9;

  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Figtree", system-ui, sans-serif;

  --container-width: 1200px;
  --container-padding: 120px;
}

/* ===========================
   Reset & base
   =========================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none;
}

html {
  font-size: 16px;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-dark);
  font-family: var(--font-sans);
  min-height: 100vh;
}

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

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

button {
  font-family: var(--font-sans);
  border: none;
}

/* ===========================
   Custom cursor
   =========================== */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 20px;
  height: 20px;
  background-color: var(--color-green);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  white-space: nowrap;
  transition:
    width 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    height 0.35s cubic-bezier(0.34, 1.4, 0.64, 1),
    border-radius 0.35s ease;
}

.cursor__pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.cursor__icon {
  font-family: "Material Symbols Outlined";
  font-size: 20px;
  color: var(--color-btn-text);
  line-height: 1;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.cursor__label {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--color-btn-text);
  line-height: normal;
}

#cursor.cursor--salt-hover {
  width: 170px;
  height: 40px;
  border-radius: 20px;
}

#cursor.cursor--salt-hover .cursor__pill {
  opacity: 1;
  transition-delay: 0.18s;
}

/* ===========================
   Layout container
   =========================== */
.nav__inner,
.hero,
.work,
.play,
.cs {
  max-width: calc(var(--container-width) + var(--container-padding) * 2);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ===========================
   Navigation
   =========================== */
.nav {
  padding-block: 24px;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
}

.nav__link {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-mid);
  line-height: normal;
  width: 80px;
  text-align: center;
  transition: color 0.2s;
}

.nav__link--active {
  font-weight: 600;
  color: var(--color-text-darkest);
}

.nav__link:hover {
  color: var(--color-text-dark);
}

.nav__logo {
  width: 57px;
  height: 52px;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
}

/* Replicates exact Figma crop: image is 359.51% wide, offset left -132.61%, top -15.72% */
.nav__logo-crop {
  position: relative;
  width: 57px;
  height: 52px;
  overflow: hidden;
}

.nav__logo-img {
  position: absolute;
  width: 359.51%;
  height: 296.86%;
  left: -132.61%;
  top: -15.72%;
  max-width: none;
  display: block;
}

/* ===========================
   Hero
   =========================== */
.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-block: 72px 72px;
}

.hero__intro {
  max-width: 698px;
}

.hero__text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 45px;
  line-height: 1.2;
  color: var(--color-text-mid);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.hero__name {
  font-style: italic;
  color: var(--color-text-darkest);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.hero__text br + * {
  color: var(--color-text-mid);
}

/* The comma and the sentence after the name */
.hero__text {
  /* Inline spans handled via HTML structure */
}

.hero__roles {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 22px;
  row-gap: 10px;
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  flex-shrink: 0;
  width: 372px;
  align-content: start;
}

/* Transparent to the grid — children participate directly in the 2-column layout */
.hero__role {
  display: contents;
}

.hero__role-label {
  color: var(--color-text-mid);
  text-align: right;
  white-space: nowrap;
}

.hero__role-label--current {
  color: var(--color-text-dark);
}

.hero__role-value {
  color: var(--color-text-mid);
}

.hero__role-value--current {
  color: var(--color-text-dark);
}

/* ===========================
   Work section
   =========================== */
.work {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-bottom: 120px;
}

.work__col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ===========================
   Cards — shared
   =========================== */
.card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  transition: transform 0.22s ease;
}

.card__link:hover {
  transform: translateY(-4px);
}

.card__link .card__media {
  transition: opacity 0.22s ease;
}

.card__link:hover .card__media {
  opacity: 0.92;
}

/* Arrow indicator that slides in on hover */
.card__link .card__footer {
  position: relative;
}

.card__link .card__footer::after {
  content: "↗";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  opacity: 0;
  font-size: 18px;
  color: var(--color-text-mid);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.card__link:hover .card__footer::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.card__media {
  border-radius: 6px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  position: relative;
}

.card__footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 24px;
  line-height: 1.2;
  color: var(--color-text-dark);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.card__meta {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-mid);
  text-align: right;
  flex-shrink: 0;
  min-width: 90px;
}

/* ===========================
   Card: YouTube
   =========================== */
.card__media--youtube {
  background: linear-gradient(180deg, #df3737 11.394%, #f9fbfa 109%);
  height: 378px;
  overflow: hidden;
  position: relative;
}

.card__phone-row {
  position: absolute;
  top: 112px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.card__phone {
  flex: 1;
  min-width: 0;
  height: 266px;
  overflow: hidden;
  position: relative;
}

.card__phone-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 137%;
  object-fit: cover;
  object-position: top center;
  max-width: none;
  display: block;
}

/* ===========================
   Card: Salt Athletic
   =========================== */
.card__media--salt {
  background: linear-gradient(180deg, #000 34.534%, #fffafa 218.62%);
  height: 341px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.card__salt-logo {
  width: 42.52%;
  height: auto;
  display: block;
}

/* ===========================
   Card: Hackville / Design System
   =========================== */
.card__media--hackville {
  background: linear-gradient(180deg, #d7e3ff 11.394%, #f9fbfa 92.404%);
  height: 621px;
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.card__hackville-imgs {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.card__hackville-top {
  width: 100%;
  height: 247px;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
  flex-shrink: 0;
}

.card__hackville-bottom {
  display: flex;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.card__hackville-bl {
  width: 118px;
  flex-shrink: 0;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 4px;
}

.card__hackville-br {
  flex: 1;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  border-radius: 4px;
}


/* ===========================
   Responsive tweaks
   =========================== */

/* Touch/mobile devices — restore native cursor */
@media (hover: none), (pointer: coarse) {
  #cursor { display: none; }
  * { cursor: auto !important; }
}

@media (max-width: 1100px) {
  :root {
    --container-padding: 48px;
  }

  .hero__text {
    font-size: 36px;
  }

  .hero__roles {
    font-size: 17px;
    width: 300px;
  }
}

@media (max-width: 860px) {
  :root {
    --container-padding: 24px;
  }

  .nav {
    padding-block: 16px;
  }

  .nav__inner {
    gap: 32px;
  }

  .nav__link {
    font-size: 17px;
    width: auto;
  }

  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    padding-block: 48px 60px;
  }

  .hero__roles {
    width: 100%;
  }

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

@media (max-width: 560px) {
  :root {
    --container-padding: 20px;
  }

  .nav {
    padding-block: 14px;
  }

  .hero {
    padding-block: 36px 48px;
  }

  /* Nav: clover slides to the left, links cluster to the right */
  .nav__inner {
    justify-content: flex-start;
    gap: 0 20px;
  }

  .nav__logo {
    order: -1;
    margin-right: auto;
  }

  .nav__link--resume {
    display: none;
  }

  .nav__link {
    font-size: 16px;
  }

  /* Hero */
  .hero__text {
    font-size: 28px;
  }

  .hero__roles {
    font-size: 16px;
    column-gap: 14px;
  }

  /* Cards: stack label below title */
  .card__footer {
    flex-direction: column;
    gap: 6px;
  }

  .card__meta {
    text-align: left;
  }

  /* YouTube card: scale down */
  .card__media--youtube {
    height: 240px;
  }

  .card__phone-row {
    top: 52px;
  }

  .card__phone {
    height: 188px;
  }

  /* Salt card: scale down */
  .card__media--salt {
    height: 220px;
  }

  /* Hackville card: scale down */
  .card__media--hackville {
    height: 360px;
    padding: 16px;
  }

  .card__hackville-top {
    height: 170px;
  }

  /* Footer: stack vertically */
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 24px var(--container-padding) 32px;
    margin-block-start: 48px;
  }

  .site-footer__sep {
    display: none;
  }
}

@media (max-width: 400px) {
  .hero__text {
    font-size: 24px;
  }

  .card__media--youtube {
    height: 200px;
  }

  .card__phone-row {
    top: 36px;
  }

  .card__phone {
    height: 160px;
  }

  .card__media--salt {
    height: 190px;
  }

  .card__media--hackville {
    height: 300px;
  }

  .card__hackville-top {
    height: 130px;
  }
}

/* ===========================
   About page
   =========================== */
.about {
  max-width: calc(var(--container-width) + var(--container-padding) * 2);
  margin-inline: auto;
  padding-inline: var(--container-padding);
  padding-bottom: 120px;
}

.about__content {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 80px;
  padding-block-start: 72px;
}

/* Left column — portrait only, sticky */
.about__left {
  /* stretches to match right column height via grid */
}

.about__portrait-frame {
  position: sticky;
  top: 30px;
  width: 100%;
  aspect-ratio: 4 / 5;
  border: 1px solid #e8e6e5;
  border-radius: 6px;
  overflow: hidden;
}

.about__portrait-img {
  position: absolute;
  width: 152.43%;
  height: 100%;
  left: -40.08%;
  top: 0;
  max-width: none;
  display: block;
  object-fit: cover;
}

/* Right column — bio + sections */
.about__right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.about__bio {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__name {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 40px;
  line-height: 1.2;
  color: var(--color-text-darkest);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-optical-sizing: auto;
}

.about__body {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(49, 28, 10, 0.6);
}

.about__sections {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.about__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.about__section-title {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  color: var(--color-text-darkest);
}

.about__entries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about__entry {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(49, 28, 10, 0.6);
}

.about__divider {
  border: none;
  border-top: 1px solid #e8e6e5;
  margin: 0;
  width: 100%;
}

/* Snap photos — full-width bottom strip */
.about__snaps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 60px;
}

.about__snap {
  position: relative;
  height: 340px;
  overflow: hidden;
  border-radius: 6px;
}

.about__snap-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* About responsive */
@media (max-width: 1100px) {
  .about__content {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
  }
}

@media (max-width: 860px) {
  .about__content {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about__portrait-frame {
    position: relative;
    max-width: 480px;
    aspect-ratio: 4 / 3;
  }

  /* Reset desktop percentage crop — let object-fit handle it naturally */
  .about__portrait-img {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    object-fit: cover;
    object-position: center top;
  }

  .about__name {
    font-size: 36px;
  }
}

@media (max-width: 560px) {
  .about__content {
    padding-block-start: 40px;
    gap: 40px;
  }

  .about__portrait-frame {
    aspect-ratio: 3 / 2;
    max-width: 100%;
  }

  .about__name {
    font-size: 30px;
  }

  .about__body,
  .about__entry {
    font-size: 16px;
  }

  .about__section-title {
    font-size: 17px;
  }

  .about__snaps {
    grid-template-columns: 1fr 1fr;
    margin-top: 32px;
    gap: 8px;
  }

  .about__snap {
    height: 200px;
  }
}

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

  .about__snap {
    height: 240px;
  }
}

/* ── Contact links (about bio) ───────────────────────────── */

.about__contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-block-start: 20px;
}

.about__contact-link {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.about__contact-link:hover {
  color: var(--color-text-darkest);
  border-bottom-color: var(--color-text-darkest);
}

/* ── Site footer ─────────────────────────────────────────── */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 32px 48px 40px;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--color-text-mid);
  border-top: 1px solid var(--color-border);
  margin-block-start: 80px;
}

.site-footer__name {
  color: var(--color-text-dark);
  font-weight: 500;
}

.site-footer__sep {
  opacity: 0.4;
}

.site-footer__link {
  color: var(--color-text-mid);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.site-footer__link:hover {
  color: var(--color-text-darkest);
  border-bottom-color: var(--color-text-darkest);
}

/* ===========================
   Play page
   =========================== */
.play {
  display: flex;
  flex-direction: column;
  gap: 52px;
  padding-block: 72px 120px;
}

/* Page header */
.play-header {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-block-end: 20px;
}

.play-heading {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 45px;
  line-height: 1.2;
  color: var(--color-text-darkest);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.play-subtitle {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-dark);
}

/* Section shared */
.play-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.play-section__title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-text-darkest);
}

/* ── Prototyping section ─────────────────────────────────── */
.play-proto {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.play-proto__item {
  height: 280px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: #f7f7f7;
}

.play-proto__gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Visual design section ───────────────────────────────── */
.play-visual {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* Fixed width so each poster shows at a readable, thumbnail size */
.play-visual__item {
  width: 260px;
  flex-shrink: 0;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  background: #fafaf8;
}

.play-visual__img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── Illustration section ────────────────────────────────── */
.play-illus {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

/* Each frame is a square tile — percentage sizing inside scales with it */
.play-illus__frame {
  flex: 1;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  background: #fff;
}

.play-illus__frame--dark {
  background: #1c1e21;
  border-color: #1c1e21;
}

/* Frame 1 — full bleed cover image */
.play-illus__img--fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Frames 2 & 3 — centred inner crop container (% dimensions scale with frame) */
.play-illus__inner {
  position: absolute;
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.play-illus__inner--paper {
  width: 78.6%;
  height: 82.3%;
  left: 50%;
  top: calc(50% + 2.1%);
}

.play-illus__inner--ladybug {
  width: 94%;
  height: 71%;
  left: 50%;
  top: 50%;
}

/* Images within inner crop containers */
.play-illus__crop {
  position: absolute;
  max-width: none;
  display: block;
}

.play-illus__crop--paper {
  width: 138.52%;
  height: 133.4%;
  left: -20%;
  top: -17.77%;
}

.play-illus__fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Frame 4 — boxes meet just past the midpoint; characters sit close but clear */
.play-illus__shrimp-img {
  position: absolute;
  width: 80%;
  height: 56%;
  left: 50%;
  transform: translateX(-50%);
  object-fit: contain;
  display: block;
}

.play-illus__shrimp-img:first-child {
  top: 0;
  object-position: bottom center;
}

.play-illus__shrimp-img:last-child {
  bottom: 0;
  object-position: top center;
}

/* ── Play responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .play {
    gap: 40px;
    padding-block: 48px 80px;
  }

  .play-proto {
    grid-template-columns: 1fr;
  }

  .play-proto__item {
    height: 240px;
  }

  .play-visual {
    gap: 16px;
  }

  .play-visual__item {
    width: 200px;
  }

  /* Horizontal scroll strip — last frame peeks to signal more content */
  .play-illus {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .play-illus::-webkit-scrollbar {
    display: none;
  }

  .play-illus__frame {
    flex: 0 0 72%;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 560px) {
  .play-heading {
    font-size: 34px;
  }

  .play-proto__item {
    height: 200px;
  }

  .play-visual {
    flex-direction: column;
    gap: 10px;
  }

  .play-visual__item {
    width: 100%;
  }

  .play-illus__frame {
    flex: 0 0 80%;
  }
}

/* ===========================
   Case study pages
   =========================== */

/* Container */
.cs {
  padding-bottom: 120px;
}

/* Hero image */
.cs__hero {
  padding-block-start: 24px;
}

.cs__hero-img {
  width: 100%;
  aspect-ratio: 5 / 2;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

/* Hackville hero — taller frame, contain so nothing is cropped */
.cs__hero--hackville {
  background: #f0f0ec;
  border-radius: 16px;
  border: 1px solid var(--color-border);
}

.cs__hero-img--contain {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  padding: 12px;
}

/* Intro: title, description, meta */
.cs__intro {
  padding-block: 52px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs__title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 72px;
  line-height: 1.1;
  color: var(--color-text-darkest);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

.cs__description {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-mid);
  max-width: 640px;
}

.cs__meta {
  display: flex;
  gap: 48px;
  padding-block-start: 4px;
}

.cs__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs__meta-label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-text-darkest);
}

.cs__meta-value {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-mid);
}

.cs__rule {
  border: none;
  border-top: 1px solid var(--color-border);
  margin-block-start: 8px;
  width: 100%;
}

/* Two-column body */
.cs__body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 60px;
  padding-block-start: 60px;
}

/* Sticky sidebar */
.cs__sidebar {
  position: sticky;
  top: 40px;
  height: fit-content;
}

.cs__toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs__toc-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs__toc-heading {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-dark);
  text-decoration: none;
}

.cs__toc-heading:hover {
  color: var(--color-text-mid);
}

.cs__toc-sub {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-inline-start: 10px;
}

.cs__toc-link {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-mid);
  text-decoration: none;
}

.cs__toc-link:hover {
  color: var(--color-text-dark);
}

/* Main content column */
.cs__content {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

/* Section */
.cs__section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cs__label {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(49, 28, 10, 0.45);
}

.cs__heading {
  font-family: var(--font-sans);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-darkest);
}

.cs__subheading {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text-darkest);
}

.cs__text {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.7;
  color: rgba(49, 28, 10, 0.65);
}

.cs__subsection {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Section divider */
.cs__divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* Media placeholders */
.cs__media-placeholder {
  background: #f7f7f7;
  border: 1.5px dashed rgba(49, 28, 10, 0.15);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.cs__media-placeholder--tall {
  height: 340px;
}

.cs__media-placeholder--xl {
  height: 440px;
}

.cs__placeholder-label {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: rgba(49, 28, 10, 0.3);
  letter-spacing: 0.03em;
}

/* Insight pill */
.cs__insight {
  background: #f7f7f7;
  border: 1px solid rgba(49, 28, 10, 0.08);
  border-radius: 8px;
  padding: 20px 24px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(49, 28, 10, 0.65);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.cs__insight-quote {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: rgba(49, 28, 10, 0.2);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  flex-shrink: 0;
  margin-top: -2px;
}

/* Row of insight pills */
.cs__insights-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* HMW statement */
.cs__hmw {
  background: #b2c248;
  border-radius: 10px;
  padding: 44px 52px;
}

.cs__hmw-text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: 34px;
  line-height: 1.35;
  color: #311c0a;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

/* ─── Case study responsive ─── */

@media (max-width: 1100px) {
  .cs__title {
    font-size: 56px;
  }

  .cs__body {
    grid-template-columns: 120px 1fr;
    gap: 48px;
  }

  .cs__heading {
    font-size: 28px;
  }

  .cs__hmw-text {
    font-size: 28px;
  }
}

@media (max-width: 860px) {
  .cs__title {
    font-size: 44px;
  }

  .cs__body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cs__sidebar {
    display: none;
  }

  .cs__heading {
    font-size: 26px;
  }

  .cs__hmw-text {
    font-size: 26px;
  }

  .cs__hmw {
    padding: 32px 36px;
  }

  .cs__insights-row {
    grid-template-columns: 1fr;
  }

  .cs__meta {
    flex-wrap: wrap;
    gap: 20px 40px;
  }
}

@media (max-width: 560px) {
  .cs__title {
    font-size: 34px;
  }

  .cs__heading {
    font-size: 22px;
  }

  .cs__text {
    font-size: 16px;
  }

  .cs__hmw-text {
    font-size: 22px;
  }

  .cs__hmw {
    padding: 28px 24px;
  }

  .cs__hero-img {
    border-radius: 10px;
    aspect-ratio: 4 / 3;
  }

  .cs__content {
    gap: 56px;
  }

  .cs__media-placeholder--tall {
    height: 240px;
  }

  .cs__media-placeholder--xl {
    height: 300px;
  }
}

/* ─── Under construction banner ─── */
.cs__wip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f7f0;
  border: 1px solid rgba(87, 111, 0, 0.25);
  border-radius: 10px;
  padding: 16px 24px;
  margin-block-start: 8px;
}

.cs__wip-icon {
  font-size: 20px;
  color: var(--color-green);
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  flex-shrink: 0;
}

.cs__wip-text {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-mid);
}

/* ─── GIF teaser row ─── */
.cs__teaser {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-block-start: 48px;
}

.cs__teaser--single {
  grid-template-columns: 1fr;
  max-width: 800px;
}

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

.cs__teaser-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #f0f0f0;
}

.cs__teaser-gif {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 860px) {
  .cs__teaser,
  .cs__teaser--two {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* ─── Case study icon elements ─── */

/* Back to work link */
.cs__back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-mid);
  text-decoration: none;
  padding-block: 16px 4px;
}

.cs__back:hover {
  color: var(--color-text-dark);
}

.cs__back-icon {
  font-size: 18px;
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
}

/* Meta icons */
.cs__meta-icon {
  font-size: 20px;
  color: var(--color-text-mid);
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 20;
  margin-bottom: 2px;
}

/* Placeholder box inner layout */
.cs__placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cs__placeholder-icon {
  font-size: 32px;
  color: rgba(49, 28, 10, 0.18);
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

/* Insight pill icon */
.cs__insight-icon {
  font-size: 18px;
  color: rgba(49, 28, 10, 0.25);
  flex-shrink: 0;
  font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 20;
  margin-top: 1px;
}

/* HMW icon */
.cs__hmw-icon {
  display: block;
  font-size: 28px;
  color: rgba(49, 28, 10, 0.45);
  font-variation-settings: "FILL" 1, "wght" 300, "GRAD" 0, "opsz" 24;
  margin-bottom: 14px;
}
