/* ==========================================================================
   Anouk van Kampen Wieling — portfolio
   --------------------------------------------------------------------------
   Written to be read top to bottom:
     1. Tokens          colour, type and spacing scales
     2. Base            reset and element defaults
     3. Shell           wordmark, navigation rail, footer
     4. Collage         the off-grid photo layout
     5. Pages           home, projects, project, about, 404
     6. Lightbox
     7. Motion          all of it subtle, and opt-out aware
   ========================================================================== */

/* 1. Tokens ============================================================== */

:root {
  /* Near-black rather than #000, and every softer tone is that same ink at a
     lower opacity. Hierarchy then comes from value rather than from weight,
     which is what keeps a page of small type looking calm. */
  --paper:     #ffffff;
  --ink:       #0d0d0c;
  /* Three steps, all of which clear WCAG AA (4.5:1) for small text on both
     --paper and --wash. The previous faint tone was 2.67:1 and failed at every
     size, which mattered because the dates, credits and section labels are all
     set in it. */
  --ink-soft:  rgba(13, 13, 12, 0.75);   /*  8.9:1 on white */
  --ink-faint: rgba(13, 13, 12, 0.62);   /*  5.5:1 on white */
  --rule:      rgba(13, 13, 12, 0.13);   /*  hairlines only, never text */
  --rule-strong: rgba(13, 13, 12, 0.45); /*  3.1:1, for borders that carry meaning */
  --wash:      #f5f4f2;

  /* Two registers only: a sober text serif for names and titles, a neutral
     grotesque for everything functional. Both are self-hosted from
     /assets/fonts, declared in fonts.css. */
  --display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* Fluid type: the clamp middle value is the viewport-relative term, so these
     scale continuously instead of stepping at breakpoints. */
  --t-hero:  clamp(2.75rem, 7.5vw, 6rem);
  --t-lede:  clamp(1.6rem, 3.6vw, 3rem);
  --t-title: clamp(1.75rem, 3.2vw, 2.75rem);
  --t-sub:   clamp(1.05rem, 1.5vw, 1.3rem);
  --t-body:  clamp(0.975rem, 0.35vw + 0.9rem, 1.0625rem);
  --t-small: 0.8125rem;
  --t-label: 0.6875rem;

  --gutter: clamp(1.25rem, 4vw, 4rem);
  --rail: 4.5rem;        /* the vertical navigation strip on the right */
  --measure: 34rem;      /* comfortable reading width for body copy */

  --ease: ease-out;
  --fast: 200ms;
  --state: 400ms;        /* drawers, overlays — the reference sites' cadence */
  --slow: 620ms;
}

/* 2. Base ================================================================ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Deliberately not `scroll-behavior: smooth`. The collage flows in CSS
     columns, so tab order cannot match visual order, and animating each
     backwards jump made keyboard traversal lurch up and down the page. */
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: 0.004em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 1.5px solid var(--ink);
  outline-offset: 3px;
}

/* Available to assistive technology, absent from the visual design. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 100;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--t-small);
}

/* A small caps-and-tracking label, used for every section heading. */
.section-label {
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Placeholder copy that still needs Anouk's input. Deliberately visible. */
.todo,
.todo-inline {
  color: var(--ink-soft);
}
.todo {
  padding-left: 1rem;
  border-left: 2px solid var(--rule);
}
.todo__tag,
.todo-inline {
  display: inline-block;
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.todo__tag { margin-right: 0.6rem; }
.todo-inline {
  padding: 0.1em 0.45em;
  background: var(--wash);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.9em;
}

/* 3. Shell =============================================================== */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.4vw, 2rem) calc(var(--rail) + var(--gutter)) clamp(1.1rem, 2.4vw, 2rem) var(--gutter);
  pointer-events: none;
}
.masthead > * { pointer-events: auto; }

/* A soft white fade so the wordmark stays legible over photographs. */
.masthead::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--paper) 35%, transparent);
  opacity: 0.94;
  pointer-events: none;
  z-index: -1;
}

.wordmark {
  font-family: var(--display);
  font-size: var(--t-sub);
  line-height: 1.15;
  letter-spacing: 0.002em;
  /* One line wherever it fits. Constraining the width made it break after
     "Kampen", which reads as a mistake rather than a considered lockup. */
  text-wrap: balance;
}

/* The navigation rail.
   A narrow fixed strip down the right edge with the labels set vertically —
   `writing-mode` plus a half turn makes them read bottom-to-top without
   absolutely positioning anything, and screen readers and find-in-page still
   see ordinary text. Below 860px it becomes a drawer instead. */
.nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  width: var(--rail);
  display: grid;
  place-content: center;
  border-left: 1px solid var(--rule);
  background: var(--paper);
}

.nav__list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 4vh, 3rem);
}

.nav__list a {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--fast) var(--ease);
}

/* The current page is marked with a rule alongside the label rather than an
   underline, which vertical text handles badly. */
.nav__list a::after {
  content: '';
  display: block;
  width: 1px;
  height: 100%;
  /* Physical properties on purpose: under `writing-mode: vertical-rl` the
     logical inline axis is vertical, so margin-inline-start would push the
     rule along the text rather than away from it. */
  margin-left: 0.45rem;
  background: currentColor;
  transform: scaleY(0);
  /* The link is rotated a half turn, so `bottom` is the visual top. */
  transform-origin: bottom;
  transition: transform var(--fast) var(--ease);
}

.nav__list a:hover,
.nav__list a:focus-visible,
.nav__list a[aria-current='page'] { color: var(--ink); }

.nav__list a:hover::after,
.nav__list a[aria-current='page']::after { transform: scaleY(1); }

.nav-toggle { display: none; }

main {
  /* Clears the fixed wordmark above and the navigation rail to the right. */
  padding: clamp(6rem, 14vh, 10rem) calc(var(--rail) + var(--gutter)) 0 var(--gutter);
}

.footer {
  margin-top: clamp(6rem, 16vh, 12rem);
  padding: clamp(2.5rem, 6vh, 4rem) calc(var(--rail) + var(--gutter)) clamp(2rem, 5vh, 3rem) var(--gutter);
  border-top: 1px solid var(--rule);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.footer__name {
  font-family: var(--display);
  font-size: var(--t-sub);
  line-height: 1.25;
}
.footer__name span {
  font-family: var(--sans);
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}
.footer__links a,
.footer__meta {
  font-size: var(--t-small);
  color: var(--ink-soft);
}
.footer__links a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.footer__links a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* 4. Collage ============================================================= */

/* CSS columns rather than a grid: it lets tall and wide photographs interlock,
   which is what keeps the page from reading as rows of tidy boxes. */
.collage__list {
  columns: 3;
  column-gap: clamp(1.25rem, 3vw, 3.5rem);
}

.collage__item {
  break-inside: avoid;
  /* Width and both offsets come from the template as custom properties.
     The top offset has to be padding, not margin: CSS fragmentation truncates
     margins that sit against a column break, so a margin here would be
     silently dropped on exactly the items that start a column — the ones the
     stagger is for. */
  width: var(--w, 100%);
  margin-left: var(--x, 0);
  padding-top: calc(var(--top, 0) * 1vh);
  margin-bottom: calc(var(--space, 4) * 1vh + 1.5rem);
}

/* A neutral block behind each photo, so a slow connection shows a considered
   empty frame rather than a collapsing layout. */
.tile__frame,
.shot,
.card__frame,
.strip__frame {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--wash);
}

.tile__img,
.shot__img,
.card__img,
.strip__img {
  width: 100%;
  height: auto;
}

/* 5. Pages =============================================================== */

/* -- Home ---------------------------------------------------------------- */

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: clamp(4rem, 12vh, 9rem);
}
.intro__title {
  max-width: 14ch;
  font-family: var(--display);
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.intro__aside {
  /* Sits on the baseline of the display type rather than under it. */
  padding-bottom: 0.5rem;
}
.intro__text {
  max-width: 32ch;
  color: var(--ink-soft);
}
.intro__more {
  margin-top: 1.25rem;
  font-size: var(--t-small);
}
.intro__more a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}

.collage > .section-label {
  margin-bottom: 2rem;
}

.tile__caption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.7rem;
  margin-top: 0.75rem;
}
.tile__title {
  font-family: var(--display);
  font-size: var(--t-sub);
  line-height: 1.2;
}
.tile__meta {
  font-size: var(--t-small);
  color: var(--ink-faint);
}

.cta {
  margin-top: clamp(3rem, 8vh, 6rem);
}
.cta__link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--display);
  font-size: var(--t-title);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--fast) var(--ease);
}
.cta__link:hover { border-color: var(--ink); }
.cta__count {
  font-family: var(--sans);
  font-size: var(--t-label);
  color: var(--ink-faint);
}

/* -- Projects index ----------------------------------------------------- */

.page-head {
  max-width: var(--measure);
  margin-bottom: clamp(3rem, 9vh, 6rem);
}
.page-head__title {
  font-family: var(--display);
  font-size: var(--t-hero);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.015em;
}
.page-head__note {
  margin-top: 1.25rem;
  color: var(--ink-soft);
}

/* The calm counterpart to the home page: an aligned grid, no offsets. */
.index__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem) clamp(1.25rem, 3vw, 3rem);
}

.card__frame {
  aspect-ratio: 4 / 5;
}
.card__img {
  height: 100%;
  object-fit: cover;
}
.card__frame--empty {
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule);
  background: var(--paper);
}

.card__body {
  display: grid;
  gap: 0.15rem;
  margin-top: 0.85rem;
}
.card__title {
  font-family: var(--display);
  font-size: var(--t-sub);
  line-height: 1.2;
}
.card__meta,
.card__year {
  font-size: var(--t-small);
  color: var(--ink-faint);
}

/* -- Project page ------------------------------------------------------- */

.project__head {
  max-width: 30ch;
  margin-bottom: clamp(2rem, 5vh, 3.5rem);
}
.project__year {
  margin-bottom: 0.75rem;
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.project__title {
  font-family: var(--display);
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.project__role {
  margin-top: 0.85rem;
  font-size: var(--t-small);
  color: var(--ink-soft);
}

.project__text {
  max-width: var(--measure);
  margin-bottom: clamp(3.5rem, 10vh, 7rem);
}
.project__text p + p { margin-top: 1.1rem; }

.credits {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.credits__row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.5rem 1.5rem;
  padding: 0.45rem 0;
  font-size: var(--t-small);
}
.credits dt {
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.credits dd { margin: 0; }

.shot {
  width: 100%;
  cursor: zoom-in;
}

.empty {
  padding: 3rem 0;
  color: var(--ink-faint);
}

/* Prev / all / next */
.pager {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: clamp(3rem, 9vh, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.pager__link {
  display: grid;
  gap: 0.2rem;
  max-width: 14rem;
}
.pager__link--next { text-align: right; }
.pager__dir {
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.pager__name {
  font-family: var(--display);
  font-size: var(--t-sub);
  line-height: 1.2;
}
.pager__index {
  font-size: var(--t-small);
  color: var(--ink-soft);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
}
.pager__index:hover { border-color: var(--ink); }

/* Horizontally scrolling strip of the other projects. Horizontal movement is
   confined to this one component so it never fights the page scroll. */
.strip {
  margin-top: clamp(4rem, 12vh, 8rem);
  /* Break out of main's padding so the strip can run to the screen edge. */
  margin-right: calc((var(--rail) + var(--gutter)) * -1);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}
.strip__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-right: calc(var(--rail) + var(--gutter));
}
.strip__hint {
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.strip__list {
  display: flex;
  gap: clamp(1rem, 2vw, 2rem);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 1rem;
  /* Room to scroll the last card clear of the navigation rail. */
  padding-right: calc(var(--rail) + var(--gutter));
  scrollbar-width: thin;
  overscroll-behavior-x: contain;
}
.strip__item {
  flex: 0 0 clamp(9rem, 20vw, 15rem);
  scroll-snap-align: start;
}
.strip__frame { aspect-ratio: 4 / 5; }
.strip__img {
  height: 100%;
  object-fit: cover;
}
.strip__title {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--display);
  font-size: 1.0625rem;
  line-height: 1.2;
}
.strip__year {
  display: block;
  font-size: var(--t-small);
  color: var(--ink-faint);
}

/* -- About -------------------------------------------------------------- */

.about__lede {
  max-width: 26ch;
  margin-bottom: clamp(3rem, 8vh, 5rem);
  font-family: var(--display);
  font-size: var(--t-lede);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.about__grid {
  display: grid;
  grid-template-columns: minmax(0, var(--measure)) minmax(0, 16rem);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.about__bio p + p { margin-top: 1.1rem; }
.about__download {
  margin-top: 1.75rem;
  font-size: var(--t-small);
}
.about__download a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
}

.about__aside {
  display: grid;
  gap: 2.5rem;
}
.practice__list,
.contact__list {
  margin-top: 1rem;
  display: grid;
  gap: 0.4rem;
  font-size: var(--t-small);
}
.practice__list li { color: var(--ink-soft); }
.contact__list a {
  padding-bottom: 2px;
  border-bottom: 1px solid var(--rule);
  transition: border-color var(--fast) var(--ease);
}
.contact__list a:hover { border-color: var(--ink); }
.contact__place { color: var(--ink-faint); }

.portrait {
  margin-top: clamp(3rem, 8vh, 5rem);
  max-width: 34rem;
}

.cv {
  margin-top: clamp(4rem, 12vh, 8rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule);
}
.cv__grid {
  display: grid;
  gap: clamp(2.5rem, 6vh, 4rem);
}
.cv__list { margin-top: 1.25rem; }
.cv__row {
  display: grid;
  grid-template-columns: 9rem minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--rule);
  font-size: var(--t-small);
}
.cv__years { color: var(--ink-faint); }
.cv__role { color: var(--ink); }
.cv__org { color: var(--ink-soft); }
.cv__note {
  grid-column: 2 / -1;
  color: var(--ink-faint);
}

/* -- 404 ---------------------------------------------------------------- */

.notfound { max-width: var(--measure); }
.notfound__code {
  font-family: var(--display);
  font-size: var(--t-hero);
  line-height: 1;
  color: var(--ink-faint);
}
.notfound__title {
  margin-top: 0.5rem;
  font-family: var(--display);
  font-size: var(--t-title);
  font-weight: 400;
  line-height: 1.05;
}
.notfound__text {
  margin-top: 1.25rem;
  color: var(--ink-soft);
}
.notfound__text a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
.notfound__suggest { margin-top: 3rem; }
.notfound__suggest ul {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: var(--t-sub);
}

/* 6. Lightbox ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  /* minmax(0, 1fr) rather than 1fr: a bare `1fr` track refuses to shrink below
     its content's minimum, so a tall photograph pushed the whole middle row
     past the bottom of the screen and took the Previous/Next buttons with it. */
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  /* Hiding waits for the fade to finish; showing happens at once, so that
     focus() has something rendered to move to. */
  transition: opacity var(--fast) var(--ease), visibility 0s linear var(--fast);
}
.lightbox[data-open='true'] {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--fast) var(--ease), visibility 0s linear 0s;
}

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 1.75rem) var(--gutter);
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.lightbox__close {
  color: var(--ink);
  font-size: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.lightbox__stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

/* Absolutely positioned and told to contain, so the whole photograph always
   fits inside the space left between the bar and the buttons, whatever its
   shape. A percentage max-height would not do: against a flexible grid track
   the browser is entitled to treat it as `none`, which is what let portrait
   images overflow. */
.lightbox__img {
  position: absolute;
  inset: 0 var(--gutter);
  width: calc(100% - var(--gutter) * 2);
  height: 100%;
  object-fit: contain;
}

.lightbox__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: clamp(1rem, 2.4vw, 1.75rem) var(--gutter);
}
.lightbox__nav {
  font-size: var(--t-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color var(--fast) var(--ease);
}
.lightbox__nav:hover { color: var(--ink); }
.lightbox__nav[disabled] {
  color: var(--rule);
  cursor: default;
}

body[data-lightbox-open='true'],
body[data-nav-open] { overflow: hidden; }

/* Landscape phones have very little height to spare. */
@media (max-height: 520px) {
  .lightbox__bar,
  .lightbox__controls { padding-block: 0.6rem; }
}

/* 7. Motion ============================================================== */

/* Photographs fade up once decoded, so the page assembles calmly instead of
   snapping in. Everything else is a hover or focus response — nothing moves
   without the visitor asking it to. */
.tile__img,
.shot__img,
.card__img,
.strip__img {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--slow) var(--ease), transform var(--slow) var(--ease);
}
.is-loaded .tile__img,
.is-loaded .shot__img,
.is-loaded .card__img,
.is-loaded .strip__img,
.no-js .tile__img,
.no-js .shot__img,
.no-js .card__img,
.no-js .strip__img {
  opacity: 1;
  transform: none;
}

.tile__frame,
.card__frame,
.strip__frame,
.shot {
  transition: opacity var(--fast) var(--ease);
}
.tile:hover .tile__frame,
.card a:hover .card__frame,
.strip__item a:hover .strip__frame,
.shot:hover { opacity: 0.86; }

.tile__title,
.card__title,
.strip__title {
  transition: opacity var(--fast) var(--ease);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tile__img,
  .shot__img,
  .card__img,
  .strip__img {
    opacity: 1;
    transform: none;
  }
}

/* 8. Responsive ========================================================== */

@media (max-width: 1100px) {
  .collage__list { columns: 2; }
  .about__grid { grid-template-columns: minmax(0, 1fr); }
  .cv__row { grid-template-columns: 7.5rem minmax(0, 1fr); }
  .cv__note { grid-column: 2; }
}

/* Below this the navigation becomes a drawer, freeing the full width. */
@media (max-width: 860px) {
  :root { --rail: 0rem; }

  main { padding-right: var(--gutter); }
  .masthead { padding-right: var(--gutter); }
  .footer { padding-right: var(--gutter); }
  .strip { margin-right: calc(var(--gutter) * -1); }
  .strip__head,
  .strip__list { padding-right: var(--gutter); }

  .nav-toggle {
    display: block;
    font-size: var(--t-label);
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }
  .nav-toggle[aria-expanded='true'] { position: relative; z-index: 60; }

  .nav {
    inset: 0;
    width: auto;
    border-left: 0;
    z-index: 55;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--state) var(--ease), visibility 0s linear var(--state);
  }
  .nav[data-open='true'] {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--state) var(--ease), visibility 0s linear 0s;
  }
  .nav__list {
    flex-direction: column;
    gap: 0.75rem;
  }
  .nav__list a {
    writing-mode: horizontal-tb;
    transform: none;
    font-family: var(--display);
    font-size: var(--t-title);
    letter-spacing: 0;
    text-transform: none;
    color: var(--ink);
  }
  .nav__list a::after { display: none; }

  /* No JavaScript means no way to open a drawer, so fall back to a plain
     visible list rather than navigation nobody can reach. */
  .no-js .nav-toggle { display: none; }
  .no-js .nav {
    position: static;
    opacity: 1;
    visibility: visible;
    place-content: start;
    padding: 0 var(--gutter) 2rem;
  }
  .no-js .nav__list { align-items: flex-start; }
  .no-js .nav__list a { font-size: var(--t-sub); }
}

@media (max-width: 860px) {
  .intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }
  .intro__title { max-width: 18ch; }
  .intro__aside { padding-bottom: 0; }
}

@media (max-width: 700px) {
  .collage__list { columns: 1; }

  /* The offsets are a desktop luxury; on one column they only waste width. */
  .collage__item {
    width: 100%;
    margin-left: 0;
    padding-top: 0;
    margin-bottom: 2.5rem;
  }

  .pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .pager__link--next { text-align: right; }
  .pager__index {
    grid-column: 1 / -1;
    order: -1;
    justify-self: start;
  }

  .credits__row { grid-template-columns: 1fr; gap: 0.1rem; }
  .cv__row { grid-template-columns: 1fr; }
  .cv__note { grid-column: 1; }
}

@media print {
  .masthead, .nav, .nav-toggle, .strip, .pager, .lightbox { display: none; }
  main { padding: 0; }
  body { font-size: 10pt; }
}
