/* ============================================================
   GLOBAL
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scroll-padding-top: 64px;
}

/* Disable scroll-snap on case study pages. They have only one snap
   target (the footer), and `mandatory` traps the scroll there. */
html:has(.case-page) {
  scroll-snap-type: none;
}

body {
  background-color: var(--color-surface-default);
  color: var(--color-grey-800);
  font-family: var(--font-utility);
  -webkit-font-smoothing: antialiased;
  /* No overflow on body — it would break `position: sticky` for every
     descendant. Horizontal overflow from the hero flowers is clipped on
     the .hero element itself instead. */
}

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

/* ============================================================
   LAYOUT CONTAINER
   max-width: 1440px, 128px horizontal padding
   ============================================================ */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 128px;
}


/* ============================================================
   NAVBAR
   h=64px, sticky top
   ============================================================ */
.navbar {
  height: 64px;
  background-color: var(--color-surface-default);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-left: 0;
  padding-right: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
}

.nav-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
  color: var(--color-lime-500);
  transition: color 0.2s ease;
}

.nav-brand:hover .nav-logo {
  color: var(--color-rose-500);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  gap: var(--size-xl);
}

.nav-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--size-xs);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-cyan-500);
}

.status-text {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.nav-links a {
  font-family: var(--font-utility);
  font-size: var(--text-50);
  font-weight: var(--font-weight-medium);
  color: var(--color-grey-700);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  background-color: var(--color-lime-200);
}


/* ============================================================
   HERO
   Full viewport height. Heading pinned to bottom-left.
   Flowers absolutely positioned within the hero.
   ============================================================ */
.hero {
  position: relative;
  height: calc(100vh - 64px); /* subtract sticky navbar */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  scroll-snap-align: start;
  /* Clip overflowing flowers within the hero itself, so body doesn't
     need overflow:hidden (which would break position:sticky). */
  overflow: hidden;
}

/* Flowers — positioned within hero, pointer-events on for hover */
.flower {
  position: absolute;
  user-select: none;
  pointer-events: auto;
  cursor: default;
  transform-origin: center center;
}

/* flower 1: cyan blue — left edge, partially clipped */
.flower-1 {
  left: -5%;
  top: 22vh;
  width: 30%;
}

/* flower 2: rose/purple — upper center */
.flower-2 {
  left: 38%;
  top: 2vh;
  width: 24%;
}

/* flower 3: lime — far right */
.flower-3 {
  left: 78%;
  top: 32vh;
  width: 28%;
}

/* Continuous float animation */
@keyframes float-1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(3px, -6px); }
}
@keyframes float-2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-4px, -5px); }
}
@keyframes float-3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3px, -7px); }
}

.flower-1 { animation: float-1 6s ease-in-out infinite; }
.flower-2 { animation: float-2 7s ease-in-out infinite; }
.flower-3 { animation: float-3 8s ease-in-out infinite; }

/* Hover — subtle directional nudge (uses CSS translate, independent of transform animation) */
.flower { transition: translate 0.4s ease; }

.flower-1:hover { translate: 3px -3px; }
.flower-2:hover { translate: -2px -3px; }
.flower-3:hover { translate: -3px -3px; }

.hero-content {
  position: relative;
  z-index: 1;
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 24px;
}

.hero-heading {
  color: var(--color-grey-800);
  letter-spacing: -0.025em;
}

.hero-name {
  color: var(--color-grey-800);
}

.hero-desc {
  color: var(--color-grey-600);
}


/* ============================================================
   SNAP SECTIONS — Work + About become full-viewport snap targets
   ============================================================ */
#work,
#about {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background-color: var(--color-surface-default);
}

/* ============================================================
   SECTION LABEL — shared by Work + About
   64px top padding, label sits at y=64 within section
   ============================================================ */
.section-label {
  padding-top: 64px;
  padding-bottom: 0;
}

.section-label h2 {
  color: var(--color-grey-800);
}


/* ============================================================
   WORK CARD
   Title above thumbnail, both full-width within container
   ============================================================ */
.work-grid {
  padding-top: var(--size-3xl);
}

.work-grid .container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.work-card-thumbnail {
  background-color: var(--color-grey-200);
  border-radius: var(--radius-lg);
}

.work-card-full {
  width: 100%;
  aspect-ratio: 1184 / 634;
}

.work-card-row {
  display: flex;
  gap: 24px;
}

.work-card-half {
  flex: 1;
  aspect-ratio: 580 / 634;
}


/* ============================================================
   ABOUT SECTION — Bento editorial layout
   ============================================================ */

#about {
  min-height: auto;
  scroll-snap-align: start;
}

/* ---- Hero statement ---- */
.about-hero {
  padding: var(--size-3xl) 0;
}

.about-hero__heading {
  color: var(--color-grey-800);
  max-width: 900px;
  letter-spacing: -0.03em;
}

.about-gradient-text {
  background: linear-gradient(
    135deg,
    var(--color-lime-500),
    var(--color-cyan-500),
    var(--color-rose-500)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Marquee ---- */
.about-marquee {
  border-top: 1px solid var(--color-grey-300);
  border-bottom: 1px solid var(--color-grey-300);
  overflow: hidden;
  padding: var(--size-md) 0;
}

.about-marquee__track {
  display: flex;
  align-items: center;
  gap: var(--size-xl);
  width: max-content;
  animation: marquee-scroll 20s linear infinite;
  font-family: var(--font-utility);
  font-size: var(--text-50);
  font-weight: var(--font-weight-medium);
  color: var(--color-grey-600);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.marquee-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--color-grey-500);
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Bento grid ---- */
.about-bento {
  padding: calc(var(--size-3xl) + 128px) 0;
}

/* ---- Bento: row-flex layout ---- */
.bento-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bento-row {
  display: grid;
  gap: 16px;
}

.bento-row--1 { height: 400px; grid-template-columns: 284fr 884fr; }
.bento-row--2 { height: 380px; grid-template-columns: repeat(3, 1fr); }
.bento-row--3 { height: 380px; grid-template-columns: 284fr 584fr 284fr; }
.bento-row--4 { height: 480px; grid-template-columns: 884fr 284fr; }

/* ---- Shared card base ---- */
.bento-card {
  position: relative;
  border-radius: 32px;
  padding: 24px;
  background-color: transparent;
  border: 1px solid var(--color-border-default);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* ---- Tag pill — SVG-drawn dotted stroke with custom gap ---- */
.bento-tag {
  position: relative;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 20px;
  border: 1px solid var(--color-border-default);
  border-radius: 9999px;
  background-color: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  width: fit-content;
}

span.bento-tag {
  margin-top: 4px;
}

.bento-tag--icon {
  padding: 8px;
}

.bento-tag__outline {
  display: none;
}

.bento-tag--icon .bento-tag__icon {
  display: block;
  position: relative;
}

/* ---- Body typography (Figtree Medium) ---- */
.bento-body {
  font-family: var(--font-decorative);
  font-weight: var(--font-weight-medium);
  margin: 0;
}

.bento-body--lg {
  font-size: 40px;
  line-height: 48px;
  letter-spacing: -0.4px;
  color: var(--color-text-primary);
}

.bento-body--md {
  font-size: 28px;
  line-height: 33.6px;
  letter-spacing: 0;
  color: var(--color-text-primary);
}

/* ---- Row 1: Portrait + Who I Am ---- */
.bento-portrait {
  padding: 0;
  border: none;
  border-radius: 32px;
  background-image: url("assets/portrait–pr.jpg");
  background-size: cover;
  background-position: center;
  background-color: var(--color-grey-200);
}

/* ---- Row 2: Value cards ---- */
/* Reverse split: lead = bright, supporting = muted */
.bento-value__text {
  margin-top: auto;
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text-secondary);
}

.bento-value__lead {
  color: var(--color-text-primary);
}

/* ---- Row 3: AI card ---- */
.bento-ai {
  background-color: var(--color-surface-accent-olive);
  border: none;
}

.bento-ai__body {
  font-size: 22px;
  line-height: 1.3;
  color: var(--color-text-primary);
}

/* ---- Row 3: Reading cards ---- */
.bento-reading__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.bento-reading__title {
  color: var(--color-text-primary);
  display: block;
  font-size: 22px;
  line-height: 1.3;
}

a.bento-reading__title {
  text-decoration: none;
  transition: color 0.2s ease;
}

a.bento-reading__title:hover {
  color: var(--color-text-secondary);
}

.bento-reading__author {
  font-family: var(--font-decorative);
  font-weight: var(--font-weight-medium);
  font-size: 22px;
  line-height: 24.2px;
  letter-spacing: 0;
  color: var(--color-text-tertiary);
}

/* ---- Scroll-triggered fade-in ---- */
.bento-card {
  opacity: 0;
  transform: translateY(24px);
}

.bento-card.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.bento-row--1 .bento-card:nth-child(1).is-visible { transition-delay: 0s;    }
.bento-row--1 .bento-card:nth-child(2).is-visible { transition-delay: 0.08s; }
.bento-row--2 .bento-card:nth-child(1).is-visible { transition-delay: 0.0s;  }
.bento-row--2 .bento-card:nth-child(2).is-visible { transition-delay: 0.08s; }
.bento-row--2 .bento-card:nth-child(3).is-visible { transition-delay: 0.16s; }
.bento-row--3 .bento-card:nth-child(1).is-visible { transition-delay: 0.0s;  }
.bento-row--3 .bento-card:nth-child(2).is-visible { transition-delay: 0.08s; }
.bento-row--3 .bento-card:nth-child(3).is-visible { transition-delay: 0.16s; }


/* ============================================================
   RESPONSIVE — Tablet  ≤ 1199px
   ============================================================ */
@media (max-width: 1199px) {
  .container {
    padding: 0 48px;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .footer-bio {
    min-height: 480px;
  }

  .footer-portrait {
    aspect-ratio: 1 / 1;
  }
}


/* ============================================================
   RESPONSIVE — Mobile  ≤ 767px
   ============================================================ */
@media (max-width: 767px) {
  .container {
    padding: 0 24px;
  }

  .nav-links {
    gap: var(--size-lg);
  }

  .hero {
    height: calc(100svh - 64px);
  }

  .hero-content {
    padding-bottom: 48px;
  }

  .flower-1 { left: -8%; top: 24vh; width: 50%; }
  .flower-2 { left: 34%;  top: 4vh;  width: 42%; }
  .flower-3 { left: 72%;  top: 28vh; width: 48%; }

  .work-grid {
    padding-top: 64px;
  }

  .work-card-row {
    flex-direction: column;
  }

  .work-card-thumbnail {
    border-radius: var(--radius-md);
  }

  .work-card-full {
    aspect-ratio: 4 / 3;
  }

  .work-card-half {
    aspect-ratio: 4 / 3;
  }

  .about-hero {
    padding: 64px 0;
  }

  .about-bento {
    padding: 224px 0;
  }

  .bento-row--1,
  .bento-row--2,
  .bento-row--3 {
    height: auto;
    grid-template-columns: 1fr;
  }

  .bento-row--1 > .bento-portrait {
    min-height: 360px;
    aspect-ratio: 4 / 3;
  }

  .bento-row > .bento-portrait {
    aspect-ratio: auto;
  }

  .bento-portrait,
  .bento-value,
  .bento-reading,
  .bento-ai {
    min-height: 480px;
  }

  .bento-card {
    border-radius: 24px;
    padding: 24px;
  }

  .site-footer {
    padding: 0 0 48px;
  }

  .footer-bio__lead {
    font-size: 28px;
    line-height: 33.6px;
    letter-spacing: -0.25px;
    margin-top: 32px;
  }

  .footer-bio__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .footer-email {
    font-size: 20px;
  }

  .bento-body--lg {
    font-size: 28px;
    line-height: 33.6px;
    letter-spacing: -0.25px;
  }
}


/* ============================================================
   EXPERIENCE
   Accordion list of past engagements. One open at a time.
   ============================================================ */
.experience {
  padding: 0 0 calc(var(--size-3xl) + 128px);
  background-color: var(--color-surface-default);
  scroll-snap-align: start;
}

.experience__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
  margin-bottom: 40px;
}

.experience-card {
  border: 1px solid var(--color-border-default);
  border-radius: 32px;
  padding: 24px;
}

.experience-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.exp-item:not(:last-child) {
  border-bottom: 1px solid var(--color-border-default);
}

.exp-row {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  column-gap: 32px;
  width: 100%;
  padding: 32px 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.exp-year {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.exp-client {
  font-family: var(--font-decorative);
  font-size: var(--text-300);
  line-height: 1;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  transition: transform 0.2s ease;
}

.exp-client-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.exp-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  transition: transform 0.2s ease;
}

.exp-row:hover .exp-chevron {
  transform: translateX(4px);
}

.exp-item[data-expanded="true"] .exp-chevron {
  transform: rotate(90deg);
}

.exp-item[data-expanded="true"] .exp-row:hover .exp-chevron {
  transform: rotate(90deg) translateY(-4px);
}

/* Smooth height transition via grid-template-rows trick */
.exp-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}

.exp-content > .exp-content__inner {
  min-height: 0;
  overflow: hidden;
}

.exp-content__inner {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease 0.05s, transform 0.25s ease 0.05s;
  padding: 0 0 32px 128px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.exp-item[data-expanded="true"] .exp-content {
  grid-template-rows: 1fr;
}

.exp-item[data-expanded="true"] .exp-content__inner {
  opacity: 1;
  transform: translateY(0);
}

.exp-item:not([data-expanded="true"]) .exp-content__inner {
  padding: 0;
}

.exp-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

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

.exp-meta__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.exp-meta__value {
  font-family: var(--font-utility);
  font-size: var(--text-50);
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin: 0;
}

.exp-description {
  font-family: var(--font-decorative);
  font-size: 22px;
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  margin: 0;
}

@media (max-width: 1199px) {
  .exp-row {
    grid-template-columns: 80px 1fr auto;
    gap: 24px;
    padding: 28px 0;
  }

  .experience-card {
    padding: 0 24px;
  }

  .exp-content__inner {
    padding-left: 104px;
  }
}

@media (max-width: 767px) {
  .experience {
    padding-bottom: 224px;
  }

  .exp-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 16px;
    row-gap: 4px;
    padding: 24px 0;
  }

  .exp-year {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .exp-client {
    grid-column: 1;
    grid-row: 2;
    font-size: var(--text-200);
  }

  .exp-chevron {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: end;
  }

  .exp-meta {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .exp-description {
    font-size: 18px;
  }

  .exp-content__inner {
    padding: 0 0 24px 0;
    gap: 24px;
  }

  .experience-card {
    padding: 24px;
  }
}

/* ============================================================
   FOOTER
   Two-card layout: 884px bio + 284px portrait, 480px tall.
   Lives below the about section; uses about-bento's bottom padding
   for the section gap so the rhythm matches hero → bento.
   ============================================================ */
.site-footer {
  padding: 0 0 48px;
  background-color: var(--color-surface-default);
  scroll-snap-align: start;
}

.footer-grid {
  display: grid;
  grid-template-columns: 884fr 284fr;
  gap: 16px;
  height: 480px;
}

.footer-bio {
  position: relative;
  border: 1px solid var(--color-border-default);
  border-radius: 32px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.footer-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border: 1px solid var(--color-border-default);
  border-radius: 9999px;
  background-color: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  width: fit-content;
}

.footer-bio__lead {
  font-family: var(--font-decorative);
  font-size: 28px;
  line-height: 33.6px;
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.25px;
  color: var(--color-text-primary);
  margin: 44px 0 0 0;
}

.footer-bio__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--color-text-primary);
  font-family: var(--font-utility);
  font-size: 18px;
  line-height: 1.2;
  font-weight: var(--font-weight-regular);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.footer-email:hover {
  opacity: 0.7;
}

.footer-email__icon {
  flex-shrink: 0;
}

.footer-email__label {
  position: relative;
  display: inline-block;
}

.footer-email__copied {
  position: absolute;
  inset: 0;
  color: var(--color-text-primary);
  font-size: inherit;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.footer-email.is-copied .footer-email__text {
  opacity: 0;
}

.footer-email.is-copied .footer-email__copied {
  opacity: 1;
}

.footer-email__text {
  transition: opacity 0.2s ease;
}

.footer-socials {
  display: flex;
  gap: 12px;
}

.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  color: var(--color-text-primary);
  flex-shrink: 0;
  transition: opacity 0.2s ease;
}

.footer-social:hover {
  opacity: 0.7;
}

.footer-portrait {
  background-image: url("assets/film-photo-mammoth.jpg");
  background-size: cover;
  background-position: center;
  border-radius: 32px;
  background-color: var(--color-grey-200);
}


/* ============================================================
   BIO + AI BENTO ADDITIONS
   ============================================================ */
.bento-bio__content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: auto;
}

.bento-bio .bento-body--md {
  font-size: 22px;
  line-height: 1.3;
}

.bento-bio__secondary {
  color: var(--color-text-secondary);
}

.bento-ai .bento-tag {
  border-color: var(--color-border-accent-lime);
  color: var(--color-text-primary);
}

.bento-ai__content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin-top: auto;
}

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

.bento-ai__tools-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.bento-ai__tools-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  font-family: var(--font-utility);
  font-size: var(--text-50);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.bento-ai__tools-list li:not(:last-child)::after {
  content: ',';
  margin-right: 6px;
}


/* ============================================================
   CASE STUDY — shared patterns for /work/[slug]/ pages
   Hero card with cyan-tinted top, eyebrow tag, two-tone
   intro heading, meta columns. Narrative sections divided
   by subtle 1px borders.
   ============================================================ */

/* ---- Page wrapper sets vertical rhythm, no scroll snap ---- */
.case-page {
  padding-top: var(--size-xl);
  padding-bottom: var(--size-3xl);
}

/* ---- Hero card ---- */
.case-hero {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-default);
  background-color: transparent;
  padding: clamp(40px, 6vw, 96px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow: hidden;
}

.case-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  background: transparent;
  border: 0;
  padding: 8px 12px 8px 0;
  color: var(--color-text-primary);
  font-family: var(--font-utility);
  font-size: 18px;
  line-height: 1;
  font-weight: var(--font-weight-bold);
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.case-hero__back:hover {
  opacity: 0.7;
}

.case-hero__back svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.case-hero__heading-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: var(--size-xl);
}

.case-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0;
  color: var(--color-text-secondary);
  text-transform: none;
}

.case-heading {
  font-family: var(--font-decorative);
  font-size: var(--text-300);
  font-weight: var(--font-weight-medium);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 0;
}

.case-heading__lead {
  color: var(--color-text-primary);
}

.case-heading__rest {
  color: var(--color-text-secondary);
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 128px;
  padding-top: var(--size-xl);
}

.case-meta__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-meta__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  letter-spacing: 0;
}

.case-meta__value {
  font-family: var(--font-utility);
  font-size: var(--text-100);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  margin: 0;
}

/* ---- Big hero image card (bento-style) ---- */
.case-cover {
  margin-top: 16px;
  border-radius: var(--radius-lg);
  background-color: var(--color-grey-200);
  aspect-ratio: 1184 / 634;
  width: 100%;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* ---- Meta strip (Option 2) ---- */
.case-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 24px var(--size-2xl);
  padding: var(--size-xl) 0;
  border-top: 1px solid var(--color-border-default);
  border-bottom: 1px solid var(--color-border-default);
  margin-top: var(--size-xl);
}

.case-strip__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 120px;
}

.case-strip__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--color-text-secondary);
}

.case-strip__value {
  font-family: var(--font-utility);
  font-size: var(--text-50);
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

/* ---- Narrative sections (single column with subtle dividers) ---- */
.case-narrative {
  margin-top: var(--size-3xl);
  display: flex;
  flex-direction: column;
}

.case-section {
  display: grid;
  grid-template-columns: 200px minmax(0, 600px);
  gap: 64px;
  padding: var(--size-2xl) 0;
  border-top: 1px solid var(--color-border-default);
}

.case-section:last-child {
  border-bottom: 1px solid var(--color-border-default);
}

.case-section__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  letter-spacing: 0;
  padding-top: 6px;
}

.case-section__title {
  font-family: var(--font-decorative);
  font-size: var(--text-300);
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  margin: 0 0 16px;
}

.case-section__body {
  font-family: var(--font-utility);
  font-size: var(--text-100);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
  margin: 0;
}

.case-section__body + .case-section__body {
  margin-top: 16px;
}

/* ---- Anchored long-form (Option 3) ----
   Full-container-width sections with inline label stacked above
   the heading. Subtle 1px border between each section. */
.case-narrative--anchored {
  display: flex;
  flex-direction: column;
}

.case-narrative--anchored .case-section {
  display: block;
  padding: var(--size-2xl) 0;
}

.case-narrative--anchored .case-section__label {
  display: block;
  margin-bottom: 24px;
  padding-top: 0;
}

.case-narrative--anchored .case-section__title {
  margin-bottom: 24px;
}

/* ---- Next project callout (Option 2) ---- */
.case-next {
  margin-top: var(--size-3xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: var(--size-2xl);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-default);
  background-color: var(--color-surface-default);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.case-next:hover {
  border-color: var(--color-grey-500);
  transform: translateY(-2px);
}

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

.case-next__eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.case-next__title {
  font-family: var(--font-decorative);
  font-size: var(--text-300);
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.case-next__arrow {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--color-text-primary);
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .case-hero {
    border-radius: var(--radius-md);
  }
  .case-cover {
    border-radius: var(--radius-md);
  }
  .case-meta {
    gap: 24px 64px;
  }
  .case-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  /* Anchored mode already uses inline labels — nothing extra needed. */
}

@media (max-width: 767px) {
  .case-hero {
    border-radius: 24px;
    padding: 32px 24px;
  }
  .case-cover {
    border-radius: 24px;
    aspect-ratio: 4 / 3;
  }
  .case-meta {
    grid-template-columns: 1fr;
  }
  .case-strip {
    gap: 16px 32px;
  }
  .case-next {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 24px;
  }
}


/* ============================================================
   CASE STUDY — Editorial layout (Option 3)
   Two-row hero with mono labels, full-width feature card,
   12-col article grid with sticky chapter nav, "next" footer.
   ============================================================ */

.case-hero-editorial {
  padding: var(--size-2xl) 0 var(--size-3xl);
}

.case-hero-editorial__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.2s ease;
  margin-bottom: var(--size-2xl);
}

.case-hero-editorial__back:hover {
  color: var(--color-text-primary);
}

.case-hero-editorial__back svg {
  width: 16px;
  height: 16px;
}

.case-hero-editorial__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: var(--size-3xl);
}

.case-hero-editorial__eyebrow,
.case-hero-editorial__category {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  letter-spacing: 0;
}

.case-hero-editorial__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--size-2xl);
  align-items: start;
}

.case-hero-editorial__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.case-hero-editorial__title {
  font-family: var(--font-decorative);
  font-size: var(--text-500);
  font-weight: var(--font-weight-medium);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--color-text-primary);
  margin: 0;
  text-wrap: balance;
}

.case-hero-editorial__side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-hero-editorial__summary {
  font-family: var(--font-utility);
  font-size: var(--text-100);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
  margin: 0;
}

.case-hero-editorial__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px var(--size-2xl);
}

.case-hero-editorial__meta > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.case-hero-editorial__meta-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
}

.case-hero-editorial__meta-value {
  font-family: var(--font-utility);
  font-size: var(--text-50);
  line-height: 1.4;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

/* ---- Feature card (between hero and article) ---- */
.case-feature {
  border-bottom: 1px solid var(--color-border-default);
  padding: var(--size-2xl) 0;
}

.case-feature__card {
  background-color: var(--color-grey-200);
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 9;
  width: 100%;
  background-size: cover;
  background-position: center;
}

/* ---- Article: centered single-column narrative ---- */
.case-article {
  padding: var(--size-3xl) 0;
}

.case-article .case-content {
  max-width: 720px;
  margin: 0 auto;
}

/* ---- Sticky chapter nav ---- */
.case-chapters {
  position: sticky;
  top: calc(64px + var(--size-xl));
  align-self: start;
  display: flex;
  flex-direction: column;
}

.case-chapters__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.4;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: 24px;
}

.case-chapters__link {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 16px;
  border-left: 2px solid var(--color-border-default);
  color: var(--color-text-secondary);
  font-family: var(--font-utility);
  font-size: var(--text-50);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.case-chapters__link:hover {
  color: var(--color-text-primary);
}

.case-chapters__link.is-active {
  color: var(--color-text-primary);
  border-left-color: var(--color-text-primary);
}

.case-chapters__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.case-chapters__link.is-active .case-chapters__num {
  color: var(--color-text-primary);
}

/* ---- Content sections (right column) ---- */
.case-content {
  display: flex;
  flex-direction: column;
  gap: var(--size-3xl);
}

.case-chapter__title {
  font-family: var(--font-decorative);
  font-size: var(--text-300);
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 24px;
}

.case-chapter__num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  flex-shrink: 0;
}

.case-chapter__body {
  font-family: var(--font-utility);
  font-size: var(--text-100);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
  margin: 0;
}

.case-chapter__body + .case-chapter__body {
  margin-top: 16px;
}

/* Hero side stacked block (label + paragraph) */
.case-hero-editorial__block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Article facts block (Role / Brands / Stack / Stack we were preparing for) */
.case-facts {
  margin: 0;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--color-border-default);
  border-bottom: 1px solid var(--color-border-default);
}

.case-fact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: baseline;
}

.case-fact__label {
  flex: 0 0 220px;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
}

.case-fact__value {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-family: var(--font-utility);
  font-size: var(--text-50);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-primary);
}

/* Lists inside chapter content */
.case-chapter__list {
  margin: 16px 0 0;
  padding-left: 1.25em;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-utility);
  font-size: var(--text-100);
  line-height: 1.4;
  font-weight: var(--font-weight-regular);
  color: var(--color-text-secondary);
}

.case-chapter__list li::marker {
  color: var(--color-text-secondary);
}

/* Inline emphasis inside chapter content */
.case-chapter__body strong,
.case-chapter__list strong {
  color: var(--color-text-primary);
  font-weight: var(--font-weight-bold);
}

/* Inline code inside chapter content */
.case-chapter__body code,
.case-chapter__list code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  padding: 1px 6px;
  border-radius: 4px;
  background-color: var(--color-grey-200);
  border: 1px solid var(--color-border-default);
  color: var(--color-text-primary);
}

/* ---- "Next Case Study" footer ---- */
.case-next-editorial {
  border-top: 1px solid var(--color-border-default);
  padding: var(--size-2xl) 0;
}

.case-next-editorial__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.case-next-editorial__label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.2;
  font-weight: var(--font-weight-bold);
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.case-next-editorial__title {
  font-family: var(--font-decorative);
  font-size: var(--text-200);
  font-weight: var(--font-weight-medium);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-text-primary);
}

.case-next-editorial__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-utility);
  font-size: var(--text-50);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
  transition: color 0.2s ease;
}

.case-next-editorial__link:hover {
  color: var(--color-text-primary);
}

.case-next-editorial__link svg {
  width: 16px;
  height: 16px;
}

/* ---- Responsive ---- */
@media (max-width: 1199px) {
  .case-hero-editorial__grid {
    grid-template-columns: 1fr;
    gap: var(--size-xl);
  }
}

@media (max-width: 767px) {
  .case-hero-editorial__top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .case-feature__card {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
  }
  .case-next-editorial__row {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ============================================================
   HOVER-WORD IMAGE PREVIEW
   ============================================================ */
.hover-word {
  color: var(--color-text-primary);
  text-decoration: underline dotted var(--color-lime-500);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
}

.hover-word:focus-visible {
  outline: 2px solid var(--color-lime-500);
  outline-offset: 2px;
  border-radius: 2px;
}

#hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.55), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 150ms ease, visibility 150ms ease;
  z-index: 1000;
}

#hover-preview.is-visible {
  opacity: 1;
  visibility: visible;
}


/* ============================================================
   RESPONSIVE OVERRIDES — must come after base rules above
   ============================================================ */
@media (max-width: 1199px) {
  .footer-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .footer-bio {
    min-height: 480px;
  }

  .footer-portrait {
    aspect-ratio: 1 / 1;
  }

  .navbar .container {
    padding-left: 48px;
    padding-right: 48px;
  }
}

@media (max-width: 767px) {
  .navbar .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .footer-bio {
    padding: 24px;
    min-height: 420px;
  }

  .footer-bio__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .bento-card.bento-value,
  .bento-card.bento-reading,
  .bento-card.bento-ai {
    min-height: 400px;
  }

  .bento-card.bento-portrait {
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  #hover-preview {
    width: 220px;
  }
}
