/* IK.portfolio — layout and components.
   Built from Figma file WMxvMUfsJnf4mr4GPecWD8 (page "UI").

   Scaling model: the design is drawn at 1440px wide. Rather than freezing
   everything at that width, the hero composition is driven by two variables —
   --hero-w (the width of the 1076x810 hero stage) and --u (one design pixel,
   expressed as a length). Every measurement inside the hero is written as
   calc(<figma px> * var(--u)), so the whole composition scales as one piece
   and the interlocking SVG panel/knockout shapes stay aligned at any size. */

/* ── Reset ──────────────────────────────────────────────────── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Anchor targets must clear the sticky header. */
[id] {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
p,
figure {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

/* ── Hero scale variables ───────────────────────────────────── */

:root {
  /* The hero stage is 1076x810 in a 1440x1024 frame, so 74.72vw wide. It is
     also capped by the available height (1076/810 = 1.3284) so the whole
     composition always fits the viewport — the design is drawn at 1024 tall
     and would otherwise run off the bottom of a shorter window. */
  --hero-w: min(1076px, 74.72vw, calc((100vh - 160px) * 1.3284));
  --u: calc(var(--hero-w) / 1076);
}

/* ── Buttons ────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  padding: 16px 32px;
  font-size: var(--fs-btn);
  letter-spacing: var(--ls-btn);
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.btn--primary {
  background: var(--pink);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 700;
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--secondary {
  min-width: 120px;
  background: transparent;
  color: var(--black);
  font-family: var(--font-display);
  font-weight: 500;
}

.btn--secondary:hover {
  color: var(--pink);
}

/* ── Header ─────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-gutter);
  /* The fallback. js/header-tone.js repaints it to match whatever page
     surface is under it, and turns it transparent over the Work hero. */
  background: var(--white);
  transition: background-color 0.25s var(--ease);
}

.site-header__logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.site-header__nav {
  display: flex;
  align-items: center;
}

/* The current page's link holds the hover state: pink text, no pill. */
.site-header__nav [aria-current="page"] {
  color: var(--pink);
}

/* On a pink header (the footer under it) pink text would vanish, so the
   links stay black there and the current one is underlined instead.
   js/header-tone.js sets data-tone="accent" when the header is pink. */
.site-header[data-tone="accent"] .btn--secondary {
  color: var(--black);
}

.site-header[data-tone="accent"] [aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding: 20px 0;
}

.hero__stage {
  position: relative;
  width: var(--hero-w);
  aspect-ratio: 1076 / 810;
  overflow: hidden;
}

/* The beige panel — a 1076x810 rounded rectangle with a stepped notch cut out
   of its bottom-left corner. The white knockout block below slots into it. */
.hero__panel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Giant "ui/ux designer" set at 328px, clipped by the stage. Two copies make
   an infinite marquee — this is the Default/Variant2 pair in the Figma file. */
.hero__marquee {
  position: absolute;
  left: 0;
  width: 100%;
  top: calc(146 * var(--u));
  height: calc(336 * var(--u));
  overflow: hidden;
}

.hero__marquee-track {
  display: flex;
  align-items: center;
  gap: calc(224 * var(--u));
  height: 100%;
  width: max-content;
  animation: marquee 20s linear infinite;
}

.hero__marquee-track span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: calc(328 * var(--u));
  line-height: 1;
  text-transform: uppercase;
  white-space: pre;
  color: var(--black);
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  /* one copy + one gap = exactly half the track, so the loop is seamless */
  to {
    transform: translateX(calc(-1 * (100% + 224 * var(--u)) / 2));
  }
}

/* Stepped white block, bottom-left, carrying the intro lines */
.hero__intro {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(623 * var(--u));
  height: calc(264 * var(--u));
}

.hero__knockout {
  position: absolute;
  left: 0;
  bottom: 0;
  width: calc(607 * var(--u));
  height: 100%;
}

.hero__lines {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(8 * var(--u)) 0;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: calc(36 * var(--u));
  line-height: calc(54 * var(--u));
  letter-spacing: calc(1.08 * var(--u));
  white-space: nowrap;
}

.hero__line em,
.hero__line .accent {
  color: var(--pink);
  font-style: italic;
  font-weight: 700;
}

.hero__line .accent {
  font-style: normal;
  font-weight: 500;
}

.hero__cta {
  position: absolute;
  right: 0;
  bottom: 0;
  font-size: calc(20 * var(--u));
  padding: calc(16 * var(--u)) calc(32 * var(--u));
  border-radius: calc(16 * var(--u));
}

/* ── Hero, proposed revisions (preview only) ────────────────── */
/* The stepped panel/knockout geometry is fixed: both SVGs are cut around a
   623x264 block of four 36/54 lines, so the intro's size and family cannot
   move. These variants change only what is free — accent count, marquee pace,
   and where the CTA sits. */

/* B — restraint */
.hero--v2 .hero__marquee-track {
  animation-duration: 20s;
}

/* Smaller than the Figma's 328, so more of "ui/ux designer" is on screen at
   once. The band height and the loop maths are independent of font size, so
   this does not disturb the panel/knockout interlock. */
.hero--v2 .hero__marquee-track span {
  font-size: calc(264 * var(--u));
}

.hero--v2 .hero__cta {
  gap: calc(10 * var(--u));
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.hero--v2 .hero__cta svg {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
}

.hero--v2 .hero__cta:hover {
  background: var(--black);
  color: var(--white);
  transform: none;
}

/* C — B, plus the CTA pulled in beside the intro block so the empty diagonal
   between copy and button closes up. */
.hero--v3 .hero__marquee-track {
  animation-duration: 20s;
}

.hero--v3 .hero__marquee-track span {
  font-size: calc(264 * var(--u));
}

.hero--v3 .hero__cta {
  right: auto;
  left: calc(655 * var(--u));
  bottom: calc(18 * var(--u));
  gap: calc(10 * var(--u));
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.hero--v3 .hero__cta svg {
  width: calc(18 * var(--u));
  height: calc(18 * var(--u));
}

.hero--v3 .hero__cta:hover {
  background: var(--black);
  color: var(--white);
  transform: none;
}

/* ── Work ───────────────────────────────────────────────────── */

.work {
  position: relative;
  padding: 120px 0;
}

.work__pin {
  position: relative;
}

.work__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(64px, 15.5vw, var(--fs-title));
  line-height: 1;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 80px;
  transform-origin: center center;
}

/* ── Card deck ──────────────────────────────────────────────── */
/* Static list by default — this is what shows with JS off, with reduced
   motion, and on mobile. scroll.js adds .is-pinned to turn it into the deck. */

.deck {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 64px;
}

.deck__link {
  display: block;
  position: relative;
  width: min(620px, 88vw);
  border-radius: 20px;
  overflow: hidden;
  background: var(--gray);
  box-shadow: 0 8px 30px rgba(34, 34, 34, 0.14);
}

.deck__shot {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: var(--gray);
}

.deck__pill {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: var(--white);
  color: var(--black);
  border-radius: 999px;
  /* A 12px line with 4px above and below: 20px tall in total. */
  padding: 4px 18px;
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 12px;
  letter-spacing: 0.08em;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(34, 34, 34, 0.16);
}

/* Progress rail — hidden until the deck is actually pinned, since it has
   nothing to track in the static list. */
.deck__rail {
  display: none;
}

.work.is-pinned .deck__rail {
  position: absolute;
  left: clamp(20px, 4vw, 60px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--black);
  z-index: 5;
}

.deck__rail-line {
  position: relative;
  width: 1px;
  height: 64px;
  background: rgba(34, 34, 34, 0.25);
}

.deck__rail-dot {
  position: absolute;
  left: 50%;
  top: 0;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--black);
}

/* Pinned deck */

.work.is-pinned {
  padding: 0;
  /* scroll.js sets --deck-vh from the number of cards. */
  height: var(--deck-vh, 300vh);
}

.work.is-pinned .work__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: block;
}

/* The giant wordmark sits centred behind the deck and stays put — the cards
   rise over it. */
.work.is-pinned .work__title {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

.work.is-pinned .deck {
  position: absolute;
  inset: 0;
  display: block;
  gap: 0;
}

.work.is-pinned .deck__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(620px, 44vw);
  margin-left: calc(min(620px, 44vw) / -2);
  will-change: transform, opacity;
}

.work.is-pinned .deck__link {
  width: 100%;
}

/* ── About ──────────────────────────────────────────────────── */

.about {
  padding: 0 0 120px;
}

.about__panel {
  background: var(--gray);
  border-radius: var(--radius-panel);
  padding: clamp(48px, 12.6vw, 182px) clamp(24px, 10.4vw, 150px);
  display: flex;
  align-items: center;
  gap: 20px;
}

.about__card,
.about__photo {
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius-panel);
  aspect-ratio: 560 / 660;
}

.about__card {
  background: rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  padding: 48px 16px;
}

.about__heading {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5vw, var(--fs-h1));
  line-height: 1.1;
  letter-spacing: var(--ls-h1);
  text-transform: uppercase;
}

.about__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: var(--fs-body);
  line-height: 24px;
  letter-spacing: var(--ls-body);
}

.about__photo {
  object-fit: cover;
}

/* ── About, proposed revision ───────────────────────────────── */
/* A summary on the homepage that links through to about.html, rather than a
   name and a wall of text. Differences from .about:
     - the inner card is gone (it was a 1.08:1 difference from the panel it
       sat on, so it read as a smudge rather than a panel)
     - the columns are 60/40 rather than a mirrored 50/50, aligned at the top
     - a facts row and outbound links, so the section says something useful */

.about--summary .about__panel {
  /* Tops line up; the photo keeps its own 4:5 proportions rather than being
     stretched to the text column's height. */
  align-items: flex-start;
  gap: clamp(24px, 4vw, 72px);
}

.about--summary .about__col {
  flex: 1 1 0;
  min-width: 0;
}

.about__label {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.about__lead {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.35;
  letter-spacing: 0.5px;
}

.about--summary .about__body {
  margin-top: 28px;
  gap: 16px;
  font-size: 17px;
  /* 1.55 rather than the 1.33 of the original — easier over two paragraphs */
  line-height: 1.55;
  max-width: 54ch;
}

.about__facts {
  margin: 40px 0 0;
  padding-top: 28px;
  border-top: 1px solid rgba(34, 34, 34, 0.15);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.about__facts dt {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.about__facts dd {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.4vw, 18px);
}

.about__links {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.about__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: transparent;
  /* Neutral stroke, as in the first version. */
  border: 1px solid rgba(34, 34, 34, 0.25);
  border-radius: 999px;
  /* Same ink as the stroke, at full strength. */
  color: var(--black);
  font-size: 15px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

.about__links a:hover {
  background: rgba(var(--pink-rgb), 0.7);
  border-color: var(--pink);
  /* The label flips to black: on the composited pink that is ~8.7:1, whereas
     keeping it pink would leave it invisible against its own fill. */
  color: var(--black);
}

.about__links a.is-primary {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
}

.about__links a.is-primary:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--black);
}

.about--summary .about__photo {
  flex: 0 0 40%;
  align-self: flex-start;
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-panel);
}

@media (max-width: 860px) {
  .about--summary .about__panel {
    flex-direction: column;
  }

  .about--summary .about__photo {
    flex: none;
    width: 100%;
    min-height: 0;
    margin-top: 24px;
    aspect-ratio: 4 / 5;
  }

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

/* ── About page (about.html) ────────────────────────────────── */
/* Drawn at 1440x5844. Two grids are at work: the hero scales as a single piece
   off one unit, and every block below it shares one editorial grid — 150px
   page padding, a 367px label column, 20px, a 753px content column
   (367 + 20 + 753 = 1140 = 1440 - 300).

   This 150px matches --page-gutter, so the body blocks line up with the
   header on every page. */

/* The hero is one composition, so it scales like one, off --au — the same
   construction as .hero and --u further up. At 1440 one unit is one design
   pixel. It was previously mixing vw-scaled type with %-of-a-clamped-height
   positioning, so the wordmark's overlap with the portrait drifted as the
   window narrowed and the two eventually collided. */
.about-hero {
  --ah: clamp(520px, 50.7vw, 730px);
  --au: calc(var(--ah) / 730);
  position: relative;
  overflow: hidden;
  /* 810 in the design less the 80px header the slab starts under. */
  height: var(--ah);
  background: var(--gray);
  border-radius: 0 0 var(--radius-panel) var(--radius-panel);
}

/* Units are of the 1440 x 730 stage: the design's y values less the 80px
   header (127 -> 47, 405 -> 325). Above the portrait in the stack — the
   wordmark paints over it rather than being sliced by it. */
.about-hero__band {
  position: absolute;
  z-index: 3;
  top: calc(47 * var(--au));
  left: 0;
  right: 0;
}

.about-hero .wordmark__track {
  font-size: calc(144 * var(--au));
}

/* The band runs 47 -> 191 and the portrait starts at 148, so the wordmark
   crosses the top of the photo by 43 — 30% of the band height. */
.about-hero__photo {
  position: absolute;
  z-index: 1;
  top: calc(148 * var(--au));
  left: calc(780 * var(--au));
  width: calc(466 * var(--au));
  aspect-ratio: 466 / 558;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-panel);
}

/* 154 rather than the design's 166: the knockout starts 12 to the left of the
   text so its corners have something to bite on. Letter-spacing scales with
   the rest — left at a fixed 2px the lines would not track the knockout's
   fixed viewBox as the window narrows. */
.about-hero__title {
  position: absolute;
  z-index: 4;
  top: calc(325 * var(--au));
  left: calc(154 * var(--au));
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: calc(48 * var(--au));
  line-height: 1.5;
  letter-spacing: calc(2 * var(--au));
  text-transform: uppercase;
}

/* The design's "Union": one stepped path with a 16 radius on every corner,
   the inner ones included, exactly as hero-knockout.svg is built. Per-line
   backgrounds cannot do this — border-radius only ever rounds outwards, so
   the steps stay square however large the radius.

   The viewBox is fixed at the measured 1440 line widths (441 / 679 / 750)
   and scaled by --au, which ties it to PP Hatton's metrics: if the font falls
   back to Didot the shape will not match the text under it. */
.about-hero__knockout {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(750 * var(--au));
  height: calc(216 * var(--au));
}

.about-hero__line {
  position: relative;
  padding: 0 calc(12 * var(--au));
}

/* The 80ms stagger lives with the other reveal delays further down — it has to
   come after `.js [data-reveal]`, whose transition shorthand resets the delay. */

.about-block {
  display: grid;
  grid-template-columns: minmax(0, 367fr) minmax(0, 753fr);
  gap: 20px;
  padding: clamp(64px, 11vw, 160px) clamp(20px, 10.42vw, 150px) 0;
}

.about-block__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.5vw, var(--fs-h3));
  line-height: 1.5;
  letter-spacing: var(--ls-h3);
}

.about-block__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 17px;
  line-height: 1.55;
}

/* The measure caps running text only — the skills grid and the table use the
   full 753px column. */
.about-block__content p {
  max-width: 54ch;
}

/* ── Skills grid ────────────────────────────────────────────── */
/* Six squares in two columns, the left column dropped by exactly one card so
   the pairs interlock. Each cell is two cards tall: the right-column card sits
   at the top of its cell, the left-column card at the bottom. The spacer is a
   100% margin, which on a grid item resolves against the column width — and
   the cards are square, so column width is also card height. */

.skills {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.skills__card {
  /* Without this the square's content-based minimum can outgrow its 1fr
     track and push the grid past the column. */
  min-width: 0;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  border: 1px solid rgba(34, 34, 34, 0.15);
  border-radius: var(--radius-card);
}

/* Rows are placed explicitly: with only the column pinned, sparse auto-placement
   sends each left-column card to the row after its partner instead of beside it. */
.skills__card:nth-child(odd) {
  grid-column: 2;
  margin-bottom: 100%;
}

.skills__card:nth-child(even) {
  grid-column: 1;
  margin-top: 100%;
}

.skills__card:nth-child(1),
.skills__card:nth-child(2) {
  grid-row: 1;
}

.skills__card:nth-child(3),
.skills__card:nth-child(4) {
  grid-row: 2;
}

.skills__card:nth-child(5),
.skills__card:nth-child(6) {
  grid-row: 3;
}

.skills__num {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6b6b6b;
}

.skills__name {
  font-family: var(--font-body);
  font-size: clamp(14px, 1.4vw, 20px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Experience table ───────────────────────────────────────── */

.exp {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.exp__col--role,
.exp__col--client {
  width: 38.5%;
}

.exp__col--year {
  width: 23%;
}

.exp th {
  padding: 0 0 8px 16px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.exp td {
  height: 80px;
  padding: 0 0 0 16px;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.5vw, 18px);
}

.exp th,
.exp td {
  border-bottom: 1px solid rgba(34, 34, 34, 0.15);
}

/* ── Contact ────────────────────────────────────────────────── */
/* Back-to-top at the top right, a small heading, an oversized wordmark, and a
   row of outline pills on full-strength pink.

   Ink is black throughout. The original design set white on this pink, which
   is 2.04:1 — under the AA floor at any size. Black is 7.5:1 on the same
   background, and reads as more deliberate besides. */

/* At least one screen below the header, with the panel at its foot, so
   scrolled to the bottom every page ends the same way: header, a white gap,
   the pink panel. Without it, whatever sits above the footer (the Work
   cards, on a tall window) shows in that gap. The extra 24px tucks the
   cards' soft shadow behind the header too, instead of leaving a faint
   line along its bottom edge. */
.contact {
  padding-top: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: calc(100vh - var(--header-h) + 24px);
  min-height: calc(100svh - var(--header-h) + 24px);
}

.contact__panel {
  background: var(--pink);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Its vertical spacing and the wordmark scale with the window's width, so
     on a wide but short window the panel used to outgrow the screen and,
     scrolled to the bottom, butt up against the header. Each vertical size
     is also capped by the window's height (the min() with vh), so the panel
     always leaves a gap below the header. On a tall window the vh caps are
     never reached (1024 tall, the design's frame, is untouched) and it is
     exactly as designed. */
  padding: min(clamp(28px, 3.5vw, 48px), 4.7vh) clamp(24px, 10.4vw, 150px)
    min(clamp(48px, 6vw, 80px), 7.8vh);
}

.contact__toprow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.contact__totop {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-body);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--black);
}

.contact__totop i {
  display: grid;
  place-items: center;
  width: clamp(48px, 4.4vw, 64px);
  height: clamp(48px, 4.4vw, 64px);
  border-radius: 50%;
  background: var(--black);
  transition: transform 0.2s var(--ease);
}

.contact__totop svg {
  width: 20px;
  height: 20px;
  color: var(--white);
}

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

.contact__heading {
  /* Deliberately not a flex item with a basis: this panel is column-direction,
     so a flex-basis here would become a height. */
  flex: none;
  margin-top: min(clamp(48px, 7vw, 104px), 10.2vh);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--black);
}

.contact__shout {
  margin-top: clamp(8px, 1vw, 16px);
  font-family: var(--font-display);
  font-weight: 500;
  /* Max capped at 200px, not higher: past ~1440 the gutters stop growing, so a
     larger cap would push the nowrap wordmark out of the panel. */
  font-size: min(clamp(48px, 14vw, 200px), 22vh);
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--black);
  user-select: none;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: min(clamp(40px, 6vw, 88px), 8.6vh);
}

.pill {
  display: flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--black);
  border-radius: 999px;
  padding: 18px clamp(28px, 3vw, 44px);
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.pill:hover {
  background: var(--black);
  color: var(--white);
}

.pill span {
  overflow-wrap: anywhere;
}

/* ── Work subpage (work.html) ───────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The "WORK W…" band that runs off both edges of the subpage.

   In the design the band sits at y=344 with a height of 336 inside a 1024
   viewport — its centre lands exactly on the viewport centre, so this is a
   centred full-height stage rather than a padded section. */
/* The band is centred on the viewport, not on the space below the header —
   the sticky header overlaps it in the design. The bottom padding pulls the
   centred track up by half the header, landing it on 512 of 1024. */
.wordmark {
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  padding-bottom: var(--header-h);
  display: grid;
  align-items: center;
}

.wordmark__track {
  display: flex;
  width: max-content;
  font-family: var(--font-display);
  font-weight: 500;
  /* 311px at 1440 (--fs-marquee), scaling down from there. */
  font-size: clamp(96px, 21.6vw, var(--fs-marquee));
  line-height: 0.843; /* the 262px line box the design crops to */
  text-transform: uppercase;
  animation: marquee-work 10s linear infinite;
}

/* The design leaves 128px between copies (period 1321 on a 1193 word), which
   is 0.412em at 311. Kept in em so it tracks the clamped font-size instead of
   drifting with the face the way &nbsp; would. */
.wordmark__track span {
  padding-right: 0.412em;
}

@keyframes marquee-work {
  from {
    transform: translateX(0);
  }
  /* four identical copies — shifting by one quarter loops seamlessly */
  to {
    transform: translateX(-25%);
  }
}

/* Cards section: 64px above the cards, 618px of air before the pink footer. */
.projects {
  padding: 64px var(--page-gutter) 618px;
}

.projects__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--grid-gap);
}

/* 560x548 at 1440: 8px padding, a 544x420 image, 24px, then an 88px label. */
.project {
  display: block;
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 8px;
  box-shadow: 0 2px 12px rgba(34, 34, 34, 0.06);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.project:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(34, 34, 34, 0.12);
}

.project__media {
  background: var(--gray);
  aspect-ratio: 544 / 420;
  border-radius: var(--radius-card);
  overflow: hidden;
}

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 24px below the image, then the 88px label frame's own 8px inset above and
   below its 72px content row: 32 + 72 + 8 = 112, which with the card's 8px
   padding and the 420px image makes the card 548 tall. */
.project__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px 0 8px;
}

.project__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.9vw, var(--fs-card-title));
  line-height: var(--lh-card-title);
  letter-spacing: var(--ls-h3);
}

/* The exported asset is a 72x72 viewBox with the glyph already inset, so the
   72px box is the frame from the design, not the glyph size. */
.project__arrow {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.project:hover .project__arrow {
  transform: translate(4px, -4px);
}

@media (max-width: 860px) {
  /* The 618px gap above the footer is a desktop measurement — on a phone it
     reads as a dead screen. */
  .wordmark {
    min-height: auto;
    padding: clamp(48px, 9vw, 130px) 0;
  }

  .projects {
    padding: 32px var(--page-gutter) 120px;
  }

  .projects__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project__label {
    padding: 16px 0 0;
  }

  .project__name {
    font-size: 28px;
    line-height: 1.2;
  }

  .project__arrow {
    width: 40px;
    height: 40px;
  }
}

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

  .project,
  .project__arrow {
    transition: none;
  }
}

/* ── Case study (case-study.html) ───────────────────────────── */
/* Drawn at 1440 wide, twice — once for GamerStore, once for ismetozkan.com,
   with identical structure. Measured off the Figma render: a 150px gutter
   (not the 166 the rest of the site uses), a 1140px content column inside it,
   and 20px between grid cells.

   Sizes are written as clamp(min, <figma px> / 1440 * 100vw, <figma px>) so
   the page scales as one piece, the same model the hero uses. */

.case {
  --case-gutter: clamp(20px, 10.42vw, 150px); /* 150 at 1440 */
  --case-gap: clamp(12px, 1.39vw, 20px); /* 20 at 1440 */
}

/* Header bottom 80 -> title cap-top 384. */
.case-hero {
  padding: clamp(96px, 21.1vw, 304px) var(--case-gutter) 0;
}

.case-hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 7.5vw, 108px);
  line-height: 1;
  letter-spacing: -0.01em;
}

/* The intro paragraph and the meta row sit on a common bottom edge in the
   design (578 and 571), not a common top — so this row aligns to its end. */
.case-hero__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(12px, 1.39vw, 20px);
}

/* Three columns on a 200px pitch, starting at the gutter. */
.case-meta {
  margin: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(110px, 13.9vw, 200px);
}

.case-meta dt {
  font-family: var(--font-body);
  font-size: clamp(13px, 1.39vw, 20px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6b6b6b;
}

.case-meta dd {
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: clamp(15px, 1.81vw, 26px);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* A side note after a meta value, e.g. "(take-home assignment)" after the
   client: set like the intro text (.case-hero__intro) so it reads as an
   aside, not part of the name. */
.case-meta__note {
  font-weight: 400;
  font-size: clamp(11px, 0.97vw, 14px);
  line-height: 1.3;
}

/* The design right-aligns this block to x=1350 — 90 from the page edge, where
   everything else on the page stops at 150. Aligned to the gutter here, since
   the 90 reads as a slip rather than a decision. */
.case-hero__intro {
  max-width: clamp(280px, 38vw, 548px);
  font-family: var(--font-body);
  font-size: clamp(11px, 0.97vw, 14px);
  line-height: 1.3;
  letter-spacing: 0.01em;
  text-align: right;
  text-transform: uppercase;
}

/* 813x610 screens, 150 apart, starting at the gutter and running off the
   right edge. Six tiles — two copies of the three drawn — so the loop is
   seamless. */
.case-strip {
  margin-top: clamp(16px, 1.81vw, 26px);
  padding-left: var(--case-gutter);
  overflow: hidden;
}

.case-strip__track {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: max-content;
  gap: var(--case-gutter);
  animation: marquee-case 25s linear infinite;
}

.case-strip__track li {
  flex: none;
  width: clamp(240px, 56.46vw, 813px);
}

.case-strip__track img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-btn);
}

/* Half the track is 3 tiles + 2.5 gaps; one full period is 3 tiles + 3 gaps,
   hence the extra half-gap. */
@keyframes marquee-case {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - var(--case-gutter) / 2));
  }
}

/* The project's own wordmark, acting as the divider into the write-up. */
.case-wordmark {
  margin: clamp(56px, 13.9vw, 200px) var(--case-gutter) 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4.03vw, 58px);
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

/* Overview / Challenges / Solutions. Hairlines run the full page width, so
   the gutter is padding on the row rather than a margin. */
.case-rows {
  margin-top: clamp(40px, 5.49vw, 79px);
  border-bottom: 1px solid var(--gray);
}

.case-row {
  display: grid;
  /* 428 + 712 of the 1140 content column */
  grid-template-columns: 37.54% 62.46%;
  align-items: start;
  border-top: 1px solid var(--gray);
  padding: clamp(32px, 5.6vw, 80px) var(--case-gutter);
}

.case-row__heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.05vw, 44px);
  line-height: 1;
}

.case-row__body {
  max-width: 712px;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 24px;
  letter-spacing: var(--ls-body);
}

/* Every tile is 4:3 — 1140x855 full width, 560x420 in the two-up rows. */
.case-gallery {
  padding: clamp(56px, 11.2vw, 161px) var(--case-gutter) 0;
}

.case-gallery__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--case-gap);
}

.case-gallery__item {
  aspect-ratio: 4 / 3;
  background: var(--gray);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.case-gallery__item--full {
  grid-column: 1 / -1;
}

.case-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 64 between the last tile and the pink panel, against the 120 elsewhere. */
.case .contact {
  padding-top: clamp(32px, 4.4vw, 64px);
}

@media (max-width: 860px) {
  /* Match the 20px the header drops to, so the page keeps one left edge. */
  .case {
    --case-gutter: 20px;
  }

  .case-hero {
    padding-top: clamp(56px, 14vw, 120px);
  }

  .case-hero__foot {
    flex-direction: column;
    /* The shared bottom edge is a two-column idea — stacked, it would just
       push both blocks to the right margin. */
    align-items: stretch;
    gap: 28px;
  }

  .case-meta {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    row-gap: 16px;
  }

  .case-meta__note {
    font-size: 13px;
  }

  .case-hero__intro {
    max-width: none;
    font-size: 13px;
    text-align: left;
  }

  .case-strip__track li {
    width: 78vw;
  }

  .case-row {
    grid-template-columns: 1fr;
    row-gap: 12px;
  }

  .case-gallery__grid {
    grid-template-columns: 1fr;
  }
}

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

/* ── Text reveal (the Default/Variant2 keyframe pairs) ──────── */

/* Scoped to .js (set by the inline script in <head>) so that with JavaScript
   disabled the copy is simply visible rather than stuck in its hidden
   starting state. */
[data-reveal] {
  display: inline-block;
}

.js [data-reveal] {
  clip-path: inset(0 0 110% 0);
  opacity: 0;
  transition: clip-path 0.75s var(--ease), opacity 0.75s var(--ease);
}

.js [data-reveal].is-revealed {
  clip-path: inset(0 0 -10% 0);
  opacity: 1;
}

.hero__line:nth-child(2) {
  transition-delay: 0.08s;
}
.hero__line:nth-child(3) {
  transition-delay: 0.16s;
}
.hero__line:nth-child(4) {
  transition-delay: 0.24s;
}

/* Same cascade for the about hero. Of-type rather than of-child, so the
   knockout sitting first inside the title does not shift the count. */
.about-hero__line:nth-of-type(2) {
  transition-delay: 0.08s;
}
.about-hero__line:nth-of-type(3) {
  transition-delay: 0.16s;
}

/* ── Mobile ─────────────────────────────────────────────────── */
/* The Figma file only contains four mobile components and no mobile page
   composition, so this layout is a judgment call: one column throughout, the
   interlocking hero geometry replaced by plain stacked type. */

@media (max-width: 860px) {
  :root {
    --page-gutter: 20px;
    --header-h: 64px;
  }

  .site-header__logo img {
    width: 32px;
    height: 32px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 16px;
  }

  .btn--secondary {
    min-width: 0;
  }

  .hero {
    min-height: 0;
    padding: 32px var(--page-gutter) 64px;
    display: block;
  }

  .hero__stage {
    width: 100%;
    aspect-ratio: auto;
    overflow: visible;
    background: var(--gray);
    border-radius: var(--radius-panel);
    padding: 32px 20px;
  }

  .hero__panel,
  .hero__knockout {
    display: none;
  }

  .hero__marquee {
    position: static;
    height: auto;
    margin-bottom: 32px;
    overflow: hidden;
  }

  .hero__marquee-track span {
    font-size: 21vw;
  }

  .hero__intro {
    position: static;
    width: 100%;
    height: auto;
    background: var(--white);
    border-radius: 16px;
    padding: 20px 16px;
  }

  .hero__lines {
    position: static;
    padding: 0;
    gap: 8px;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: 0.4px;
    white-space: normal;
  }

  .hero__cta {
    position: static;
    margin-top: 24px;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: var(--radius-btn);
  }

  .work {
    padding: 64px var(--page-gutter);
  }

  .work__title {
    margin-bottom: 40px;
  }

  .deck {
    gap: 40px;
  }

  .deck__pill {
    left: 12px;
    bottom: 12px;
    padding: 4px 14px;
    font-size: 11px;
  }

  .about {
    padding: 0 var(--page-gutter) 64px;
  }

  .about__panel {
    flex-direction: column;
    padding: 32px 20px;
  }

  .about__card,
  .about__photo {
    width: 100%;
    aspect-ratio: auto;
  }

  .about__card {
    padding: 24px 16px;
    gap: 24px;
  }

  .about__photo {
    aspect-ratio: 4 / 5;
  }

  /* About page. The hero's three absolute pieces go back into flow, and the
     interlocking skills grid collapses to a plain stack. */
  .about-hero {
    height: auto;
    padding: 0 var(--page-gutter) 40px;
    display: flex;
    flex-direction: column;
  }

  .about-hero__band {
    position: static;
    margin: 0 calc(-1 * var(--page-gutter)) 24px;
    overflow: hidden;
  }

  .about-hero .wordmark__track {
    font-size: clamp(56px, 10vw, 144px);
  }

  .about-hero__title {
    position: static;
    order: 1;
    font-size: clamp(22px, 6.4vw, 32px);
    line-height: 1.35;
  }

  /* The lines wrap here so the fixed path no longer describes them, and with
     the portrait stacked below there is nothing left to knock out of. Without
     the knockout the side padding buys nothing, and at 335px of content width
     it costs a whole extra wrapped line. */
  .about-hero__knockout {
    display: none;
  }

  .about-hero__line {
    padding: 0;
  }

  .about-hero__photo {
    position: static;
    order: 2;
    width: 100%;
    margin-top: 32px;
  }

  .about-block {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 64px var(--page-gutter) 0;
  }

  .skills {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }

  .skills__card:nth-child(n) {
    grid-column: 1;
    grid-row: auto;
    margin: 0;
  }

  .exp td {
    height: 64px;
    padding-left: 8px;
  }

  .exp th {
    padding-left: 8px;
  }

  .contact {
    padding-top: 64px;
  }

  /* Height-capped like the desktop panel, for short phones. */
  .contact__panel {
    min-height: 0;
    padding: min(48px, 5vh) 20px;
    gap: min(40px, 4vh);
  }

  .contact__links {
    gap: min(24px, 2vh) 24px;
    width: 100%;
  }

  .pill {
    padding: 20px 24px;
    font-size: 16px;
  }

  .pill img {
    width: 28px;
    height: 24px;
  }
}

/* ── Reduced motion ─────────────────────────────────────────── */
/* Everything collapses to the static stacked layout. scroll.js also bails out
   entirely, so .is-pinned is never applied. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__marquee-track {
    animation: none;
  }

  .js [data-reveal] {
    clip-path: none;
    opacity: 1;
    transition: none;
  }

  .btn,
  .pill {
    transition: none;
  }
}
