:root {
  color-scheme: light;            /* opt out of browser auto dark-mode inversion */
  --bg: #fdfdfd;
  --black: #000;
  --body: #666;
  --overline: #bdbdbd;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --pad: 200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  /* Use the OS default (subpixel) smoothing so Light/300 weights render with
     fuller strokes — matching Figma. `antialiased` here forces grayscale AA on
     macOS, which makes text look noticeably thinner/lighter. */
  -webkit-font-smoothing: subpixel-antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  font-family: var(--sans);
  color: var(--black);
}

.page { width: 100%; overflow-x: hidden; }

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

/* centered content column — 1200px content inside a 1440px frame */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.serif-accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  color: var(--overline);
}
.sans-light { font-family: var(--sans); font-weight: 300; letter-spacing:0.64px; }

/* ---------- NAV ---------- */
.nav {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-top: 40px;
  padding-bottom: 40px;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 1.44px;
  color: var(--overline);
}
.nav a { transition: color 0.2s ease; }
.nav a:hover { color: var(--black); }

/* ---------- BUTTON ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 2px;
  background-image: linear-gradient(171deg, #282828 20%, #000 108%);
  box-shadow: inset 2px 2px 5px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 2px 2px 5px 0 rgba(255, 255, 255, 0.25), 0 6px 18px rgba(0, 0, 0, 0.18);
}
.btn span:first-child {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 1.44px;
  color: #fff;
  white-space: nowrap;
}
.btn__divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.35); }
.btn__arrow { width: 11px; height: 11px; display: block; transition: transform 0.2s ease; }
/* up-right arrows (case CTAs): nudge 2px up + 2px right on hover */
.btn:hover .btn__arrow:not(.btn__arrow--down) { transform: translate(2px, -2px); }
/* hero "VIEW MY WORK": point the arrow straight down and loop a vertical "jump"
   to invite scrolling (per unused-css animated down arrow: jump, 1.5s, infinite) */
.btn__arrow--down { transform: rotate(135deg); animation: arrowJump 1.5s infinite; }
@keyframes arrowJump {
  0%   { transform: translateY(0)   rotate(135deg); }
  50%  { transform: translateY(4px) rotate(135deg); }
  100% { transform: translateY(0)   rotate(135deg); }
}
@media (prefers-reduced-motion: reduce) {
  .btn__arrow--down { animation: none; }   /* stays a static down arrow */
}

/* ---------- HERO ---------- */
/* two equal columns (same grid as .case) so the bio fills the left half and its
   right edge lands on the centre line — aligned with the case image's right edge below */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero__bio {
  font-family: var(--sans); font-weight: 300; font-size: 20px; line-height: 1.5;
  letter-spacing: 0.32px; color: var(--black);
}
.hero__bio .serif-accent { color: var(--overline); }   /* "one rectangle at a time." */
.hero__cv { display: flex; flex-direction: column; gap: 20px; padding-left: 40px; }   /* match .case__info padding → year aligns with the case title's left edge */
.hero__cv-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; }   /* auto gaps; role lands on the right edge */
.hero__cv-year { flex: 0 0 80px; font-family: var(--mono); font-weight: 300; color: var(--overline); }
.hero__cv-co   { flex: 0 0 140px; font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--black); letter-spacing: 0.48px; }
.hero__cv-role { flex: 0 0 145px; font-family: var(--sans); font-weight: 300; color: var(--body); letter-spacing: 0.5px; }

/* ---------- HERO ENTRANCE ANIMATION ---------- */
/* blur + rise reveal, staggered (LaunchNow-style) */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(40px) scale(0.97); filter: blur(18px); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    filter: blur(0); }
}
.hero__bio    { animation: riseIn 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both; }
.hero__cv-row { animation: riseIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__cv-row:nth-child(1) { animation-delay: 0.45s; }
.hero__cv-row:nth-child(2) { animation-delay: 0.58s; }
.hero__cv-row:nth-child(3) { animation-delay: 0.71s; }
.hero__cv-row:nth-child(4) { animation-delay: 0.84s; }

@media (prefers-reduced-motion: reduce) {
  .hero__bio, .hero__cv-row { animation: none; }
}

/* ---------- SCROLL REVEAL (case studies) ---------- */
/* dramatic blur + rise, triggered when the element enters the viewport */
.reveal {
  opacity: 0;
  transform: translateY(56px) scale(0.97);
  filter: blur(20px);
  transition:
    opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    transform 1.1s cubic-bezier(0.16, 1, 0.3, 1),
    filter 1.1s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}
/* stagger the text behind the visual within each case */
.case__info.reveal { transition-delay: 0.14s; }

/* experience: heading first, then timeline entries cascade */
.experience__heading.reveal { transition-delay: 0.05s; }
.timeline .entry.reveal:nth-child(1) { transition-delay: 0.12s; }
.timeline .entry.reveal:nth-child(2) { transition-delay: 0.19s; }
.timeline .entry.reveal:nth-child(3) { transition-delay: 0.26s; }
.timeline .entry.reveal:nth-child(4) { transition-delay: 0.33s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ---------- CASES ---------- */
.cases {
  display: flex;
  flex-direction: column;
  gap: 160px;
  padding-top: 40px;
  padding-bottom: 120px;
}
/* two equal halves so the visuals meet at the centre line: Case 1's visual
   (left) ends where Case 2's visual (right) begins — they stay vertically
   aligned at any width. The 40px visual↔text gap lives on the info's inner side. */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.case__visual { min-width: 0; }
.case__info {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 0 40px 40px;   /* normal row: info on the right → gap on its left */
}
.case--reverse .case__info { padding: 40px 40px 40px 0; }   /* reversed: info on the left → gap on its right */
.case__title { font-size: 24px; line-height: 1.5; font-weight: 300; color: var(--black);}
.case__title .sans-light { letter-spacing: -0.16px; }
.case__cta { margin-top: 32px; }

/* stats */
.stats { display: flex; flex-direction: column; margin-top: 56px; width: 100%; }
.stat { display: flex; align-items: center; gap: 16px; }
.stat:not(:last-child) { padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid #e9e9e9; }
.stat__num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 92px;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 20px;
  color: #000;
}
.stat__sign { display: inline-block; width: 12px; }
.stat__label { font-family: var(--sans); font-weight: 300; font-size: 14px; line-height: 1.2; letter-spacing: 0.5px; color: var(--body); }

/* frame / visual — internal coordinate space is 588 x 545, scaled to fit by script.js */
/* case-study visual: the whole composition (blurred background + card +
   "px" measurement brackets) is exported straight from Figma as one image */
.case__shot { display: block; width: 100%; height: auto; }

/* ---------- DESIGN ARCHIVE ---------- */
.archive-head { padding-top: 40px; }
.archive__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-weight: 300; font-size: 12px; letter-spacing: 1.44px;
  color: var(--overline); transition: color 0.2s ease;
}
.archive__back:hover { color: var(--black); }
.archive__back svg { width: 16px; height: 16px; }
.archive__title { margin-top: 28px; font-size: 24px; line-height: 1.2; font-weight: 300; letter-spacing: -0.6px; max-width: 600px; }
.archive { padding-top: 72px; padding-bottom: 120px; }
.archive__grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; row-gap: 60px; }
.archive__card { display: flex; flex-direction: column; }
.archive__shot { aspect-ratio: 580 / 338; overflow: hidden; background: #f3f3f4; }
.archive__shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.archive__card:hover .archive__shot img { transform: scale(1.03); }
/* disable the generic scale for the new card types */
.archive__card:hover .archive__shot--aff img,
.archive__card:hover .archive__shot--duo img { transform: none; }

/* ── archive card: affiliate (card 1) ─────────────────────────────── */
.archive__shot--aff { background: #f5f3ff; position: relative; }
/* browser window — not an img, unaffected by the generic reset */
.archive__aff-browser {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 68.97%;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  display: flex; flex-direction: column; gap: 1px;
}
.archive__aff-content { position: relative; width: 100%; aspect-ratio: 400 / 255; overflow: hidden; }
/* prefixed with parent to reach 0-2-0 specificity and beat the .archive__shot img 0-1-1 reset */
.archive__shot--aff .archive__aff-bg {
  position: absolute;
  left: 0; top: -6.8%;
  width: 117.9%; height: 113.9%;
  object-fit: cover;
  pointer-events: none;
}
.archive__shot--aff .archive__aff-bar { display: block; width: 100%; height: auto; }
.archive__shot--aff .archive__aff-gif {
  position: absolute;
  width: 100%; height: 101.93%;
  top: -1.81%; left: 0;
  object-fit: cover;
}

/* ── archive card: duo (card 6) ───────────────────────────────────── */
.archive__shot--duo { background: #f2f2ff; display: flex; align-items: center; justify-content: center; gap: 24px; }
.archive__duo-a,
.archive__duo-b { position: relative; width: 36.55%; border-radius: 4px; overflow: hidden; flex: none; }
.archive__duo-a { aspect-ratio: 212 / 176; }
.archive__duo-b { aspect-ratio: 212 / 177; }
/* 0-2-1 beats the .archive__shot img 0-1-1 reset */
.archive__shot--duo .archive__duo-a img {
  position: absolute; width: 339.43%; height: 254.5%; left: -90.31%; top: -84.75%; max-width: none;
}
.archive__shot--duo .archive__duo-b img {
  position: absolute; width: 276.59%; height: 206.6%;  left: -63.51%; top: -60.69%; max-width: none;
}
.archive__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-top: 16px; }
.archive__name { font-family: var(--sans); font-weight: 300; font-size: 15px; color: var(--black); letter-spacing: 0.5px;}
.archive__tag { font-family: var(--mono); font-weight: 300; font-size: 11px; letter-spacing: 1px; color: var(--overline); white-space: nowrap; }
/* progressive blur fixed to the bottom of the viewport: content sits frosted at
   the bottom edge and sharpens as it scrolls up out of the band */
.scroll-blur {
  position: fixed; left: 0; right: 0; bottom: 0;
  height: 190px; z-index: 60; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 88%);
          mask-image: linear-gradient(to top, #000 0%, #000 12%, transparent 88%);
}

/* ---------- EXPERIENCE ---------- */
.experience { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 120px; padding-bottom: 120px; gap: 60px; }
.experience__heading { display: flex; align-items: center; gap: 8px; font-size: 32px; white-space: nowrap; flex: 0 0 auto; }
.experience .serif-accent { color: rgba(0, 0, 0, 0.4); }
.experience__heading-sans { font-family: var(--sans); font-weight: 300; color: rgba(0, 0, 0, 0.75); letter-spacing: -0.32px; }

.timeline { flex: 0 1 776px; display: flex; flex-direction: column; gap: 40px; }
.entry { display: flex; gap: 24px; align-items: flex-start; }
.entry__year { flex: 0 0 180px; font-family: var(--mono); font-weight: 300; font-size: 14px; color: var(--overline); }
.entry__body { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.entry__role { display: flex; flex-direction: column; gap: 6px; }
.entry__company { font-family: var(--sans); font-weight: 300; font-size: 16px; color: var(--black); }
.entry__sub { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 14px; color: var(--body); opacity: 0.7; }
.entry__desc { font-family: var(--sans); font-weight: 300; font-size: 12px; line-height: 1.5; color: var(--body); letter-spacing: 0.5px; }

/* ---------- FOOTER ---------- */
.footer { position: relative; background: #000; overflow: hidden; }
.footer .container { padding-top: 0; padding-bottom: 0; }

.footer__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 366px;
  min-height: 432px;
  /* faint blueprint guides at the content edges */
  border-left: 1px dashed rgba(255, 255, 255, 0.14);
  border-right: 1px dashed rgba(255, 255, 255, 0.14);
}

/* left region: two measurement brackets with the headline between them */
.footer__left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 0;
}
.footer__headline {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 32px;
  line-height: 1.4;
  letter-spacing: -0.32px;
  color: #fff;
  max-width: 425px;
  padding: 0 20px;
}
.footer__accent { color: rgba(255, 255, 255, 0.5); }

.footer__measure { display: flex; align-items: center; height: 14px; }
.m-line { flex: 1; height: 1px; background: rgba(255, 255, 255, 0.22); }
.m-label {
  margin: 0 14px;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
}
/* chevron caps sit flush against the line ends */
.m-arrow { width: 7px; height: 7px; flex: none; }
.m-arrow--l { border-left: 1px solid rgba(255, 255, 255, 0.45); border-bottom: 1px solid rgba(255, 255, 255, 0.45); transform: rotate(45deg); margin-right: -1px; }
.m-arrow--r { border-right: 1px solid rgba(255, 255, 255, 0.45); border-top: 1px solid rgba(255, 255, 255, 0.45); transform: rotate(45deg); margin-left: -1px; }

/* right region: contact links separated by horizontal rules */
.footer__right {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 100px 0;
}
.footer__rule { height: 14px; width: 100%; display: flex; align-items: center; }
.footer__rule::before { content: ""; display: block; width: 100%; height: 1px; background: rgba(255, 255, 255, 0.16); }
.footer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 16px 20px;
  font-family: var(--mono);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: 2.24px;
  color: var(--overline);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.footer__link:hover { color: #fff; }
.link-arrow { width: 16px; height: 16px; flex: none; display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* tablet — tighten side padding */
@media (max-width: 1200px) {
  :root { --pad: 64px; }
}

/* stack case studies + hero before the two-column layout gets cramped */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 48px;
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .hero__bio { max-width: none; }
  .hero__cv { width: 100%; padding-left: 0; }   /* drop the desktop indent once stacked */

  .cases { gap: 96px; }
  .case, .case--reverse { grid-template-columns: 1fr; align-items: stretch; gap: 24px; }
  .case__visual { flex: none; max-width: 100%; width: 100%; margin: 0 auto; }
  .case--reverse .case__visual { order: -1; }   /* image on top for every card once stacked */
  .case__info, .case--reverse .case__info { padding: 0; }
  .case__title { order: 1; }
  .stats { order: 2; margin-top: 28px; }
  .case__cta {
    order: 3;
    margin-top: 28px;
    align-self: flex-start;
  }

  .experience { flex-direction: column; gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .timeline { flex-basis: auto; width: 100%; }

  .footer__inner { grid-template-columns: 1fr; min-height: 0; }
  .footer__left { padding: 64px 0 40px; gap: 48px; justify-content: flex-start; }
  .footer__right { border-left: none; padding: 0 0 64px; }
}

/* phone — matches the 393px mobile frame */
@media (max-width: 560px) {
  :root { --pad: 16px; }

  .nav { gap: 12px; font-size: 10px; letter-spacing: 0.5px; }   /* stays one row down to ~340px phones */
  .hero { padding-top: 56px; padding-bottom: 56px; }
  .hero__bio { font-size: 18px; }
  /* one shared grid (rows are display:contents) so the year column is the same width on every row → company + role line up perfectly */
  .hero__cv { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 16px 14px; align-items: start; }
  .hero__cv-row { display: contents; font-size: 10px; }   /* 10px must sit on the row — children inherit from it, not from .hero__cv */
  .hero__cv-year { white-space: nowrap; }

  /* full-width "VIEW CASE STUDY" button per the mobile frame */
  /* full-width: label centered across the whole button, divider + arrow pinned to the right edge */
  .case__cta { align-self: stretch; justify-content: center; }
  .case__cta .btn__divider { position: absolute; right: 43px; top: 50%; margin-top: -9px; }
  .case__cta .btn__arrow { position: absolute; right: 16px; top: 50%; margin-top: -5.5px; }

  /* stack each experience entry: year on its own line, then company / role / desc */
  .entry { flex-direction: column; gap: 8px; }
  .entry__year { flex: 0 0 auto; }   /* drop the 180px basis (becomes height once column) */

  .case__title { font-size: 24px; }
  .experience__heading { font-size: 26px; }
  .archive__title { font-size: 26px; }
  .archive__grid { grid-template-columns: 1fr; row-gap: 40px; }
  .archive { padding-top: 48px; }

  .footer__headline { font-size: 26px; }
  .footer__link { font-size: 12px; letter-spacing: 1.6px; padding: 16px 20px; }
}
