/* ============================================================
   Millie Lembke — Portfolio
   Editorial minimal. Near-white ground, Instrument Serif display
   + Inter body, one cobalt accent. Counter preloader, hover
   previews, sticky-stacking services. Committed light world.
   ============================================================ */

:root {
  --bg:        #f4f4f1;   /* soft near-white */
  --panel:     #fbfbf9;   /* lifted card */
  --ink:       #16161a;   /* cool near-black */
  --muted:     #6c6c66;   /* considered grey */
  --line:      #e1e0da;   /* hairline */
  --accent:    #2b34e0;   /* electric cobalt, used sparingly */

  --font-display: "Instrument Serif", Georgia, "Times New Roman", serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;

  --maxw: 1200px;
  --pad: clamp(1.25rem, 5vw, 5rem);
  --nav-h: 4.75rem;
  --tile-h: clamp(180px, 26vh, 252px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.55vw + 0.9rem, 1.1rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
strong { font-weight: 600; }
em { font-style: italic; color: var(--muted); }

::selection { background: var(--accent); color: #fff; }

/* Instrument Serif is a single weight — size and italics carry hierarchy */
.serif, .hero-headline, .section-title, .work-name, .about-lead p,
.stack-content h3, .contact-pitch, .cred-title, .preloader-name,
.preloader-count {
  font-family: var(--font-display);
  font-weight: 400;
}

/* ---------- PRELOADER ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: flex;
  align-items: flex-end;
  padding: var(--pad);
  transition: transform .9s cubic-bezier(.76, 0, .24, 1);
}
.preloader.done { transform: translateY(-101%); }
.preloader-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}
.preloader-name {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
}
.preloader-count {
  font-size: clamp(3rem, 12vw, 9rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.nav.scrolled { border-color: var(--line); }
.wordmark { font-weight: 600; font-size: 1rem; letter-spacing: -0.01em; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.6vw, 2.2rem);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a { color: var(--muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 0.42rem 1.05rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-cta:hover { background: var(--ink); color: var(--bg) !important; border-color: var(--ink); }

/* ---------- SECTION SHELL ---------- */
section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4.5rem, 11vh, 8.5rem) var(--pad);
  scroll-margin-top: var(--nav-h);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  letter-spacing: -0.01em;
  line-height: 1;
}
.section-caption {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
}

/* ---------- HERO ---------- */
.hero {
  padding-top: clamp(3rem, 8vh, 5.5rem);
  padding-bottom: clamp(3.5rem, 9vh, 6rem);
}
.eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: clamp(1.6rem, 4vh, 2.6rem);
}
.hero-headline {
  font-size: clamp(3rem, 8.7vw, 7rem);
  line-height: 0.96;
  letter-spacing: -0.02em;
  max-width: 15ch;
}
.hero-headline .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-headline .line > span { display: block; }
.hero-headline em { font-style: italic; color: var(--ink); }
.hero-headline .accent { color: var(--accent); font-style: italic; }
.js .hero .hero-headline .line > span { transform: translateY(115%); }
.hero.in .hero-headline .line > span {
  transform: translateY(0);
  transition: transform 1.05s cubic-bezier(.19, 1, .22, 1);
}
.hero.in .hero-headline .line:nth-child(1) > span { transition-delay: .06s; }
.hero.in .hero-headline .line:nth-child(2) > span { transition-delay: .17s; }
.hero.in .hero-headline .line:nth-child(3) > span { transition-delay: .28s; }

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #35a35a;
  margin-right: 0.6rem;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(53, 163, 90, .5);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(53, 163, 90, .5); }
  70%  { box-shadow: 0 0 0 8px rgba(53, 163, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 163, 90, 0); }
}
.hero-sub {
  margin-top: clamp(1.6rem, 4vh, 2.4rem);
  max-width: 48ch;
  font-size: clamp(1.05rem, 1.1vw, 1.22rem);
  color: var(--muted);
}
.hero-actions {
  margin-top: clamp(2rem, 5vh, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.85rem 1.6rem;
  border-radius: 100px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.credential-strip {
  margin-top: clamp(3rem, 8vh, 5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1.5rem;
}
.cred-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.credential-strip ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.6rem;
}
.credential-strip li {
  position: relative;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1;
}
.credential-strip li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -0.85rem;
  top: 50%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--muted);
  transform: translateY(-50%);
}

/* ---------- MARQUEE ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.15rem 0;
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 1.9rem;
  white-space: nowrap;
  will-change: transform;
  animation: marquee 36s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.7rem);
  letter-spacing: -0.01em;
  line-height: 1;
}
.marquee-track .sep { color: var(--accent); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- WORK ---------- */
.work-list { list-style: none; }
.work-item { border-top: 1px solid var(--line); }
.work-item:last-child { border-bottom: 1px solid var(--line); }
.work-link {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1.05fr) minmax(0, 1.4fr) 2rem;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  padding: clamp(1.5rem, 3.4vh, 2.3rem) 0.35rem;
  cursor: pointer;
  transition: padding-left .3s ease;
}
.work-link:hover { padding-left: 1.3rem; }
.work-num {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.work-name {
  display: block;
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  letter-spacing: -0.01em;
  line-height: 1.02;
  transition: color .3s ease;
}
.work-role {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.work-desc { font-size: 0.98rem; color: var(--muted); line-height: 1.5; }
.work-toggle {
  justify-self: end;
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), color .3s ease;
}
.work-item:hover .work-toggle,
.work-item.open .work-toggle { transform: rotate(45deg); color: var(--accent); }
.work-link:hover .work-name,
.work-item.open .work-name { color: var(--accent); }

/* expand-on-hover gallery */
.work-gallery {
  max-height: 0;
  overflow: hidden;
  transition: max-height .55s cubic-bezier(.2,.7,.2,1);
}
.work-item:hover .work-gallery,
.work-item.open .work-gallery { max-height: 360px; }
.work-gallery-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.3rem 0.35rem 2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

/* image tile with hover caption (darkens + centered label) */
.gitem {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.gitem img {
  display: block;
  height: var(--tile-h);
  width: auto;
  max-width: 84vw;
  object-fit: cover;
  background: var(--panel);
  transition: filter .3s ease;
}
.gitem figcaption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: #fff;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
  line-height: 1.15;
  text-shadow: 0 1px 10px rgba(0,0,0,.55);
  opacity: 0;
  transition: opacity .3s ease;
}
.gitem:hover img { filter: brightness(.55); }
.gitem:hover figcaption { opacity: 1; }

/* browser-window site preview (links to live site) */
.site-card {
  flex: 0 0 auto;
  width: min(360px, 82vw);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
  transition: border-color .25s ease, transform .25s ease;
}
.site-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.site-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.site-url { margin-left: 8px; font-size: 0.72rem; color: var(--muted); }
.site-shot { position: relative; display: block; height: calc(var(--tile-h) - 2.4rem); overflow: hidden; }
.site-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter .3s ease; }
.site-wordmark {
  position: absolute; left: 15px; bottom: 12px; color: #fff;
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.01em;
  text-shadow: 0 1px 12px rgba(0,0,0,.55);
}
.site-cta {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 500; font-size: 0.9rem;
  background: rgba(16,16,18,.5); opacity: 0; transition: opacity .3s ease;
}
.site-card:hover .site-cta { opacity: 1; }
.site-card:hover .site-shot img { filter: brightness(.55); }

/* video / reel link tile (portrait, reads as a reel) */
.video-card {
  position: relative;
  flex: 0 0 auto;
  width: calc(var(--tile-h) * 0.62);
  height: var(--tile-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1.1rem;
  text-align: center;
  border-radius: 10px;
  overflow: hidden;
  background: #16161a;
  color: #fff;
  transition: transform .25s ease;
}
.video-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform .5s ease, filter .3s ease;
}
.video-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.58) 100%);
}
.video-card::before {
  content: "REEL";
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,.85);
}
.video-card:hover { transform: translateY(-3px); }
.video-card:hover .video-thumb { filter: brightness(.62); transform: scale(1.05); }
.video-play {
  position: relative;
  z-index: 2;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border: 1px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.2);
  font-size: 1.05rem;
  transition: background .25s ease, color .25s ease, transform .25s ease;
}
.video-card:hover .video-play { background: #fff; color: var(--ink); transform: scale(1.06); }
.video-label { position: relative; z-index: 2; font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.video-label span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(255,255,255,.72);
  margin-top: 0.35rem;
  letter-spacing: 0.02em;
}

/* placeholder tiles (awaiting real samples) */
.ph-tile {
  flex: 0 0 auto;
  height: var(--tile-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
}
.ph-story { aspect-ratio: 9 / 16; }
.ph-grid { aspect-ratio: 1 / 1; }
.ph-tile span { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.ph-tile small { font-size: 0.72rem; }
/* clickable article headline cards (journalism) */
.article-card {
  flex: 0 0 auto;
  width: min(300px, 80vw);
  height: var(--tile-h);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  transition: border-color .25s ease, transform .25s ease;
}
.article-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.article-pub {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.article-head {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.06;
  letter-spacing: -0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.article-date { font-size: 0.8rem; color: var(--muted); }
.article-cta { margin-top: auto; font-size: 0.85rem; font-weight: 500; color: var(--accent); }
.work-earlier {
  margin-top: 1.8rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* ---------- ABOUT ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); }
.about-lead p {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.about-body p { color: var(--muted); max-width: 62ch; }
.about-body p + p { margin-top: 1.2rem; }

/* ---------- SERVICES (sticky stack) ---------- */
.stack { position: relative; }
.stack-card {
  position: sticky;
  top: calc(var(--nav-h) + var(--i) * 4.2rem);
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: start;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(1.8rem, 4vw, 3rem);
  min-height: clamp(15rem, 34vh, 20rem);
  box-shadow: 0 -18px 40px -34px rgba(0,0,0,0.55);
}
.stack-card + .stack-card { margin-top: 1.1rem; }
.stack-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: 0.5rem;
}
.stack-content h3 {
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.01em;
  line-height: 1;
  margin-bottom: 1rem;
}
.stack-content p {
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.18rem);
  max-width: 46ch;
}

/* ---------- CREDENTIALS ---------- */
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 5rem); }
.cred-heading {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.cred-list { list-style: none; display: flex; flex-direction: column; }
.cred-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "title year" "org year";
  gap: 0.15rem 1rem;
  padding: 1.15rem 0;
  border-top: 1px solid var(--line);
}
.cred-list li:last-child { border-bottom: 1px solid var(--line); }
.cred-title { grid-area: title; font-size: 1.35rem; letter-spacing: -0.005em; line-height: 1.2; }
.cred-org { grid-area: org; color: var(--muted); font-size: 0.92rem; }
.cred-year {
  grid-area: year;
  align-self: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- CREDENTIALS TIMELINE ---------- */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-fill {
  position: absolute;
  left: 5px;
  top: 6px;
  width: 2px;
  height: 0;
  background: var(--ink);
  z-index: 1;
}
.tl-item {
  position: relative;
  display: flex;
  gap: clamp(1.1rem, 3vw, 2rem);
  align-items: flex-start;
  padding: clamp(1.5rem, 3.5vh, 2.4rem) 0;
}
.tl-item + .tl-item { border-top: 1px solid var(--line); }
.tl-node {
  flex: 0 0 12px;
  width: 12px;
  height: 12px;
  margin-top: 0.35em;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--muted);
  position: relative;
  z-index: 2;
  transition: background .35s ease, border-color .35s ease, transform .35s ease;
}
.tl-item.in-view .tl-node { background: var(--accent); border-color: var(--accent); transform: scale(1.18); }
.tl-content {
  flex: 1;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: clamp(0.6rem, 2vw, 1.8rem);
  align-items: baseline;
}
.tl-year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tl-title {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.1vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.tl-org { display: block; margin-top: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.js .tl-content { opacity: 0; transform: translateX(16px); }
.tl-item.in-view .tl-content {
  opacity: 1;
  transform: none;
  transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- CONTACT ---------- */
.contact-pitch {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin-bottom: 2rem;
}
.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.15rem;
  transition: border-color .25s ease, color .25s ease;
}
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact-socials {
  list-style: none;
  display: flex;
  gap: 1.6rem;
  margin-top: 2.2rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.contact-socials a { color: var(--muted); border-bottom: 1px solid transparent; padding-bottom: 2px; transition: color .2s ease, border-color .2s ease; }
.contact-socials a:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- FOOTER ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}
.footer a { transition: color .2s ease; }
.footer a:hover { color: var(--ink); }

/* ---------- REVEAL (hero entrance) ---------- */
.js .hero .reveal { opacity: 0; transform: translateY(16px); }
.hero.in .reveal {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.hero.in .reveal:nth-child(1) { transition-delay: .00s; }
.hero.in .reveal:nth-child(2) { transition-delay: .08s; }
.hero.in .reveal:nth-child(3) { transition-delay: .16s; }
.hero.in .reveal:nth-child(4) { transition-delay: .24s; }
.hero.in .reveal:nth-child(5) { transition-delay: .32s; }

/* scroll-triggered reveals */
.js .rise { opacity: 0; transform: translateY(28px); }
.rise.in-view {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1);
}

/* ---------- CUSTOM CURSOR ---------- */
.cursor-dot, .cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  html.cursor-on, html.cursor-on * { cursor: none !important; }
  html.cursor-on .cursor-dot,
  html.cursor-on .cursor-ring {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    pointer-events: none;
    border-radius: 50%;
    mix-blend-mode: difference;
    will-change: transform;
  }
  html.cursor-on .cursor-dot { width: 7px; height: 7px; background: #fff; }
  html.cursor-on .cursor-ring {
    width: 34px;
    height: 34px;
    border: 1px solid #fff;
    transition: width .28s ease, height .28s ease, background-color .28s ease, opacity .2s ease;
  }
  html.cursor-hover .cursor-ring { width: 60px; height: 60px; background: rgba(255,255,255,.1); }
  html.cursor-hidden .cursor-dot,
  html.cursor-hidden .cursor-ring { opacity: 0; }
}

/* ---------- FOCUS ---------- */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stack-card { position: static; box-shadow: none; }
  .js .hero .reveal { opacity: 1; transform: none; }
  .js .hero .hero-headline .line > span { transform: none !important; }
  .js .rise { opacity: 1; transform: none; }
  .js .tl-content { opacity: 1; transform: none; }
  .marquee-track, .status-dot { animation: none !important; }
  * { transition: none !important; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 780px) {
  .nav-links { gap: 0.9rem; font-size: 0.85rem; }
  .nav-links a:not(.nav-cta) { display: none; }

  .work-gallery-inner { justify-content: flex-start; gap: 0.85rem; }

  .work-link {
    grid-template-columns: 1.8rem 1fr auto;
    grid-template-areas: "num body tog" ".   desc desc";
    gap: 0.5rem 1rem;
    row-gap: 0.7rem;
  }
  .work-num { grid-area: num; }
  .work-body { grid-area: body; }
  .work-desc { grid-area: desc; }
  .work-toggle { grid-area: tog; align-self: start; }

  .about-grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .cred-grid { grid-template-columns: 1fr; }
  .stack-card { grid-template-columns: 1fr; gap: 0.6rem; min-height: 0; }
  .stack-num { padding-top: 0; }
}
