/* ============================================================
   Reuben Cowell — Portfolio 2026
   Design system: warm paper / ink / terracotta / pine
   Type: Fraunces (display) + Instrument Sans (text)
   ============================================================ */

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

:root {
  --paper: #f5f0e6;
  --paper-2: #ece5d6;
  --ink: #17140f;
  --ink-2: #2a251d;
  --pine: #1c241d;
  --pine-2: #242e25;
  --terra: #bd5d33;
  --terra-bright: #d97a4a;
  --terra-soft: #e0a37e;
  --moss: #5c6b4f;
  --grey: #7d766a;
  --grey-on-dark: #a9a396;
  --line: rgba(23, 20, 15, 0.12);
  --line-strong: rgba(23, 20, 15, 0.28);
  --line-on-dark: rgba(245, 240, 230, 0.14);

  --serif: 'Fraunces', 'Georgia', serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);

  --gutter: clamp(20px, 4.5vw, 64px);
  --section-y: clamp(80px, 12vw, 170px);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
}

::selection { background: var(--terra); color: var(--paper); }

img, video { max-width: 100%; display: block; }

/* <picture> should never create its own box: lets img size against the real container */
picture { display: contents; }

a { color: inherit; }

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

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

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9000;
}

/* ------------------------------------------------------------
   Utilities
   ------------------------------------------------------------ */

.container {
  width: 100%;
  max-width: 1560px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terra);
}

.kicker::before {
  content: '';
  width: 34px;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 40px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.section-index {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--grey);
  white-space: nowrap;
}

h2.display {
  font-family: var(--serif);
  font-weight: 470;
  font-style: italic;
  font-variation-settings: 'opsz' 144, 'SOFT' 40;
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lede {
  max-width: 640px;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--grey);
  text-wrap: pretty;
}

/* Reveal-on-scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease-out),
    transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
  will-change: opacity, transform;
}

[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

[data-reveal="fade"] { transform: none; }

[data-reveal="clip"] {
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.2s var(--ease-out), opacity 0.6s linear;
  transition-delay: var(--d, 0s);
}

[data-reveal="clip"].is-in { clip-path: inset(0 0 0% 0); }

/* Masked line reveal (hero) */
.mask-line {
  display: block;
  overflow: hidden;
  padding-block: 0.06em;
  margin-block: -0.06em;
}

.mask-line > span {
  display: block;
  transform: translateY(115%);
  transition: transform 1.15s var(--ease-out);
  transition-delay: var(--d, 0s);
}

.is-loaded .mask-line > span { transform: translateY(0); }

/* ------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------ */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  /* Light text while floating over the hero image */
  color: var(--paper);
  transition: transform 0.5s var(--ease-out), background-color 0.4s, box-shadow 0.4s, color 0.4s;
}

.site-header.is-hidden { transform: translateY(-102%); }

.site-header.is-scrolled {
  color: var(--ink);
  background: rgba(245, 240, 230, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.menu-open .site-header { color: var(--paper); background: transparent; box-shadow: none; }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--gutter);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 520;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  line-height: 1;
  color: inherit;
}

.brand-mark {
  font-family: var(--mono);
  font-style: normal;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--terra-bright);
  transform: translateY(-1px);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 36px);
  list-style: none;
}

.nav-links a {
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  padding-block: 6px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1.5px;
  background: var(--terra-bright);
  transition: right 0.4s var(--ease-out);
}

.nav-links a:hover::after,
.nav-links a.is-active::after { right: 0; }

.nav-cta {
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 9px 20px !important;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.nav-cta::after { display: none; }

.nav-cta:hover {
  background: var(--terra-bright);
  border-color: var(--terra-bright);
  color: var(--paper);
}

.scroll-progress {
  position: absolute;
  left: 0; bottom: -1.5px;
  height: 1.5px;
  width: 100%;
  background: var(--terra);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  align-items: center;
  z-index: 620;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 1.6px;
  background: currentColor;
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
}

.menu-open .menu-toggle span:nth-child(1) { transform: translateY(7.6px) rotate(45deg); }
.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-7.6px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 100px var(--gutter) 48px;
  background: var(--pine);
  color: var(--paper);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.45s var(--ease-out), visibility 0s 0.45s;
}

.menu-open .mobile-menu {
  visibility: visible;
  opacity: 1;
  transition-delay: 0s;
}

.mobile-menu ul { list-style: none; }

.mobile-menu li { overflow: hidden; }

.mobile-menu a {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-size: clamp(38px, 9vw, 64px);
  line-height: 1.22;
  text-decoration: none;
  transform: translateY(110%);
  transition: transform 0.7s var(--ease-out), color 0.3s;
}

.menu-open .mobile-menu a { transform: translateY(0); }

.mobile-menu li:nth-child(1) a { transition-delay: 0.05s; }
.mobile-menu li:nth-child(2) a { transition-delay: 0.1s; }
.mobile-menu li:nth-child(3) a { transition-delay: 0.15s; }
.mobile-menu li:nth-child(4) a { transition-delay: 0.2s; }
.mobile-menu li:nth-child(5) a { transition-delay: 0.25s; }
.mobile-menu li:nth-child(6) a { transition-delay: 0.3s; }

.mobile-menu a:hover { color: var(--terra-soft); }

.mobile-menu-foot {
  margin-top: auto;
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-on-dark);
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--paper);
  overflow: clip;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}

.hero-media img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 36%;
  transform: scale(1.08);
  transition: transform 2.6s var(--ease-out);
  will-change: transform;
}

.is-loaded .hero-media img { transform: scale(1); }

.hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 14, 11, 0.42) 0%, rgba(13, 14, 11, 0.06) 34%, rgba(13, 14, 11, 0.1) 58%, rgba(13, 14, 11, 0.62) 100%);
}

.hero-inner {
  position: relative;
  padding: 140px var(--gutter) clamp(36px, 5vh, 64px);
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: clamp(0.62rem, 1vw, 0.74rem);
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.85);
  margin-bottom: clamp(14px, 2.4vh, 26px);
}

.hero-kicker .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--terra-bright);
}

.hero-title {
  font-family: var(--serif);
  font-weight: 430;
  font-variation-settings: 'opsz' 144, 'SOFT' 30;
  font-size: clamp(64px, 13.5vw, 218px);
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-left: -0.04em;
  margin-bottom: clamp(20px, 3.5vh, 40px);
}

.hero-title .row-2 {
  font-style: italic;
  color: var(--terra-soft);
}

.hero-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
  border-top: 1px solid rgba(245, 240, 230, 0.22);
  padding-top: clamp(18px, 3vh, 28px);
}

.hero-tagline {
  max-width: 470px;
  font-size: clamp(0.95rem, 1.3vw, 1.08rem);
  line-height: 1.6;
  color: rgba(245, 240, 230, 0.88);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-meta {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(245, 240, 230, 0.55);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: 1px;
  height: 52px;
  background: rgba(245, 240, 230, 0.28);
  overflow: hidden;
  display: none;
}

.scroll-cue::after {
  content: '';
  position: absolute;
  left: 0; top: -50%;
  width: 100%; height: 50%;
  background: var(--paper);
  animation: cue 2.2s var(--ease-inout) infinite;
}

@keyframes cue {
  0% { top: -50%; }
  60%, 100% { top: 110%; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s, transform 0.35s var(--ease-out);
}

.btn .arrow { transition: transform 0.35s var(--ease-out); }

.btn:hover .arrow { transform: translateX(4px); }

.btn-solid {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
}

.btn-solid:hover { background: var(--terra-bright); border-color: var(--terra-bright); color: var(--paper); }

.btn-ghost {
  border: 1px solid rgba(245, 240, 230, 0.42);
  color: var(--paper);
}

.btn-ghost:hover { background: rgba(245, 240, 230, 0.14); }

.btn-ink {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
}

.btn-ink:hover { background: var(--terra); border-color: var(--terra); color: var(--paper); }

.btn-outline-ink {
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-outline-ink:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ------------------------------------------------------------
   Marquee
   ------------------------------------------------------------ */

.marquee {
  border-block: 1px solid var(--line);
  padding-block: 16px;
  overflow: hidden;
  background: var(--paper);
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 36s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  padding-inline: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 450;
  font-size: clamp(17px, 2vw, 24px);
  white-space: nowrap;
  color: var(--ink-2);
}

.marquee-item::after {
  content: '✳';
  font-style: normal;
  font-size: 0.8em;
  color: var(--terra);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ------------------------------------------------------------
   Intro / manifesto
   ------------------------------------------------------------ */

.intro {
  padding-block: var(--section-y);
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  gap: clamp(40px, 6vw, 110px);
  align-items: start;
}

.intro-statement {
  font-family: var(--serif);
  font-weight: 420;
  font-variation-settings: 'opsz' 90;
  font-size: clamp(28px, 3.6vw, 52px);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}

.intro-statement em {
  font-style: italic;
  color: var(--terra);
}

.intro-statement .w {
  opacity: 0.12;
  transition: opacity 0.5s linear;
}

.intro-statement .w.is-lit { opacity: 1; }

.status-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 24px;
  background: rgba(255, 255, 255, 0.35);
  display: grid;
  gap: 16px;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss);
}

.status-line .pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--moss);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(92, 107, 79, 0.45); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(92, 107, 79, 0); }
}

.status-card p { color: var(--ink-2); font-size: 0.95rem; }

.status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  background: var(--paper);
}

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

.work {
  background: var(--pine);
  color: var(--paper);
  padding-block: var(--section-y);
  border-radius: clamp(20px, 3vw, 44px);
  margin-inline: clamp(6px, 1vw, 16px);
}

.work .kicker { color: var(--terra-soft); }
.work .lede { color: var(--grey-on-dark); }
.work .section-index { color: var(--grey-on-dark); }

.project {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(28px, 4.5vw, 80px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 84px);
  border-top: 1px solid var(--line-on-dark);
}

.project:first-of-type { border-top: 0; padding-top: 0; }
.project:last-of-type { padding-bottom: 0; }

.project:nth-child(even) .project-media { order: 2; }

.project-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--pine-2);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out), filter 1s;
}

.project-media:hover img { transform: scale(1.05); }

.project-media .media-tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  border-radius: 999px;
  background: rgba(13, 14, 11, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(245, 240, 230, 0.9);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 14px;
}

.project-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.project-strip a {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1;
  display: block;
}

.project-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), opacity 0.4s;
}

.project-strip a:hover img { transform: scale(1.08); opacity: 0.85; }

.project-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--terra-soft);
  margin-bottom: 14px;
  display: block;
}

.project-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 460;
  font-variation-settings: 'opsz' 120;
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1.04;
  margin-bottom: 16px;
  text-wrap: balance;
}

.project-desc {
  color: var(--grey-on-dark);
  max-width: 520px;
  text-wrap: pretty;
  margin-bottom: 22px;
}

.project-desc a { color: var(--terra-soft); text-decoration-color: rgba(224, 163, 126, 0.4); text-underline-offset: 3px; }
.project-desc a:hover { color: var(--paper); }

.project-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.project-facts li {
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-on-dark);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-on-dark);
  transition: border-color 0.3s, color 0.3s;
}

.text-link .arrow { transition: transform 0.35s var(--ease-out); }
.text-link:hover { color: var(--terra-soft); border-color: var(--terra-soft); }
.text-link:hover .arrow { transform: translateX(4px); }

/* ------------------------------------------------------------
   Photography gallery
   ------------------------------------------------------------ */

.gallery {
  padding-block: var(--section-y);
}

.masonry {
  column-count: 3;
  column-gap: 14px;
}

.masonry-item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
  border: 0;
  padding: 0;
  display: block;
  width: 100%;
}

.masonry-item img {
  width: 100%;
  height: auto;
  transition: transform 0.9s var(--ease-out), filter 0.5s;
}

.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(13, 14, 11, 0.38));
  opacity: 0;
  transition: opacity 0.4s;
}

.masonry-item:hover::after { opacity: 1; }
.masonry-item:hover img { transform: scale(1.045); }

.masonry-item .zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(245, 240, 230, 0.92);
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}

.masonry-item:hover .zoom-hint { opacity: 1; transform: none; }

.gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.gallery-note {
  text-align: center;
  margin-top: 18px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ------------------------------------------------------------
   Films
   ------------------------------------------------------------ */

.films {
  padding-block: var(--section-y);
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.film-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.5vw, 32px);
}

.film-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
}

.video-facade {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--ink-2);
}

.video-facade img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.9s var(--ease-out), opacity 0.4s;
}

.video-facade:hover img { transform: scale(1.04); opacity: 1; }

.video-facade .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 74px; height: 74px;
  border-radius: 50%;
  background: rgba(245, 240, 230, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: transform 0.4s var(--ease-out), background-color 0.3s;
}

.video-facade:hover .play { transform: scale(1.08); background: var(--terra-bright); color: var(--paper); }

.video-facade .play svg { margin-left: 3px; }

.film-card iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  border: 0;
  display: block;
}

.film-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
}

.film-title { font-size: 0.92rem; font-weight: 600; letter-spacing: 0.01em; }

.film-sub {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey-on-dark);
  margin-top: 3px;
}

.film-ext {
  flex-shrink: 0;
  color: var(--grey-on-dark);
  transition: color 0.3s, transform 0.3s var(--ease-out);
}

.film-ext:hover { color: var(--terra-soft); transform: translate(2px, -2px); }

/* Instagram row */
.insta-row {
  margin-top: clamp(40px, 5vw, 64px);
}

.insta-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.insta-card {
  position: relative;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
  padding: 20px;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
  transition: border-color 0.3s, transform 0.45s var(--ease-out), box-shadow 0.45s;
}

.insta-card:hover {
  border-color: var(--terra);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(23, 20, 15, 0.35);
}

.insta-card .insta-glyph { color: var(--terra); }

.insta-card .insta-label {
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.insta-card .insta-hint {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
}

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

.about {
  padding-block: var(--section-y);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(40px, 6vw, 100px);
  align-items: start;
}

.about-media {
  position: sticky;
  top: 110px;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.about-media figcaption {
  position: absolute;
  left: 14px; bottom: 14px;
  border-radius: 999px;
  background: rgba(13, 14, 11, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: rgba(245, 240, 230, 0.92);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
}

.about-body .display { margin-bottom: 26px; }

.about-body p {
  max-width: 600px;
  color: var(--ink-2);
  margin-bottom: 18px;
  text-wrap: pretty;
}

.about-body p a {
  color: var(--terra);
  text-decoration-color: rgba(189, 93, 51, 0.35);
  text-underline-offset: 3px;
}

.about-list {
  list-style: none;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.about-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--line);
}

.about-list .k {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  flex-shrink: 0;
}

.about-list .v {
  text-align: right;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.contact {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--section-y);
  border-radius: clamp(20px, 3vw, 44px) clamp(20px, 3vw, 44px) 0 0;
  margin-inline: clamp(6px, 1vw, 16px);
  margin-bottom: 0;
}

.contact .kicker { color: var(--terra-soft); }

.contact-title {
  font-family: var(--serif);
  font-weight: 440;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(46px, 8vw, 132px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-block: 18px 30px;
  text-wrap: balance;
}

.contact-title em { font-style: italic; color: var(--terra-soft); }

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.6vw, 34px);
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--line-on-dark);
  padding-bottom: 6px;
  transition: color 0.3s, border-color 0.3s;
}

.contact-email:hover { color: var(--terra-soft); border-color: var(--terra-soft); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px 60px;
  margin-top: clamp(40px, 6vw, 80px);
}

.socials {
  display: flex;
  gap: 10px;
  list-style: none;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line-on-dark);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.socials a:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

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

.site-footer {
  background: var(--ink);
  color: var(--grey-on-dark);
  margin-inline: clamp(6px, 1vw, 16px);
  padding: 40px var(--gutter) 34px;
}

.footer-inner {
  border-top: 1px solid var(--line-on-dark);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 22px 40px;
  font-size: 0.78rem;
}

.footer-brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--paper);
}

.footer-credits {
  display: grid;
  gap: 5px;
  max-width: 520px;
}

.footer-credits a { color: var(--terra-soft); text-decoration: none; }
.footer-credits a:hover { color: var(--paper); }

.to-top {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey-on-dark);
  text-decoration: none;
  transition: color 0.3s;
}

.to-top:hover { color: var(--paper); }

/* ------------------------------------------------------------
   Journal
   ------------------------------------------------------------ */

.journal {
  padding-block: var(--section-y);
  background: var(--paper);
}

.journal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

.journal-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s, border-color 0.3s;
}

.journal-card:hover {
  transform: translateY(-5px);
  border-color: var(--terra);
  box-shadow: 0 24px 48px -28px rgba(23, 20, 15, 0.4);
}

.journal-card-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-2);
}

.journal-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}

.journal-card:hover .journal-card-media img { transform: scale(1.05); }

.journal-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
}

.journal-card-date {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
}

.journal-card-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 480;
  font-size: 1.5rem;
  line-height: 1.15;
  color: var(--ink);
}

.journal-card-desc {
  font-size: 0.9rem;
  color: var(--grey);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.journal-card-more {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terra);
}

/* Journal page */
.journal-page .site-header {
  color: var(--ink);
  background: rgba(245, 240, 230, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}

.journal-main {
  min-height: 70vh;
  padding: clamp(130px, 16vh, 180px) 0 var(--section-y);
}

.journal-head { margin-bottom: clamp(36px, 5vw, 60px); }
.journal-head .lede { margin-top: 14px; }

.journal-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

.journal-empty { padding-block: 10vh; }

/* Article */
.post { max-width: 760px; margin-inline: auto; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 22px;
}

.post-meta a { color: var(--terra); text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }

.post-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 470;
  font-variation-settings: 'opsz' 144;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 18px;
  text-wrap: balance;
}

.post-desc {
  font-size: 1.12rem;
  color: var(--grey);
  margin-bottom: 10px;
  text-wrap: pretty;
}

.post-cover {
  margin: clamp(28px, 4vw, 44px) 0;
  border-radius: 16px;
  overflow: hidden;
}

.post-cover img { width: 100%; height: auto; }

.post-body {
  font-size: 1.06rem;
  line-height: 1.75;
  color: var(--ink-2);
}

.post-body > * + * { margin-top: 1.1em; }

.post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  line-height: 1.1;
  margin-top: 1.8em;
  color: var(--ink);
}

.post-body h2 { font-size: 1.9rem; }
.post-body h3 { font-size: 1.45rem; }
.post-body h4 { font-size: 1.15rem; }

.post-body a {
  color: var(--terra);
  text-decoration-color: rgba(189, 93, 51, 0.35);
  text-underline-offset: 3px;
}

.post-body a:hover { color: var(--ink); }

.post-body img { border-radius: 12px; width: 100%; height: auto; }

.post-body figure { margin-block: 1.6em; }

.post-body figcaption {
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey);
  text-align: center;
}

.post-body blockquote {
  border-left: 2px solid var(--terra);
  padding-left: 20px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
}

.post-body ul, .post-body ol { padding-left: 1.3em; }
.post-body li { margin-top: 0.4em; }
.post-body li::marker { color: var(--terra); }

.post-body hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin-block: 2em;
}

.post-body pre {
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

.post-body code {
  font-family: var(--mono);
  font-size: 0.9em;
}

.post-body p code, .post-body li code {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}

.post-foot {
  margin-top: clamp(40px, 6vw, 64px);
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

@media (max-width: 1100px) {
  .journal-cards, .journal-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .journal-cards, .journal-list { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Lightbox
   ------------------------------------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 10, 0.95);
  padding: clamp(14px, 3vw, 44px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s 0.35s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 110px);
  width: auto; height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  transform: scale(0.97);
  transition: transform 0.35s var(--ease-out);
}

.lightbox.open .lightbox-img { transform: scale(1); }

.lightbox-btn {
  position: fixed;
  z-index: 2;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(245, 240, 230, 0.3);
  background: rgba(15, 13, 10, 0.4);
  color: var(--paper);
  display: grid;
  place-items: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.lightbox-btn:hover { background: rgba(245, 240, 230, 0.16); border-color: rgba(245, 240, 230, 0.6); }

.lightbox-close { top: 18px; right: 18px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: rgba(245, 240, 230, 0.75);
}

/* Embed modal (Instagram) */
.embed-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 10, 0.95);
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease-out), visibility 0s 0.35s;
}

.embed-modal.open { opacity: 1; visibility: visible; transition-delay: 0s; }

.embed-modal iframe {
  width: min(94vw, 500px);
  height: min(88vh, 760px);
  border: 0;
  border-radius: 10px;
  background: white;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (min-width: 761px) {
  .scroll-cue { display: block; }
}

@media (max-width: 1100px) {
  .masonry { column-count: 2; }
  .insta-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .intro-grid,
  .about-grid,
  .project,
  .film-grid { grid-template-columns: 1fr; }

  .project:nth-child(even) .project-media { order: 0; }

  .about-media { position: static; max-width: 520px; }

  .hero-meta { display: none; }
}

@media (max-width: 600px) {
  .masonry { column-count: 1; }
  .insta-cards { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(58px, 17vw, 90px); }
  .lightbox-prev { left: 6px; }
  .lightbox-next { right: 6px; }
}

/* ------------------------------------------------------------
   Reduced motion
   ------------------------------------------------------------ */

@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;
  }

  [data-reveal],
  .mask-line > span { opacity: 1 !important; transform: none !important; clip-path: none !important; }

  .intro-statement .w { opacity: 1; }

  .marquee-track { animation: none; }
}
