:root {
  --ink: #2e2e2e;
  --ink-soft: #6b6b6b;
  --ink-faint: #9a9489;
  --paper: #ffffff;
  --paper-soft: #f1efec;
  --line: #e4e0d9;
  --accent: #2e2e2e;
  --accent-soft: #e4e0d9;
  --max: 1180px;
  --gap: 20px;
}

* { box-sizing: border-box; }

/* Cross-document view transitions: gives every same-origin page-to-page
   navigation (e.g. the "What I Build" card to Projects) a soft cross-fade
   instead of an instant hard cut. No-ops in browsers that don't support it. */
@view-transition {
  navigation: auto;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--accent-soft);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }

h1, h2, h3 {
  font-family: "Figtree", sans-serif;
  font-weight: 300;
  margin: 0;
  color: var(--ink);
}

.accent {
  font-family: "Newsreader", serif;
  color: var(--accent);
  font-style: italic;
  font-weight: 500;
}

/* ---------- Accent bar ---------- */
.accent-bar {
  height: 4px;
  background: var(--accent);
}

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-name {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
}

.nav-links {
  display: flex;
  gap: 22px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  text-align: center;
}

/* Hero itself is always visible (see revealObserver in js/main.js for the
   generic .reveal fade, overridden here) — the lines inside it start empty
   and get typed out by initHeroTypewriter(). */
.hero .hero-inner {
  opacity: 1;
  transform: none;
  transition: none;
}

.hero-title {
  max-width: 820px;
  margin: 0 auto;
}

.hero-line {
  display: block;
  min-height: 1em;
}

.hero-line.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 0.9em;
  margin-left: 2px;
  background: currentColor;
  vertical-align: -0.1em;
  animation: hero-cursor-blink 0.9s step-end infinite;
}

@keyframes hero-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hero-line:not(.accent) {
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.5em;
}

.hero-line.accent {
  font-size: clamp(1.15rem, 2.3vw, 1.6rem);
  line-height: 1.5;
}

/* ---------- Section header ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9vh 32px;
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.section-body {
  display: flex;
  flex-direction: column;
  gap: 72px;
}

/* ---------- Category blocks ---------- */
.category-intro {
  max-width: 620px;
  margin-bottom: 24px;
}

/* Text stacked above the work (instead of side by side), four blocks
   staggered into an irregular grid on a 12-column track — Curation stays
   its own full-width block below, deliberately not part of the stagger. */
.beyond-blocks {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 56px 32px;
  margin-bottom: 32px;
}

.beyond-block {
  min-width: 0;
}

.beyond-block:nth-child(1) { grid-column: 1 / 8; }
.beyond-block:nth-child(2) { grid-column: 8 / 13; margin-top: 64px; }
.beyond-block:nth-child(3) { grid-column: 1 / 6; margin-top: 32px; }
.beyond-block:nth-child(4) { grid-column: 6 / 13; }

.beyond-block-text {
  max-width: 480px;
  margin-bottom: 20px;
}

.beyond-block-media .grid-masonry {
  column-count: 3;
  column-gap: 12px;
}

.beyond-block-media .tile img {
  aspect-ratio: 3 / 2;
}

.beyond-block-media .series-tile {
  aspect-ratio: 3 / 2;
}

/* Oil Painting reads better tall — canvases are usually portrait. The extra
   .auto-gallery-flat.uniform-crop in the selector isn't decorative: that
   combo has higher specificity than a plain .tile img rule, so without
   matching it here the 3:2 uniform-crop default from the base gallery
   styles wins and silently ignores this override. */
.beyond-block-media-tall .auto-gallery-flat.uniform-crop .tile img,
.beyond-block-media-tall .series-tile {
  aspect-ratio: 3 / 4;
}

/* .grid-masonry already sets column-count: 3 by default (see base rule
   above) — this must NOT also set column-count on the wrapper around it,
   or the two column-splits nest and each tile gets divided down to a
   ninth of the width instead of a third. */
.curation-media .grid-masonry {
  column-gap: 16px;
}

.curation-media .tile img,
.curation-media .tile video {
  aspect-ratio: 3 / 4;
}

@media (max-width: 860px) {
  .beyond-blocks {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .beyond-block:nth-child(1),
  .beyond-block:nth-child(2),
  .beyond-block:nth-child(3),
  .beyond-block:nth-child(4) {
    grid-column: 1 / -1;
    margin-top: 0;
  }
  .beyond-block-media .grid-masonry {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .curation-media .grid-masonry {
    column-count: 1;
  }
}

.category-tag {
  display: inline-block;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 4px;
  margin-bottom: 4px;
}

/* Bigger heading treatment, no underline — used where a category label
   should carry as much weight as a section heading (e.g. Paper/Project). */
.category-tag-lg {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 8px;
}

.paper-card {
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 720px;
}

.paper-cover {
  flex: 0 0 160px;
  width: 160px;
  height: auto;
  display: block;
}

.paper-title {
  font-family: "Figtree", sans-serif;
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.6;
  margin: 0;
}

.paper-title a {
  color: var(--ink);
}

.exhibition-title {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink);
  margin: 4px 0 20px;
}

/* The parenthesized letters spell out "library" hidden inside the exhibition
   name — accent-colored so the wordplay actually reads as intentional. */
.exhibition-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 700;
}

.meta-line {
  max-width: 620px;
  color: var(--ink-soft);
  line-height: 1.7;
  margin: 0 0 10px;
}

.meta-line-soft {
  color: var(--ink-faint);
  font-size: 0.92rem;
}

/* ---------- Project cards ---------- */
/* align-items: start keeps each card at its own natural height instead of
   Grid's default row-stretch — since the cover images below now render at
   their own aspect ratio, cards naturally end up different heights, which
   reads as an irregular, less uniform grid instead of lockstep rows. */
/* CSS Grid, not multi-column: multi-column fills a whole column top-to-
   bottom before starting the next one, so card 05 landed next to card 02
   instead of after card 04 — the numbers read out of order. Grid keeps
   cards in source order (left to right, then wrapping down), and
   align-items: start stops it from stretching every card in a row to
   match the tallest one, so cards can still be different heights. */
/* Positioned by initProjectMasonry() in js/main.js, not CSS Grid or
   multi-column: Grid's row height is set by the tallest card in that row,
   so shorter cards end up with a much bigger gap before the next row than
   taller ones do; multi-column fills one column completely before the
   next, which scrambles the 01/02/03... reading order instead. Manually
   placing each card into whichever column is currently shortest gets a
   consistent gap under every card while keeping cards in source order. */
.project-grid {
  position: relative;
}

/* Compact card: full-bleed cover image at the top (the card's own
   overflow:hidden + border-radius clips it, no inset padding around it),
   then a padded body with index/category, title, blurb, and tags. The
   rest (.project-details) stays hidden until clicked open in the modal. */
.project-card {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
  background: var(--paper);
  border: 1px solid rgba(46, 46, 46, 0.3);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
}

.project-card.is-positioned {
  opacity: 1;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(46, 46, 46, 0.1);
}

/* No fixed aspect-ratio/object-fit here on purpose — that was letterboxing
   images that didn't match a 4:3 box (empty bars above/below). Letting each
   cover render at its own natural ratio fills the card edge to edge with
   no gaps, and it's also what gives the cards their varied heights above. */
.project-cover {
  display: block;
  width: 100%;
  height: auto;
}

.project-card-body {
  padding: 14px;
}

.project-card-label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.project-index,
.project-category {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.project-index-sep {
  color: var(--line);
  font-size: 0.62rem;
}

.project-title {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
}

.project-blurb {
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.78rem;
  margin: 0 0 10px;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.project-tag {
  font-family: "Figtree", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--paper-soft);
}

.project-meta {
  font-family: "Figtree", sans-serif;
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin: 0 0 10px;
}

.project-overview {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.92rem;
  margin: 0;
}

.project-detail-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(46, 46, 46, 0.3);
  margin-top: 20px;
}

.project-details {
  margin-top: 16px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
  padding: 10px 18px;
  border: 1px solid rgba(46, 46, 46, 0.3);
  border-radius: 999px;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.project-link:hover {
  background: var(--paper-soft);
  border-color: rgba(46, 46, 46, 0.55);
}

/* Shared modal, populated on click with a clone of the card's hidden
   .project-details — see initProjectModal() in js/main.js. */
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.project-modal[hidden] {
  display: none;
}

.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(46, 46, 46, 0.5);
}

.project-modal-panel {
  position: relative;
  background: var(--paper);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 36px;
}

.project-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--paper-soft);
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.project-modal-close:hover {
  background: var(--accent-soft);
}

.project-modal-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 24px;
}

.project-modal-body .project-title {
  margin: 0 0 20px;
  padding-right: 32px;
}

.project-modal-body .project-details {
  padding: 0;
}

/* ---------- Series tiles (arrows step through each series) ---------- */
.series-grid {
  column-count: 3;
  column-gap: var(--gap);
}

.series-tile {
  position: relative;
  margin: 0 0 var(--gap);
  overflow: hidden;
  break-inside: avoid;
  /* aspect-ratio is set inline per tile, matching that series' cover photo */
  aspect-ratio: 4 / 5;
  background: var(--paper-soft);
  transition: transform 0.4s ease;
}

.series-tile:hover {
  transform: scale(1.02);
  z-index: 1;
}

.series-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease, transform 0.15s ease;
  z-index: 2;
}

.series-tile:hover .series-nav,
.series-tile:focus-within .series-nav {
  opacity: 1;
}

.series-nav:hover {
  background: rgba(0, 0, 0, 0.6);
  transform: translateY(-50%) scale(1.12);
}

.series-nav:active {
  transform: translateY(-50%) scale(0.92);
}

.series-nav-prev { left: 10px; }
.series-nav-next { right: 10px; }

/* Touch devices have no hover state, so keep the arrows visible there */
@media (hover: none) {
  .series-nav { opacity: 0.85; }
}

.series-strip {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.series-strip img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.series-tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  font-size: 0.8rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.series-tile:hover figcaption {
  opacity: 1;
}

.auto-gallery-empty {
  grid-column: 1 / -1;
  color: var(--ink-faint);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Masonry galleries ---------- */
.grid-masonry {
  column-count: 3;
  column-gap: var(--gap);
}

.tile {
  margin: 0 0 var(--gap);
  break-inside: avoid;
  background: var(--paper-soft);
  overflow: hidden;
  transition: transform 0.4s ease;
}

.tile img,
.tile video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: opacity 0.3s ease, transform 0.5s ease;
}

.tile-tall img { aspect-ratio: 3 / 4.4; }
.tile-wide img { aspect-ratio: 16 / 10; }

.auto-gallery-flat.uniform-crop .tile img,
.auto-gallery-flat.uniform-crop .tile video { aspect-ratio: 3 / 2; }

.tile:hover { transform: translateY(-4px); }
.tile:hover img { opacity: 0.92; transform: scale(1.05); }

/* Stagger children fading in together within a grid */
.grid-masonry .tile:nth-child(1) { transition-delay: 0ms; }
.grid-masonry .tile:nth-child(2) { transition-delay: 70ms; }
.grid-masonry .tile:nth-child(3) { transition-delay: 140ms; }
.grid-masonry .tile:nth-child(4) { transition-delay: 210ms; }
.grid-masonry .tile:nth-child(5) { transition-delay: 280ms; }
.grid-masonry .tile:nth-child(n+6) { transition-delay: 350ms; }

.tile figcaption {
  padding: 10px 2px 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- About ---------- */
.about-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9vh 32px;
  border-top: 1px solid var(--line);
}

.hero-intro-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}

.hero-photo {
  margin-top: -140px;
}

.hero-photo img {
  display: block;
  width: 100%;
}

.hero-bio {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: 20px 0 0;
  max-width: 480px;
}

.experience-heading {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin: 0;
}

/* A vertical line down the center, alternating company/dates on the left
   and title/summary on the right, with a node marking each row on the line. */
.experience-timeline {
  position: relative;
  margin-top: 40px;
  max-width: 760px;
}

.experience-timeline::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  border-left: 1px dashed var(--accent-soft);
  transform: translateX(-50%);
}

.experience-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 20px 1fr;
  gap: 28px;
  align-items: start;
}

.experience-row + .experience-row {
  margin-top: 36px;
}

.experience-row-left {
  text-align: right;
}

.experience-row-node {
  display: flex;
  justify-content: center;
  padding-top: 4px;
}

.experience-row-node::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--paper);
}

/* The current role gets a halo instead of a color, so "in progress" reads
   without breaking the site's grayscale palette. */
.experience-row-node.is-current::before {
  box-shadow: 0 0 0 4px var(--paper), 0 0 0 7px var(--accent-soft);
}

.experience-title {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.experience-company {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  margin: 0 0 2px;
}

.experience-dates {
  color: var(--ink-faint);
  font-family: "Figtree", sans-serif;
  font-size: 0.78rem;
  margin: 0;
}

.experience-summary {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 6px 0 0;
}

@media (max-width: 640px) {
  .experience-timeline::before {
    left: 5px;
  }
  .experience-row {
    grid-template-columns: 10px 1fr;
    grid-template-areas: "node left" "node right";
    gap: 4px 16px;
  }
  .experience-row-node {
    grid-area: node;
  }
  .experience-row-left {
    grid-area: left;
    text-align: left;
  }
  .experience-row-right {
    grid-area: right;
  }
}

/* ---------- Competitions ---------- */
.competitions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin-top: 36px;
}

.competition-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.competition-logo {
  display: block;
  width: 90px;
  height: 90px;
  object-fit: cover;
  border: 1px solid rgba(46, 46, 46, 0.3);
  border-radius: 12px;
}

.competition-result {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--accent);
  margin: 0;
}

.competition-name {
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink);
  margin: 0;
}

.competition-date {
  font-family: "Figtree", sans-serif;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- Bento grid ---------- */
.bento-head {
  margin-bottom: 32px;
}

.bento-grid {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.bento-row {
  display: grid;
  gap: var(--gap);
}

.bento-row-top {
  grid-template-columns: 3fr 2fr;
}

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

/* Cascading reveal: each card in a row fades up a beat after the last */
.bento-row-top .bento-card:nth-child(1) { transition-delay: 0ms; }
.bento-row-top .bento-card:nth-child(2) { transition-delay: 120ms; }
.bento-row-bottom .bento-card:nth-child(1) { transition-delay: 0ms; }
.bento-row-bottom .bento-card:nth-child(2) { transition-delay: 120ms; }
.bento-row-bottom .bento-card:nth-child(3) { transition-delay: 240ms; }

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--paper);
  border: 1px solid rgba(46, 46, 46, 0.3);
  border-radius: 12px;
  padding: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.bento-card-more {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.bento-card:hover .bento-card-more {
  color: var(--ink);
}

a.bento-card {
  color: inherit;
  text-decoration: none;
}

.bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(46, 46, 46, 0.55);
  box-shadow: 0 16px 32px rgba(46, 46, 46, 0.1);
}

.bento-label {
  display: block;
  font-family: "Figtree", sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 20px;
}

/* Tech Stack — three rows of tags, scrolling on an endless loop. Each track
   is the tag list duplicated once, so translating it by exactly -50% loops
   seamlessly back to the start. Rows 1 and 3 scroll left, row 2 scrolls
   right, so the middle row visibly runs against the other two. */
.bento-card-tech {
  justify-content: flex-start;
}

.marquee-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  margin-bottom: auto;
}

.marquee-row {
  overflow: hidden;
  width: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 8px;
}

.marquee-left .marquee-track {
  animation: marquee-left 11s linear infinite;
}

.marquee-right .marquee-track {
  animation: marquee-right 11s linear infinite;
}

.bento-card-tech:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-left {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes marquee-right {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
  }
}

/* Competitions — two static logo chips, no animation needed for just 2. */
.tools-static {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 18px;
}

.tool-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.tool-chip-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.tool-chip-name {
  font-size: 0.72rem;
  color: var(--ink-faint);
  white-space: nowrap;
}

.bento-tools-caption {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.7rem;
  color: var(--ink-faint);
  margin: auto 0 6px;
}

.bento-big-line {
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.3;
  color: var(--ink);
  margin: 0;
}

/* What I Build — headline cycles vertically through what she builds, a
   subtle gradient washes in on hover, and the whole card links to Projects. */
.bento-card-build {
  position: relative;
  overflow: hidden;
}

.bento-card-build::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 25% 15%, rgba(46, 46, 46, 0.07), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bento-card-build:hover::before {
  opacity: 1;
}

.build-cycle {
  position: relative;
  min-height: 3.6em;
  margin: auto 0 16px;
}

.build-word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  font-family: "Figtree", sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.25;
  color: var(--ink);
  opacity: 0;
  transform: translateY(100%);
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.build-word.is-active {
  opacity: 1;
  transform: translateY(0);
}

.build-tagline {
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.88rem;
  margin: 0 0 16px;
}

.build-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.build-chip {
  font-family: "Figtree", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 1px solid rgba(46, 46, 46, 0.3);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--paper-soft);
}

/* Beyond Code — three photos scattered like a loose stack of prints, each
   tilted at its own angle (same spirit as the tilted testimonial cards in
   the reference). They fan out further apart on hover instead of scrolling. */
.bento-card-beyond .bento-big-line {
  margin: 0 0 20px;
}

.beyond-scatter {
  position: relative;
  height: 96px;
  margin-top: auto;
}

.beyond-photo {
  position: absolute;
  width: 68px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 5px solid var(--paper);
  box-shadow: 0 10px 24px rgba(46, 46, 46, 0.16);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.beyond-photo-1 {
  left: 0;
  top: 9px;
  transform: rotate(-7deg);
  z-index: 1;
}

.beyond-photo-2 {
  left: 49px;
  top: 0;
  transform: rotate(4deg);
  z-index: 3;
}

.beyond-photo-3 {
  left: 98px;
  top: 10px;
  transform: rotate(-4deg);
  z-index: 2;
}

.bento-card-beyond:hover .beyond-photo-1 {
  transform: rotate(-12deg) translateY(-4px);
}

.bento-card-beyond:hover .beyond-photo-2 {
  transform: rotate(0deg) translateY(-10px);
  box-shadow: 0 16px 28px rgba(46, 46, 46, 0.2);
}

.bento-card-beyond:hover .beyond-photo-3 {
  transform: rotate(8deg) translateY(-4px);
}

@media (prefers-reduced-motion: reduce) {
  .beyond-photo {
    transition: none;
  }
}

/* How I Think */
.think-track {
  position: relative;
  padding-top: 6px;
  margin-bottom: 24px;
}

.think-line-track {
  position: absolute;
  top: 6px;
  left: 10%;
  right: 10%;
  height: 2px;
}

.think-line-bg {
  position: absolute;
  inset: 0;
  background: var(--line);
}

.think-line-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transition: width 0.6s ease;
}

.think-steps {
  position: relative;
  display: flex;
  justify-content: space-between;
}

.think-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.think-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.think-name {
  font-family: "Figtree", sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-faint);
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.think-step.is-active .think-dot {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

.think-step.is-active .think-name {
  color: var(--ink);
  font-weight: 700;
}

.think-step.is-done .think-dot {
  background: var(--accent);
  border-color: var(--accent);
}

.think-desc {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 0.95rem;
  min-height: 3.4em;
  max-width: 560px;
  margin: 0;
}

@media (max-width: 860px) {
  .bento-row-top,
  .bento-row-bottom {
    grid-template-columns: 1fr;
  }
  .think-name {
    font-size: 0.7rem;
  }
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 9vh 32px;
  border-top: 1px solid var(--line);
}

.about-thanks {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.contact-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.contact-links a {
  font-size: 0.95rem;
}

.footer-copyright {
  margin: 28px 0 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* ---------- Blog ---------- */
.blog-empty {
  color: var(--ink-faint);
  font-size: 0.95rem;
  margin: 0;
}

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--paper);
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 40;
}

.to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal, .category {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view, .category.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid-masonry {
    column-count: 2;
  }
  .series-grid {
    column-count: 2;
  }
  .hero-intro-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-photo {
    max-width: 200px;
    margin: 0 auto;
  }
}

@media (max-width: 540px) {
  .nav-links { gap: 16px; font-size: 0.82rem; }
  .nav-inner { padding: 16px 20px; }
  .hero { min-height: 70vh; padding: 0 20px; }
  .section { padding: 7vh 20px; }
  .grid-masonry { column-count: 1; }
  .series-grid { column-count: 1; }
  .about-section { padding: 7vh 20px; }
  .site-footer { padding: 7vh 20px; }
}
