/* ---------- Tokens (dark only) ---------- */
:root {
  color-scheme: dark;
  --bg: #0d1d16;            /* very dark, muted forest green */
  --ink: #eceee8;
  --muted: #b2bcb5;         /* secondary text: light enough to read comfortably (~9:1 on --bg) */
  --faint: #3b4d45;
  --line: #24352e;
  --accent: #8fd3a8;        /* forest green, lifted for a dark background */
  --accent-ink: #0d1d16;

  /* Big type: Montserrat. Body: Avenir (built into Apple devices), Nunito Sans elsewhere. */
  --display: "Montserrat", system-ui, sans-serif;
  --display-weight: 800;   /* Montserrat ExtraBold */
  --sans: "Avenir Next", "Avenir", "Nunito Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 3vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .4s, color .4s;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
ol, ul { list-style: none; margin: 0; padding: 0; }
.accent { font-family: var(--sans); font-style: italic; font-weight: 400; }
.green { color: var(--accent); }   /* same font as its surroundings, just green */
.about__lead .green { font-style: italic; }   /* Montserrat Medium Italic, same weight as the paragraph */
::selection { background: var(--accent); color: var(--accent-ink); }

main > section { padding: 0 var(--gutter); }

/* Dot grid behind everything (drawn by main.js); content sits above it */
.dots { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.topbar__name { font-weight: 500; }
.topbar__meta { color: var(--muted); }
.topbar__meta { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.clock { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }


/* ---------- Hero ---------- */
.hero {
  --t: clamp(70px, 14vw, 250px);        /* name size; the indent and intro align to it */
  min-height: calc(100svh - 52px);
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  align-content: end; column-gap: 32px; row-gap: clamp(24px, 3vw, 44px);
  padding-bottom: clamp(40px, 6vw, 80px) !important;
  border-bottom: 1px solid var(--line);
}
.hero__title {
  grid-column: 1; grid-row: 1;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: var(--t); line-height: .9; letter-spacing: -.04em;
}
.hero__title > span { display: block; }
.hero__line2 { padding-left: .55em; }
.hero__memoji {
  grid-column: 2; grid-row: 1; align-self: center;
  width: clamp(150px, 16vw, 260px);
}
.hero__intro {
  grid-column: 1 / -1; grid-row: 2;
  margin-left: calc(var(--t) * .55);
  max-width: 34ch; display: grid; gap: 24px; justify-items: start;
  font-size: clamp(18px, 1.7vw, 24px); line-height: 1.4; color: var(--muted);
}
.hero__intro strong { color: var(--ink); font-weight: 600; }
/* Face: base image + eye layers. Eyes follow the cursor, head tilts a little, blinks now and then. */
.hero__memoji { perspective: 900px; }
.face {
  position: relative;
  transform-origin: 50% 60%;
  will-change: transform;
  filter: drop-shadow(0 24px 30px rgba(0,0,0,.18));
}
.face__base { display: block; width: 100%; height: auto; }
.eye {
  position: absolute; overflow: hidden;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.eye--l {
  left: 17.851%; top: 40.312%; width: 24.610%; height: 16.250%;
  --cx: 51.761%; --cy: 54.327%; --size: 64.789%;
  -webkit-mask-image: url(assets/img/face/eye-l-mask.png); mask-image: url(assets/img/face/eye-l-mask.png);
}
.eye--r {
  left: 58.925%; top: 44.375%; width: 25.130%; height: 16.250%;
  --cx: 50.345%; --cy: 54.327%; --size: 62.759%;
  -webkit-mask-image: url(assets/img/face/eye-r-mask.png); mask-image: url(assets/img/face/eye-r-mask.png);
}
.iris {
  position: absolute; left: var(--cx); top: var(--cy); width: var(--size); height: auto;
  transform: translate(-50%, -50%) translate(var(--ex, 0px), var(--ey, 0px));
}
/* soft shadow under the upper lid, over the iris */
.eye::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 10px 10px -8px rgba(70, 40, 30, .28);
}
.lid {
  position: absolute; inset: -2px; z-index: 1;
  background: rgb(214, 184, 168);
  border-bottom: 3px solid rgb(74, 56, 50);
  transform: translateY(-104%);
  transition: transform .07s ease-in;
}
.face.is-blinking .lid { transform: translateY(0); }

.arrow-link {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 15px; font-weight: 500;
  border-bottom: 1px solid currentColor; padding-bottom: 2px; width: fit-content;
}
/* icons (assets/icons.svg) sit on the text baseline and take the text colour */
.icon {
  width: 1em; height: 1em; flex: none; vertical-align: -.13em; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10;   /* sharp: square cuts, pointed tips */
}
.icon-link { display: inline-flex; align-items: center; gap: 6px; }
.arrow-link .icon { transition: transform .3s var(--ease); }
.arrow-link:hover .icon { transform: translate(2px, 2px); }

/* ---------- Section heads ---------- */
.section-head {
  display: grid; grid-template-columns: 1fr minmax(240px, 320px); gap: 32px; align-items: end;
  padding: clamp(80px, 12vw, 160px) 0 20px;
  border-bottom: 1px solid var(--line);
}
.section-title { font-family: var(--display); font-weight: var(--display-weight); font-size: clamp(30px, 3.6vw, 52px); letter-spacing: -.025em; line-height: 1; }
.section-title sup { font-size: .32em; vertical-align: super; margin-left: 4px; letter-spacing: 0; color: var(--muted); }
.section-note { font-size: 15px; color: var(--muted); }
.section-note .accent { display: block; font-size: 17px; color: var(--ink); }   /* own line; hidden on touch screens */
.kicker { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Work list ---------- */
.work-item { border-bottom: 1px solid var(--line); }
.work-item a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: baseline; gap: 16px;
  padding: clamp(18px, 2.4vw, 30px) 0;
  transition: color .35s var(--ease), opacity .35s var(--ease);
}
.work-item__num { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.work-item__title {
  display: block;
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(34px, 6vw, 96px);
  line-height: 1; letter-spacing: -.035em;
  transition: transform .5s var(--ease);
}
.work-item__tags { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }
.work-item__cat { font-size: clamp(14px, 1.4vw, 18px); color: var(--muted); text-align: right; white-space: nowrap; }
.work-item__thumb { display: none; }

/* dim the siblings on hover (desktop) */
@media (hover: hover) {
  .work-list:has(.is-current) .work-item a { color: var(--faint); }
  .work-list:has(.is-current) .work-item a * { color: inherit; }
  .work-list .work-item a.is-current { color: var(--ink); }
  .work-list .work-item a.is-current .work-item__title { transform: translateX(12px); }
  .work-list .work-item a.is-current .work-item__tags,
  .work-list .work-item a.is-current .work-item__num { color: var(--muted); }
  .work-list .work-item a.is-current .work-item__cat { color: var(--accent); }
}

.work-more {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 24px 0 0; font-size: 15px; color: var(--muted);
}

/* ---------- Floating preview ---------- */
.preview {
  position: fixed; left: 0; top: 0; z-index: 30;
  width: 340px; pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.85);
  transition: opacity .35s var(--ease);
  will-change: transform;
}
.preview.is-visible { opacity: 1; }
.preview__frame { overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.06);
  clip-path: inset(100% 0 0 0);
  transition: clip-path .55s var(--ease);
}
.preview.is-visible .preview__frame { clip-path: inset(0 0 0 0); }
/* every preview window has the same shape (8:5, like a 1600 × 1002 export); taller previews scroll inside */
.preview__screen { aspect-ratio: 1600 / 1002; overflow: hidden; position: relative; container-type: inline-size; }
.preview__page { position: absolute; inset: 0 0 auto 0; }
.preview__page img { display: block; width: 100%; height: auto; }
/* a preview shorter than the window still fills it: scaled up just enough, top aligned */
.preview__page img { min-height: calc(100cqw * 1002 / 1600); object-fit: cover; object-position: top; }
.preview__page.is-scrolling { animation: page-scroll var(--scroll-dur, 9s) ease-in-out infinite alternate; }
@keyframes page-scroll {
  0%, 8% { transform: translateY(0); }
  92%, 100% { transform: translateY(var(--scroll-dist, -400px)); }
}

/* Placeholder page (until real exports are added) */
.ph { --c: #1f4a35; background: #fff; padding: 10px; display: grid; gap: 8px; }
.ph__nav { height: 10px; display: flex; justify-content: space-between; }
.ph__nav i { width: 40px; background: #e7e6e1; }
.ph__hero { height: 150px; background: var(--c); display: grid; place-items: center; color: #fff; font: 500 18px/1 var(--sans); letter-spacing: -.02em; }
.ph__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph__row i { height: 70px; background: color-mix(in srgb, var(--c) 18%, #f3f2ee); }
.ph__line { height: 8px; background: #ecebe6; }
.ph__line.short { width: 60%; }
.ph__band { height: 110px; background: color-mix(in srgb, var(--c) 60%, #000); }

/* ---------- About ---------- */
.about {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px;
  padding-top: clamp(80px, 12vw, 160px) !important;
}
.about__label { padding-top: 12px; }
.about__label .kicker { writing-mode: vertical-rl; transform: rotate(180deg); }
.about__lead {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(24px, 3vw, 42px); line-height: 1.18; letter-spacing: -.02em;
  max-width: 1100px;
}
/* areas of work, side by side (no numbers: they aren't a sequence); two by two on narrower screens */
.skills {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(48px, 7vw, 96px);
}
.skill { padding: 4px 24px 4px 20px; border-left: 1px solid var(--line); display: grid; gap: 12px; align-content: start; }
.skill h3 {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(20px, 1.9vw, 26px); line-height: 1.1; letter-spacing: -.02em;
}
.skill p { font-size: 18px; line-height: 1.5; color: var(--muted); max-width: 34ch; }

/* ---------- Experience ---------- */
.row {
  display: grid; grid-template-columns: 160px 1fr 1fr; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 16px;
}
.row__date { color: var(--muted); font-variant-numeric: tabular-nums; }
.row__main strong { display: block; font-weight: 500; }
.row__main { color: var(--muted); }
.row__desc { color: var(--muted); }
.subhead { font-size: 14px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 56px 0 14px; border-bottom: 1px solid var(--line); }

/* ---------- Marquee ---------- */
.marquee {
  /* the top edge of the contact section: full width (out past the section's side padding), content below */
  margin: 0 calc(-1 * var(--gutter)) clamp(48px, 6vw, 88px);
  overflow: hidden;
  /* a ruled band: its own surface between two hairlines */
  background: var(--band); color: var(--muted);
  border-block: 1px solid var(--line);
  padding: 11px 0;
}
/* the text slides out from the page edges instead of being cut off (fades over the band's own colour) */
.marquee { position: relative; --band: color-mix(in srgb, var(--ink) 6%, var(--bg)); }
.marquee::before, .marquee::after {
  content: ""; position: absolute; top: 0; bottom: 0; z-index: 1; width: 8%; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--band), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--band), transparent); }
.marquee__track {
  display: flex; width: max-content;
  animation: marquee 32s linear infinite;
  font: 500 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
}
.marquee__track span, .marquee__track i { padding: 0 1.1em; }
.marquee__track i { font-style: normal; opacity: .5; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Contact ---------- */
.contact {
  margin-top: clamp(100px, 14vw, 200px);
  padding-top: 0 !important;   /* the band at the top of the section is its edge */ padding-bottom: clamp(48px, 6vw, 80px) !important;
}
.contact__title {
  font-family: var(--display); font-weight: var(--display-weight);
  font-size: clamp(40px, 6.4vw, 112px); line-height: 1; letter-spacing: -.035em;
  max-width: 14ch;
}
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px;
  padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 14px; color: var(--muted);
}
.status__face {
  position: relative; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--bg));
}
.status__face img { width: 80%; height: auto; }
.status__face i { position: absolute; right: -1px; top: -1px; width: 8px; height: 8px; border-radius: 50%; background: #7ed957; border: 2px solid var(--bg); }
.contact__lead { margin-top: 28px; max-width: 46ch; font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 48px; }
.pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500;
  transition: background .3s, transform .3s var(--ease);
}
.pill:hover { background: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- Floating section nav (the site's only navigation) ---------- */
/* Compact: where you are + next. Hover (or tap the section name) to expand into all sections. */
.jump {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25;
  display: flex; align-items: center;
  max-width: calc(100vw - 24px);
  padding: 5px; border-radius: 999px;   /* the nav pill stays rounded */
  background: var(--ink); color: var(--bg);
  font-size: 14px; white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.35);
  transform: translateX(-50%);
  animation: jump-in .6s var(--ease) .3s both;
}
@keyframes jump-in { from { transform: translate(-50%, 140%); opacity: 0; } }

/* widths are measured by main.js (--compact-w / --menu-w) so the morph covers exactly the real distance */
.jump { --dur: .7s; --morph: cubic-bezier(.65, .05, .36, 1); }
.jump__compact, .jump__menu {
  display: flex; align-items: center; overflow: hidden;
  transition: max-width var(--dur) var(--morph), opacity .3s, visibility 0s;
}
.jump__compact { gap: 6px; max-width: var(--compact-w, 360px); }
.jump__menu {
  gap: 2px; list-style: none; margin: 0; padding: 0;
  max-width: 0; opacity: 0; visibility: hidden;
  transition-delay: 0s, 0s, var(--dur);      /* hide only after collapsing */
}
/* section names fade in one after another while the pill widens */
.jump__menu li { opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s var(--ease); }

/* keyboard focus opens it too (:focus-visible, so a tap doesn't open it under the finger) */
.jump.is-open .jump__compact, .jump:has(:focus-visible) .jump__compact { max-width: 0; opacity: 0; }
.jump.is-open .jump__menu, .jump:has(:focus-visible) .jump__menu { max-width: var(--menu-w, 640px); opacity: 1; visibility: visible; transition-delay: 0s; }
.jump.is-open .jump__menu li, .jump:has(:focus-visible) .jump__menu li {
  opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .06s);
}
@media (hover: hover) {
  .jump:hover .jump__compact { max-width: 0; opacity: 0; }
  .jump:hover .jump__menu { max-width: var(--menu-w, 640px); opacity: 1; visibility: visible; transition-delay: 0s; }
  .jump:hover .jump__menu li { opacity: 1; transform: none; transition-delay: calc(.18s + var(--i) * .06s); }
}
@media (prefers-reduced-motion: reduce) {
  .jump { --dur: 0s; }
  .jump__menu li { transition: none; }
}

.jump button, .jump__menu a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: none; color: inherit; font: inherit; text-decoration: none;
  transition: background .25s, color .25s;
}
.jump__where { padding-left: 11px; }
.jump__count { opacity: .5; font-variant-numeric: tabular-nums; }
.jump__next { background: color-mix(in srgb, var(--bg) 14%, transparent) !important; }
.jump__next[hidden] { display: none; }
.jump__next:hover { background: color-mix(in srgb, var(--bg) 24%, transparent) !important; }
.jump__arrow { display: inline-block; transition: transform .3s var(--ease); }
.jump__next:hover .jump__arrow { transform: translateY(2px); }
.jump__menu a { color: color-mix(in srgb, var(--bg) 55%, transparent); }
@media (hover: hover) { .jump__menu a:hover { color: var(--bg); background: color-mix(in srgb, var(--bg) 10%, transparent); } }
.jump__menu a[aria-current="true"] { color: var(--bg); background: color-mix(in srgb, var(--bg) 16%, transparent); }
@media (max-width: 420px) { .jump__menu a { padding: 8px 10px; } }

/* ---------- Custom cursor (mouse/trackpad only; touch keeps the system cursor) ---------- */
/* One solid disc in difference mode: it inverts whatever is under it, so it never reads as a background dot */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor * { cursor: none !important; }
  .has-cursor .cursor { display: block; }
}
.cursor {
  position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: #f1f0eb; mix-blend-mode: difference;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width .35s var(--ease), height .35s var(--ease), opacity .25s;
}
.cursor.is-link { width: 56px; height: 56px; }
.cursor.is-work { width: 8px; height: 8px; }          /* the project preview takes over */
.cursor.is-out { opacity: 0; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 var(--gutter); padding: 20px 0 28px;
  border-top: 1px solid var(--line); font-size: 14px; color: var(--muted);
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
.footer a:hover { color: var(--ink); }
/* playlist above the footer line (index.html): a short note beside a record sleeve that links to Spotify */
.playlist {
  flex-basis: 100%; display: grid; grid-template-columns: 1fr minmax(0, 560px); gap: 24px 48px; align-items: center;
  padding-bottom: 28px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.playlist__text { display: grid; gap: 8px; }
.playlist__text p { font-size: 18px; color: var(--ink); }
.playlist__text .playlist__note { font-size: 16px; color: var(--muted); max-width: 40ch; }
.record { display: flex; align-items: center; gap: 28px; color: var(--muted); }
/* the sleeve, with the vinyl hidden right behind it: on hover the vinyl slides out to the right */
.record__art { position: relative; flex: none; width: 128px; aspect-ratio: 1; margin-right: 56px; }   /* room for the vinyl to slide out */
.record__art img {
  position: relative; width: 100%; height: 100%; border-radius: 4px;
  box-shadow: 0 10px 30px rgb(0 0 0 / .35);
  transition: box-shadow .7s var(--ease);
}
/* as the vinyl comes out, the sleeve's open edge casts a short shadow onto it */
.record:hover .record__art img, .record:focus-visible .record__art img { box-shadow: 0 10px 30px rgb(0 0 0 / .35), 6px 0 10px -2px rgb(0 0 0 / .55); }
.record__disc {
  position: absolute; inset: 4px; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 1.6%, #45301f 2% 17%, #050505 17.5% 22%, transparent 22.5%),    /* hole, label in the sleeve's colour, run-out */
    radial-gradient(circle, transparent 0 94%, #0a0a0a 94.5%),                                             /* smooth outer rim */
    conic-gradient(from 30deg, rgb(255 255 255 / 0) 0 6%, rgb(255 255 255 / .09) 11%, rgb(255 255 255 / 0) 17% 50%,
                   rgb(255 255 255 / .09) 61%, rgb(255 255 255 / 0) 67%),                                  /* light catching the grooves */
    repeating-radial-gradient(circle, #0c0c0c 0 1px, #151515 1px 2px);                                    /* grooves */
  box-shadow: 0 0 0 rgb(0 0 0 / 0);    /* no shadow while inside the sleeve: only the sleeve has one */
  transition: translate .7s var(--ease), box-shadow .7s var(--ease);
}
.record:hover .record__disc, .record:focus-visible .record__disc { translate: 46% 0; box-shadow: 0 8px 24px rgb(0 0 0 / .45); }
@media (prefers-reduced-motion: reduce) { .record__disc, .record__art img { transition: none; } }
.record__info { display: grid; gap: 12px; min-width: 0; }
.record__title { font-family: var(--display); font-weight: var(--display-weight); font-size: 22px; letter-spacing: -.02em; color: var(--ink); }
.record__tracks { display: grid; gap: 4px; list-style: none; font-size: 14px; counter-reset: t; }
.record__tracks li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.record__tracks li::before { counter-increment: t; content: counter(t, decimal-leading-zero); margin-right: 12px; opacity: .5; font-variant-numeric: tabular-nums; }
.record__tracks b { font-weight: 500; color: var(--ink); margin-right: 6px; }
.record__cta { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
.record:hover .record__cta { color: var(--accent); }
@media (max-width: 900px) { .playlist { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .record__art { width: 96px; margin-right: 44px; } .record { gap: 20px; } }
/* touch screens: the vinyl never slides out, so don't keep room for it; numbers go too, so artists fit */
@media (hover: none) {
  .record__art { margin-right: 0; }
  .record__tracks li::before { content: none; }
}

/* ---------- Easter egg cards: pop out of the face on click (main.js) ---------- */
.hero__memoji { position: relative; }
/* the photo in a thin light frame with rounded corners */
.fun-card {
  position: absolute; left: 50%; top: 50%; z-index: 5; width: 116px; margin: 0;
  padding: 4px; border-radius: 14px; background: var(--ink);
  box-shadow: 0 18px 32px -14px rgba(0, 0, 0, .6);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(.2) rotate(0deg); opacity: 0;
  transition: transform .7s cubic-bezier(.34, 1.56, .64, 1), opacity .25s;
}
.fun-card.is-out { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(var(--r)); opacity: 1; }
.fun-card.is-gone { opacity: 0; transition: opacity .5s; }
.fun-card__img { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--ink) 14%, var(--bg)); display: grid; place-items: center; }
.fun-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fun-card__ph { font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); padding: 6px; text-align: center; word-break: break-all; }

/* ---------- Loader (first visit): pulsing rings of dots, then the background dots fill the page (main.js) ---------- */
.loader {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  transition: opacity .8s var(--ease);
}
.is-loading .loader, .loader.is-leaving { display: block; }
.loader.is-leaving { opacity: 0; pointer-events: none; }
.loader__dots { position: absolute; inset: 0; }
/* the hero waits behind the loader, then makes its usual entrance */
.is-loading .reveal.is-in { opacity: 0; transform: translateY(24px); }

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

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

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .skills { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}
@media (max-width: 900px) {
  .clock { display: none; }
  .hero, .section-head { grid-template-columns: 1fr; }
  .hero { --t: 18vw; min-height: calc(88svh - 52px); grid-template-rows: auto; }
  .hero__memoji, .hero__title, .hero__intro { grid-column: 1; grid-row: auto; }
  .hero__memoji { order: -1; width: 112px; }
  .skills { grid-template-columns: 1fr; gap: 28px; }
  .skill { padding: 0 0 0 16px; }
  .row { grid-template-columns: 1fr; gap: 4px; }
  .row__desc:empty { display: none; }
  .about { grid-template-columns: 1fr; }
  .about__label .kicker { writing-mode: initial; transform: none; }
}

/* touch devices: no hover preview, show an inline thumbnail instead */
@media (hover: none), (max-width: 900px) {
  .preview, .section-note .accent { display: none; }
  .work-item a { grid-template-columns: 1fr; gap: 0; }
  .work-item__num { order: -1; margin-bottom: 8px; }
  .work-item__cat { text-align: left; margin-top: 6px; }
  .work-item__thumb {
    display: block; margin-top: 16px; aspect-ratio: 1600 / 1002; overflow: hidden;
    position: relative; border: 1px solid var(--line); container-type: inline-size;
  }
  .work-item__thumb > div { position: absolute; inset: 0 0 auto 0; }
  /* scale the full-page export to the card's width; the top of the page shows */
  .work-item__thumb img { display: block; width: 100%; height: auto; min-height: calc(100cqw * 1002 / 1600); object-fit: cover; object-position: top; }
}
