/* ==========================================================
   Portfolio styles — bold geometric theme
   Edit the tokens below to rebrand the whole site.
   ========================================================== */
:root {
  --green: #406c4a;          /* main brand green */
  --green-tint: #4b7a56;     /* lighter green for background shapes */
  --pink: #f2a7da;           /* bright pink for shapes & surfaces (ink on pink 10:1) */
  --pink-text: #f2a7da;      /* same pink for type on green, 3.3:1, large text only */
  --grey: #e3e3e3;           /* light neutral */
  --ink: #111111;            /* body text on grey & pink */
  --paper: #f2f2f2;          /* text on green, 5.4:1 (passes AA) */
  --bg: var(--grey);
  --text: var(--ink);
  --muted: #4a4a4a;
  --line: #c4c4c4;          /* hairline grid */

  --font: "Outfit", system-ui, -apple-system, sans-serif;
  --radius: 28px;
  --max: 1440px;
  --prose: 700px;

  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

@media (prefers-color-scheme: dark) {
  :root { --bg: #121212; --text: #f2f2f2; --muted: #b5b5b5; --line: #333; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--paper); }

h1, h2, h3 { font-weight: 400; line-height: 1.02; letter-spacing: -.025em; margin: 0 0 .4em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; }
h3 { font-size: 1.5rem; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 112px 0 0; }
.eyebrow { font-size: .85rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; margin: 0 0 20px; }
.lead { font-size: 1.25rem; max-width: 620px; }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 16px; }

/* ---------- Header ---------- */
.site-header { position: absolute; inset: 0 0 auto 0; z-index: 10; color: var(--paper); }
.site-header :focus-visible, .hero :focus-visible, .case-hero :focus-visible { outline-color: var(--paper); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.15rem; line-height: 1; text-decoration: none; letter-spacing: -.01em; }
.logo svg { width: 30px; height: 30px; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-weight: 500; }
.nav a:hover { text-decoration: underline; text-underline-offset: 6px; }
/* Menu links use the same mono label style as the case study detail labels */
.nav nav a, .nav .logo, .nav .logo span { font-family: "DM Mono", ui-monospace, monospace; font-size: .85rem; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; line-height: 1.6; }
/* Home: line the header up with the hero frame's lines (where the + marks sit) */
.nav.nav-grid { width: calc(100% - 96px); padding: 0; }

/* ---------- Buttons: sharp, mono, hairline ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 20px; border: 1px solid transparent; border-radius: 0;
  font-family: "DM Mono", ui-monospace, monospace; font-size: .85rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  text-decoration: none; transition: background .2s ease, color .2s ease, border-color .2s ease; }
.btn::after { content: "→"; transition: transform .2s ease; }
.btn:hover::after { transform: translateX(4px); }
.btn-primary { background: var(--pink); color: var(--ink); border-color: var(--pink); }
.btn-primary:hover { background: var(--paper); border-color: var(--paper); }
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: var(--green); border-color: var(--green); }
.btn-ghost { border-color: currentColor; }
.btn-email { text-transform: none; letter-spacing: .02em; }
.btn-ghost:hover { background: color-mix(in srgb, currentColor 12%, transparent); }
@media (prefers-color-scheme: dark) { .contact .btn-dark { background: var(--paper); color: var(--ink); border-color: var(--paper); } }

/* ---------- Hero: hairline frame, boxes, mountain range ---------- */
.hero { --hline: rgba(242, 242, 242, .38); --name-size: clamp(3.2rem, 7vw, 6.4rem); position: relative; overflow: hidden; background: var(--green); color: var(--paper); padding-top: 96px; }
.hero :focus-visible { outline-color: var(--paper); }
.hero-frame { position: relative; width: calc(100% - 96px); max-width: var(--max); margin: 0 auto; border-left: 1px solid var(--hline); border-right: 1px solid var(--hline); }
.hero-frame::before { content: ""; position: absolute; top: 0; left: -50vw; right: -50vw; height: 1px; background: var(--hline); }
.hero .cross::before, .hero .cross::after { background: var(--paper); }

.hero-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.hero-title-cell { padding: 40px 56px 230px; }
.hero-title { font-size: var(--name-size); font-weight: 500; letter-spacing: -.04em; line-height: .95; color: var(--paper); margin: 0; }
.hero-title .line { display: block; }
.hero-title .accent { color: var(--pink-text); }
.hero-hatch { border-left: 1px solid var(--hline); border-bottom: 1px solid var(--hline); min-height: 0;
  background: repeating-linear-gradient(135deg, var(--hline) 0 1px, transparent 1px 14px); }

/* Staggered outlined boxes */
/* The middle box spans exactly "Petrova": from the name's left edge (title cell padding)
   to the ink edge of its last "a", which is 3.193 × the name's font size */
.hero-boxes { --box-h: 100px; --name-start: 56px; --name-end: calc(var(--name-start) + var(--name-size) * 3.193);
  display: flow-root; position: relative; margin-top: -150px; padding-bottom: 12px; }
.box { position: absolute; border: 1px solid var(--hline); background: var(--green); }
.box.b1 { left: -48px; width: calc(var(--name-start) + 48px); top: 56px; height: calc(var(--box-h) - 26px); }
.box.b2 { left: var(--name-start); width: calc(var(--name-end) - var(--name-start)); top: 0; height: var(--box-h); }
/* Tagline box + actions stack in flow, so the buttons keep their gap however many lines the tagline takes */
.hero-copy { position: relative; margin: 36px 0 0 var(--name-end); width: calc(200% / 3 - var(--name-end)); }
.box.b3 { position: relative; min-height: var(--box-h); display: flex; align-items: center; padding: 12px 36px; }
.tagline { font-size: 1.15rem; line-height: 1.5; margin: 0; }
.caret { display: inline-block; width: 2px; height: 1.25em; background: var(--pink); margin-left: 6px; vertical-align: -.2em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-actions { margin: 24px 0 0; flex-wrap: nowrap; justify-content: center; }  /* centred under the tagline box */
.hero-actions .btn { flex: none; }

/* Role tag: a cursor pointing at the end of the name, like a collaborator label */
.hero-name { position: relative; display: inline-block; }
/* Arrow tip (3/32 into the 34px icon) lands on the bottom-right ink corner of the last "a":
   .02em in from the line box's right edge, on the baseline .1em above its bottom */
.hero-tag { position: absolute; z-index: 1;
  left: calc(100% - var(--name-size) * .021 - 34px * 3 / 32);
  top: calc(100% - var(--name-size) * .101 - 34px * 3 / 32); }
.pointer { display: block; width: 34px; height: 34px; fill: var(--pink); }
/* Quiet annotation, not a button: hairline box like the outlined rectangles, with grid-style + marks on the corners */
.hero-label { position: relative; margin: -6px 0 0 30px; white-space: nowrap; background: var(--green); border: 1px solid var(--hline); color: var(--paper);
  font-size: 1.15rem; line-height: 1.5; font-weight: 400; padding: 8px 16px; }  /* same size as the tagline */
.hero-label .cross { width: 11px; height: 11px; }

.hero-sun { display: block; width: 100%; height: 380px; margin-top: 0; }

/* ---------- Work: editorial hairline grid ---------- */
.work { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 0; margin-top: 112px; }
.work-frame { position: relative; padding: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) repeat(3, minmax(0, 1fr)); }

/* Crosshair marks where the frame's vertical borders cross the section lines */
.cross { position: absolute; width: 22px; height: 22px; z-index: 2; pointer-events: none; }
.cross::before, .cross::after { content: ""; position: absolute; background: var(--text); }
.cross::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.cross::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.cross.tl { top: -1px; left: -1px; transform: translate(-50%, -50%); }
.cross.tr { top: -1px; right: -1px; transform: translate(50%, -50%); }
.cross.bl { bottom: -1px; left: -1px; transform: translate(-50%, 50%); }
.cross.br { bottom: -1px; right: -1px; transform: translate(50%, 50%); }
.work-intro, .case-col { display: flex; flex-direction: column; }
.case-col { border-left: 1px solid var(--line); }
.case-col > a { display: flex; flex-direction: column; height: 100%; text-decoration: none; transition: background .2s ease; }
.case-col > a:hover { background: color-mix(in srgb, var(--paper) 55%, transparent); }
@media (prefers-color-scheme: dark) { .case-col > a:hover { background: #1c1c1c; } }

.case-top { height: 320px; padding: 32px 28px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; justify-content: space-between; }
.work-intro .case-top { justify-content: space-between; padding: 40px 48px; }
.work-intro h2 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 500; letter-spacing: -.035em; line-height: .98; margin: 0; }

.case-num { font-family: "DM Mono", ui-monospace, monospace; font-size: .95rem; color: #8a8a8a; }
.case-tags { font-family: "DM Mono", ui-monospace, monospace; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.case-col h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; line-height: 1.25; margin: 0; }

.work-text { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; padding: 40px 48px; }
.work-text .small { font-size: .95rem; max-width: 470px; color: var(--muted); margin: 0; }
.work-text .large { font-size: 1.35rem; line-height: 1.5; max-width: 620px; margin: 0; }

.case-glyph { position: relative; flex: 1; min-height: 560px; overflow: hidden; }
.glyph { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); font-size: clamp(16rem, 30vw, 30rem); font-weight: 400; line-height: 1; letter-spacing: 0; transition: transform .4s ease; }
.case-col:nth-of-type(1) .glyph { color: var(--green); }
.case-col:nth-of-type(2) .glyph { color: var(--pink); }
.case-col:nth-of-type(3) .glyph { color: var(--text); }
.case-col > a:hover .glyph { transform: translate(-50%, -50%) scale(1.06); }
.case-result { position: absolute; left: 28px; right: 28px; bottom: 24px; margin: 0; font-size: .9rem; }
.case-result strong { font-weight: 600; }

/* Same columns as .work-grid: the intro column stays empty, one colour under each case study */
.work-strip { display: grid; grid-template-columns: minmax(0, 1.9fr) repeat(3, minmax(0, 1fr)); height: 24px; }
.work-strip span:nth-child(1) { grid-column: 2; }
.work-strip span:nth-child(1) { background: var(--green); }
.work-strip span:nth-child(2) { background: var(--pink); }
.work-strip span:nth-child(3) { background: var(--ink); }
@media (prefers-color-scheme: dark) { .work-strip span:nth-child(3) { background: #2a2a2a; } }

/* ---------- Shared editorial frame (About) ---------- */
.lined { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 112px; }
.frame { position: relative; padding: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.hatch { background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 14px); }

/* ---------- About: square-cell grid ---------- */
.about { --cell-light: #ebebeb; --cell-grey: #d4d4d4; }
@media (prefers-color-scheme: dark) { .about { --cell-light: #1a1a1a; --cell-grey: #262626; } }
.meet { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cell { position: relative; aspect-ratio: 1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cell:nth-child(n) { }
.c1 { grid-column: 1; } .c2 { grid-column: 2; } .c3 { grid-column: 3; } .c4 { grid-column: 4; } .c5 { grid-column: 5; } .c6 { grid-column: 6; border-right: 0; }
.r1 { grid-row: 1; } .r2 { grid-row: 2; } .r3 { grid-row: 3; }
.cell.wide { aspect-ratio: 2 / 1; grid-column-end: span 2; }
.cell.wide.c5 { grid-column-start: 5; border-right: 0; }

/* intro block spans two columns and two rows; no inner borders, like the reference */
.intro { grid-column: 1 / span 3; grid-row: 1 / span 2; aspect-ratio: auto; border-right: 0; padding: 40px 48px; display: flex; flex-direction: column; justify-content: center; }
.cell.blank { box-shadow: inset 1px 0 0 var(--line); }
.tag-eyebrow { display: flex; align-items: center; gap: 10px; font-family: "DM Mono", ui-monospace, monospace; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 18px; }
.tag-eyebrow .sq { width: 8px; height: 8px; background: var(--pink); }
.about h2 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 500; letter-spacing: -.035em; line-height: .98; margin: 0 0 20px; }
.intro-lead { font-size: 1.35rem; line-height: 1.5; color: var(--text); margin: 0; max-width: 620px; }

.c4.r2 { box-shadow: inset 1px 0 0 var(--line); }  /* left edge where the intro ends */

.card, .card-light { background: var(--cell-light); }
.card { padding: 16px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.mono { font-family: "DM Mono", ui-monospace, monospace; font-size: .78rem; line-height: 1.55; letter-spacing: .03em; text-transform: uppercase; margin: 0; }
.chips { display: flex; margin: 0; font-family: "DM Mono", ui-monospace, monospace; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
.chips span { border: 1px solid var(--line); background: var(--bg); padding: 3px 7px; }
.chips span:first-child { font-weight: 500; border-right: 0; }
.chips span + span { color: var(--muted); }
.bracket::before { content: ""; position: absolute; top: -1px; left: -1px; width: 10px; height: 10px; border-top: 2px solid var(--text); border-left: 2px solid var(--text); }

.photo .ph, .photo img { width: 100%; height: 100%; object-fit: cover; }
.photo .ph { background: #bdbdbd; display: grid; place-items: center; font-size: .85rem; color: var(--ink); }

.grey { background: var(--cell-grey); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.grey .big { font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.small-label { font-size: .68rem; color: var(--muted); }

.cell.hatch { background: repeating-linear-gradient(135deg, var(--line) 0 1px, transparent 1px 14px); }
.cross-in { position: absolute; right: -11px; bottom: -11px; width: 22px; height: 22px; z-index: 2; }
.cross-in::before, .cross-in::after { content: ""; position: absolute; background: var(--text); }
.cross-in::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.cross-in::after { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }

.skills { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.skills li { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 120px; padding: 16px 14px; font-weight: 500; border-right: 1px solid var(--line); }
.skills li:last-child { border-right: 0; }
.skill-num { font-family: "DM Mono", ui-monospace, monospace; font-size: .8rem; color: #8a8a8a; font-weight: 400; }

/* ---------- Contact: black modular grid (8 x 4 rhythm) ---------- */
.contact-dark { --slot: 64px; --row: 132px; background: #0a0a0a; color: var(--paper); margin-top: 112px; padding: 24px 0; }
.contact-dark :focus-visible { outline-color: var(--paper); }
.contact-grid { position: relative; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-template-rows: repeat(4, var(--row));
  max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* slot marker: dashed square with four + marks, centred in its cell */
.slot { position: relative; width: var(--slot); height: var(--slot); place-self: center; }
.slot::before { content: ""; position: absolute; inset: 16px; background: #1c1c1c; border: 1px dashed #3a3a3a; }
.slot i { position: absolute; width: 9px; height: 9px; }
.slot i::before, .slot i::after { content: ""; position: absolute; background: #e6e6e6; }
.slot i::before { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.slot i::after  { top: 50%; left: 0; height: 1.5px; width: 100%; transform: translateY(-50%); }
.slot i:nth-child(1) { top: 0; left: 0; } .slot i:nth-child(2) { top: 0; right: 0; }
.slot i:nth-child(3) { bottom: 0; left: 0; } .slot i:nth-child(4) { bottom: 0; right: 0; }
.slot-row { display: none; }

/* photos snap to the grid: their edges line up with the marker edges */
.contact-photo { position: relative; z-index: 1; }
.contact-photo .ph, .contact-photo img { width: 100%; height: 100%; object-fit: cover; }
.contact-photo .ph { background: #2b2b2b; color: #9a9a9a; display: grid; place-items: center; font-family: "DM Mono", ui-monospace, monospace; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.p1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.p2 { grid-column: 7 / span 2; grid-row: 3 / span 2; }
.p1, .p2 { margin: calc((var(--row) - var(--slot)) / 2) calc(25% - var(--slot) / 2); }

.contact-center { grid-column: 3 / span 4; grid-row: 2 / span 2; align-self: center; justify-self: center; text-align: center; position: relative; z-index: 1; }
.contact-center .tag-eyebrow { justify-content: center; }
.contact-center h2 { font-size: clamp(2.6rem, 5vw, 4.6rem); font-weight: 500; letter-spacing: -.035em; line-height: .98; margin: 0 0 16px; }
.contact-center h2 .accent { color: var(--pink-text); }
.contact-center p { color: #bdbdbd; margin: 0; font-size: .95rem; }
.contact-center .actions { justify-content: center; margin-top: 24px; }

/* ---------- Case study ---------- */
.case-hero { position: relative; background: var(--green); color: var(--paper); padding: 140px 0 80px; overflow: hidden; }
.case-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: center; }
.circles { position: relative; aspect-ratio: 1.35; max-width: 520px; width: 100%; }
.circles span { position: absolute; top: 0; height: 100%; aspect-ratio: 1; border-radius: 50%; background: #b9b9b9; }
.circles span:nth-child(1) { left: 0; opacity: .35; clip-path: inset(0 70% 0 0); }
.circles span:nth-child(2) { left: 12%; opacity: .6; clip-path: inset(0 50% 0 0); }
.circles span:nth-child(3) { right: 0; display: grid; place-items: center; font-size: .85rem; overflow: hidden; }
.circles span img { width: 100%; height: 100%; object-fit: cover; }
.case-title { font-size: clamp(2.8rem, 7vw, 6rem); text-transform: uppercase; color: var(--pink-text); letter-spacing: -.01em; }
.case-title .accent { display: block; color: var(--pink-text); font-weight: 600; }
.back { display: inline-block; margin-bottom: 24px; text-decoration: none; font-weight: 500; }
.back:hover { text-decoration: underline; }
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px; margin: 36px 0 0; }
.meta dt { font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .2em; }
.meta dd { margin: 4px 0 0; font-weight: 500; }

.prose { max-width: calc(var(--prose) + 48px); padding-top: 80px; }
.prose p { color: var(--muted); }
.step { font-size: .85rem; font-weight: 600; letter-spacing: .28em; color: var(--green); margin-bottom: 8px; }
.tldr { background: var(--pink); color: var(--ink); border-radius: var(--radius); padding: 32px 36px; }
.tldr h2 { font-size: 1.6rem; font-weight: 500; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li + li { margin-top: 8px; }
blockquote { margin: 32px 0; padding: 28px 32px; background: var(--ink); color: var(--paper); border-radius: var(--radius); font-size: 1.4rem; font-weight: 300; line-height: 1.4; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 32px 0; }
.stats > div { border-radius: 20px; padding: 24px; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); }
.stats > div:nth-child(3n+1) { background: var(--green); color: var(--paper); }
.stats > div:nth-child(3n+2) { background: var(--pink); }
.stats > div:nth-child(3n)   { background: var(--ink); color: var(--paper); }
.stat-num { display: block; font-size: 2.6rem; line-height: 1; letter-spacing: -.03em; align-self: flex-end; }
.stats > div:nth-child(3n+1) .stat-num { color: var(--pink-text); }
.stats > div:nth-child(3n) .stat-num { color: var(--pink-text); }
.stat-label { font-size: .9rem; font-weight: 500; }

.placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #c9c9c9; color: var(--ink); border-radius: var(--radius); font-size: .9rem; text-align: center; padding: 16px; margin: 24px 0; }
.placeholder.wide { aspect-ratio: 16 / 9; }
.gallery { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.next-project { padding-top: 112px; padding-bottom: 112px; }
.next-project a { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; min-height: 220px; text-decoration: none; padding: 40px; border-radius: var(--radius); background: var(--green); color: var(--paper); transition: transform .2s ease; }
.next-project a:hover { transform: translateY(-4px); }
.next-title { font-size: clamp(1.8rem, 4vw, 3rem); color: var(--pink-text); line-height: 1.05; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0a0a; border-top: 1px solid #222; color: var(--grey); padding: 32px 0; font-size: .92rem; }
.site-footer .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .container { padding: 0 16px; }
  .section { padding-top: 80px; }
  .lined { margin-top: 80px; }
  .frame { width: calc(100% - 32px); padding: 0; }
  .meet { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-right: -1px; }
  .meet .cell { grid-column: auto; grid-row: auto; border-right: 1px solid var(--line); }
  .meet .cell:nth-child(even) { }
  .intro { grid-column: 1 / span 2 !important; padding: 32px 20px; }
  .cell.blank, .card-light, .cell.hatch.c1 { display: none; }
  .meet .cell:nth-of-type(n) { border-right: 1px solid var(--line) !important; }
  .c6.r2, .c3.r3, .c5.r3 { }
  .cell.hatch.wide { grid-column: 1 / span 2 !important; aspect-ratio: 3 / 1; border-right: 0; }
  .c5.r2, .c3.r3, .c5.r3 { border-right: 0 !important; }
  .c4.r2 { box-shadow: none; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .skills li { border-bottom: 1px solid var(--line); min-height: 100px; }
  .skills li:nth-child(2n) { border-right: 0; }
  .skills li:nth-last-child(-n+2) { border-bottom: 0; }
  .contact-dark { --slot: 56px; margin-top: 80px; padding: 16px 0 24px; }
  .contact-grid { display: flex; flex-direction: column; padding: 0 16px; }
  .contact-grid > .slot { display: none; }
  .slot-row { display: grid; grid-template-columns: repeat(4, 1fr); justify-items: center; padding: 12px 0; }
  .slot-row .slot { place-self: center; }
  .m-top { order: 0; } .p1 { order: 1; } .contact-center { order: 2; padding: 40px 0; } .p2 { order: 3; } .m-bot { order: 4; }
  .p1, .p2 { margin: 12px 0; aspect-ratio: 16 / 10; }
  .hero-frame { width: calc(100% - 32px); }
  .hero-top { grid-template-columns: 1fr; }
  .hero-title-cell { padding: 28px 20px 116px; }
  .hero-hatch { border-left: 0; border-top: 1px solid var(--hline); min-height: 90px; }
  .hero-boxes { height: auto; margin-top: 0; padding: 0 0 48px; }
  .box.b1, .box.b2 { display: none; }
  .hero-copy { margin: 0; width: auto; }
  .box.b3 { min-height: 0; margin: -40px 20px 0 20px; padding: 16px 24px; }
  .hero-actions { margin: 24px 20px 0; flex-wrap: wrap; }
  .hero-sun { height: 220px; }
  .case-hero-inner { grid-template-columns: 1fr; }
  .circles { max-width: 380px; }
  .nav ul { gap: 18px; }
  .logo span { font-size: 1rem; }
  .nav.nav-grid { width: calc(100% - 32px); padding: 0; }
  .work { padding-top: 0; margin-top: 80px; }
  .work-frame { width: calc(100% - 32px); padding: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .work-strip { grid-template-columns: repeat(3, 1fr); }
  .work-strip span:nth-child(1) { grid-column: auto; }
  .case-col { border-left: 0; border-top: 1px solid var(--line); }
  .work-intro .case-top, .work-text { padding: 32px 20px; }
  .case-top { height: auto; min-height: 150px; gap: 40px; padding: 24px 20px; }
  .case-glyph { min-height: 340px; }
  .glyph { font-size: 15rem; top: 42%; }
  .case-result { left: 20px; }
  .tldr, blockquote, .next-project a { padding: 24px; }
  .next-project a { flex-direction: column; align-items: flex-start; }
}

/* Small phones only: the role tag no longer fits beside the name, so it drops below it.
   Wider than this, it keeps its desktop position next to the arrow. */
@media (max-width: 600px) {
  .hero-tag { position: static; }
  .pointer { position: absolute; z-index: 1;
    left: calc(100% - var(--name-size) * .021 - 34px * 3 / 32);
    top: calc(100% - var(--name-size) * .101 - 34px * 3 / 32); }
  .hero-label { position: absolute; top: calc(100% + 22px); left: 0; margin: 0; width: max-content; max-width: calc(100vw - 72px); white-space: normal; }
}
@media (min-width: 601px) and (max-width: 860px) {
  .hero-title-cell { padding-bottom: 88px; }
}
