/* ==========================================================================
   Fares Dagher, Lighting Design
   One stylesheet. Quiet by design: the photography carries the colour.
   ========================================================================== */

@font-face {
  font-family: 'Instrument Sans';
  src: url(fonts/instrument-sans-latin-wght.adbdfd9a.woff2) format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  src: url(fonts/newsreader-latin-wght.e599ceb4.woff2) format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
    U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Colour */
  --paper: #f3f0ea;
  --ink: #1b1a18;
  --ink-soft: #3b3935;
  --muted: #6d6860;
  --rule: #d9d3c9;
  --night: #0c0b0a;
  --night-ink: #ece8e1;
  --night-muted: #9a958d;
  --night-rule: #2a2825;

  /* Type */
  --sans: 'Instrument Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --fs-label: 11.5px;
  --fs-small: 13.5px;
  --fs-body: clamp(15.5px, 0.25vw + 14.5px, 17px);
  --fs-lead: clamp(21px, 0.9vw + 16px, 30px);
  --fs-feature: clamp(30px, 2.6vw + 14px, 56px);
  --fs-title: clamp(52px, 8.4vw, 144px);
  --fs-display: clamp(44px, 6.4vw, 112px);

  /* Grid */
  --max: 1680px;
  --margin: clamp(20px, 4.4vw, 72px);
  --gutter: clamp(14px, 1.7vw, 28px);

  /* Vertical rhythm */
  --space-xs: 12px;
  --space-s: clamp(20px, 2.4vw, 36px);
  /* Height of the sticky header: its padding plus one line of nav. */
  --header-h: calc(2 * clamp(18px, 2.2vw, 30px) + 26px);
  --space-m: clamp(40px, 5vw, 80px);
  --space-l: clamp(72px, 9vw, 152px);
  --space-xl: clamp(104px, 14vw, 240px);

  color-scheme: light;
}

/* ------------------------------------------------------------------ Base */

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

html {
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------ Page transitions
   Moving between pages, the old page fades away and the new one settles in
   softly, while the header holds still. Browsers without cross-document
   view transitions, and visitors who prefer reduced motion, simply get the
   new page. */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  /* The home header sits over the hero and differs, so it fades with the page. */
  .site-header:not(.site-header--overlay) {
    view-transition-name: site-header;
  }

  ::view-transition-old(root) {
    animation: fd-page-out 0.28s cubic-bezier(0.4, 0, 1, 1) both;
  }

  ::view-transition-new(root) {
    animation: fd-page-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both;
  }

  /* Only the current-page marker changes; let it crossfade in place. */
  ::view-transition-group(site-header) {
    animation-duration: 0.4s;
  }
}

@keyframes fd-page-out {
  to {
    opacity: 0;
  }
}

@keyframes fd-page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

h1,
h2,
h3,
p,
dl,
dd,
ol,
ul,
figure {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 400;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

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

::selection {
  background: #1b1a18;
  color: var(--paper);
}

:focus-visible {
  outline: 1.5px solid currentColor;
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--margin);
  top: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-small);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Text links inside running copy */
.text a,
.lead a,
.cv a,
.plain-list a,
.arrow-link,
.site-footer a,
.contact-block a,
.contact-page a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  transition: text-decoration-color 0.25s ease;
}

.text a:hover,
.lead a:hover,
.cv a:hover,
.plain-list a:hover,
.arrow-link:hover,
.site-footer a:hover,
.contact-block a:hover,
.contact-page a:hover {
  text-decoration-color: currentColor;
}

.arrow-link::after {
  content: '\2002\2192';
  display: inline-block;
  text-decoration: none;
}

/* ------------------------------------------------------------ Typography */

.label {
  font-family: var(--sans);
  font-size: var(--fs-label);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.lead {
  font-family: var(--serif);
  font-size: var(--fs-lead);
  font-weight: 380;
  line-height: 1.36;
  letter-spacing: -0.006em;
  color: var(--ink);
  hanging-punctuation: first;
  text-wrap: pretty;
}

.lead + .lead {
  margin-top: 0.8em;
}

.caption {
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--muted);
  max-width: 40em;
}

/* ------------------------------------------------------------------ Grid */

.grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gutter);
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding-inline: var(--margin);
}

.grid > * {
  grid-column: 1 / -1;
  min-width: 0;
}

@media (min-width: 760px) {
  .grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------- Pictures */

.pic {
  display: block;
  background-color: var(--ph, transparent);
}

.pic img {
  width: 100%;
  height: auto;
}

/* Drawings and product shots on white paper print onto the page. The picture
   carries the paper colour itself so the blend never depends on what sits
   behind it (sticky or transformed parents create their own stacking context). */
.pic--blend {
  background-color: var(--paper);
  isolation: isolate;
}

.pic--blend img {
  mix-blend-mode: multiply;
}

/* ---------------------------------------------------------- Image viewer
   Home and project pages (main.js). A photograph opened large over a darkened
   page. It grows out of the photograph on the page and returns to it on
   closing, while the backdrop fades. Clicking the image zooms in and out;
   scrolling pushes it away (it moves with the gesture, and carries on and
   fades once pushed far enough); a click outside it or Escape closes it. */

.pic--zoom {
  cursor: pointer;
}

.viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(52px, 6vw, 80px) clamp(16px, 3vw, 48px);
  border: 0;
  background: transparent;
  color: var(--night-ink);
  overflow: hidden;
}

.viewer[open] {
  display: grid;
  place-items: center;
}

.viewer::backdrop {
  background: rgba(12, 11, 10, 0.94);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.viewer.is-shown::backdrop {
  opacity: 1;
}

/* Caption and Close arrive just after the image, and leave with it. */
.viewer__caption,
.viewer__close {
  opacity: 0;
  transition: opacity 0.25s ease;
}

.viewer.is-shown .viewer__caption,
.viewer.is-shown .viewer__close {
  opacity: 1;
  transition: opacity 0.4s ease 0.2s;
}

.viewer__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

.viewer__figure.is-settling {
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.3, 1), opacity 0.3s ease;
}

.viewer__img {
  display: block;
  max-width: none;
  background: var(--night) center / 100% 100% no-repeat;
  cursor: zoom-in;
}

.viewer.is-zoomed .viewer__img {
  cursor: zoom-out;
}

.viewer__img.is-zooming {
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.3, 1);
}

/* Drawings keep the paper they were drawn on. */
.viewer--drawing .viewer__img {
  background-color: #fff;
}

.viewer__caption {
  max-width: 40em;
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--night-muted);
  text-align: center;
}

.viewer.is-zoomed .viewer__caption {
  visibility: hidden;
}

.viewer__close {
  position: absolute;
  top: clamp(14px, 2vw, 26px);
  right: clamp(16px, 3vw, 48px);
  z-index: 1; /* stays above a zoomed image */
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--night-ink);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .viewer__img.is-zooming,
  .viewer::backdrop {
    transition: none;
  }
}

/* ---------------------------------------------------------------- Header
   Stays at the top of every page on a softly translucent paper band. A
   hairline appears once the page has scrolled (main.js). The band is a
   pseudo-element so its backdrop blur never becomes the containing block of
   the full-screen mobile menu inside the header. */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(243, 240, 234, 0.74);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled::before {
  border-bottom-color: var(--rule);
}

.site-header__inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  max-width: calc(var(--max) + 2 * var(--margin));
  margin-inline: auto;
  padding: clamp(18px, 2.2vw, 30px) var(--margin);
}

.brand,
.site-nav a,
.menu-button {
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.4;
}

.brand__name {
  font-weight: 600;
}

.brand__role {
  color: var(--muted);
  font-weight: 400;
}

.site-nav ul {
  display: flex;
  gap: clamp(20px, 2.4vw, 40px);
}

.site-nav a {
  position: relative;
  display: inline-block;
  padding-block: 4px;
}

.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

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

.menu-button {
  display: none;
  padding: 4px 0;
  margin: 0;
  border: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  cursor: pointer;
}

.menu-button__close {
  display: none;
}

/* Home: transparent over the hero, then the same paper band once the hero
   has scrolled away, with the name in it. */
.site-header--overlay {
  position: fixed;
  inset: 0 0 auto;
  color: #f4f1ec;
}

.site-header--overlay::before {
  opacity: 0;
}

.site-header--overlay .brand__role {
  color: rgba(244, 241, 236, 0.66);
}

.site-header--overlay.is-solid {
  color: var(--ink);
}

.site-header--overlay.is-solid::before {
  opacity: 1;
  border-bottom-color: var(--rule);
}

.site-header--overlay.is-solid .brand__role {
  color: var(--muted);
}

.brand--after-hero {
  visibility: hidden;
}

.is-solid .brand--after-hero,
.menu-open .brand--after-hero {
  visibility: visible;
}

/* Without JavaScript the home header simply scrolls away with the hero. */
html:not(.js) .site-header--overlay {
  position: absolute;
}

/* Small screens: a single "Menu" control opening a quiet full-screen list. */
@media (max-width: 759px) {
  .js .menu-button {
    display: block;
    position: relative;
    z-index: 2;
  }

  .js .site-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: var(--margin);
    padding-bottom: calc(var(--margin) + 12vh);
    background: var(--paper);
    color: var(--ink);
    visibility: hidden;
  }

  .js .site-nav ul {
    flex-direction: column;
    gap: 6px;
  }

  .js .site-nav a {
    font-size: 34px;
    font-weight: 400;
    letter-spacing: -0.015em;
    text-transform: none;
  }

  .js .brand {
    position: relative;
    z-index: 2;
  }

  .menu-open .site-nav {
    visibility: visible !important;
  }

  .menu-open .menu-button__open {
    display: none;
  }

  .menu-open .menu-button__close {
    display: inline;
  }

  .menu-open .site-header--overlay {
    color: var(--ink);
  }

  .menu-open .site-header--overlay .brand__role {
    color: var(--muted);
  }

  .menu-open body {
    overflow: hidden;
  }

  /* Without JavaScript the three links simply sit in the header. */
  html:not(.js) .site-header__inner {
    flex-wrap: wrap;
  }
}

/* ------------------------------------------------------------------ Hero */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: #f4f1ec;
}

.hero__media,
.hero__glow,
.hero__media .pic,
.hero__glow .pic,
.hero__media img,
.hero__glow img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__media img,
.hero__glow img {
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

/* The same photograph reduced to its light sources and the surfaces they
   strike. Seen only during the opening reveal. */
.hero__glow {
  display: none;
}

.hero__glow .pic {
  background: none;
}

.hero__glow img {
  filter: brightness(0.55) contrast(2.6) saturate(1.15);
}

/* Static shading so the type always reads against the photograph. */
.hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 8, 7, 0.42) 0%, rgba(9, 8, 7, 0) 20%),
    linear-gradient(0deg, rgba(9, 8, 7, 0.72) 0%, rgba(9, 8, 7, 0.28) 30%, rgba(9, 8, 7, 0) 55%);
  pointer-events: none;
}

/* Used only during the opening reveal: a very broad, soft falloff centred on
   the light source in the photograph. It recedes outward as the room is lit. */
.hero__veil {
  position: absolute;
  left: calc(var(--lx, 50%) - 200vmax);
  top: calc(var(--ly, 35%) - 200vmax);
  width: 400vmax;
  height: 400vmax;
  background: radial-gradient(
    closest-side,
    rgba(9, 8, 7, 0) 0%,
    rgba(9, 8, 7, 0.06) 7%,
    rgba(9, 8, 7, 0.5) 24%,
    rgba(9, 8, 7, 0.86) 42%,
    rgb(9, 8, 7) 62%
  );
  opacity: 0;
  pointer-events: none;
}

.hero__text {
  position: absolute;
  left: var(--margin);
  right: var(--margin);
  bottom: clamp(28px, 5.5vw, 88px);
  max-width: calc(var(--max));
}

.hero__title {
  font-size: var(--fs-display);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.035em;
}

.hero__role {
  margin-top: clamp(14px, 1.4vw, 22px);
  font-size: clamp(16px, 0.6vw + 13px, 21px);
  letter-spacing: -0.005em;
}

.hero__place {
  font-size: clamp(16px, 0.6vw + 13px, 21px);
  color: rgba(244, 241, 236, 0.62);
}

.hero__caption {
  position: absolute;
  right: var(--margin);
  bottom: clamp(28px, 5.5vw, 88px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 241, 236, 0.72);
  transition: color 0.3s ease;
}

.hero__caption:hover {
  color: #f4f1ec;
}

/* --------------------------------------------------- Opening light reveal
   The only significant animation on the site. The page holds in complete
   darkness for a moment; the fittings and the surfaces they light appear
   first, then the room itself is slowly exposed while a soft falloff recedes
   from the light source, as the eye adjusts. The name follows as the room
   comes up. Plays every time the home page is shown, is skipped for reduced
   motion, and without JavaScript the hero is simply lit. */

.reveal .hero__media,
.reveal .hero__glow {
  opacity: 0;
}

.reveal .hero__glow {
  display: block;
}

.reveal .hero__veil {
  opacity: 1;
  transform: scale(0.5);
}

.reveal .hero__text > *,
.reveal .hero__caption,
.reveal .site-header {
  opacity: 0;
}

.reveal.is-lit .hero__glow {
  animation: fd-fade 1.6s cubic-bezier(0.4, 0, 0.6, 1) 0.7s both;
}

.reveal.is-lit .hero__media {
  animation: fd-expose 3s cubic-bezier(0.45, 0, 0.3, 1) 1.3s both;
}

.reveal.is-lit .hero__veil {
  animation: fd-recede 3.6s cubic-bezier(0.33, 0.05, 0.25, 1) 0.6s both;
}

.reveal.is-lit .hero__title {
  animation: fd-fade 1.4s ease 2.4s both;
}

.reveal.is-lit .hero__role {
  animation: fd-fade 1.4s ease 2.65s both;
}

.reveal.is-lit .hero__place {
  animation: fd-fade 1.4s ease 2.8s both;
}

.reveal.is-lit .hero__caption,
.reveal.is-lit .site-header {
  animation: fd-fade 1.2s ease 3.3s both;
}

@keyframes fd-expose {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fd-recede {
  from {
    opacity: 1;
    transform: scale(0.5);
  }
  60% {
    opacity: 0.9;
  }
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

@keyframes fd-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* On small screens the reveal is exposure only. */
@media (max-width: 759px) {
  .hero__veil,
  .reveal .hero__glow {
    display: none;
  }

  .reveal.is-lit .hero__media {
    animation-delay: 0.7s;
    animation-duration: 2.8s;
  }

  .hero__caption {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__veil,
  .reveal .hero__glow {
    display: none;
  }

  .reveal .hero__media,
  .reveal .hero__text > *,
  .reveal .hero__caption,
  .reveal .site-header {
    opacity: 1 !important;
    animation: none !important;
  }
}

/* ----------------------------------------------------- Home: selected work */

.selected {
  padding-top: var(--space-l);
}

.section-head {
  align-items: baseline;
  padding-bottom: 14px;
}

.section-head::after {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-top: 14px;
  background: var(--rule);
}

.section-head > :first-child {
  grid-column: 1 / 4;
}

.section-head__link {
  grid-column: 4 / -1;
  justify-self: end;
  transition: color 0.25s ease;
}

.section-head__link:hover {
  color: var(--ink);
}

.feature {
  margin-top: var(--space-l);
  row-gap: var(--space-s);
}

.feature + .feature {
  margin-top: var(--space-xl);
}

.feature__index {
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-bottom: 10px;
}

.feature__title {
  font-size: var(--fs-feature);
  line-height: 1;
  letter-spacing: -0.025em;
}

.feature__title a {
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  padding-bottom: 0.06em;
  transition: background-size 0.45s ease;
}

.feature__title a:hover {
  background-size: 100% 1px;
}

.feature__detail {
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--muted);
}

.feature__img,
.index-row__cover {
  display: block;
}

.index-row__cover img {
  transition: opacity 0.5s ease;
}

.index-row:has(a:hover) .index-row__cover img {
  opacity: 0.9;
}

/* Small screens: strong vertical rhythm, second images stepped in. */
@media (max-width: 759px) {
  .feature__img--b {
    grid-column: 3 / -1;
  }

  .feature--portrait-indent .feature__img--a {
    grid-column: 1 / 6;
  }
}

@media (min-width: 760px) {
  /* 01: a large photograph with a smaller one hung beside the title */
  .feature--pair-left .feature__img--a {
    grid-column: 1 / 8;
    grid-row: 1 / 3;
  }
  .feature--pair-left .feature__meta {
    grid-column: 9 / -1;
    grid-row: 1;
  }
  .feature--pair-left .feature__img--b {
    grid-column: 9 / 12;
    grid-row: 2;
    align-self: end;
  }

  /* 02: indented, a single vertical photograph */
  .feature--portrait-indent .feature__meta {
    grid-column: 3 / 6;
    grid-row: 1;
    align-self: end;
  }
  .feature--portrait-indent .feature__img--a {
    grid-column: 6 / 11;
    grid-row: 1;
  }

  /* 03: architecture and its plan */
  .feature--photo-plan .feature__meta {
    grid-column: 1 / 5;
    grid-row: 1;
  }
  .feature--photo-plan .feature__img--a {
    grid-column: 1 / 9;
    grid-row: 2;
  }
  .feature--photo-plan .feature__img--b {
    grid-column: 9 / -1;
    grid-row: 2;
    align-self: end;
  }

  /* 04: colour: a horizontal and a vertical photograph, offset */
  .feature--pair-right .feature__meta {
    grid-column: 2 / 6;
    grid-row: 1;
    align-self: end;
  }
  .feature--pair-right .feature__img--a {
    grid-column: 2 / 8;
    grid-row: 2;
    align-self: start;
  }
  .feature--pair-right .feature__img--b {
    grid-column: 9 / -1;
    grid-row: 1 / 3;
    align-self: end;
  }
}

/* --------------------------------------------------- Home: profile, contact */

.profile,
.contact-block {
  margin-top: var(--space-xl);
  row-gap: var(--space-s);
}

.profile::before,
.contact-block::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: 14px;
  background: var(--rule);
}

.profile__more {
  margin-top: var(--space-s);
  font-size: var(--fs-body);
}

.contact-block {
  padding-bottom: var(--space-l);
}

.contact-block__intro {
  color: var(--muted);
  margin-bottom: 10px;
}

.contact-block__email {
  font-size: clamp(26px, 2.8vw + 12px, 60px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-s);
  overflow-wrap: anywhere;
}

.contact-block__email a {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.contact-block__line {
  font-size: clamp(17px, 0.5vw + 14px, 22px);
}

@media (min-width: 760px) {
  .profile__label,
  .contact-block__label {
    grid-column: 1 / 4;
  }
  .profile__text {
    grid-column: 4 / 11;
  }
  .contact-block__body {
    grid-column: 4 / -1;
  }
}

/* ---------------------------------------------------------------- Footer */

.site-footer {
  padding-bottom: clamp(24px, 3vw, 40px);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.site-footer .grid {
  row-gap: var(--space-s);
}

.site-footer .grid::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: calc(var(--space-m) - var(--space-s));
  background: var(--rule);
}

.site-footer .label {
  margin-bottom: 10px;
}

.site-footer__nav a {
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
}

.site-footer__colophon {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.site-footer--minimal .grid::before {
  margin-bottom: 4px;
}

@media (min-width: 760px) {
  .site-footer__contact {
    grid-column: 1 / 5;
  }
  .site-footer__nav {
    grid-column: 7 / 10;
  }
  .site-footer__colophon {
    margin-top: var(--space-m);
  }
  .site-footer--minimal .site-footer__colophon {
    margin-top: 0;
  }
}

/* ------------------------------------------------------------ Page heads */

.page-head {
  padding-top: clamp(48px, 9vw, 150px);
  padding-bottom: var(--space-m);
  align-items: end;
}

.page-title {
  font-size: var(--fs-title);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.page-head__note {
  color: var(--muted);
  font-size: var(--fs-small);
  margin-top: 16px;
}

@media (min-width: 760px) {
  .page-head .page-title {
    grid-column: 1 / 9;
  }
  .page-head__note {
    grid-column: 9 / -1;
    justify-self: end;
    margin-top: 0;
    padding-bottom: 0.6em;
  }
}

/* ------------------------------------------------------------ Work index */

.index-head {
  align-items: baseline;
  padding-bottom: 12px;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.index-head > * {
  font-size: inherit !important;
  color: inherit !important;
  letter-spacing: inherit !important;
}

.index-row {
  padding-bottom: var(--space-l);
}

.index-row__line {
  align-items: baseline;
  padding-bottom: var(--space-s);
  row-gap: 4px;
}

.index-row__line::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: 18px;
  background: var(--rule);
}

.index-row__n {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: var(--fs-small);
}

.index-row__title {
  font-size: var(--fs-feature);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.index-row__type,
.index-row__place,
.index-row__year {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.index-row__line:hover .index-row__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.index-head .index-row__title {
  font-size: inherit;
  letter-spacing: inherit;
}

.index-head > :not(.index-row__n):not(.index-row__title) {
  display: none;
}

@media (max-width: 759px) {
  .index-row__n {
    grid-column: 1 / 2;
  }
  .index-row__title {
    grid-column: 2 / -1;
  }
  .index-row__type,
  .index-row__place,
  .index-row__year {
    grid-column: 2 / -1;
  }
  .index-head .index-row__n {
    grid-column: 1 / 2;
  }
  .index-head .index-row__title {
    grid-column: 2 / -1;
  }
  .index-row__cover {
    grid-column: 2 / -1;
  }
  .index-row--portrait .index-row__cover {
    grid-column: 2 / 6;
  }
}

@media (min-width: 760px) {
  .index-head > * {
    display: block !important;
  }
  .index-row__n {
    grid-column: 1 / 2;
  }
  .index-row__title {
    grid-column: 2 / 6;
  }
  .index-row__type {
    grid-column: 6 / 9;
  }
  .index-row__place {
    grid-column: 9 / 12;
  }
  .index-row__year {
    grid-column: 12 / 13;
    justify-self: end;
  }
  .index-row--odd .index-row__cover {
    grid-column: 2 / 9;
  }
  .index-row--even .index-row__cover {
    grid-column: 6 / 13;
  }
  .index-row--portrait.index-row--odd .index-row__cover {
    grid-column: 2 / 6;
  }
  .index-row--portrait.index-row--even .index-row__cover {
    grid-column: 6 / 10;
  }
}

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

.project-head {
  padding-top: clamp(40px, 7vw, 120px);
  row-gap: var(--space-m);
}

.project-head__index {
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  margin-bottom: clamp(12px, 1.4vw, 22px);
}

.project-title {
  font-size: var(--fs-title);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px var(--gutter);
  font-size: var(--fs-small);
  line-height: 1.45;
}

.facts dt {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.facts dd {
  color: var(--ink);
}

.project-hero-wrap {
  margin-top: var(--space-m);
}

.project-head--portrait .facts {
  margin-top: var(--space-s);
}

.project-hero .pic {
  width: 100%;
}

@media (min-width: 760px) {
  .project-head--wide .project-head__text {
    grid-column: 1 / -1;
  }
  .project-head--wide .facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .project-head--portrait {
    align-items: end;
  }
  .project-head--portrait .project-head__text {
    grid-column: 1 / 6;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-self: stretch;
  }
  .project-head--portrait .project-title {
    margin-bottom: auto;
  }
  .project-head--portrait .facts {
    margin-top: var(--space-l);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 22px;
  }
  .project-head--portrait .project-hero {
    grid-column: 7 / -1;
    grid-row: 1;
  }
}

@media (min-width: 1100px) {
  .project-head--portrait .facts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.project-intro {
  margin-top: var(--space-l);
}

@media (min-width: 760px) {
  .project-intro__text {
    grid-column: 2 / 10;
  }
}

@media (min-width: 1200px) {
  .project-intro__text {
    grid-column: 2 / 9;
  }
}

/* Sections */

.project .block {
  margin-top: var(--space-l);
}

.band {
  margin-top: var(--space-l);
  padding-block: var(--space-l);
  background: var(--night);
  color: var(--night-ink);
}

.band .block:first-child {
  margin-top: 0;
}

.band .label,
.band .caption {
  color: var(--night-muted);
}

.band .text p {
  color: var(--night-ink);
}

.text p {
  max-width: 34em;
  text-wrap: pretty;
}

.text p + p {
  margin-top: 1em;
}

.text .label {
  margin-bottom: 18px;
}

/* Single image layouts */
@media (min-width: 760px) {
  .l-left-large > .fig {
    grid-column: 1 / 10;
  }
  .l-right-large > .fig {
    grid-column: 4 / -1;
  }
  .l-center > .fig {
    grid-column: 3 / 11;
  }
  .l-center-narrow > .fig {
    grid-column: 4 / 10;
  }
  .l-left > .fig {
    grid-column: 1 / 8;
  }
  .l-right > .fig {
    grid-column: 6 / -1;
  }
}

.block--image.l-full {
  max-width: none;
  padding-inline: 0;
}

.block--image.l-full .caption {
  padding-inline: var(--margin);
}

/* Text layouts */
@media (min-width: 760px) {
  .block--text.l-left .text {
    grid-column: 2 / 7;
  }
  .block--text.l-right .text {
    grid-column: 7 / 12;
  }
  .block--text.l-center .text {
    grid-column: 4 / 10;
  }
}

/* Image with text */
.block--image-text {
  row-gap: var(--space-s);
  align-items: end;
}

.it--align-center {
  align-items: center;
}

.it--align-start {
  align-items: start;
}

@media (max-width: 759px) {
  .it--small .it__fig {
    grid-column: 2 / -1;
  }
}

@media (min-width: 760px) {
  .block--image-text > * {
    grid-row: 1;
  }
  .it--img-right.it--large .it__fig {
    grid-column: 6 / -1;
  }
  .it--img-right.it--large .it__text {
    grid-column: 1 / 5;
  }
  .it--img-right.it--medium .it__fig {
    grid-column: 7 / -1;
  }
  .it--img-right.it--medium .it__text {
    grid-column: 2 / 6;
  }
  .it--img-right.it--small .it__fig {
    grid-column: 8 / 12;
  }
  .it--img-right.it--small .it__text {
    grid-column: 2 / 7;
  }
  .it--img-left.it--large .it__fig {
    grid-column: 1 / 8;
  }
  .it--img-left.it--large .it__text {
    grid-column: 9 / -1;
  }
  .it--img-left.it--medium .it__fig {
    grid-column: 1 / 7;
  }
  .it--img-left.it--medium .it__text {
    grid-column: 8 / 12;
  }
  .it--img-left.it--small .it__fig {
    grid-column: 2 / 6;
  }
  .it--img-left.it--small .it__text {
    grid-column: 7 / 12;
  }
}

/* Pairs */
.block--pair {
  row-gap: var(--space-m);
  align-items: end;
}

@media (max-width: 759px) {
  .block--pair .pair__fig:nth-child(2) {
    grid-column: 2 / -1;
  }
}

@media (min-width: 760px) {
  .block--pair .pair__fig {
    grid-row: 1;
  }
  .pair--offset .pair__fig:nth-child(1) {
    grid-column: 1 / 8;
  }
  .pair--offset .pair__fig:nth-child(2) {
    grid-column: 9 / -1;
  }
  .pair--offset-reverse .pair__fig:nth-child(1) {
    grid-column: 1 / 6;
  }
  .pair--offset-reverse .pair__fig:nth-child(2) {
    grid-column: 7 / -1;
  }
  .pair--hang {
    align-items: center;
  }
  .pair--hang .pair__fig:nth-child(1) {
    grid-column: 2 / 6;
  }
  .pair--hang .pair__fig:nth-child(2) {
    grid-column: 7 / 12;
  }
  .pair--even {
    align-items: start;
  }
  .pair--even .pair__fig:nth-child(1) {
    grid-column: 1 / 7;
  }
  .pair--even .pair__fig:nth-child(2) {
    grid-column: 7 / -1;
  }
}

/* Contact sheet */
.thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
}

@media (min-width: 760px) {
  .thumbs--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .thumbs--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Plan with numbered legend */
.block--plan {
  row-gap: var(--space-s);
  align-items: start;
}

.plan__label {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

.legend {
  display: grid;
  gap: var(--space-m);
}

.legend__item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  column-gap: 16px;
}

.legend__n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  margin-top: -2px;
}

.legend__title {
  font-size: clamp(17px, 0.5vw + 14px, 21px);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin-top: 8px;
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.specs li + li::before {
  content: '/';
  margin-inline: 0.55em;
  color: var(--rule);
}

.legend__images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gutter);
  align-items: start;
  margin-top: 18px;
}

.legend__images--1 {
  grid-template-columns: minmax(0, 0.62fr);
}

@media (min-width: 760px) {
  .plan__drawing {
    grid-column: 1 / 7;
    position: sticky;
    top: calc(var(--header-h) + var(--space-s));
  }
  .legend {
    grid-column: 8 / -1;
  }
}

/* Drawing studies: one row per option, two drawings and their fixtures */
.block--studies {
  display: block;
}

.study {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: var(--space-s);
  align-items: end;
}

.study + .study {
  margin-top: var(--space-l);
}

.study__title {
  grid-column: 1 / -1;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  align-self: start;
}

.study__drawing:nth-of-type(1) {
  grid-column: 1 / 4;
}

.study__drawing:nth-of-type(2) {
  grid-column: 4 / -1;
}

.study__drawing .caption {
  margin-top: 10px;
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.study__fixtures {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

@media (min-width: 760px) {
  .study {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .study__drawing:nth-of-type(1) {
    grid-column: 1 / 5;
  }
  .study__drawing:nth-of-type(2) {
    grid-column: 5 / 9;
  }
  .study__fixtures {
    grid-column: 10 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gutter);
    align-self: end;
    padding-bottom: 32px;
  }
}

/* Previous / next */
.project-nav {
  margin-top: var(--space-xl);
  padding-top: 18px;
  padding-bottom: var(--space-l);
  row-gap: var(--space-s);
  align-items: start;
  position: relative;
}

.project-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: var(--margin);
  right: var(--margin);
  height: 1px;
  background: var(--rule);
}

.project-nav__link {
  display: block;
}

.project-nav__link .label {
  display: block;
  margin-bottom: 10px;
}

.project-nav__title {
  font-size: var(--fs-feature);
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.project-nav__link:hover .project-nav__title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.project-nav__all {
  transition: color 0.25s ease;
}

.project-nav__all:hover {
  color: var(--ink);
}

@media (max-width: 759px) {
  .project-nav__all {
    order: 3;
  }
}

@media (min-width: 760px) {
  .project-nav__link--prev {
    grid-column: 1 / 6;
  }
  .project-nav__all {
    grid-column: 6 / 8;
    justify-self: center;
  }
  .project-nav__link--next {
    grid-column: 8 / -1;
    text-align: right;
  }
}

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

.bio__text p:not(.lead) {
  max-width: 36em;
  margin-top: 1em;
  color: var(--ink-soft);
  text-wrap: pretty;
}

.bio__text .lead {
  margin-bottom: 0.9em;
}

.cv {
  margin-top: var(--space-l);
  row-gap: var(--space-s);
}

.cv::before {
  content: '';
  grid-column: 1 / -1;
  height: 1px;
  margin-bottom: 14px;
  background: var(--rule);
}

.cv__list {
  display: grid;
  gap: var(--space-m);
}

.cv__item {
  display: grid;
  gap: 6px;
}

.cv__dates {
  font-size: var(--fs-small);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.cv__title {
  font-size: clamp(19px, 0.6vw + 15px, 24px);
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.cv__sub {
  color: var(--ink-soft);
  margin-top: 2px;
}

.cv__note {
  margin-top: 10px;
  max-width: 38em;
  font-size: var(--fs-small);
  line-height: 1.55;
  color: var(--muted);
}

.cv--compact .label {
  margin-bottom: 12px;
}

.plain-list li {
  line-height: 1.6;
}

.cv--compact {
  padding-bottom: var(--space-xl);
  row-gap: var(--space-m);
}

@media (max-width: 759px) {
  .cv--compact .cv__cell {
    grid-column: span 3;
  }
}

@media (min-width: 760px) {
  .bio__text {
    grid-column: 4 / 11;
  }
  .cv__label {
    grid-column: 1 / 4;
  }
  .cv__list {
    grid-column: 4 / -1;
  }
  .cv__item {
    grid-template-columns: repeat(9, minmax(0, 1fr));
    column-gap: var(--gutter);
  }
  .cv__dates {
    grid-column: 1 / 3;
    padding-top: 0.35em;
  }
  .cv__body {
    grid-column: 3 / 9;
  }
  .cv--compact .cv__cell:nth-of-type(1) {
    grid-column: 4 / 6;
  }
  .cv--compact .cv__cell:nth-of-type(2) {
    grid-column: 6 / 8;
  }
  .cv--compact .cv__cell:nth-of-type(3) {
    grid-column: 8 / 10;
  }
  .cv--compact .cv__cell:nth-of-type(4) {
    grid-column: 10 / -1;
  }
}

/* --------------------------------------------------------------- Contact */

.contact-page {
  min-height: 72vh;
}

.contact-page__body {
  padding-bottom: var(--space-xl);
}

.contact-page__intro {
  color: var(--muted);
  margin-bottom: 12px;
}

.contact-page__email {
  font-size: clamp(30px, 3.6vw + 12px, 84px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.contact-page__email a {
  text-underline-offset: 0.14em;
}

.contact-page__list {
  display: grid;
  gap: 18px;
  margin-top: var(--space-m);
  font-size: clamp(17px, 0.5vw + 14px, 22px);
}

.contact-page__list dt {
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

@media (min-width: 760px) {
  .contact-page__details {
    grid-column: 4 / -1;
  }
  .contact-page__list {
    grid-template-columns: repeat(2, max-content);
    column-gap: clamp(40px, 6vw, 120px);
  }
}

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

.not-found {
  padding-bottom: var(--space-xl);
}

.not-found p + p {
  margin-top: var(--space-s);
}

@media (min-width: 760px) {
  .not-found {
    grid-column: 4 / 11;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
