/* ============================================================
   Pernilla Glaser — Japandi / Scandinavian minimal
   Black & white, grotesque typography, hairline rules.
   ============================================================ */

:root {
  --paper: #ffffff;
  --paper-soft: #f5f4f1;      /* warm off-white — the Japandi whisper */
  --ink: #101010;
  --ink-soft: #5f5e5a;
  --line: rgba(16, 16, 16, 0.16);
  --wood: #cbb9a2;            /* muted oak, used only in the hero motif */
  --black: #0e0e0e;
  --black-text: #f4f3f0;
  --black-muted: rgba(244, 243, 240, 0.55);
  --black-line: rgba(244, 243, 240, 0.18);
  --accent: #f43b50;          /* the one splash of colour — used sparingly */
  --display: "Inter Tight", "Inter", -apple-system, sans-serif;
  --sans: "Inter", -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 450;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.03em;
}

h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h1 em, h2 em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
}

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

/* ===== Navigation ===== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: box-shadow 0.4s var(--ease);
}
/* blur lives on a pseudo-element: backdrop-filter on .nav itself would
   turn it into a containing block and trap the fixed mobile menu inside it */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
}
.nav.is-scrolled::before { opacity: 1; }
.nav.is-scrolled { box-shadow: 0 1px 0 var(--line); }

/* At the very top the nav floats over the dark hero → light text.
   Once scrolled, the light blur panel appears → revert to dark text. */
.nav:not(.is-scrolled) .nav__logo,
.nav:not(.is-scrolled) .nav__dot,
.nav:not(.is-scrolled) .nav__links a { color: var(--paper); }
.nav:not(.is-scrolled) .nav__links a:not(.nav__cta)::after { background: var(--accent); }
.nav:not(.is-scrolled) .nav__cta { border-color: var(--paper); }
.nav:not(.is-scrolled) .nav__cta:hover { background: var(--paper); color: var(--ink) !important; }
.nav__inner {
  position: relative;
  width: min(1320px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  transition: padding 0.4s var(--ease);
}
.nav.is-scrolled .nav__inner { padding: 1rem 0; }
.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.nav__logo-img {
  height: 30px;
  width: auto;
  display: block;
  transition: filter 0.4s var(--ease);
}
/* Over the dark hero (nav not yet scrolled) the black half of the mark would
   disappear — show it white until the nav goes light on scroll. */
.nav:not(.is-scrolled) .nav__logo-img { filter: brightness(0) invert(1); }
.nav.is-scrolled .nav__logo-img { height: 26px; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav__links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav__links a:not(.nav__cta):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__cta {
  padding: 0.6rem 1.3rem;
  border: 1px solid var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.nav__cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav__toggle { display: none; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn--primary {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--ghost {
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn--ghost:hover { border-color: var(--ink); }
.btn--onblack {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
}
.btn--onblack:hover { background: transparent; color: var(--paper); }
.btn--ghost-light {
  color: var(--black-text);
  border: 1px solid var(--black-line);
}
.btn--ghost-light:hover { border-color: var(--black-text); }

/* ===== Hero — split panel that covers the photo on scroll ===== */
.hero {
  position: relative;
  height: 200vh;            /* scroll runway for the cover effect */
  background: var(--black);
}
.hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
/* Photo fills the whole stage; the panel sits on top and grows to cover it */
.hero__media {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 1;
  overflow: hidden;
}
.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 20%;   /* bias toward her face, and right of the panel edge */
  filter: grayscale(1) contrast(1.04);
  will-change: transform;
}
.hero__panel {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 42vw;              /* JS drives this from 42vw → 100vw */
  background: var(--black);
  z-index: 2;
  will-change: width;
}
/* Name + roles: anchored to the left column so they don't drift as the panel grows */
.hero__id {
  position: absolute;
  left: 0;
  top: 0;
  width: 42vw;
  height: 100%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  padding: 2rem clamp(1.6rem, 5vw, 4rem);
  color: var(--black-text);
}
.hero__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 4.6vw, 4.2rem);
  letter-spacing: -0.03em;
  line-height: 1;
}
.hero__roles {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin-top: 1.3rem;
}
.hero__roles li {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  letter-spacing: -0.01em;
  color: var(--accent);
}
.hero__roles li:not(:last-child)::after {
  content: "·";
  margin: 0 0.7em;
  color: var(--accent);
  opacity: 0.5;
}
.hero__desc {
  margin-top: 2.2rem;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.62;
  color: rgba(244, 243, 240, 0.66);
}
/* Tagline: fades in centred on the full-black stage as the cover completes */
.hero__tagline {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.4rem;
  text-align: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
}
.hero__tagline h1 {
  max-width: 16ch;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  color: var(--black-text);
}
.hero__tagline h1 em { font-style: normal; font-weight: inherit; }
.hero__actions { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 5rem;
  width: 1px;
  height: 56px;
  background: var(--black-line);
  overflow: hidden;
  z-index: 5;
}
.hero__scroll span {
  position: absolute;
  top: -50%;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--accent);
  animation: scrollHint 2.2s var(--ease) infinite;
}
@keyframes scrollHint {
  0% { top: -50%; }
  100% { top: 110%; }
}

/* line-reveal on load (name) */
.reveal-line { display: block; overflow: hidden; padding-bottom: 0.12em; margin-bottom: -0.12em; }
.reveal-line > span {
  display: block;
  transform: translateY(110%);
  transition: transform 1s var(--ease) 0.2s;
}
body.is-loaded .reveal-line > span { transform: translateY(0); }

/* ===== Scroll reveals ===== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ===== Section labels ===== */
.section-num {
  font-weight: 400;
  color: var(--ink-soft);
  margin-right: 0.6rem;
}
.intro__label {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}
.intro__label--light { color: var(--black-text); }
.intro__label--light .section-num { color: var(--black-muted); }
.section-head { margin-bottom: 4rem; }
.section-head .intro__label { margin-bottom: 1.6rem; }

/* ===== Intro ===== */
.intro { padding: 9rem 0; }
.intro__grid {
  display: grid;
  grid-template-columns: 1fr 2.2fr;
  gap: 3rem;
  align-items: start;
}
.intro__statement {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.32;
  letter-spacing: -0.02em;
  margin-bottom: 1.8rem;
}
.intro__statement em { font-style: italic; font-weight: 300; }
.intro__support {
  max-width: 38em;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ===== Practice ===== */
.practice {
  padding: 8rem 0;
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.practice__list { border-top: 1px solid var(--ink); }
.practice__item {
  display: grid;
  grid-template-columns: 5rem 1fr 3rem;
  align-items: center;
  gap: 2rem;
  padding: 2.5rem 0.6rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease), padding-left 0.4s var(--ease);
  cursor: default;
}
.practice__item:hover { background: var(--paper); padding-left: 1.6rem; }
.practice__index {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}
.practice__text h3 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.practice__text p { color: var(--ink-soft); max-width: 46em; font-size: 0.96rem; }
.practice__arrow {
  font-size: 1.25rem;
  color: var(--ink);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.practice__item:hover .practice__arrow { opacity: 1; transform: translateX(0); }

/* ===== Clients stage — sticky white stage, one name at a time ===== */
.clients-stage {
  /* runway: 100vh stage + 45vh of scroll per client (6 clients) */
  height: calc(100vh + 270vh);
  position: relative;
  background: var(--paper);
}
.clients-stage__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.clients-stage__label {
  position: absolute;
  top: 14vh;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.clients-stage__names {
  position: absolute;
  inset: 0;
  perspective: 900px;
}
.clients-stage__name {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 6vw;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6vw, 5.4rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
  opacity: 0;
  will-change: transform, opacity;
}

/* ===== Writing (black section) ===== */
.writing {
  padding: 8.5rem 0;
  background: var(--black);
  color: var(--black-text);
}
.writing__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--black-line);
  border: 1px solid var(--black-line);
}
.card {
  padding: 2.4rem;
  background: var(--black);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
.card:hover { background: var(--paper); color: var(--ink); }
.card__date {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black-muted);
  transition: color 0.4s var(--ease);
}
.card:hover .card__date { color: var(--ink-soft); }
.card__title { font-size: 1.4rem; }
.card__excerpt {
  color: var(--black-muted);
  font-size: 0.95rem;
  flex-grow: 1;
  transition: color 0.4s var(--ease);
}
.card:hover .card__excerpt { color: var(--ink-soft); }
.card__link {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.card__link i {
  font-style: normal;
  display: inline-block;
  transition: transform 0.3s var(--ease);
}
.card:hover .card__link i { transform: translateX(5px); }

/* ===== Testimonials — auto-rotating carousel ===== */
.testimonials {
  padding: 7.5rem 0;
  background: var(--black);
  color: var(--black-text);
  overflow: hidden;
}
.testimonials__viewport { position: relative; }
/* Stack all slides in one grid cell so the track height follows the tallest
   one — stays correct if the quotes are edited later. */
.testimonials__track { display: grid; }
.testimonial {
  grid-area: 1 / 1;
  margin: 0;
  max-width: 52rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(60px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), visibility 0.7s;
}
.testimonial.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}
/* Outgoing slide exits to the left */
.testimonial.is-leaving {
  opacity: 0;
  visibility: visible;
  transform: translateX(-60px);
}
.testimonial__quote {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.6vw, 2.15rem);
  line-height: 1.34;
  letter-spacing: -0.02em;
  margin-bottom: 2.2rem;
}
.testimonial__quote::before { content: "“"; }
.testimonial__quote::after { content: "”"; }
.testimonial__quote em { font-style: normal; color: var(--accent); }
.testimonial__by { display: flex; flex-direction: column; gap: 0.4rem; }
.testimonial__name {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.testimonial__role {
  font-size: 0.92rem;
  color: var(--black-muted);
  max-width: 40ch;
}
.testimonials__dots {
  display: flex;
  gap: 0.7rem;
  margin-top: 3rem;
}
.testimonials__dot {
  width: 26px;
  height: 2px;
  padding: 0;
  border: 0;
  background: var(--black-line);
  cursor: pointer;
  transition: background 0.4s var(--ease);
}
.testimonials__dot.is-active { background: var(--accent); }

/* ===== Projects — mosaic gallery ===== */
.projects { padding: 8.5rem 0; }
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 10px;
}
.tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  text-decoration: none;
  background: var(--black);
  display: block;
}
.tile--big { grid-column: span 2; grid-row: span 2; }
.tile--wide { grid-column: span 2; aspect-ratio: 2 / 1; }
.tile--tall { grid-row: span 2; aspect-ratio: 1 / 2; }

/* Image tiles: the cover art carries its own title, so no text overlay.
   Grayscale by default, colour + zoom on hover; hairline frame defines
   light covers against the white section. */
.tile--img {
  border: 1px solid var(--line);
  background: var(--paper);
  isolation: isolate;   /* keep the duotone blend inside the tile */
}
.tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* lifted + lower contrast so the pink tint reads bright, not crimson */
  filter: grayscale(1) contrast(0.9) brightness(1.22);
  transition: filter 0.6s var(--ease), transform 0.7s var(--ease);
}
/* Pink duotone at rest — the greyscale art is tinted with the accent, then
   the tint lifts on hover to reveal the cover in full colour. */
.tile--img::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--accent);
  mix-blend-mode: color;
  opacity: 0.75;
  pointer-events: none;
  transition: opacity 0.6s var(--ease);
}
.tile--img:hover::after { opacity: 0; }
.tile--img:hover .tile__img { filter: grayscale(0); transform: scale(1.05); }
.tile--pos-bottom .tile__img { object-position: center bottom; }

/* Caption (typographic tiles only) */
.tile__caption {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2;
}
.tile__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.08rem;
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--black-text);
  overflow-wrap: anywhere;
  hyphens: auto;
}
.tile--big .tile__title { font-size: 1.7rem; }
.tile__tag {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Typographic tiles: title top-anchored, hairline border */
.tile--text {
  border: 1px solid var(--black-line);
  transition: background 0.4s var(--ease);
}
.tile--text:hover { background: #171717; }
.tile--text .tile__caption {
  top: 0;
  bottom: auto;
  height: 100%;
  justify-content: flex-start;
  padding: 1.5rem;
}
.tile--text .tile__title { order: 2; margin-top: auto; }
.tile--text .tile__tag { order: 1; }

/* Hover arrow — white with difference blend so it reads on light or dark covers */
.tile__arrow {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  z-index: 3;
  font-size: 1.15rem;
  line-height: 1;
  color: #ffffff;
  mix-blend-mode: difference;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.tile:hover .tile__arrow { opacity: 1; transform: translate(0, 0); }

/* ===== Lectures — filmed talks, embedded ===== */
.lectures {
  padding: 8.5rem 0;
  background: var(--black);
  color: var(--black-text);
}
/* Each lecture is a full-width row: title on top, then large video left + text right */
.lectures__grid {
  display: flex;
  flex-direction: column;
  gap: clamp(4.5rem, 8vw, 8rem);
}
.lecture__head { margin-bottom: clamp(1.6rem, 2.5vw, 2.4rem); }
.lecture__title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: -0.03em;
  line-height: 1.04;
}
.lecture__meta {
  margin-top: 1rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black-muted);
}
.lecture__body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.lecture__video {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--black-line);
  overflow: hidden;
}
.lecture__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.lecture__context {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.lecture__desc {
  color: rgba(244, 243, 240, 0.8);
  font-size: clamp(1rem, 1.15vw, 1.08rem);
  line-height: 1.68;
}

/* ===== The Book ===== */
.book {
  padding: 9rem 0;
  background: var(--paper-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.book__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.book__cover img {
  width: 100%;
  max-width: 440px;
  height: auto;
  display: block;
  box-shadow: 0 34px 70px -24px rgba(16, 16, 16, 0.42);
}
.book__body { max-width: 34rem; }
.book__body .intro__label { margin-bottom: 1.5rem; }
.book__title {
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);
  margin-bottom: 1.8rem;
}
.book__title em { font-style: italic; font-weight: 300; }
.book__blurb {
  color: var(--ink-soft);
  font-size: 1.02rem;
  margin-bottom: 1.1rem;
}
.book__quote {
  margin: 2.2rem 0 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
}
.book__quote p {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.42;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.book__quote cite {
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
}
.book__buy { margin-top: 2.4rem; }

/* ===== Contact ===== */
.contact {
  padding: 9rem 0;
  background: var(--black);
  color: var(--black-text);
}
.contact__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.contact__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
  border: 1px solid var(--black-line);
  display: block;
}
.contact .intro__label { margin-bottom: 1.6rem; }
.contact__title { font-size: clamp(2.6rem, 5.6vw, 4.4rem); margin-bottom: 1.8rem; }
.contact__lede {
  max-width: 36em;
  margin: 0 0 3rem;
  color: var(--black-muted);
}
.contact__email {
  display: inline-block;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.8vw, 1.9rem);
  letter-spacing: -0.02em;
  color: var(--black-text);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.3rem;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.contact__email:hover { color: var(--accent); border-color: var(--accent); }
.contact__links {
  margin-top: 3rem;
  display: flex;
  justify-content: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.contact__links a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}
.contact__links a:hover { color: var(--accent); }

/* ===== Footer ===== */
.footer {
  background: var(--black);
  color: var(--black-muted);
  border-top: 1px solid var(--black-line);
  padding: 1.6rem 0;
  font-size: 0.8rem;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__tag em { font-style: italic; }

/* ===== Mobile ===== */
@media (max-width: 760px) {
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--paper);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.5s var(--ease);
  }
  .nav__links.is-open { transform: translateY(0); }
  .nav__links a { font-size: 1.05rem; }
  /* The open menu overlay is always white — links must be dark regardless of
     the nav's over-hero (not-scrolled) white-text state. */
  .nav:not(.is-scrolled) .nav__links.is-open a { color: var(--ink); }
  .nav:not(.is-scrolled) .nav__links.is-open .nav__cta { border-color: var(--ink); }
  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 110;
    padding: 6px 0;
  }
  .nav__toggle span {
    width: 26px; height: 1.5px;
    background: var(--ink);
    transition: transform 0.35s var(--ease), background 0.35s var(--ease);
  }
  .nav__toggle.is-open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav__toggle.is-open span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }

  /* Mobile hero: the desktop cover effect rotated 90° — the black panel is
     docked at the bottom and swiping grows it upward over the photo.
     JS drives .hero__panel height (52svh → 100svh) instead of width. */
  .hero__sticky { height: 100svh; }
  .hero__photo { object-position: 62% 12%; }
  .hero__panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 52svh;
    will-change: height;
  }
  .hero__id {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 52svh;
    padding: 1.75rem 1.5rem;
  }
  .hero__scroll { display: none; }

  .intro__grid { grid-template-columns: 1fr; gap: 1.6rem; }
  .practice__item { grid-template-columns: 3.2rem 1fr; }
  .practice__arrow { display: none; }
  .writing__grid { grid-template-columns: 1fr; }
  .lectures__grid { gap: 4rem; }
  .lecture__body { grid-template-columns: 1fr; gap: 1.6rem; }
  .lecture__text { order: 2; }
  .book__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact__grid { grid-template-columns: 1fr; gap: 3rem; }
  .contact__media img { max-width: 340px; aspect-ratio: 4 / 5; }
  .book__cover img { max-width: 300px; margin: 0 auto; }
  .mosaic { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tile--big { grid-column: span 2; grid-row: span 2; }
  .tile--wide { grid-column: span 2; aspect-ratio: 2 / 1; }
  .tile__title { font-size: 1rem; }
  .tile--big .tile__title { font-size: 1.3rem; }
  .intro, .practice, .writing, .projects, .lectures, .book, .contact { padding: 5.5rem 0; }
  .footer__inner { justify-content: center; text-align: center; }
}

/* ===== Capture mode (?capture) — static layout for screenshots ===== */
html.capture .hero { height: 760px; }
html.capture .hero__sticky { position: relative; height: 760px; }
html.capture .reveal,
html.capture .reveal-line > span {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html.capture .hero__scroll { display: none; }
html.capture .clients-stage { height: auto; }
html.capture .clients-stage__sticky { position: static; height: auto; padding: 7rem 0 6rem; }
html.capture .clients-stage__label { position: static; margin-bottom: 3rem; }
html.capture .clients-stage__names {
  position: static;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
html.capture .clients-stage__name {
  position: static;
  opacity: 1 !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
