/* =========================================================================
   Ana Lilić — Portfolio
   Modular card deck (Magnetto-style): rounded full-screen blocks that stack
   on scroll, glass panels, pill buttons, floating dock. Tokyo Dreams display.
   ------------------------------------------------------------------------
   0. Fonts  1. Tokens  2. Reset  3. Deck & cards  4. Utilities (panel/pill)
   5. Hero   6. Projects 7. About  8. Dark blocks (software/services/milestones)
   9. Contact 10. Dock   11. Cursor/Intro  12. Reveals  13. Responsive
   ========================================================================= */

/* ---------- 0. FONTS ---------- */
@font-face {
  font-family: "Tokyo Dreams";
  src: url("../assets/tokyodreams-webfont.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: block;
  /* the licensed web font reports tighter vertical metrics than the old OTF (ascent .87 vs 1.0 em);
     these keep the line boxes, and so every title's position, exactly as before */
  ascent-override: 100%; descent-override: 20%; line-gap-override: 0%;
}


/* ---------- 1. TOKENS ---------- */
:root {
  --bg:        #939393;   /* grey page base (with soft blobs, see body) */
  --card:      #0e0e10;   /* dark card surface */
  --card-2:    #141417;   /* raised surface */
  --ink:       #f4f1ea;   /* headings */
  --ink-2:     #cfcabf;   /* body */
  --muted:     #9c9a95;   /* meta (same grey as --p-gray) */
  --p-gray:    #9c9a95;   /* grey paragraph copy: a hair warmer than neutral, to sit with the cream tones */
  --line:      rgba(244, 241, 234, 0.14);
  --line-soft: rgba(244, 241, 234, 0.07);
  --accent:    #cfcabf;   /* light warm grey (same as --ink-2) */
  --dim:       #7b7974;   /* quietest text: inactive items, hints (same warm undertone) */

  --glass:     rgba(18, 16, 15, 0.28);
  --glass-brd: rgba(255, 255, 255, 0.16);

  --fs-display: clamp(3.4rem, 11vw, 10rem);
  --fs-h2:      clamp(2.6rem, 8vw, 7rem);
  --fs-body:    clamp(1rem, 1.05vw, 1.18rem);
  --fs-meta:    0.75rem;

  --edge:   8px;                             /* body padding / outer gutter */
  --gap:    20px;                            /* gap between cards */
  --page:   1900px;                          /* max content width */
  --radius: clamp(30px, 4vw, 60px);
  --pad:    clamp(1.5rem, 5vw, 5rem);        /* inner card padding */
  --max:    1500px;
  --dock-h: 78px;

  --display: "Tokyo Dreams", "Libre Baskerville", Georgia, serif;
  --serif:   "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans:    "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); transition: background-color .9s var(--ease); }
/* When the About card sits in the centre of the viewport, the page goes dark grey */
html.about-focus { background-color: #141416; }
/* The soft blobs sit on their own fixed layer behind the page. (As a `background-attachment: fixed` on the
   body they were repainted on every scroll frame; a fixed layer is painted once and just stays.)
   The body has no background of its own: the html element's colour above is the base. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    radial-gradient(38% 34% at 15% 20%, rgba(176,176,176,0.75) 0%, rgba(176,176,176,0) 60%),
    radial-gradient(42% 38% at 85% 26%, rgba(118,118,118,0.55) 0%, rgba(118,118,118,0) 62%),
    radial-gradient(40% 36% at 27% 82%, rgba(126,126,126,0.5) 0%, rgba(126,126,126,0) 60%),
    radial-gradient(44% 40% at 80% 80%, rgba(178,178,178,0.65) 0%, rgba(178,178,178,0) 62%),
    radial-gradient(30% 28% at 55% 50%, rgba(130,130,130,0.4) 0%, rgba(130,130,130,0) 60%);
}
/* Dark state keeps soft blobs, but low-contrast (close to the dark base) */
html.about-focus body::before {
  background-image:
    radial-gradient(38% 34% at 15% 20%, rgba(74,74,80,0.32) 0%, rgba(74,74,80,0) 60%),
    radial-gradient(42% 38% at 85% 26%, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 62%),
    radial-gradient(40% 36% at 27% 82%, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 60%),
    radial-gradient(44% 40% at 80% 80%, rgba(70,70,76,0.3) 0%, rgba(70,70,76,0) 62%),
    radial-gradient(30% 28% at 55% 50%, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0) 60%);
}

/* Hide the visible scrollbar (scrolling still works) */
html { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
html.js.lenis, html.js.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html:not(.js) { scroll-behavior: smooth; }
/* NB: no overflow-x:hidden on html/body — it would break position:sticky */

body {
  margin: 0;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
::selection { background: var(--ink); color: var(--card); }
html.has-cursor, html.has-cursor a, html.has-cursor button { cursor: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- 3. DECK & CARDS ---------- */
/* Bento grid: full-width cards span both columns, half-width cards span one */
.deck {
  background: transparent;
  max-width: var(--page);
  margin: 0 auto;
  padding: var(--edge);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  align-items: stretch;
}
.card {
  position: relative;   /* containing block for the absolute .card__bg */
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  display: flex;
  isolation: isolate;
  min-height: clamp(360px, 64vh, 700px);   /* default: half-width cards */
}
.card--full { grid-column: 1 / -1; }
.card--hero { min-height: calc(100svh - var(--edge) * 2); }
.card--about { min-height: clamp(460px, 82vh, 860px); }

/* Full-bleed background media inside a card */
.card__bg {
  position: absolute; inset: 0; z-index: 0; margin: 0; overflow: hidden;
  background: var(--card-2);
}
.card__bg img {
  position: absolute; top: -15%; left: 0; width: 100%; height: 130%;
  object-fit: cover; object-position: 50% 35%;
  filter: grayscale(1) contrast(1.04);
  will-change: transform;
}
.card__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.25) 45%, rgba(0,0,0,0.55) 100%);
}
.card__scrim--hero {
  background: none;
}
.card__scrim--about {
  background: linear-gradient(to right, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.72) 45%, rgba(0,0,0,0.5) 100%);
}
.card__replace {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 2;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--dim); background: rgba(0,0,0,0.3);
  backdrop-filter: blur(4px); padding: 0.4em 0.7em; border-radius: 6px;
}
/* Placeholder duotones for project media */
.media--01 { background: radial-gradient(120% 140% at 25% 15%, #6a5a49 0%, transparent 55%), linear-gradient(135deg, #4a4137 0%, #2a2620 48%, #100e0c 100%); }
.media--02 { background: radial-gradient(120% 120% at 78% 18%, #55605c 0%, transparent 55%), linear-gradient(200deg, #3a423f 0%, #24282a 45%, #0e0f10 100%); }
.media--03 { background: radial-gradient(130% 160% at 30% 82%, #7a4f3a 0%, transparent 55%), linear-gradient(160deg, #573a2c 0%, #33211a 45%, #100b09 100%); }
.media--04 { background: radial-gradient(120% 130% at 75% 20%, #5a615c 0%, transparent 55%), linear-gradient(150deg, #3e453f 0%, #262a26 45%, #0e0f0d 100%); }

/* ---------- 4. UTILITIES: glass panel + pills ---------- */
.panel {
  position: relative; z-index: 2;
  margin: auto;
  max-width: min(560px, 84%);
  text-align: center;
  padding: clamp(2rem, 4vw, 3.5rem);
  border-radius: clamp(20px, 2.4vw, 34px);
  background: var(--glass);
  border: none;
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}
.panel__eyebrow {
  display: block;
  font-size: var(--fs-meta); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-2); margin-bottom: 1rem;
}
.panel__title {
  font-family: var(--display); font-weight: 400; color: #fff;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; letter-spacing: 0.01em;
}
.panel__desc { margin-top: 1rem; color: var(--ink-2); font-size: 0.98rem; }

.pill {
  display: inline-flex; align-items: center; gap: 0.7em;
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap;               /* never break "Preview CV" onto two lines */
  padding: 0.85em 1.4em; border-radius: 100px;
  border: none;
  background: rgba(0,0,0,0.28); color: var(--ink);
  backdrop-filter: blur(8px);
  transition: background-color .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.pill:hover { background: var(--ink); color: #111; border-color: var(--ink); }
.pill__plus { font-size: 1.15em; line-height: 0; transition: transform .45s var(--ease); }
.pill:hover .pill__plus { transform: rotate(90deg); }
.pill--solid { margin-top: 1.6rem; background: rgba(10,10,10,0.55); }
.pill--email { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0.01em; font-size: clamp(1.1rem, 2.4vw, 1.7rem); padding: 0.7em 1.2em; }
.pill--email .pill__plus { font-style: normal; }
.pill--email:hover .pill__plus { transform: translate(3px,-3px) rotate(0); }

/* ---------- 5. HERO ---------- */
.card--hero {
  flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(2rem, 5vh, 3.5rem) clamp(1.75rem, 5vw, 4rem) calc(var(--dock-h) + var(--edge));
  text-align: center;
}
/* Top corners: small tracked metadata */
.hero__meta {
  position: absolute; z-index: 2;
  top: clamp(1.5rem, 4vh, 2.5rem);
  left: clamp(1.75rem, 5vw, 4rem); right: clamp(1.75rem, 5vw, 4rem);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--fs-meta); letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-2); text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
/* Top corners: availability badge (left) + live clock (right) */
.hero__status, .hero__clock {
  position: absolute; z-index: 2; top: clamp(1.5rem, 4vh, 2.5rem);
  display: flex; align-items: center;
  font-size: var(--fs-meta); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.hero__status { left: clamp(1.75rem, 5vw, 4rem); gap: 0.65em; }
.hero__clock { right: clamp(1.75rem, 5vw, 4rem); gap: 0.5em; }
.hero__dot {
  position: relative; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none;
}
/* the pulse ring grows with transform + opacity only (animating box-shadow repaints on the main thread every frame) */
.hero__dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: rgba(74,222,128,0.55); animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(3.25); opacity: 0; }   /* 8px dot + a 9px ring on every side = 26px */
  100% { transform: scale(1); opacity: 0; }
}
.hero__sep { opacity: 0.5; }
.hero__time { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Centred name lockup */
.hero__center { position: relative; z-index: 2; top: clamp(1.5rem, 8vh, 5.5rem); }
.hero__name {
  font-family: var(--display); font-weight: 400; color: #fff;
  font-size: var(--fs-display); line-height: 0.98; letter-spacing: 0.02em;
}
.hero__name .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero__name .line > span { display: block; }
.hero__role {
  margin-bottom: clamp(0.3rem, 0.9vh, 0.6rem);
  display: flex; flex-direction: column; align-items: center;
}
.hero__rule { width: clamp(34px, 6vw, 64px); height: 1px; background: rgba(244,241,234,0.55); }
.hero__role-text {
  font-size: var(--fs-meta); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--ink); text-indent: 0.3em; text-shadow: 0 2px 16px rgba(0,0,0,0.5);
}
.hero__intro {
  position: absolute; z-index: 2;
  right: clamp(1.5rem, 4vw, 3.5rem);
  bottom: calc(var(--dock-h) + 2rem);
  max-width: 34ch; text-align: right;
  color: var(--ink); font-size: clamp(0.9rem, 1vw, 1.02rem);
  text-shadow: 0 2px 22px rgba(0,0,0,0.6);
}
/* Wide screens: the centred dock no longer reaches the corner, so drop the
   paragraph all the way down into the bottom-right. */
@media (min-width: 1440px) {
  .hero__intro { bottom: clamp(1.75rem, 4vh, 2.75rem); }
}
/* Tablet and below: the intro joins the title as one centred block instead of sitting in the corner.
   - same vertical offset as .hero__center, so the two move together
   - gap to the title = 0.4 x the title's font size (about 22px on a phone, 34px on a tablet)
   - centred with auto margins, not a transform, so the fade-in animation is left alone */
@media (max-width: 1023px) {
  .hero__intro {
    position: relative; left: auto; right: auto; bottom: auto;
    top: clamp(1.5rem, 8vh, 5.5rem);
    margin: calc(var(--fs-display) * 0.4) auto 0;
    width: fit-content; max-width: min(34ch, calc(100% - 3rem)); text-align: center;
    text-wrap: balance;   /* even line lengths, no short last line under the centred title */
  }
}
/* Zoom the hero portrait in more (also keeps edges covered during parallax) */
.card--hero .card__bg img { scale: 1.1; translate: 0 -1.5%; transform-origin: 50% 100%; object-position: 50% 90%; }
.card--hero, .card--hero .card__bg { background: #a0a0a0; }
/* Hero chromatic hover overlay (WebGL, js/hero-chromatic.js): invisible until hovered */
.hero-chromatic { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; opacity: 0; }

/* ---------- 6. PROJECT CARDS ---------- */
.card--project { display: block; padding: 0; }
/* Project previews show in full colour (not the grayscale used for atmosphere) */
.card--project .card__bg img { filter: none; object-position: 50% 45%; }
/* No parallax here: the image rests where it sat mid-scroll (card centred), so the framing doesn't change */
.card--project .card__bg img { translate: 0 -4%; will-change: auto; }
.card--project.card--soon .card__bg img { translate: 0 -2%; }   /* Via had half the travel */
/* Gamut: centre the phone in the card (the hand on the right pulls the default crop off-centre) */
.card--project .card__bg img[src*="work-03"] { top: -5%; height: 112%; object-position: 56% 28%; scale: 1.24; transform-origin: 50% 50%; }   /* smaller zoom than the other cards */
/* Via: less zoom — shorter overscan box, so `cover` scales the image down */
.card--project .card__bg img[src*="work-04"] { top: -4.5%; height: 109%; }
/* Zoom the bg container (GSAP owns the <img> transform, so scale that instead) */
.card--project .card__bg { transition: scale 1.1s var(--ease); }
.card--project:hover .card__bg { scale: 1.012; }

/* Category tags — top-right frosted pill with a sienna middot */
.proj__tags { position: absolute; top: clamp(16px, 2.2vw, 34px); right: clamp(16px, 3vw, 46px); z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }   /* two tags (Via) drop to a second row on narrow cards */
.proj__tag {
  white-space: nowrap;
  padding: 0.62em 1.05em; border-radius: 100px;
  background: rgba(244, 241, 234, 0.16);
  -webkit-backdrop-filter: blur(14px) saturate(140%); backdrop-filter: blur(14px) saturate(140%);
  color: var(--ink); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
}
.proj__tag b { color: var(--accent); font-weight: 500; padding: 0 0.4em; }
/* "Coming soon": dark pill with a softly pulsing dot, so unfinished projects read differently from the filled category tag */
.proj__tag--soon { display: inline-flex; align-items: center; gap: 0.7em; background: rgba(12, 12, 14, 0.35); }
.proj__tag--soon::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: soon-pulse 2s ease-in-out infinite; }
@keyframes soon-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .proj__tag--soon::before { animation: none; } }
/* Via: light backing so no dark hairline shows on the antialiased rounded corners */
.card--soon, .card--soon .card__bg { background: #b9bcc1; }
/* Via: the category tag matches the "Coming soon" pill */
.card--soon .proj__tag { background: rgba(12, 12, 14, 0.35); }
/* Unfinished project (Via): dimmed photo, no link behaviour */
.card--soon .card__bg img { filter: brightness(0.82) saturate(0.92); }
.card--soon .proj__bar { cursor: default; background: rgba(20, 20, 24, 0.52); }   /* Via sits on light marble: a bit more tint */
.card--soon .proj__btn { opacity: 0.45; }

/* Bottom glass bar — title + arrow; expands on hover to reveal the description */
.proj__bar {
  position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 2; display: block;
  --bar-pad: clamp(1rem, 2vw, 1.35rem);
  padding: var(--bar-pad) clamp(1.1rem, 2.2vw, 1.5rem);
  /* big screens: concentric with the card corners; smaller screens: follows the round arrow button
     inside it (button radius 23px + the padding around it), so the bar ends are as round as the button */
  border-radius: max(calc(var(--radius) - 14px), calc(23px + var(--bar-pad)));
  color: #fff; overflow: hidden;
  background: rgba(20, 20, 24, 0.40);   /* same light glass as the dock */
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  transition: background-color .55s var(--ease);
}
.card--project:hover .proj__bar { background: rgba(20, 20, 24, 0.55); }   /* a bit darker once the description opens */
.proj__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.proj__title {
  font-family: var(--display); font-weight: 400; color: #fff;
  font-size: clamp(1.6rem, 2.6vw, 2.4rem); line-height: 1; letter-spacing: 0.01em; text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
}
.proj__btn {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: rgba(255, 255, 255, 0.16); display: grid; place-items: center; color: #fff; font-size: 1.15rem;
  transition: background-color .55s var(--ease), color .55s var(--ease), transform .55s var(--ease);
}
.proj__desc {
  color: var(--ink); font-size: 0.92rem; line-height: 1.55; max-width: 46ch;
  max-height: 0; opacity: 0; margin-top: 0; transform: translateY(10px);
  transition: max-height .55s var(--ease), opacity .45s var(--ease) .05s,
              transform .55s var(--ease) .05s, margin-top .55s var(--ease);
}
.card--project:hover .proj__desc { max-height: 9rem; opacity: 1; margin-top: 0.9rem; transform: translateY(0); }
.card--project:hover .proj__btn { background: #f2efe8; color: #111; transform: translate(3px, -3px); }
/* Touch devices (no hover): keep the description visible */
@media (hover: none) {
  .card--project .proj__desc { max-height: 9rem; opacity: 1; margin-top: 0.9rem; transform: none; }
  .card--project .proj__btn { background: #f2efe8; color: #111; }
}

/* ---------- 7. ABOUT ---------- */
.card--about {
  flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: clamp(3rem, 8vh, 6rem) var(--pad);
}
.about__content { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.about__eyebrow {
  display: block; font-size: var(--fs-meta); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: clamp(0.9rem, 2.2vh, 1.3rem);
}
.about__title {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: var(--fs-h2); line-height: 1; letter-spacing: 0.01em;
  margin-bottom: clamp(1.2rem, 3vh, 2rem);
}
.about__text {
  color: var(--ink-2); max-width: 60ch; margin: 0 auto;   /* wide enough that "decisions." stays with its line */
  font-size: clamp(1rem, 1.15vw, 1.2rem); line-height: 1.75;
  text-wrap: pretty;   /* where supported, never leaves a single word alone on the last line */
}
.about__text + .about__text { margin-top: 1rem; }
.about__cv {
  display: inline-flex; align-items: center; gap: 0.6em;
  margin-top: clamp(1.6rem, 3.5vh, 2.4rem);
  padding: 0.95em 1.7em; border-radius: 100px;
  background: var(--ink); color: #111;
  font-size: 0.76rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
.about__cv span { transition: transform .45s var(--ease); }
.about__cv:hover { background: rgba(244, 241, 234, 0.14); color: var(--ink); }
.about__cv:hover span { transform: translate(3px, -3px); }

/* ---------- 8. DARK BLOCKS (software / services / milestones) ---------- */
.card--panel-dark {
  flex-direction: column; justify-content: center;
  padding: clamp(4.4rem, 10vh, 8.6rem) var(--pad);
  background: var(--card);
}

/* Tools strip — full-width marquee, label fixed on the left */
.card--toolstrip {
  flex-direction: row; align-items: center; justify-content: flex-start;
  gap: clamp(1.5rem, 4vw, 3rem);
  min-height: auto; padding: clamp(1.4rem, 3vh, 2rem) var(--pad);
}
.toolstrip__label {
  flex: none; font-size: var(--fs-meta); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); white-space: nowrap;
}
.toolstrip__marquee {
  flex: 1 1 auto; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.toolstrip__track {
  display: flex; align-items: center; gap: clamp(3.2rem, 6.8vw, 5.2rem);
  width: max-content; will-change: transform;
}
.toolstrip__track.is-ready { animation: toolstrip-scroll 90s linear infinite; }
@keyframes toolstrip-scroll { to { transform: translateX(-50%); } }
.toolstrip__item {
  display: inline-flex; align-items: center; gap: 0.75rem; flex: none; color: var(--p-gray);
  transition: color .4s var(--ease);
}
.toolstrip__ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; flex: none; }
.toolstrip__ico svg { width: 100%; height: 100%; }
.toolstrip__name { font-size: 0.98rem; letter-spacing: 0.005em; white-space: nowrap; }
.toolstrip__dot { display: none; }
@media (max-width: 767px) {
  .card--toolstrip { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
.block__head { text-align: center; max-width: 60ch; margin: 0 auto clamp(2.5rem, 5vh, 4rem); }
.block__head--left { text-align: left; width: 100%; max-width: var(--max); margin-left: auto; margin-right: auto; margin-bottom: clamp(1.8rem, 3.5vh, 2.8rem); }

/* Trimmed-height dark blocks (Services + Software share identical padding) */
.card--services, .card--software, .card--experience {
  min-height: auto;
  padding-top: clamp(1.8rem, 3.5vh, 3rem);
  padding-bottom: clamp(1.8rem, 3.5vh, 3rem);
}
.card--services, .card--experience {
  --pad-x-wide: clamp(2.6rem, 9vw, 8.5rem);
  padding-left: var(--pad-x-wide); padding-right: var(--pad-x-wide);
  padding-top: clamp(3.6rem, 9vh, 5.8rem);
  padding-bottom: clamp(3.6rem, 9vh, 5.8rem);
}
/* Half-width cards (>= 1024px): side padding grows with the screen (same as before at 1440px), tighter below */
@media (min-width: 1024px) {
  .card--services, .card--experience { --pad-x-wide: clamp(2.6rem, calc(19vw - 144px), 8.5rem); }
}
.block__eyebrow {
  display: block; font-size: var(--fs-meta); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 1rem;
}
.block__title {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: var(--fs-h2); line-height: 0.95; letter-spacing: 0.01em;
}
.block__lead { margin: 1.5rem auto 0; max-width: 46ch; color: var(--muted); font-size: 0.98rem; }

/* Software grid */
.software__grid {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: 20px; overflow: hidden;
}
.tool {
  background: var(--card);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.9rem;
  padding: clamp(1.5rem, 3.5vw, 2.6rem) 1rem; color: var(--muted);
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
.tool:hover { background: var(--card-2); color: var(--ink); }
.tool__glyph { width: 38px; height: 38px; display: grid; place-items: center; }
.tool__glyph svg { width: 100%; height: 100%; fill: currentColor; }
.tool__glyph--badge svg { fill: none; }
.tool__name { font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; }

/* Services — expanding strips, auto-loop + hover, top-aligned head */
.card--services { justify-content: flex-start; text-align: center; }
.card--services .block__title { font-size: clamp(2.4rem, 5vw, 4.2rem); }

.svc-strips {
  width: 100%; max-width: var(--max); margin: clamp(1rem, 2.4vh, 1.75rem) auto 0;
  display: flex; gap: 10px; height: clamp(280px, 42vh, 370px);
}
.svc-strip {
  position: relative; flex: 1; min-width: 0; margin: 0;
  border-radius: clamp(16px, 1.8vw, 22px); overflow: hidden; cursor: pointer; background: #111313; /* #0B0D0D + 4% grey */
  transition: flex .7s var(--ease);
}
.svc-strip::after {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-color: #0B0D0D;   /* same near-black as the artwork, so the contained image has no visible frame */
  background-size: contain; background-position: center; background-repeat: no-repeat;
  opacity: 0; transition: opacity .35s ease;   /* closing: quick, calm fade-out */
}
.svc-strip.is-active { flex: 4.5; }
.svc-strip.is-active::after { opacity: 1; transition: opacity .7s ease .3s; }   /* opening: wait for the card to widen, then fade in softly */
.svc-strip::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  /* soft grey wash over the open card (under the caption) so it stands out from the closed ones */
  background:
    linear-gradient(0deg, rgba(10,10,11,.55) 0%, rgba(10,10,11,0) 40%),
    rgba(150, 152, 158, .08);
  opacity: 0; transition: opacity .35s ease;   /* closing: quick, calm fade-out */
}
.svc-strip.is-active::before { opacity: 1; transition: opacity .7s ease .3s; }
.svc-strip__cap { position: relative; z-index: 1; }
.svc-strip:nth-child(1)::after { background-image: url("../assets/ux%20design.png"); }
.svc-strip:nth-child(2)::after { background-image: url("../assets/ui%20design.png"); }
.svc-strip:nth-child(3)::after { background-image: url("../assets/design%20system.png"); }
.svc-strip:nth-child(4)::after { background-image: url("../assets/accessibility.png"); }
.svc-strip__cap {
  position: absolute; left: 16px; right: 16px; bottom: 16px;
  display: flex; align-items: baseline; gap: 12px; text-align: left; white-space: nowrap;
}
.svc-strip__num { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--p-gray); font-variant-numeric: tabular-nums; }
.svc-strip__title { font-family: var(--sans); font-weight: 500; font-size: 1.3rem; color: var(--ink); }
.svc-strip:not(.is-active) .svc-strip__cap { flex-direction: column; align-items: flex-start; gap: 10px; }
.svc-strip:not(.is-active) .svc-strip__title { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 1.05rem; }
.svc-strip__title, .svc-strip__num { transition: color .6s var(--ease); }
.svc-strip:not(.is-active) .svc-strip__title { color: var(--p-gray); }
.svc-strip:not(.is-active) .svc-strip__num { color: var(--dim); }
@media (max-width: 767px) {
  .svc-strips { gap: 6px; height: clamp(280px, 52vh, 360px); }
  .svc-strip__cap { left: 12px; right: 12px; bottom: 12px; }
  .svc-strip__title { font-size: 1.1rem; }
}

/* Software — bare enlarged logos (no tile box), spotlight on hover */
.card--software { justify-content: flex-start; text-align: center; }
.card--software .block__title { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.soft-tiles {
  width: 100%; max-width: 560px; margin: clamp(1.6rem, 4vh, 2.6rem) auto 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.4rem, 3vw, 2.2rem);
}
@media (max-width: 767px) {
  .soft-tiles { grid-template-columns: repeat(3, 1fr); max-width: 400px; }
}
.soft-tiles.has-hover .soft-tile { opacity: 0.32; transition: opacity .35s var(--ease); }
.soft-tiles.has-hover .soft-tile.is-active { opacity: 1; }
.soft-tile { display: flex; flex-direction: column; align-items: center; gap: 0.7rem; transition: opacity .35s var(--ease); }
.soft-tile__ico {
  display: flex; align-items: center; justify-content: center; color: var(--ink-2);
  transition: transform .35s var(--ease), color .35s var(--ease);
}
.soft-tile__ico svg { width: 56px; height: 56px; transition: transform .35s var(--ease); }
.soft-tile__ico:hover { transform: translateY(-4px); color: var(--ink); }
.soft-tile__ico:hover svg { transform: scale(1.08); }
.soft-tile__name {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.005em; color: var(--ink-2);
  transition: color .35s var(--ease);
}
.soft-tile:hover .soft-tile__name { color: var(--ink); }

/* glass tooltip — a single shared element appended to <body>, positioned via JS
   (a fixed-position child of a transformed/animated ancestor would be clipped to
   that ancestor instead of the viewport, so it must live outside .soft-tiles) */
#softTip {
  position: fixed; left: 0; top: 0; transform: translate(-50%, calc(-100% - 4px)) translateY(4px);
  width: max-content; max-width: 170px; padding: 0.55rem 0.85rem; border-radius: 11px;
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.55);
  opacity: 0; pointer-events: none; transition: opacity .28s var(--ease), transform .28s var(--ease);
  text-align: center; z-index: 9999; will-change: transform;
  font-family: var(--sans); font-size: 0.75rem; color: var(--ink-2); line-height: 1.35; white-space: nowrap;
}
#softTip.is-visible { opacity: 1; transform: translate(-50%, calc(-100% - 4px)) translateY(0); }

/* Milestones — mirrors the Services list (left head, row dividers, colour hierarchy) */
.card--milestones .block__title { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.mstones { width: 100%; max-width: var(--max); margin: 0 auto; }
.mstone {
  display: grid; grid-template-columns: minmax(auto, 5.5rem) 1fr; align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.4rem, 3vw, 2.4rem) 0;
}
.mstone + .mstone { border-top: 1px solid var(--line); }
.mstone__num {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(2.8rem, 6vw, 5rem); line-height: 0.9;
  display: flex; align-items: flex-start;
}
.mstone__plus { color: var(--accent); font-size: 0.5em; margin-left: 0.05em; }
.mstone__label {
  justify-self: start; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}

/* Experience — big stacked rows, period aligned right */
.card--experience {
  justify-content: flex-start; text-align: center;
  padding-left: var(--pad-x-wide); padding-right: var(--pad-x-wide);
}
.card--experience .block__title { font-size: clamp(2.4rem, 5vw, 4.2rem); }
.exp__list { --exp-pad: clamp(1.3rem, 3vw, 2rem); --exp-dim: 0.4; width: 100%; max-width: var(--max); margin: 0 auto; }
.exp__row {
  position: relative;
  display: flex; flex-direction: column; justify-content: center;   /* keeps the head + description centred in the row's slot */
  padding: var(--exp-pad) 0;
  transition: padding .55s var(--ease);
}
.exp__row + .exp__row { border-top: 1px solid var(--line); }
.exp__head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 0.5rem 1.5rem; width: 100%;
  padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
/* the button's hit area is stretched over the whole row (its padding included), not just the title line;
   the description sits above it, so its text stays selectable */
.exp__head::after { content: ""; position: absolute; inset: 0; }
.exp__more { position: relative; }
/* Spotlight: the other rows dim (--exp-dim) while one is hovered. Mouse only: on touch the hover
   would stay stuck on the last tapped row and leave the rest dimmed */
.exp__role, .exp__co, .exp__period { transition: opacity .35s var(--ease); }
@media (hover: hover) {
  .exp__list:hover .exp__row .exp__role,
  .exp__list:hover .exp__row .exp__co,
  .exp__list:hover .exp__row .exp__period { opacity: var(--exp-dim) !important; }
  .exp__list:hover .exp__row:hover .exp__role,
  .exp__list:hover .exp__row:hover .exp__co,
  .exp__list:hover .exp__row:hover .exp__period { opacity: 1 !important; }
  .exp__list:hover .exp__row:not(:hover) .exp__more { opacity: var(--exp-dim); }
}
.exp__left { display: flex; align-items: center; flex-wrap: nowrap; gap: clamp(0.9rem, 1.8vw, 1.3rem); }
.exp__role {
  font-family: var(--sans); font-weight: 400; color: var(--ink);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem); line-height: 1; letter-spacing: 0.005em;
}
.exp__co { font-size: 0.85rem; letter-spacing: 0.05em; color: var(--p-gray); }
.exp__period { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-gray); flex: none; }

/* Click a row: its description opens below, the other rows tighten up and the divider lines follow */
.exp__list.has-open .exp__row:not(.is-open) { padding-block: calc(var(--exp-pad) * 0.5); }
.exp__more {
  display: grid; grid-template-rows: 0fr; margin-top: 0;
  transition: grid-template-rows .55s var(--ease), margin-top .55s var(--ease), opacity .35s var(--ease);
}
.exp__more > p {
  min-height: 0; overflow: hidden; max-width: 52ch;
  font-size: 0.9rem; line-height: 1.6; color: var(--ink-2); text-align: left; text-wrap: pretty;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility 0s linear .55s;
}
.exp__row.is-open .exp__more { grid-template-rows: 1fr; margin-top: 0.9rem; }
.exp__row.is-open .exp__more > p { opacity: 1; visibility: visible; transition: opacity .45s var(--ease) .12s, visibility 0s; }

/* Role and company stack (company under the role) on screens up to 1600px */
@media (max-width: 1600px) {
  .exp__list { --exp-pad: clamp(1.1rem, 2.4vw, 1.6rem); }
  .exp__head { align-items: flex-start; flex-wrap: nowrap; }
  .exp__left { flex-direction: column; align-items: flex-start; gap: 0.3rem; text-align: left; }
}
/* Desktop 1024-1600px: cards are half-width, so the rows are packed tighter */
@media (min-width: 1024px) and (max-width: 1600px) {
  .exp__list { --exp-pad: clamp(1rem, 1.8vw, 1.4rem); }
}
/* Side-by-side with Services (>= 1024px): Experience fills the same card height,
   the four rows stretch by the same amount and each row's content sits centred in its slot
   (auto rows, not 1fr: an open row has to be allowed to be taller than the others) */
@media (min-width: 1024px) {
  .card--experience .exp__list { flex: 1; display: grid; }
  .exp__head { display: grid; grid-template-columns: 1fr auto; align-items: center; }
}
@media (min-width: 1024px) and (max-width: 1600px) {
  .exp__head { align-items: start; }
}

/* ---------- 9. CONTACT ---------- */
.card--contact {
  flex-direction: column; justify-content: center; align-items: center; text-align: center;
  padding: clamp(3rem, 8vh, 6rem) var(--pad);
  /* plain photo (no overlays): a .card__bg figure with gentle parallax, slightly zoomed in */
  background: #0e0e10;
}
.card--contact .card__bg { background: #0e0e10; }   /* same as the photo's own dark edges, so a smaller photo has no visible frame */
.card--contact .card__bg img { object-position: 50% 50%; filter: none; will-change: auto; }   /* no parallax: the photo must sit exactly on the card's edges */
/* Desktop: the photo is exactly as wide as the card (no crop, no zoom) and the card takes the photo's
   proportion (3600 x 1500), so the photo fills it edge to edge; smaller screens fill the card instead */
@media (min-width: 1024px) {
  .card--contact { min-height: 0; aspect-ratio: 3600 / 1500; }
  .card--contact .card__bg img { object-fit: contain; }
}
.card--contact > :not(.card__bg) { position: relative; z-index: 1; }
.contact__title {
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: clamp(2.8rem, 8vw, 6.5rem); line-height: 1; letter-spacing: 0.01em;
  margin: 0 0 clamp(3.2rem, 6vw, 4.4rem);
}
.contact__text { color: var(--p-gray); max-width: 44ch; margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem); }
.contact__email { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: 0.01em; font-size: clamp(1.1rem, 2.4vw, 1.7rem); padding: 0.7em 1.4em; }
.contact__email .pill__plus { font-style: normal; }

/* ---------- 9a. PLAY (pixel bricks + breakout): a fixed layer hidden behind the page,
   uncovered from the bottom as the empty .play-spacer scrolls into view ---------- */
.play-spacer { height: 0; }
.play {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(1rem, 3vh, 2rem) var(--pad) calc(var(--dock-h) + 1.75rem);
  visibility: hidden; pointer-events: none; clip-path: inset(100% 0 0 0);
}
.play__stage {
  position: relative; width: 100%; max-width: 1100px; overflow: hidden;
  transition: height .8s var(--ease);
}
.play__stage canvas { display: block; }
.play__stage.is-playing canvas { touch-action: none; }
.play__actions { margin-top: clamp(1.2rem, 3vh, 1.8rem); display: flex; gap: 12px; }
.play__btn { background: rgba(244, 241, 234, 0.08); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; }
.play__btn[hidden] { display: none; }
/* Main CTA: solid cream pill, larger, with a soft pulsing halo (a pill behind the button that grows and fades:
   transform + opacity only, so it never repaints). 1.16 / 1.7 = a 16px ring around the 202 x 46px button. */
#playBtn {
  position: relative;
  background: var(--ink); color: #111; box-shadow: none;
  font-size: 0.86rem; padding: 1em 1.8em; gap: 0.8em;
  transition: transform .45s var(--ease), background-color .45s var(--ease), color .45s var(--ease);
}
#playBtn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: rgba(244, 241, 234, 0.35); animation: play-halo 2.4s ease-out infinite;
}
#playBtn:hover { background: rgba(244, 241, 234, 0.16); color: var(--ink); transform: scale(1.04); }
#playBtn:hover::after { animation: none; opacity: 0; }
@keyframes play-halo { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(1.16, 1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #playBtn::after { animation: none; opacity: 0; } }
.play__foot {
  width: 100%; max-width: var(--page); margin-top: clamp(1.6rem, 4vh, 2.6rem); padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--p-gray);
}
.play__foot a { transition: color .4s var(--ease); }
.play__foot a:hover { color: var(--ink); }

/* ---------- 9b. SITE FOOTER ---------- */
.site-footer {
  max-width: var(--page); margin: 0 auto;
  padding: calc(16px - var(--edge)) var(--pad) 1.75rem;
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2);
}
.site-footer__hint { display: inline-flex; align-items: center; gap: 0.9em; animation: footer-hint-fade 2s var(--ease) infinite; }
.site-footer__arrow { width: 1.3em; height: 1.3em; flex: none; animation: footer-arrow 1.6s var(--ease) infinite; }
@keyframes footer-arrow { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) { .site-footer__arrow { animation: none; } }
@keyframes footer-hint-fade { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

/* ---------- 10. FLOATING DOCK ---------- */
.dock {
  position: fixed; z-index: 300;
  left: 50%; bottom: clamp(16px, 2.6vh, 30px); transform: translateX(-50%);
  display: flex; align-items: center; gap: clamp(1.4rem, 3.2vw, 2.75rem);
  padding: 0.5rem 0.5rem 0.5rem 0.75rem;
  border-radius: 100px;
  background: rgba(20, 20, 24, 0.40);   /* light glass; cream links + a soft text shadow keep it readable */
  border: none;
  backdrop-filter: blur(16px);   /* 16px reads the same as 32px behind small text, at a fraction of the cost */
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  max-width: calc(100vw - var(--edge) * 2);
}
.dock__bar { display: contents; }   /* transparent on desktop */
.dock__bigLinks, .dock__bigCta, .dock__close { display: none; }   /* mobile-expanded-panel only */
.dock__brand { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex: none; background: rgba(255,255,255,0.06); display: grid; place-items: center; transition: opacity .35s var(--ease), transform .4s var(--ease); }
.dock__brand img { width: 60%; height: 60%; object-fit: contain; }
.dock__links { display: flex; gap: clamp(0.95rem, 2vw, 1.6rem); padding: 0 0.4rem; }
.dock__links a {
  position: relative; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);   /* resting: a step below white, so hover (pure white) is clearly lighter */
  padding: 0.3em 0; white-space: nowrap; transition: color .4s var(--ease);
}
.dock__links a:hover { color: #fff; }
/* The pills inside the dock sit on the dock's own glass: a blur of their own shows nothing extra (and is a second blur) */
.dock .pill { -webkit-backdrop-filter: none; backdrop-filter: none; }
.pill--contact { background: var(--ink); color: #111; border-color: var(--ink); }
.pill--contact:hover { background: rgba(244, 241, 234, 0.14); color: var(--ink); }
.pill--contact .pill__plus { font-size: 1em; }
.pill--contact:hover .pill__plus { transform: translate(2px, -2px); }

/* Mobile "Menu" button — hidden on desktop, shown at the mobile breakpoint */
.pill--menu { display: none; background: var(--ink); color: #111; border: none; cursor: pointer; transition: background-color .45s var(--ease), color .45s var(--ease), opacity .35s var(--ease), transform .4s var(--ease); }
.pill--menu:hover { background: rgba(244, 241, 234, 0.14); color: var(--ink); }
.dock__close svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; fill: none; }
html.menu-open body { overflow: hidden; }

/* ---------- 11. CURSOR + INTRO ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 9999; pointer-events: none; display: none; }
html.has-cursor .cursor { display: block; }
.cursor__dot { position: fixed; top: 0; left: 0; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); transform: translate(-50%,-50%); transition: width .3s var(--ease), height .3s var(--ease); }
.cursor__ring {
  position: fixed; top: 0; left: 0; transform: translate(-50%, calc(-100% - 14px));
  display: flex; align-items: center; justify-content: center;
  padding: 0; border-radius: 10px;
  background: rgba(20, 20, 24, 0.40);
  backdrop-filter: blur(32px) saturate(160%); -webkit-backdrop-filter: blur(32px) saturate(160%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
  white-space: nowrap; overflow: hidden;
  opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease), padding .3s var(--ease);
}
.cursor__label {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.03em; color: var(--ink); text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
html.cursor-active .cursor__dot { width: 26px; height: 26px; }

.loader { display: none; }
/* intro already played in this tab: never show it again (class set in the head script) */
html.seen .loader { display: none !important; }
html.js:not(.reduced) .loader {
  display: grid; place-items: center;
  position: fixed; inset: 0; z-index: 10000;
  /* identical to the loaded site's page background */
  background-color: #939393;
  background-image:
    radial-gradient(38% 34% at 15% 20%, rgba(176,176,176,0.75) 0%, rgba(176,176,176,0) 60%),
    radial-gradient(42% 38% at 85% 26%, rgba(118,118,118,0.55) 0%, rgba(118,118,118,0) 62%),
    radial-gradient(40% 36% at 27% 82%, rgba(126,126,126,0.5) 0%, rgba(126,126,126,0) 60%),
    radial-gradient(44% 40% at 80% 80%, rgba(178,178,178,0.65) 0%, rgba(178,178,178,0) 62%),
    radial-gradient(30% 28% at 55% 50%, rgba(130,130,130,0.4) 0%, rgba(130,130,130,0) 60%);
  background-repeat: no-repeat;
}
.loader__row { display: flex; align-items: center; justify-content: center; }
.loader__word {
  font-family: var(--display); font-weight: 400; color: #2c2c2e;   /* dark grey */
  font-size: clamp(2.4rem, 8vw, 7rem); line-height: 1; letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden; display: inline-block; padding-bottom: 0.12em;
}
.loader__word-in { display: inline-block; }
html.js:not(.reduced) .loader__word-in { visibility: hidden; }   /* revealed by the intro once the title font is ready */
.loader__media {
  position: relative; flex: none; overflow: hidden;
  width: 0; height: clamp(110px, 18vh, 220px);
  margin: 0 clamp(10px, 2vw, 26px);
  border-radius: 16px; background: #1c1c1f;
}
.loader__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
}

/* ---------- 12. REVEAL STATES ---------- */
html.js:not(.reduced) [data-reveal="fade"] { opacity: 0; transform: translateY(16px); }
html.js:not(.reduced) .hero__name .line > span { transform: translateY(110%); }
.reveal-inner { display: block; will-change: transform; }

/* ---------- 13. RESPONSIVE ---------- */
/* Collapse the bento grid to a single column */
@media (max-width: 1023px) {
  .deck { grid-template-columns: 1fr; }
  .card { grid-column: 1 / -1; min-height: clamp(420px, 78vh, 760px); }
  .card--panel-dark, .card--contact { min-height: auto; }
}

@media (max-width: 1023px) {
  .software__grid { grid-template-columns: repeat(2, 1fr); }
  .about__body { grid-template-columns: 1fr; }
}

/* Narrow screens: the dock IS the menu — same pill, same width, always.
   Clicking "Menu" only grows it TALLER (not wider):
     logo+Menu bar        -> fades out entirely
     (hidden) -> close X  — fades in, centred at the top
     (hidden) -> big links — fade into the newly tall middle
     (hidden) -> Preview CV — fades in, full width, pinned at the bottom */
@media (max-width: 767px) {
  .pill--menu { display: inline-flex; padding: 0.95rem 1.5rem; }
  .dock__links { display: none; }   /* the small inline row is desktop-only */
  .dock .pill--contact { display: none; }   /* replaced by .dock__bigCta on mobile */

  .dock {
    position: fixed;
    width: min(88vw, 420px);
    height: 57px;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 0.4rem;
    border-radius: 100px;
    overflow: hidden;
    bottom: calc(clamp(16px, 2.6vh, 30px) + env(safe-area-inset-bottom, 0px));
    transition: height .5s var(--ease), border-radius .5s var(--ease), background-color .45s var(--ease);
  }
  .dock.is-open {
    height: min(64vh, 540px);   /* tall enough for the larger links below */
    border-radius: 32px;
    padding-bottom: 0.6rem;
  }

  /* logo + Menu bar — the closed-state content, fades out as a whole */
  .dock__bar {
    display: flex; align-items: center; justify-content: space-between;
    flex: none; width: 100%;
    opacity: 1; transition: opacity .3s var(--ease);
  }
  .dock.is-open .dock__bar { opacity: 0; pointer-events: none; }

  /* close (X) — centred at the very top, independent of the bar */
  .dock__close {
    display: grid; place-items: center; position: absolute;
    top: 0.4rem; left: 50%; transform: translateX(-50%) scale(0.5);
    width: 40px; height: 40px; border-radius: 50%;
    background: transparent; border: none; color: var(--ink); cursor: pointer;
    opacity: 0; pointer-events: none; z-index: 2;
    transition: opacity .35s var(--ease), transform .4s var(--ease);
  }
  .dock.is-open .dock__close { opacity: 1; transform: translateX(-50%) scale(1); pointer-events: auto; }

  /* big stacked links — fade into the tall middle area once the pill has grown */
  .dock__bigLinks {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    flex: 1; gap: clamp(0.8rem, 2.6vh, 1.4rem); text-align: center;
    opacity: 0; pointer-events: none;
    transition: opacity .3s var(--ease);
  }
  .dock.is-open .dock__bigLinks { opacity: 1; pointer-events: auto; }
  .dock__bigLinks a {
    font-family: var(--display); font-weight: 400; color: var(--ink);
    font-size: clamp(1.7rem, 7.6vw, 2.1rem); line-height: 1; letter-spacing: 0.01em;
    transition: color .35s var(--ease), transform .45s var(--ease);
  }
  .dock__bigLinks a:hover { color: var(--accent); transform: translateY(-2px); }

  /* Preview CV — full width, pinned at the very bottom */
  .dock__bigCta {
    display: flex; flex: none; width: 100%; justify-content: center;
    padding: 0.95rem 1.5rem; line-height: normal;   /* the same height as the Menu button (a <button>, so line-height: normal) */
    background: var(--ink); color: #111;
    opacity: 0; transform: translateY(8px); pointer-events: none;
    transition: opacity .35s var(--ease), transform .4s var(--ease), background-color .45s var(--ease), color .45s var(--ease);
  }
  .dock__bigCta:hover { background: rgba(244, 241, 234, 0.14); color: var(--ink); }
  .dock.is-open .dock__bigCta { opacity: 1; transform: translateY(0); pointer-events: auto; }
}

@media (max-width: 767px) {
  :root { --fs-display: clamp(2.8rem, 15vw, 4.5rem); --dock-h: 80px; }
  .software__grid { grid-template-columns: 1fr; }
  .card__bg img { object-position: 50% 25%; }
  .hero__status, .hero__clock { display: none; }   /* "Available for work" + the clock: not on phones */
  /* The hero fills the screen, as on desktop (the general single-column card height would cap it at 760px) */
  .card--hero { min-height: calc(100vh - var(--edge) * 2); min-height: calc(100svh - var(--edge) * 2); }
  .proj__title { font-size: 2rem; }   /* project titles a step larger on phones (the fluid size bottoms out at 1.6rem) */
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .card__bg img { transform: none !important; }
}

/* ---------- STACKED LAYOUT (single column, <= 1023px): About / Services / Experience / Contact share one rhythm ---------- */
@media (max-width: 1023px) {
  .deck :is(#about, #services, #experience, #contact) {
    padding: 3rem clamp(1.75rem, 6vw, 4rem); min-height: auto;
  }
  .deck :is(#about, #services, #experience, #contact) :is(.block__eyebrow, .about__eyebrow) {
    font-size: 0.75rem; letter-spacing: 0.12em; margin-bottom: 1rem;
  }
  .deck :is(#about, #services, #experience, #contact) :is(.block__title, .about__title, .contact__title) {
    font-size: clamp(2.6rem, 7vw, 3.8rem); line-height: 1; margin-top: 0;
  }
  .deck :is(#services, #experience) .block__head { margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }
  .deck :is(#services, #experience) .block__title { margin-bottom: 0; }
  .deck :is(#about, #contact) :is(.about__title, .contact__title) { margin-bottom: clamp(2.5rem, 6vw, 3.5rem); }
  .deck #services .svc-strips { margin-top: 0; }
}
@media (max-width: 767px) {
  .svc-strip.is-active { flex: 5.6; }
  .svc-strip__cap { gap: 8px; }
  .svc-strip.is-active .svc-strip__title { font-size: 1rem; }
}
