:root {
  --bg: #050505;
  --bg-2: #0d0d0d;
  --ink: #f4f1ea;
  --muted: #9d968a;
  --accent: #e9622a;
  --line: rgba(244, 241, 234, 0.13);
  --line-strong: rgba(244, 241, 234, 0.3);

  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --sans: "Outfit", system-ui, -apple-system, sans-serif;

  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --max: 1240px;
  --gap: clamp(2rem, 5vw, 4.5rem);
  --section-y: clamp(4.5rem, 9vw, 8rem);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

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

ul,
ol {
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad);
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.skip-link:focus {
  top: 1rem;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 400;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Type */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 2px;
  flex: none;
  background: var(--accent);
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
}

h3 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

em {
  font-style: italic;
  color: var(--ink);
}

/* Wordmark */

.nav-mark,
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.12em;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: -0.01em;
}

.the {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  height: 0.72em;
  margin-inline: 0.06em;
  /* Flex centring lands slightly above the cap line; nudge onto it. */
  transform: translateY(0.0092em);
}

@supports (height: 1cap) {
  .the {
    height: 1cap;
  }
}

.the span {
  display: block;
  font-size: 0.3em;
  line-height: 1;
  letter-spacing: 0.06em;
  text-align: center;
  padding-inline: 0.16em;
}

.the::before,
.the::after {
  content: "";
  display: block;
  width: 100%;
  height: 0.14em;
  flex: none;
  background: currentColor;
}

@supports (height: 1cap) {
  .the::before,
  .the::after {
    height: 0.2cap;
  }
}

/* Nav */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad);
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0));
  transition: background 0.35s ease, border-color 0.35s ease;
}

.nav.scrolled {
  background: rgba(5, 5, 5, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-mark {
  font-size: 1.05rem;
  position: relative;
  z-index: 60;
}

.nav-links {
  display: flex;
  gap: 1.55rem;
}

.nav-links a {
  position: relative;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
  padding-block: 0.2rem;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--ink);
}

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 1.9rem;
  height: 1rem;
  position: relative;
  z-index: 60;
}

.nav-toggle span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease, bottom 0.3s ease;
}

.nav-toggle span:first-child {
  top: 0.15rem;
}

.nav-toggle span:last-child {
  bottom: 0.15rem;
}

.nav.open .nav-toggle span:first-child {
  top: 0.45rem;
  transform: rotate(45deg);
}

.nav.open .nav-toggle span:last-child {
  bottom: 0.45rem;
  transform: rotate(-45deg);
}

/* Hero */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem var(--pad) 6rem;
  position: relative;
}

.hero .eyebrow {
  margin-bottom: 1.8rem;
}

.wordmark {
  font-size: clamp(3rem, 11.5vw, 9.5rem);
  justify-content: center;
}

.hero-lead {
  margin-top: 2.4rem;
  max-width: 30em;
  font-size: clamp(1.02rem, 1.9vw, 1.3rem);
  font-weight: 300;
  color: var(--muted);
}

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.3s ease;
}

.scroll-cue:hover {
  color: var(--ink);
}

.scroll-line {
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(to bottom, var(--line-strong), transparent);
}

/* Sections */

.section,
.contact {
  scroll-margin-top: 4.5rem;
}

.section {
  max-width: calc(var(--max) + var(--pad) * 2);
  margin: 0 auto;
  padding: var(--section-y) var(--pad);
}

.section--ruled {
  border-top: 1px solid var(--line);
}

.section--tight {
  padding-block: clamp(3.5rem, 6vw, 5.5rem);
}

.section-head {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--gap);
  align-items: end;
}

.section-head__title h2 {
  margin-top: 1.1rem;
}

.section-head__copy p {
  color: var(--muted);
  font-size: 1.03rem;
}

.section-head__copy p + p {
  margin-top: 1rem;
}

p.meta {
  margin-top: 1.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Figures */

.figure {
  background: var(--bg-2);
  border: 1px solid var(--line);
}

.figure--hero {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.zoom {
  display: block;
  width: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.zoom img {
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.zoom:hover img {
  transform: scale(1.03);
}

.figure figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
  margin-top: clamp(1rem, 2vw, 1.5rem);
}

/* History */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.5rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
}

.timeline li {
  position: relative;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.timeline li::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.2rem;
  height: 2px;
  background: var(--accent);
}

.timeline .year {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.timeline h3 {
  font-size: 1.15rem;
  margin: 0.5rem 0 0.7rem;
}

.timeline p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* Inside */

.inside {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: center;
}

.page-about .nav {
  background: rgba(5, 5, 5, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.page-about .about {
  padding-top: calc(var(--section-y) + 3rem);
}

.about-head h1 {
  margin: 1.1rem 0 1.5rem;
}

.about-body {
  display: grid;
  grid-template-columns: minmax(0, 34em) minmax(12rem, 17rem);
  justify-content: start;
  align-items: start;
  gap: 1.75rem;
}

.inside-copy h2 {
  margin: 1.1rem 0 1.5rem;
}

.inside-copy p {
  color: var(--muted);
  font-size: 1.03rem;
  max-width: 34em;
}

.inside-copy p + p {
  margin-top: 1rem;
}

.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1.5rem;
  margin-top: 2.4rem;
}

.specs li {
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.specs span {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}

.figure--portrait {
  width: 100%;
  max-width: 17rem;
}

.figure--portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 8%;
}

/* Contact */

.contact {
  padding: clamp(5rem, 10vw, 9rem) var(--pad);
  text-align: center;
  border-top: 1px solid var(--line);
}

.contact .eyebrow {
  justify-content: center;
}

.contact h2 {
  margin: 1.2rem auto 2.6rem;
  max-width: 22em;
}

.mail {
  display: inline-block;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.9rem);
  letter-spacing: -0.01em;
  padding-bottom: 0.25rem;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  border-bottom: 1px solid var(--line-strong);
  transition: background-size 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Footer */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem var(--pad) 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer .nav-mark {
  font-size: 0.95rem;
  color: var(--ink);
}

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(3, 3, 3, 0.92);
}

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

.lightbox figure {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  align-items: center;
  animation: pop 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.lightbox img {
  max-width: min(94vw, 1180px);
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lightbox figcaption {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.7);
  color: var(--ink);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.lightbox-close:hover {
  border-color: var(--accent);
  background: rgba(233, 98, 42, 0.14);
}

.lightbox-close svg {
  width: 1.05rem;
  height: 1.05rem;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Reveal */

.hero .eyebrow,
.wordmark,
.hero-lead,
.scroll-cue {
  animation: rise 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.wordmark {
  animation-delay: 0.1s;
}

.hero-lead {
  animation-delay: 0.26s;
}

.scroll-cue {
  animation-delay: 0.5s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */

@media (max-width: 1080px) {
  .timeline {
    grid-template-columns: 1fr 1fr;
    gap: 2.2rem;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 40;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.2rem;
    background: #050505;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav.open .nav-links {
    opacity: 1;
    pointer-events: auto;
  }

  body.menu-open {
    overflow: hidden;
  }

  .nav-links a {
    font-size: 1.3rem;
    letter-spacing: 0.16em;
    color: var(--ink);
  }

  .section-head,
  .inside,
  .about-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-head {
    align-items: start;
  }

  .figure--portrait {
    max-width: 14rem;
  }

  .study-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    gap: 0.7rem;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .timeline,
  .specs {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero .eyebrow,
  .wordmark,
  .hero-lead,
  .scroll-cue,
  .lightbox figure {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .zoom img,
  .nav-links a::after,
  .mail {
    transition: none;
  }
}
