/* ===================================================================
   Nikita Steblanko — Property Valuation portfolio
   Tokens
=================================================================== */
:root {
  --bg: #f1efe9;
  --bg-panel: #faf9f6;
  --ink: #16150f;
  --muted: #6d6a5f;
  --line: #d9d5c9;
  --orange: #d95b1e;   /* the front door */
  --green: #1d4033;
  --slate: #3b526e;
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, monospace;
  --font-display: "Anton", "Archivo", "Helvetica Neue", sans-serif;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.overlay-open { overflow: hidden; }

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

a { color: inherit; }

/* ===================================================================
   Type helpers
=================================================================== */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 400; /* Anton ships a single weight */
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
}

.section-sub {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 34rem;
}

.section-head { margin-bottom: clamp(2rem, 5vw, 3.5rem); }

/* ===================================================================
   Reveal on scroll (subtle)
=================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease var(--d, 0s), transform 0.55s ease var(--d, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

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

/* ===================================================================
   Letter-drop headings ([data-letter-drop], split into spans by JS)
=================================================================== */
[data-letter-drop] .word { display: inline-block; white-space: nowrap; }
[data-letter-drop] .letter {
  display: inline-block;
  opacity: 0;
  transform: translateY(-0.65em);
  transition: opacity 0.45s ease-out var(--ld, 0s),
              transform 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) var(--ld, 0s);
}
[data-letter-drop].is-dropped .letter { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-letter-drop] .letter { opacity: 1; transform: none; transition: none; }
}

/* ===================================================================
   Hero
=================================================================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Corner nav stays fixed while scrolling. White + difference blending renders
   as ink over light sections and inverts to light over the dark contact
   section, so the corners stay legible everywhere. z-index sits above page
   content but below the case-study overlay (100) and the SOON cursor (1000). */
.hero__logo {
  position: fixed;
  top: var(--pad); left: var(--pad);
  z-index: 90;
  mix-blend-mode: difference;
  color: #fff;
  display: grid; place-items: center;
  width: 3.1rem; height: 3.9rem;
  border: 1.5px solid #fff;
  border-radius: 1.4rem;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.25s ease, color 0.25s ease;
}
.hero__logo:hover { background: #fff; color: #000; }

.hero__corner {
  position: fixed;
  z-index: 90;
  mix-blend-mode: difference;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 1.45rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.2em 0;
}
.hero__corner::after {
  content: "";
  display: block;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.hero__corner:hover::after { transform: scaleX(1); }
.hero__corner--tr { top: var(--pad); right: var(--pad); }
.hero__corner--bl { bottom: var(--pad); left: var(--pad); }
.hero__corner--br { bottom: var(--pad); right: var(--pad); }

.hero__center { position: relative; text-align: center; }

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 8.75rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.015em;
  line-height: 0.98;
  animation: hero-in 0.9s ease both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* Floating specialism badges */
.badge {
  position: absolute;
  z-index: 2;
  font-family: var(--font-mono);
  font-size: clamp(0.62rem, 1.1vw, 0.8rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  white-space: nowrap;
  transform: rotate(var(--r));
  animation: badge-in 0.9s 0.35s ease backwards, badge-float 3.8s var(--fd, 1.3s) ease-in-out infinite;
}
.badge--orange { background: var(--orange); top: -2.6em; left: -4%;   --fd: 1.3s; }
.badge--green  { background: var(--green);  bottom: -3.4em; right: 4%; --fd: 2.9s; }
.badge--slate  { background: var(--slate);  top: 24%; right: -20%;    --fd: 2.1s; }

@media (max-width: 640px) {
  .badge--orange { left: 0; }
  .badge--slate  { right: -4%; top: auto; bottom: -3.8em; }
  .badge--green  { bottom: -7.4em; right: 10%; }
}

@keyframes badge-in {
  from { opacity: 0; transform: rotate(var(--r)) scale(0.85); }
  to   { opacity: 1; transform: rotate(var(--r)) scale(1); }
}
/* gentle float + rotation wobble; --fd offsets keep the three badges out of sync */
@keyframes badge-float {
  0%, 100% { transform: rotate(var(--r)) translateY(0); }
  50%      { transform: rotate(calc(var(--r) + 1.6deg)) translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .badge, .hero__name { animation: none; }
}

.hero__scroll {
  position: absolute;
  bottom: var(--pad); left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.hero__scroll svg { transition: transform 0.3s ease; }
.hero__scroll:hover svg { transform: translateY(3px); }

@media (max-width: 640px) {
  .hero__scroll { bottom: calc(var(--pad) + 3.2rem); }
}

/* ===================================================================
   Sections shared
=================================================================== */
.work {
  padding: clamp(4rem, 10vw, 8rem) var(--pad);
  max-width: 82rem;
  margin: 0 auto;
}

/* ===================================================================
   Work grid
=================================================================== */
.work__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 21rem));
  gap: clamp(2rem, 5vw, 4.5rem);
  justify-content: center;
}
@media (max-width: 980px) {
  .work__grid { grid-template-columns: repeat(2, minmax(0, 21rem)); }
}
@media (max-width: 640px) {
  .work__grid { grid-template-columns: minmax(0, 24rem); }
}

.card {
  position: relative;
  border-radius: 1rem;
}

.card__media {
  position: relative;
  z-index: 1;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: inherit;
  background: var(--bg-panel);
  transition: transform 0.3s ease-out;
}
.card:hover .card__media,
.card--done:focus-visible .card__media { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) {
  .card__media { transition: none; }
  .card:hover .card__media { transform: none; }
}

.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  /* transform is driven by the scroll rubber-band effect in main.js */
  will-change: transform;
}

/* zoom wrapper carries the idle pan-zoom so the img transform stays free */
.card__zoom { width: 100%; height: 100%; }

/* slow, restrained idle pan-zoom */
.card--done .card__zoom {
  animation: card-drift 16s ease-in-out infinite alternate;
}
/* min scale > 1 keeps the photo overfilling its frame — no hairline seam */
@keyframes card-drift {
  from { transform: scale(1.02) translateX(0); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}
@media (prefers-reduced-motion: reduce) {
  .card--done .card__zoom { animation: none; }
  .card__media img { will-change: auto; }
}

.card--done { cursor: pointer; }
.card--done:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

/* caption slides up on hover */
.card__caption {
  position: absolute;
  z-index: 2;
  left: 0; right: 0; bottom: 0;
  padding: 0.9rem 1.1rem;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  color: var(--bg-panel);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-radius: 0 0 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.card--done:hover .card__caption,
.card--done:focus-visible .card__caption { transform: none; }

/* touch devices have no hover — keep the caption visible */
@media (hover: none) {
  .card__caption { transform: none; }
}

.card__title { font-weight: 700; font-size: 1.05rem; }
.card__meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* ===================================================================
   In-progress card — coin-flip to a vintage Macintosh that types its
   status line. Front: static white "next case study" cover (the only
   face that prints). Hover/focus/tap coin-flips to the Mac; main.js
   types the sentence character by character with a blinking caret.
   Mac geometry transcribed from the reference cover (820px stage),
   converted to cqw so it scales with the card, no JS sizing.
=================================================================== */
.card__media--wip { background: #F6EFE3; }
.card--wip { cursor: none; }

.flip { position: absolute; inset: 0; perspective: 1200px; }
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.5, 0, 0.22, 1);
}
.card--wip.is-flipped .flip-inner { transform: rotateY(180deg); }
/* coin bump: standalone scale + shadow pulse, re-fired by JS each flip */
.card--wip.is-bumping .flip { animation: coin-bump 0.72s ease-in-out; }
@keyframes coin-bump {
  0%, 100% { scale: 1; filter: drop-shadow(0 3px 4px rgba(22, 21, 15, 0.12)); }
  50%      { scale: 1.05; filter: drop-shadow(0 18px 28px rgba(22, 21, 15, 0.35)); }
}

.flip-face {
  position: absolute; inset: 0; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  background: #F6EFE3;
}
/* front: white resting cover with the status text */
.flip-front {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.flip-front__text {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.9rem; text-align: center; color: var(--muted);
  font-weight: 600; font-size: 1rem; line-height: 1.45; padding: 1rem;
}
.flip-back {
  transform: rotateY(180deg);
  background: #F8F2E2;          /* the cover's cream */
  container-type: size;          /* cqw drives the Mac's scale */
}

/* --- the Macintosh (1 cqw = stage px / 8.2) --- */
.mac {
  position: absolute;
  left: 0; top: 2cqw;
  width: 100cqw; height: 109.8cqw;   /* chassis runs off the card base */
  border-radius: 4.2cqw 4.2cqw 0 0;
  background: linear-gradient(180deg, #EFE6CE 0%, #E9DEC3 46%, #E2D5B6 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    inset 0.5cqw 0 1.2cqw rgba(122, 100, 62, 0.10),
    inset -0.5cqw 0 1.2cqw rgba(122, 100, 62, 0.14),
    0 4.1cqw 11cqw rgba(101, 77, 41, 0.16);
}
.mac__shine {
  position: absolute; left: 2.7cqw; top: 1.5cqw; right: 2.7cqw; height: 3.7cqw;
  border-radius: 2.7cqw;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
}
.mac__recess {
  position: absolute; left: 6.8cqw; top: 6.8cqw; width: 86.3cqw; height: 68.3cqw;
  border-radius: 2.9cqw;
  background: linear-gradient(180deg, #E3D7BA 0%, #E8DDC2 55%, #EDE3CB 100%);
  box-shadow:
    inset 0 0.7cqw 1.5cqw rgba(104, 84, 48, 0.28),
    inset 0 -0.4cqw 0.7cqw rgba(255, 255, 255, 0.55),
    inset 0.5cqw 0 1cqw rgba(104, 84, 48, 0.14),
    inset -0.5cqw 0 1cqw rgba(104, 84, 48, 0.14);
}
.mac__bezel {
  position: absolute; left: 4.4cqw; top: 4.4cqw; width: 77.6cqw; height: 59.5cqw;
  border-radius: 2.4cqw;
  background: linear-gradient(180deg, #3B3C35 0%, #30312B 60%, #2A2B26 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0.4cqw 1.2cqw rgba(60, 48, 24, 0.35);
}
.mac__screen {
  position: absolute; left: 3.2cqw; top: 2.9cqw; width: 71.2cqw; height: 53.7cqw;
  border-radius: 1.2cqw;
  background: radial-gradient(120% 120% at 50% 42%, #FFFEFA 0%, #FCFAF1 70%, #F6F2E4 100%);
  box-shadow: inset 0 0 0 1px rgba(42, 43, 38, 0.35), inset 0 0 3.7cqw rgba(58, 50, 28, 0.07);
  padding: 4cqw 4.4cqw;
  overflow: hidden;
}
/* faint CRT scanlines; a whisper of flicker only while flipped */
.mac__screen::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg, rgba(42, 43, 38, 0.045) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.card--wip.is-flipped .mac__screen::after { animation: crt-flicker 3.8s step-end infinite; }
@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  38% { opacity: 0.72; }
  41% { opacity: 1; }
  76% { opacity: 0.85; }
  78% { opacity: 1; }
}

/* the typed line: editorial old-style serif, dark ink, top-aligned wrap */
.mac__type {
  position: relative;
  font-family: "Instrument Serif", Georgia, "Times New Roman", serif;
  font-size: 6.4cqw;
  line-height: 1.28;
  letter-spacing: 0.005em;
  color: #2A2B26;
  overflow-wrap: break-word;
}
.mac__caret {
  display: inline-block;
  width: 0.5em; height: 1em;
  margin-left: 0.06em;
  vertical-align: -0.12em;
  background: #2A2B26;
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.mac__power {
  position: absolute; left: 49.5cqw; top: 79.5cqw; width: 1cqw; height: 1cqw;
  border-radius: 50%; background: #37382F;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mac__badge {
  position: absolute; left: 11.2cqw; top: 85.4cqw; width: 3.2cqw; height: 3.2cqw;
  border-radius: 0.9cqw; background: #C2552F;
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 1px 0 rgba(255, 255, 255, 0.5);
}
.mac__floppy {
  position: absolute; left: 52.4cqw; top: 84.1cqw; width: 36.6cqw; height: 9.5cqw;
  border-radius: 1.5cqw;
  background: linear-gradient(180deg, #E0D3B4 0%, #E7DCC1 100%);
  box-shadow: inset 0 0.5cqw 1cqw rgba(104, 84, 48, 0.25),
    inset 0 -0.25cqw 0.5cqw rgba(255, 255, 255, 0.5);
}
.mac__slot {
  position: absolute; left: 2.9cqw; bottom: 2.2cqw; width: 21.5cqw; height: 1.1cqw;
  border-radius: 0.5cqw; background: #24251F;
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.7), 0 1px 0 rgba(255, 255, 255, 0.4);
}
.mac__diskwin {
  position: absolute; right: 2.7cqw; top: 1.7cqw; width: 7.6cqw; height: 6.1cqw;
  border-radius: 0.7cqw;
  background: linear-gradient(180deg, #2E2F29 0%, #1F201B 100%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.65), 0 1px 0 rgba(255, 255, 255, 0.4);
}
.mac__diskwin i {
  position: absolute; left: 16%; right: 16%; height: 0.4cqw; border-radius: 0.2cqw;
  background: rgba(255, 255, 255, 0.10);
}
.mac__diskwin i:nth-child(1) { top: 16%; }
.mac__diskwin i:nth-child(2) { top: 38%; background: rgba(255, 255, 255, 0.07); }
.mac__diskwin i:nth-child(3) { top: 60%; background: rgba(255, 255, 255, 0.05); }
.mac__pinhole {
  position: absolute; right: 11.7cqw; bottom: 2.4cqw; width: 0.6cqw; height: 0.6cqw;
  border-radius: 50%; background: #3A3B33;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
}

/* reduced motion: no flip, no typing — crossfade to the Mac showing the
   finished sentence (main.js fills the text immediately), caret static */
@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: none; transform: none !important; }
  .flip-face { backface-visibility: visible; -webkit-backface-visibility: visible; }
  .flip-back { transform: none; opacity: 0; transition: opacity 0.35s ease; z-index: 2; }
  .card--wip.is-flipped .flip-back { opacity: 1; }
  .mac__caret { animation: none; }
  .card--wip.is-flipped .mac__screen::after { animation: none; }
  .card--wip.is-bumping .flip { animation: none; }
}

/* print / PDF: static front cover only — flip, Mac and typing must not exist */
@media print {
  .flip-inner { transform: none !important; transition: none !important; }
  .flip-back { display: none !important; }
  .flip-front { position: absolute; inset: 0; }
}

.wip-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.45em 1.1em;
}
.wip-tag--dark {
  display: inline-block;
  margin-top: 1.1rem;
  color: var(--orange);
}

/* Custom SOON cursor */
.soon-cursor {
  position: fixed;
  z-index: 1000;
  top: 0; left: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.7em 1.3em;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.soon-cursor.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ===================================================================
   Overlay — case study
=================================================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.overlay.is-open { opacity: 1; }

.overlay__panel {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: #fff;
  transform: translateY(4vh);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.overlay.is-open .overlay__panel { transform: none; opacity: 1; }

.overlay__close {
  position: fixed;
  top: 1.4rem; right: 1.6rem;
  z-index: 10;
  display: grid; place-items: center;
  width: 3.2rem; height: 3.2rem;
  border: none;
  border-radius: 50%;
  background: #e9e7e1;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.overlay__close:hover { background: var(--ink); color: #fff; transform: rotate(90deg); }

/* Case study content */
.cs {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 5.5rem) var(--pad) clamp(3rem, 6vw, 5rem);
}
/* keep the header clear of the fixed close button on small screens */
@media (max-width: 720px) {
  .cs { padding-top: 6rem; }
}

.cs__pdf { margin-top: 1.8rem; }

/* --- color-block layout --- */
.cs-block { border-radius: 1.25rem; }
.cs-block--muted { background: #f1efe8; }
.cs-block--tint  { background: #e4eae6; }
.cs-block--green { background: var(--green); color: #edece3; }
.cs-block--ink   { background: var(--ink);  color: #edece3; }

.cs__section.cs-block {
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.75rem);
}

.cs-block--green h3, .cs-block--ink h3 {
  border-color: rgba(237, 236, 227, 0.35);
}
.cs-block--green .cs__list em,
.cs-block--ink .cs__list em,
.cs-block--green figcaption,
.cs-block--ink figcaption { color: rgba(237, 236, 227, 0.65); }

/* opening duo grid */
.cs__duo {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 1.5rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}
@media (max-width: 720px) {
  .cs__duo { grid-template-columns: 1fr; }
}
.cs__duo-a {
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  min-height: 16rem;
}
.cs__duo-a img { width: 88%; }
.cs__duo-b { padding: clamp(1.25rem, 3vw, 2rem); }
.cs__duo-b img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* light panels inside colored blocks */
.cs-block .facts > div { background: #fff; }
.cs-block .table-wrap { background: #fff; }

/* full report shown page-by-page inside the overlay */
.report-stack {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  margin-top: clamp(2rem, 5vw, 3rem);
}
.report-stack img {
  display: block;
  width: 100%;
  height: auto;
}

/* valuation conclusion stat row */
.verdict {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(237, 236, 227, 0.25);
  border: 1px solid rgba(237, 236, 227, 0.25);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-top: 1.6rem;
}
.verdict > div {
  background: var(--ink);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.verdict__k {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #97948a;
}
.verdict__v {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  white-space: nowrap;
}
.verdict__v--accent { color: var(--orange); }
@media (max-width: 720px) {
  .verdict { grid-template-columns: 1fr 1fr; }
}

.cs__head { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4rem); }
.cs__head h2 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.cs__sub {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.cs__section { margin-top: clamp(2.75rem, 6vw, 4.5rem); }

.cs__section h3 {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 1.1rem;
  padding-bottom: 0.7rem;
  border-bottom: 2px solid var(--ink);
}
.cs__section h3 span {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--orange);
}

.cs__section p + p { margin-top: 0.9rem; }

.cs__cols {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(1.5rem, 4vw, 2.75rem);
  align-items: start;
}
@media (max-width: 720px) {
  .cs__cols { grid-template-columns: 1fr; }
}

.cs__list {
  list-style: none;
  margin-top: 1.1rem;
  display: grid;
  gap: 0.7rem;
}
.cs__list li {
  padding-left: 1.2rem;
  position: relative;
}
.cs__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.45em; height: 0.45em;
  background: var(--orange);
  border-radius: 1px;
}
.cs__list em { color: var(--muted); font-style: normal; font-size: 0.9em; }

/* Key facts */
.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
}
.facts > div { background: var(--bg-panel); padding: 0.9rem 1.1rem; }
.facts dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.facts dd { font-weight: 700; }

/* Figures */
.cs__figure { margin-top: 1.6rem; }
.cs__figure--tight { margin-top: 0; }
.cs__figure img {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
}
.cs__figure figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.cs__map-pair { display: grid; gap: 1.25rem; }

/* Tables */
.table-wrap {
  margin-top: 1.4rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 34rem;
}
th, td { text-align: left; padding: 0.8rem 1rem; }
th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--ink);
  white-space: nowrap;
}
tbody tr + tr td { border-top: 1px solid var(--line); }
tbody td:first-child { font-weight: 600; }
td[data-note] { cursor: help; }
td[data-note]:hover::after {
  content: attr(data-note);
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.cs__range {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cs__range strong { color: var(--orange); font-size: 1.1em; }
.cs__range span { color: var(--muted); margin-left: 0.8em; }

/* Comparable photo strip */
.comp-strip {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 620px) { .comp-strip { grid-template-columns: 1fr; } }
.comp-strip img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0.6rem;
  border: 1px solid var(--line);
}
.comp-strip figcaption {
  margin-top: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* Case study footer */
.cs__foot {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}
.cs__foot p { margin-top: 1.4rem; font-size: 0.95rem; }

.btn-close-bottom {
  font: 600 0.95rem var(--font-sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--bg-panel);
  border: none;
  border-radius: 999px;
  padding: 0.95em 2.4em;
  cursor: pointer;
  transition: background 0.25s ease;
}
.btn-close-bottom:hover { background: var(--orange); }

/* ===================================================================
   About page
=================================================================== */
.page-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--pad);
}
.page-top .hero__logo { position: static; }
.page-top__nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
.page-top__nav a {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}
.page-top__nav a:hover { color: var(--orange); }

.about-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5.5rem);
  align-items: start;
  max-width: 74rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) var(--pad) clamp(4rem, 8vw, 6rem);
}
@media (max-width: 860px) {
  .about-page { grid-template-columns: 1fr; }
}

/* <sketch-avatar> web component (sketch-avatar.js) — the component draws and
   animates itself; here we only place it and add the site's slate ring
   (ring + breathing gap around the inner circle, like the reference). */
.avatar-sketch {
  display: block;
  margin-bottom: 2rem;
  border: 2px solid var(--slate);
  border-radius: 50%;
  padding: 2px;
}

.about-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.02;
  margin: 0.2rem 0 1.4rem;
}
.about-page p + p { margin-top: 0.9rem; }
.about-page .about__lead { margin-bottom: 1.2rem; }
.about-page .about__creds { margin-bottom: 2.4rem; }

.about-links {
  list-style: none;
  display: flex;
  gap: 1.8rem;
}
.about-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.2em;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.about-links a:hover { color: var(--ink); border-color: var(--ink); }

.about-page__photo { position: sticky; top: 2rem; }
.about-page__photo img {
  width: 100%;
  border-radius: 1rem;
}
.about-page__photo figcaption {
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ===================================================================
   Progression / achievements band (About page)
=================================================================== */
.ach-band {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--pad) clamp(4rem, 8vw, 6rem);
}

.ach-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
/* skill-tree spine between the columns */
.ach-grid::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 1px;
  background: var(--line);
}
@media (max-width: 860px) {
  .ach-grid { grid-template-columns: 1fr; }
  .ach-grid::before { display: none; }
}

.ach-col { display: grid; gap: 1.25rem; align-content: start; }
.ach-col__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.ach {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
  border-radius: 1.5rem;
  padding: 1.4rem 1.5rem;
  /* keep the staggered reveal (opacity/transform + --d delay) intact while
     `scale` grows the badge on hover with no delay — separate properties,
     no conflict. color/border cover the wip hover tint. */
  transition:
    opacity 0.55s ease var(--d, 0s),
    transform 0.55s ease var(--d, 0s),
    scale 0.25s cubic-bezier(0.45, 0, 0.25, 1),
    color 0.3s ease,
    border-color 0.3s ease;
}
@media (hover: hover) {
  .ach:hover { scale: 1.03; }
}
@media (prefers-reduced-motion: reduce) {
  .ach { transition: none; }
  .ach:hover { scale: none; }
}

.ach__icon {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
}
/* credential lettermark sitting on the tile like a logo chip.
   Swap a <span> for <img src="logo.svg" class="badge-logo__mark"> to
   drop in an official logo later — sizing/animation stay the same. */
.badge-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  width: 100%;
  height: 100%;
  font-family: var(--font-display);
  font-size: var(--fs, 1rem);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: currentColor;
  /* pop-in when the badge scrolls into view, staggered per badge */
  opacity: 0;
  transform: scale(0);
}
.badge-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ach.is-visible .badge-logo {
  animation: logoPop 0.45s cubic-bezier(.34, 1.56, .64, 1) both;
  animation-delay: calc(var(--badge-index, 0) * 120ms);
}
@keyframes logoPop {
  0%   { transform: scale(0);    opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  80%  { transform: scale(0.96); }
  100% { transform: scale(1);    opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .badge-logo { opacity: 1; transform: none; }
  .ach.is-visible .badge-logo { animation: none; }
}

.ach__body h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  line-height: 1.15;
}
.ach__status {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0.3rem 0 0.5rem;
}
.ach__desc { font-size: 0.92rem; line-height: 1.55; }

/* unlocked — solid hero-badge colors; logo chip is an off-white ground
   carrying the body's mark in the card's accent colour */
/* one cohesive set: solid ink tiles + the site's orange accent */
.ach--unlocked {
  background: var(--ink);
  color: #f4f3ee;
}
.ach--unlocked .ach__icon { background: #f4f2ec; }
.ach--unlocked .ach__status { color: #e98147; opacity: 1; }
.ach--unlocked .ach__desc { color: rgba(244, 243, 238, 0.85); }

/* in progress — ghost badges, colored in on hover like the wip card */
.ach--wip {
  border: 1.5px dashed #b6b2a4;
  color: var(--muted);
}
.ach--wip .ach__desc { color: var(--muted); transition: color 0.3s ease; }
.ach--wip .ach__icon {
  background: #f4f2ec;
  border: 1px solid var(--line);
  transition: border-color 0.3s ease;
}
.ach--wip .badge-logo { color: var(--muted); transition: color 0.3s ease; }
.ach--wip:hover {
  border-style: solid;
  border-color: var(--ink);
  color: var(--ink);
}
.ach--wip:hover .ach__desc { color: var(--ink); }
.ach--wip:hover .ach__icon { border-color: var(--ink); }
.ach--wip:hover .badge-logo { color: var(--orange); }

.page-foot {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--pad) 2.5rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.page-foot a { text-decoration: none; }
.page-foot a:hover { color: var(--ink); }

.about__body { max-width: 46rem; }
.about__lead {
  font-size: clamp(1.3rem, 2.6vw, 1.7rem);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 1.2rem;
}
.about__body > p { color: var(--muted); }

.about__creds {
  list-style: none;
  margin-top: 2.2rem;
  border-top: 2px solid var(--ink);
}
.about__creds li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.cred-k {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  padding-top: 0.25em;
}
@media (max-width: 540px) {
  .about__creds li { grid-template-columns: 1fr; gap: 0.2rem; }
}

/* ===================================================================
   Contact — CONTACT ME CTA + footer (navy full-bleed closer)
=================================================================== */
.contact {
  --accent: #ec8747; /* terracotta lifted one step for contrast on navy */
  --cream-dim: rgba(244, 243, 238, 0.75);
  --cream-faint: rgba(244, 243, 238, 0.5);
  --hairline: rgba(244, 243, 238, 0.18);
  position: relative;
  background: var(--slate);
  color: var(--bg-panel);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 3.5rem) var(--pad) 0;
}
.contact__inner {
  max-width: 82rem;
  margin: 0 auto;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}

/* two-tone intro line */
.cta-intro {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.7vw, 2.1rem);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  max-width: 36ch;
}
.cta-intro span { color: var(--accent); }

/* the big clickable block: headline + arrow + full-width underline */
.cta-link {
  position: relative;
  display: flex;
  align-items: center;
  /* one em-based scale for title + gap + arrow → the row fills the width
     at every viewport without wrapping */
  font-size: clamp(2.6rem, 16.6vw, 13rem);
  gap: 0.18em;
  width: 100%;
  margin-top: clamp(1.8rem, 4.5vw, 3rem);
  padding-bottom: 0.14em;
  text-decoration: none;
  color: var(--bg-panel);
  white-space: nowrap;
}
.cta-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1em;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.cta-arrow {
  flex: none;
  width: 0.58em;
  height: auto;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.45, 0, 0.25, 1);
}
/* underline sweeps in left→right when the block reveals */
.cta-underline {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--bg-panel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.22, 0.9, 0.35, 1) 0.25s;
}
.cta-link.is-visible .cta-underline { transform: scaleX(1); }
/* hover: arrow nudges up-right, underline thickens in accent */
.cta-link:hover .cta-arrow,
.cta-link:focus-visible .cta-arrow { transform: translate(10%, -10%); }
.cta-link.is-visible:hover .cta-underline,
.cta-link.is-visible:focus-visible .cta-underline {
  transform: scaleX(1) scaleY(1.8);
  background: var(--accent);
  transition: transform 0.25s ease, background 0.25s ease;
}
.cta-link:focus-visible { outline: 2px solid var(--bg-panel); outline-offset: 6px; }

/* footer columns */
/* footer social — centred under the CONTACT ME headline: the email on top,
   the social links stacked beneath (reference layout) */
.foot-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: clamp(1.8rem, 4vw, 2.6rem);
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.foot-social a {
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream-dim);
  transition: color 0.25s ease;
}
.foot-social a:hover { color: var(--accent); }
.foot-social__email {
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  overflow-wrap: anywhere;
}
.foot-social__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.foot-social__links a { font-size: 0.95rem; }

@media (prefers-reduced-motion: reduce) {
  .cta-underline { transition: none; transform: scaleX(1); }
  .cta-link:hover .cta-arrow { transform: none; }
}

.btn {
  display: inline-block;
  font: 600 0.95rem var(--font-sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 999px;
  padding: 1em 2.4em;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn--solid {
  background: var(--orange);
  color: #fff;
}
.btn--solid:hover { background: var(--bg-panel); color: var(--ink); }
.btn--ghost {
  border: 1.5px solid #55524a;
  color: var(--bg-panel);
}
.btn--ghost:hover { border-color: var(--bg-panel); background: var(--bg-panel); color: var(--ink); }

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 82rem;
  margin: clamp(2rem, 5vw, 3.5rem) auto 0;
  padding: 1.4rem 0 1.8rem;
  border-top: 1px solid var(--hairline, rgba(244, 243, 238, 0.18));
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-faint, #97948a);
}
.footer a { text-decoration: none; color: inherit; }
.footer a:hover { color: var(--bg-panel); }
/* clear the fixed bottom corner labels on small screens */
@media (max-width: 720px) {
  .footer { padding-bottom: 5rem; }
}
