/* ============================================================
   Jack Chapman — Architectural Designer
   Draft homepage · refined architectural minimalism
   ============================================================ */

:root {
  --paper:      #F1ECE1;
  --paper-2:    #FBF8F1;
  --ink:        #1A1813;
  --ink-soft:   #5B564A;
  --dark:       #0B0B0A;
  --dark-2:     #15140F;
  --clay:       #9E5C3C;
  --clay-light: #C08A66;
  --line:       rgba(26, 24, 19, 0.16);
  --line-light: rgba(245, 240, 228, 0.18);

  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", "Times New Roman", serif;

  --pad: clamp(1.4rem, 5vw, 6rem);     /* horizontal page padding */
  --maxw: 1500px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.5vw + 0.92rem, 1.12rem);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

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

/* ---------- grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
}

.skip-link {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: 300;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  transition: transform 0.25s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- accessibility: visible focus ring for keyboard users ----------
   Uses :focus-visible so the ring shows up only on keyboard navigation
   (tab/shift-tab) and not on every mouse click. Clay (brand) outline,
   offset slightly so it sits clear of the element it's framing. */
:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
  border-radius: 1px;
}
a:focus-visible,
.brand:focus-visible,
.site-nav a:focus-visible,
.toc a:focus-visible,
.site-socials a:focus-visible,
.pp-back:focus-visible,
.pp-foot-link:focus-visible,
.pp-foot-home:focus-visible {
  outline-offset: 5px;
}
button:focus-visible,
.contact-submit:focus-visible,
.contact-cv:focus-visible,
.vsound:focus-visible {
  outline-offset: 3px;
}
/* Make sure clicking with a mouse never leaves an orphan focus ring */
:focus:not(:focus-visible) { outline: none; }

/* ---------- shared type elements ---------- */
.eyebrow,
.section-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.idx {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--clay);
  margin-right: 0.7em;
  font-variant-numeric: tabular-nums;
}

em { font-style: italic; }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--pad);
  color: var(--paper);
  transition: background 0.45s var(--ease), color 0.45s var(--ease),
              padding 0.45s var(--ease), border-color 0.45s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(241, 236, 225, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  padding-top: 1.05rem;
  padding-bottom: 1.05rem;
  border-bottom-color: var(--line);
  text-shadow: none;
}
/* When sitting over the dark hero, lift the nav text from the image behind it */
.site-header:not(.scrolled) {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.brand { display: flex; align-items: baseline; gap: 0.75rem; }
.brand-mark {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 0.92rem;
  border: 1px solid currentColor;
  padding: 0.32em 0.5em 0.26em;
  line-height: 1;
}
.brand-name {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0.01em;
}

.site-nav { display: flex; gap: clamp(1.1rem, 2.4vw, 2.6rem); }
.site-nav a {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding-bottom: 2px;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  background: var(--dark);
  color: var(--paper);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 0 var(--pad) clamp(3rem, 7vh, 6rem);
}

.hero-figure {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 52%;
  z-index: 0;
  -webkit-mask-image: linear-gradient(105deg, transparent 4%, #000 40%);
  mask-image: linear-gradient(105deg, transparent 4%, #000 40%);
}
.hero-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 30% 38%;
  transform: scaleX(-1);
  animation: heroImg 1.8s var(--ease) both;
}
@keyframes heroImg {
  from { opacity: 0; transform: scaleX(-1) scale(1.08); }
  to   { opacity: 1; transform: scaleX(-1) scale(1); }
}

/* Top scrim so the nav stays legible over the lighter parts of the model */
.hero-scrim {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 13rem;
  z-index: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    transparent 100%
  );
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}

.eyebrow--light { color: var(--clay-light); }

.hero-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 11vw, 8.4rem);
  line-height: 0.94;
  letter-spacing: -0.02em;
  margin: 1.1rem 0 1.5rem;
}

.hero-lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 0.8vw + 0.78rem, 1.35rem);
  line-height: 1.5;
  color: #DDD6C5;
  max-width: 34ch;
}
.hero-lead em { color: var(--paper); }

.hero-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-top: 2.2rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #B5AE9D;
}
.hero-meta li { position: relative; padding-left: 1.4rem; }
.hero-meta li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.42em;
  width: 0.5rem; height: 1px;
  background: var(--clay-light);
}

.scroll-cue {
  position: absolute;
  right: var(--pad);
  bottom: clamp(3rem, 7vh, 6rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #B5AE9D;
}
.scroll-line {
  width: 1px; height: 4rem;
  background: linear-gradient(var(--clay-light), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--paper);
  animation: scrollDrop 2.4s var(--ease) infinite;
}
@keyframes scrollDrop {
  0%   { transform: translateY(-100%); }
  60%, 100% { transform: translateY(260%); }
}

/* hero load stagger */
[data-hero] {
  opacity: 0;
  transform: translateY(26px);
  animation: heroUp 1s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes heroUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   SECTION SHELL
   ============================================================ */
.statement,
.work,
.skills,
.about,
.contact {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  /* Account for the fixed site-header when scrolled to via anchor link.
     Without this, the section heading lands UNDER the header. */
  scroll-margin-top: 5rem;
}

.section-label {
  color: var(--ink-soft);
  padding-bottom: 1.4rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   STATEMENT
   ============================================================ */
.statement {
  padding-top: clamp(5rem, 12vh, 9rem);
  padding-bottom: clamp(5rem, 12vh, 9rem);
}
.statement-quote {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 4.6vw, 4rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
  max-width: 18ch;
  margin-bottom: 3rem;
}
.statement-quote em { color: var(--clay); }

.statement-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  max-width: 62rem;
  margin-left: auto;
}
.statement-body p { color: var(--ink-soft); }
.statement-more {
  grid-column: 1 / -1;
  margin-top: clamp(1rem, 2.5vh, 1.6rem);
  font-family: var(--sans) !important;
  font-size: 0.74rem !important;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink) !important;
}
.statement-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.statement-more a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.statement-more span { transition: transform 0.3s var(--ease); }
.statement-more a:hover span { transform: translateX(4px); }

/* About → Approach link — same treatment as statement-more, slightly tighter */
.about-more {
  margin-top: clamp(1rem, 2.5vh, 1.6rem);
  font-family: var(--sans) !important;
  font-size: 0.74rem !important;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink) !important;
}
.about-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.about-more a:hover { color: var(--clay); border-bottom-color: var(--clay); }
.about-more span { transition: transform 0.3s var(--ease); }
.about-more a:hover span { transform: translateX(4px); }

/* ============================================================
   WORK
   ============================================================ */
.work {
  padding-top: clamp(3rem, 7vh, 6rem);
  padding-bottom: clamp(4rem, 9vh, 7rem);
}
.work-head { margin-bottom: clamp(3rem, 7vh, 6rem); }
.work-head .section-label { margin-bottom: 1.6rem; }
.work-head-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  color: var(--ink-soft);
}

.project {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.8rem, 5vw, 5.5rem);
  padding: clamp(2.6rem, 6vh, 5rem) 0;
  border-top: 1px solid var(--line);
}
.project:last-of-type { border-bottom: 1px solid var(--line); }
.project--flip .project-media { order: 2; }

.project-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.project-media img,
.project-media .project-video {
  display: block;
  transition: transform 1.2s var(--ease), filter 0.8s var(--ease);
}
.project-media img { width: 100%; }
.project-media .project-video {
  width: 92%;        /* slightly smaller — sits inside a thin dark mat */
  height: auto;      /* override the HTML height attribute so the aspect
                        ratio below takes effect */
  margin: 0 auto;
  background: var(--dark);
  /* Explicit aspect ratio so iOS Safari (and others) don't fall back to
     the default 300×150 box before the video metadata loads. */
  aspect-ratio: 720 / 1280;
  object-fit: cover;
}

/* Sound toggle that sits over a project video */
.vsound {
  position: absolute;
  bottom: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 2.35rem;
  height: 2.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 11, 10, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(245, 240, 228, 0.2);
  color: var(--paper);
  cursor: pointer;
  padding: 0;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
              transform 0.3s var(--ease);
}
.vsound:hover {
  background: rgba(11, 11, 10, 0.85);
  border-color: var(--clay-light);
}
.vsound:active { transform: scale(0.95); }
.vsound svg { width: 1.05rem; height: 1.05rem; }
.vsound .vsound-wave { display: none; }
.vsound[aria-pressed="true"] .vsound-slash { display: none; }
.vsound[aria-pressed="true"] .vsound-wave { display: block; }
.vsound[aria-pressed="true"] { border-color: var(--clay-light); }
.project-media--dark { background: var(--dark); }
.project:hover .project-media img { transform: scale(1.045); }
@media (prefers-reduced-motion: reduce) {
  /* Hide the video for visitors who've asked for less motion — the poster
     image still shows from <video poster=...> so they see the static tower. */
  .project-video { pointer-events: none; }
}

/* Mobile fallback: video playback on iOS Safari/Chrome was unreliable, so
   on small screens we swap the video out for a still of the finished tower.
   The !important is here because earlier rules (.project-media img) carry a
   type-selector boost that would otherwise show the fallback on desktop. */
.project-media .project-video-fallback,
.pp-video-frame .project-video-fallback { display: none !important; }
@media (max-width: 720px) {
  .project-media .project-video,
  .pp-video-frame .project-video { display: none; }
  .project-media .project-video-fallback,
  .pp-video-frame .project-video-fallback {
    display: block !important;
    width: 100%;
    height: auto;
    aspect-ratio: 720 / 1280;
    object-fit: cover;
    background: var(--dark);
  }
  /* Sound button is irrelevant once the video is gone */
  .vsound { display: none; }
}

.project-num {
  position: absolute;
  top: 0.7rem; left: 0.9rem;
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--ink);
  background: var(--paper);
  padding: 0.4em 0.7em;
}
.project-media--dark .project-num { background: var(--paper); }

.project-kicker {
  font-family: var(--sans);
  font-size: 0.71rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.1rem;
}
.project-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
}
.project-desc {
  color: var(--ink-soft);
  max-width: 42ch;
  margin-bottom: 1.7rem;
}
.project-tags {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: inline-block;
}

.project-link {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.6rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.35s var(--ease), border-color 0.35s var(--ease),
              color 0.35s var(--ease);
}
.project-link:hover {
  color: var(--clay);
  border-bottom-color: var(--clay);
  gap: 1rem;
}
.project-link span {
  font-size: 0.95rem;
  line-height: 0;
}

/* Live-build flag: set the 1:1 build visually apart from the theoretical work */
.project-flag {
  position: absolute;
  top: 0.7rem; right: 0.9rem;
  z-index: 2;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--clay);
  padding: 0.4em 0.8em;
}
.project--livebuild .project-kicker { color: var(--clay); }

/* ============================================================
   INTERLUDE
   ============================================================ */
.interlude {
  position: relative;
  margin: clamp(2rem, 6vh, 5rem) 0;
  background: var(--dark);
}
.interlude img {
  width: 100%;
  max-height: 78vh;
  object-fit: cover;
  opacity: 0.94;
}
.interlude::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.66));
  pointer-events: none;
}
.interlude figcaption {
  position: absolute;
  z-index: 2;
  left: var(--pad);
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
  max-width: 28ch;
}
.interlude figcaption .idx { color: var(--clay-light); }
.interlude figcaption p { margin-bottom: 0.45rem; }
.interlude-link {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 0.35s var(--ease), gap 0.35s var(--ease);
}
.interlude-link:hover { color: var(--clay-light); }
.interlude-link span { margin-left: 0.3rem; }

/* ============================================================
   SKILLS
   ============================================================ */
.skills {
  padding-top: clamp(4rem, 9vh, 7rem);
  padding-bottom: clamp(4rem, 9vh, 7rem);
}
.skills-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 clamp(2rem, 5vw, 5rem);
  border-bottom: 1px solid var(--line);
  max-width: 64rem;
}
.skills-list li {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
/* First row uses the section-label underline as its top edge — avoids a doubled hairline */
.skills-list li:first-child,
.skills-list li:nth-child(2) { border-top: none; }
.skill-num {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--clay);
  font-variant-numeric: tabular-nums;
  min-width: 1.6em;
}
.skill-name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.3vw, 1.35rem);
  color: var(--ink);
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  padding-top: clamp(4rem, 10vh, 8rem);
  padding-bottom: clamp(4rem, 10vh, 8rem);
}
.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.about-portrait {
  margin: 0;
  position: relative;
}
.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.95);
}
.about-lead {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.4rem, 2.4vw, 2.05rem);
  line-height: 1.32;
  letter-spacing: -0.012em;
  margin-bottom: 1.6rem;
}
.about-prose p:not(.about-lead) { color: var(--ink-soft); }

.about-facts { display: grid; gap: 1.7rem; }
.fact { border-top: 1px solid var(--line); padding-top: 1.1rem; }
.fact dt {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.8rem;
}
.fact dd {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 0.55rem;
}
.fact dd:last-child { margin-bottom: 0; }
.fact dd span {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  background: var(--dark);
  color: var(--paper);
  max-width: none;
  margin-top: clamp(2rem, 6vh, 5rem);
  padding-top: clamp(5rem, 13vh, 10rem);
  padding-bottom: clamp(5rem, 13vh, 10rem);
}
.contact > * { max-width: var(--maxw); margin-inline: auto; }
.contact .eyebrow--light { color: var(--clay-light); }

.contact-head {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 6.5vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 1.6rem 0 1.8rem;
}
.contact-head em { color: var(--clay-light); }

.contact-sub {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  color: #C8C1B0;
  max-width: 42ch;
  margin-inline: 0;
  margin-bottom: clamp(2.6rem, 6vh, 4.5rem);
}

/* Two-column contact layout: form on the left, "Other ways" panel on the right. */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.4rem);
  align-items: start;
  margin-top: clamp(2rem, 5vh, 3.6rem);
}
.contact-form { max-width: 46rem; }
.field-optional {
  font-size: 0.75em;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #807969;
  margin-left: 0.4em;
}

.contact-aside {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 3.5vh, 2.4rem);
}

/* CV download — the headline thing on the right column. */
.contact-cv-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  background: var(--paper);
  color: var(--dark);
  text-decoration: none;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  border: 1px solid rgba(245, 240, 228, 0.18);
}
.contact-cv-card:hover {
  background: var(--clay);
  color: var(--paper);
  border-color: var(--clay);
}
.contact-cv-icon {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--clay);
  transition: color 0.35s var(--ease), transform 0.35s var(--ease);
}
.contact-cv-card:hover .contact-cv-icon { color: var(--paper); transform: translateY(3px); }
.contact-cv-body { display: flex; flex-direction: column; gap: 0.2rem; }
.contact-cv-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.contact-cv-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
  transition: color 0.35s var(--ease);
}
.contact-cv-card:hover .contact-cv-sub { color: rgba(251, 250, 246, 0.7); }

/* Sub-list of other ways to reach Jack */
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.contact-links-label {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay-light);
  margin-bottom: 0.2rem;
}
.contact-link {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 1rem;
  align-items: baseline;
  text-decoration: none;
  color: #C8C1B0;
  font-family: var(--sans);
  font-size: 0.82rem;
}
a.contact-link {
  transition: color 0.3s var(--ease);
}
a.contact-link:hover { color: var(--paper); }
a.contact-link:hover .contact-link-val { color: var(--clay-light); }
.contact-link-key {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #807969;
}
.contact-link-val {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--paper);
  letter-spacing: 0;
  text-transform: none;
  transition: color 0.3s var(--ease);
}

.form-meta {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  color: #C8C1B0;
}

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 2.4rem; }
  .contact-aside { order: -1; }   /* on mobile, the CV button comes BEFORE the form */
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.4rem, 4vw, 2.8rem);
}
.field { margin-bottom: 1.7rem; }
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay-light);
  margin-bottom: 0.75rem;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-light);
  border-radius: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0.55rem 0;
  transition: border-color 0.35s var(--ease);
}
.field textarea {
  resize: vertical;
  min-height: 3.4rem;
  line-height: 1.5;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--clay-light);
}
/* Keyboard-only focus ring on form fields — visible halo for tabbed-in fields */
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* honeypot — hidden from people, catches bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem 2.2rem;
  margin-top: 2.4rem;
}
.contact-submit {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper);
  background: transparent;
  border: 1px solid var(--line-light);
  padding: 1.05rem 2.5rem;
  cursor: pointer;
  transition: background 0.4s var(--ease), color 0.4s var(--ease),
              border-color 0.4s var(--ease);
}
.contact-submit:hover {
  background: var(--paper);
  color: var(--dark);
  border-color: var(--paper);
}
.contact-submit:disabled { opacity: 0.45; cursor: default; }

.contact-ig {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: #C8C1B0;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease);
}
.contact-ig:hover {
  color: var(--paper);
  border-bottom-color: var(--clay-light);
}

.form-status {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: #C8C1B0;
  margin-top: 1.4rem;
  min-height: 1.1rem;
}
.form-status.error { color: #E3A07C; }

.contact-thanks {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  line-height: 1.3;
  color: var(--paper);
  max-width: 32ch;
}
.contact-thanks em { color: var(--clay-light); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark);
  color: #8A8474;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 2.4rem var(--pad);
  border-top: 1px solid var(--line-light);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
}
.site-footer a:hover { color: var(--paper); }

.site-socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  padding: 0;
  margin: 0;
}
.site-socials a {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #B5AE9D;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.site-socials a:hover {
  color: var(--paper);
  border-bottom-color: var(--clay-light);
}

.site-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-light);
}

/* ============================================================
   404 PAGE
   ============================================================ */
.nf-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 7rem var(--pad) clamp(4rem, 9vh, 7rem);
}
.nf {
  max-width: 38rem;
  text-align: center;
}
.nf-eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 2rem;
}
.nf-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(6rem, 18vw, 13rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.nf-line {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  line-height: 1.3;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.nf-line em { color: var(--clay); }
.nf-sub {
  color: var(--ink-soft);
  max-width: 32rem;
  margin: 0 auto 2.5rem;
}
.nf-actions {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}
.nf-actions .project-link { margin-top: 0; }

/* ============================================================
   FLOATING SECTION INDEX (TOC)
   Right-side editorial index. Uses mix-blend-mode: difference so a
   single colour reads cleanly over both paper and dark sections.
   ============================================================ */
.toc {
  position: fixed;
  right: clamp(1rem, 2vw, 2.4rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  pointer-events: none;
  opacity: 0;
  /* Asymmetric transitions: slow fade-out (so it doesn't blink away
     mid-scroll), fast fade-in (so it responds when you start scrolling). */
  transition: opacity 0.8s var(--ease), color 0.45s var(--ease);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
/* Theme: TOC sits over a paper section -> ink text; dark section -> paper text */
.toc.toc--dark { color: #E7E0D0; }
.toc.toc--light { color: var(--ink); }
.toc.is-visible {
  opacity: 1;
  pointer-events: auto;
  /* Override the slower fade-out timing — fading IN should feel quick. */
  transition: opacity 0.3s var(--ease), color 0.45s var(--ease);
}
.toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  padding: 0;
  margin: 0;
}
.toc li { padding: 0; margin: 0; }
.toc a {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  opacity: 0.45;
  transition: opacity 0.4s var(--ease);
  white-space: nowrap;
}
.toc a:hover { opacity: 1; }

.toc-num {
  font-variant-numeric: tabular-nums;
  min-width: 1.5em;
}
/* Tick: container is always full width to keep the layout stable; the
   visible portion scales via transform so hover doesn't reflow the item. */
.toc-tick {
  display: inline-block;
  width: 2rem;
  height: 1px;
  background: currentColor;
  transform-origin: left center;
  transform: scaleX(0.42);
  transition: transform 0.4s var(--ease);
  flex-shrink: 0;
}
.toc-label {
  opacity: 0;
  transform: translateX(-0.35rem);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.toc a:hover .toc-tick,
.toc li.is-active a .toc-tick { transform: scaleX(1); }
.toc a:hover .toc-label,
.toc li.is-active a .toc-label {
  opacity: 1;
  transform: translateX(0);
}
.toc li.is-active a { opacity: 1; }

/* On phones the TOC isn't useful and gets in the way. On larger screens
   it stays — the auto-fade-on-idle (driven by main.js) handles the
   overlap problem by only showing the TOC while the visitor is actively
   scrolling, and tucking it away after 1.5s of idle. */
@media (max-width: 767px) {
  .toc { display: none; }
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(7, 7, 6, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 5rem);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; }
.lightbox-inner {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  cursor: default;
}
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  width: auto;
  display: block;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}
.lightbox figcaption {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #D7D0BE;
  text-align: center;
  cursor: zoom-out;
}
.lightbox-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  background: transparent;
  border: 1px solid rgba(245, 240, 228, 0.25);
  color: var(--paper);
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.lightbox-close:hover {
  border-color: var(--clay-light);
  background: rgba(245, 240, 228, 0.08);
}

/* ============================================================
   PROJECT DETAIL PAGE
   ============================================================ */
body.project-page { background: var(--paper); }

/* Header on project pages: always in scrolled state (no dark hero behind it) */
.site-header--page {
  background: rgba(241, 236, 225, 0.94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--ink);
  border-bottom-color: var(--line);
}

.pp {
  max-width: 1200px;
  margin-inline: auto;
  padding: 7.5rem var(--pad) clamp(4rem, 9vh, 7rem);
}

.pp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: clamp(3rem, 7vh, 5rem);
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
              gap 0.35s var(--ease);
}
.pp-back:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  gap: 0.9rem;
}

.pp-head { max-width: 38rem; margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.pp-eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.pp-eyebrow .idx { color: var(--clay); }
.pp-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin-bottom: 1.5rem;
}
.pp-deck {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 1.4vw, 1.4rem);
  line-height: 1.45;
  color: var(--ink-soft);
}
.pp-deck em { color: var(--ink); font-style: italic; }

.pp-hero {
  margin: 0 0 clamp(3rem, 7vh, 5rem);
  background: var(--paper-2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pp-hero--dark { background: var(--dark); }
.pp-hero--dark figcaption { color: var(--ink-soft); }
.pp-hero img {
  display: block;
  max-width: 100%;
  max-height: 75vh;
  width: auto;
  height: auto;
}
.pp-hero figcaption {
  align-self: flex-start;
  padding: 0 clamp(1rem, 3vw, 2rem);
}
.pp-hero figcaption {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

.pp-body {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  margin-bottom: clamp(4rem, 9vh, 7rem);
}
.pp-copy h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  letter-spacing: -0.012em;
  margin: 0 0 1.1rem;
}
.pp-copy h2:not(:first-child) { margin-top: 2.6rem; }
.pp-copy p {
  color: var(--ink-soft);
  margin-bottom: 1rem;
  max-width: 60ch;
}

.pp-facts dl { display: grid; gap: 1.7rem; }
.pp-facts .fact {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.pp-facts dt {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.7rem;
}
.pp-facts dd {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}
.pp-facts dd:last-child { margin-bottom: 0; }
.pp-facts dd span {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
}

/* Animation section on a project page — centred portrait video on dark */
.pp-animation { margin-bottom: clamp(3rem, 7vh, 5rem); }
.pp-animation .section-label { margin-bottom: 2rem; }
.pp-video { margin: 0; display: flex; flex-direction: column; align-items: center; }
.pp-video-frame {
  position: relative;
  background: var(--dark);
  width: 100%;
  max-width: 32rem;       /* keeps the portrait video from dominating the page */
  margin: 0 auto;
  display: flex;
  justify-content: center;
}
.pp-video-frame .project-video {
  width: 100%;
  height: auto;
  aspect-ratio: 720 / 1280;
  background: var(--dark);
  object-fit: cover;
  display: block;
}
.pp-video figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--ink-soft);
  margin-top: 1.4rem;
  max-width: 40rem;
  text-align: center;
}

.pp-gallery { margin-bottom: clamp(3rem, 7vh, 5rem); }
.pp-gallery .section-label { margin-bottom: 2.6rem; }
.pp-shot {
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
}
.pp-shot--white { background: #fff; }
.pp-shot img {
  width: 100%;
  height: auto;
  display: block;
}
/* Constrain very-portrait shots (eg. a single drawn render) so they don't
   stretch to fill the whole gallery column. Caption stays centred under it. */
.pp-shot--narrow {
  max-width: 62%;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 720px) {
  .pp-shot--narrow { max-width: 100%; }
}

/* Two portrait shots side-by-side instead of stacked vertically. Keeps the
   page from becoming a never-ending column of 1500px-tall photographs. */
.pp-gallery-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 1.8vw, 1.5rem);
  margin: 0 0 clamp(2.5rem, 6vh, 4rem);
}
.pp-gallery-pair .pp-shot { margin-bottom: 0; }
@media (max-width: 720px) {
  .pp-gallery-pair { grid-template-columns: 1fr; gap: 0; }
  .pp-gallery-pair .pp-shot { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
  .pp-gallery-pair .pp-shot:last-child { margin-bottom: 0; }
}
.pp-shot figcaption {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.9rem;
}

/* ────────────────────────────────────────────────────────────────
   Story chapters — used by the skin-tectonics-study journey page.
   Each chapter has an eyebrow label, a serif chapter title, body
   copy, and an image (either alongside on desktop or beneath on
   smaller widths). Some chapters use the two-column grid; others
   stack the copy full-width and follow it with a single figure or
   a paired gallery.
   ──────────────────────────────────────────────────────────────── */
.pp-chapter {
  margin: clamp(4rem, 9vh, 7rem) 0;
}
.pp-chapter .section-label {
  margin-bottom: 0.6rem;
}
.pp-chapter-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.85rem, 3.4vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 clamp(1.4rem, 3vh, 2.2rem);
  max-width: 30ch;
}
.pp-chapter-copy p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 0.6vw + 0.85rem, 1.2rem);
  line-height: 1.6;
  margin: 0 0 1.1em;
  max-width: 38ch;
}
.pp-chapter-copy p:last-child { margin-bottom: 0; }
.pp-chapter-copy--wide p { max-width: 56ch; }

/* Two-column chapter: copy on the left, single image on the right.
   On the --reverse variant the image leads. Stacks at narrow widths. */
.pp-chapter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
  margin-top: clamp(1.4rem, 3vh, 2.4rem);
}
.pp-chapter-grid .pp-shot { margin-bottom: 0; }
.pp-chapter-grid--reverse > :first-child { order: 2; }
.pp-chapter-grid--reverse > :last-child { order: 1; }
@media (max-width: 880px) {
  .pp-chapter-grid {
    grid-template-columns: 1fr;
    gap: clamp(1.6rem, 4vh, 2.8rem);
  }
  .pp-chapter-grid--reverse > :first-child,
  .pp-chapter-grid--reverse > :last-child { order: initial; }
}

/* Chapter that has no figure attached — pure narrative interlude. */
.pp-chapter--no-image .pp-chapter-copy { margin-top: clamp(1rem, 2vh, 1.6rem); }

/* When a chapter stacks copy above gallery items, give the first
   gallery item a little air. */
.pp-chapter > .pp-chapter-copy + .pp-shot,
.pp-chapter > .pp-chapter-copy + .pp-gallery-pair {
  margin-top: clamp(2rem, 5vh, 3.4rem);
}
.pp-chapter > .pp-shot + .pp-gallery-pair,
.pp-chapter > .pp-gallery-pair + .pp-shot {
  margin-top: clamp(1.4rem, 3vh, 2rem);
}

/* Small photo credit line above the project footer nav */
.pp-credits {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.86rem;
  color: var(--ink-soft);
  text-align: right;
  margin: clamp(1.4rem, 3vh, 2rem) 0 clamp(2rem, 5vh, 3rem);
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.pp-credits a {
  color: var(--clay);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.22s var(--ease);
}
.pp-credits a:hover { opacity: 0.7; }
.pp-credits + .pp-foot { border-top: 0; padding-top: 0; }

.pp-foot {
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vh, 3.5rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.pp-foot .pp-back { margin-bottom: 0; }
.pp-foot-link {
  display: grid;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: opacity 0.22s var(--ease);
}
.pp-foot-link:hover { opacity: 0.65; }
.pp-foot-prev { grid-column: 1; text-align: left; }
.pp-foot-next { grid-column: 3; text-align: right; }
.pp-foot-direction {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 600;
}
.pp-foot-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.pp-foot-title {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  line-height: 1.2;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.pp-foot-title em {
  font-style: italic;
  color: var(--ink-soft);
  font-weight: 300;
  font-size: 0.92em;
  margin-left: 0.3em;
}
.pp-foot-home {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  padding-top: 0.2rem;
  transition: color 0.22s var(--ease);
}
.pp-foot-home .pp-foot-home-icon {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  display: block;
  color: var(--clay);
}
.pp-foot-home:hover { color: var(--clay); }

@media (max-width: 700px) {
  .pp-foot {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    text-align: center;
  }
  .pp-foot-prev, .pp-foot-next, .pp-foot-home {
    grid-column: 1;
    text-align: center;
    justify-items: center;
  }
}

@media (max-width: 900px) {
  .pp { padding-top: 6rem; }
  .pp-body { grid-template-columns: 1fr; }
}

/* Drawings page */
.drawings {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 6vh, 4rem);
  margin-bottom: clamp(3rem, 8vh, 5rem);
}
.drawing-shot { margin: 0; background: var(--paper-2); }
.drawing-shot img { width: 100%; height: auto; display: block; }
.drawing-shot figcaption {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 1rem;
}
.drawings-note {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  color: var(--ink-soft);
  text-align: center;
  padding: clamp(3rem, 8vh, 5rem) 0;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2rem, 5vh, 4rem);
}
.drawings-note em { color: var(--clay); }

/* ============================================================
   APPROACH PAGE
   ============================================================ */
.ap {
  max-width: 56rem;
  margin: 0 auto;
  padding: clamp(7rem, 12vh, 9rem) var(--pad) clamp(4rem, 8vh, 6rem);
}
.ap-head {
  max-width: 44rem;
  margin: clamp(1.6rem, 4vh, 3rem) 0 clamp(2.4rem, 5vh, 4rem);
}
.ap-eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: clamp(1rem, 2.4vh, 1.6rem);
}
.ap-eyebrow .idx { color: var(--clay); }
.ap-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-bottom: clamp(1.6rem, 3vh, 2.2rem);
}
.ap-title em {
  font-style: italic;
  color: var(--clay);
  font-weight: 300;
}
.ap-deck {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38rem;
}
.ap-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: clamp(2.4rem, 6vh, 4rem) 0 clamp(2rem, 4vh, 3rem);
}

.ap-principle {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: clamp(1.4rem, 3vw, 2.6rem);
  padding: clamp(2.4rem, 5vh, 3.4rem) 0;
  border-bottom: 1px solid var(--line);
}
.ap-principle:last-of-type { border-bottom: 0; }
.ap-num {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.8rem, 4.5vw, 4rem);
  line-height: 0.85;
  color: var(--clay);
  letter-spacing: -0.02em;
  padding-top: 0.4rem;
}
.ap-body { max-width: 40rem; }
.ap-body h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: clamp(0.9rem, 2vh, 1.4rem);
  letter-spacing: -0.005em;
}
.ap-body p {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  line-height: 1.62;
  color: var(--ink);
  margin-bottom: clamp(0.8rem, 1.8vh, 1.2rem);
}
.ap-body p:last-child { margin-bottom: 0; }
.ap-body a {
  color: var(--clay);
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
  transition: opacity 0.25s var(--ease);
}
.ap-body a:hover { opacity: 0.7; }

.ap-closing {
  max-width: 40rem;
  margin: clamp(2rem, 4vh, 3rem) 0 clamp(2.4rem, 5vh, 3.6rem);
}
.ap-closing p {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.ap-sign {
  font-family: var(--sans);
  font-style: normal !important;
  font-size: 0.74rem !important;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay) !important;
  margin-top: 1.6rem !important;
}

@media (max-width: 720px) {
  .ap { padding-top: 6rem; }
  .ap-principle {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .ap-num { padding-top: 0; }
}

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* Line-draw — for horizontal rules and dividers. Scales from left edge
   to full width over ~1.2s when scrolled into view. Architectural feel. */
.line-draw {
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}
.line-draw.in { transform: scaleX(1); }

/* ============================================================
   PAGE-LOAD FADE — soft transition between pages
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  body.project-page,
  body.approach-page {
    animation: page-fade-in 0.55s var(--ease) both;
  }
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }
  .reveal { opacity: 1; transform: none; }
  .line-draw { transform: scaleX(1); }
  [data-hero] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero { align-items: flex-end; }
  .hero-figure {
    width: 70%; opacity: 0.5;
    -webkit-mask-image: linear-gradient(150deg, transparent 6%, #000 55%);
    mask-image: linear-gradient(150deg, transparent 6%, #000 55%);
  }
  .hero-scrim { height: 8rem; }
  .scroll-cue { display: none; }

  .statement-body { grid-template-columns: 1fr; }

  .project,
  .about-grid { grid-template-columns: 1fr; }
  .project { gap: 1.8rem; padding: 2.8rem 0; }
  .project--flip .project-media { order: 0; }
  .project-desc { max-width: 52ch; }

  /* On mobile, let the video use the full project-media width — the mat is too
     subtle to register on a small portrait screen. */
  .project-media .project-video { width: 100%; }

  .about-portrait { max-width: 22rem; margin-bottom: 0.5rem; }

  .skills-list { grid-template-columns: 1fr; }

  .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .hero-figure { width: 86%; }
  .hero-meta { gap: 0.7rem 1.2rem; }
  .site-footer-row { flex-direction: column; gap: 0.5rem; }
  .site-socials { gap: 1.2rem; }
}

/* ────────────────────────────────────────────────────────────────────
   PRINT STYLESHEET
   For recruiters and tutors who print a portfolio page on A4.
   Strip interactive chrome, force a single column, ensure project
   media + text print together on the same sheet where possible.
   ──────────────────────────────────────────────────────────────────── */
@media print {
  /* Force a sensible A4 layout with generous margins */
  @page {
    size: A4;
    margin: 18mm 16mm;
  }

  /* Pure paper background, full-contrast ink */
  html, body {
    background: #fff !important;
    color: #111 !important;
    font-size: 10pt !important;
  }

  /* Hide chrome that has no meaning on paper */
  .grain,
  .site-header,
  .site-header--page,
  .toc,
  .scroll-cue,
  .hero-scrim,
  .skip-link,
  .vsound,
  .contact-form,
  .contact-cv,
  .contact-thanks,
  .site-footer,
  .pp-foot,
  .pp-back,
  .drawings-note,
  video,
  .project-video,
  .project-video-fallback {
    display: none !important;
  }

  /* Hero becomes a quiet masthead — show name + lead, no photo, no dark bg */
  .hero {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 0 8mm 0 !important;
    border-bottom: 0.5pt solid #888;
    margin-bottom: 8mm;
    page-break-after: avoid;
    background: transparent !important;
    color: #111 !important;
    text-shadow: none !important;
    display: block !important;
  }
  .hero * { text-shadow: none !important; }
  .hero-meta li::before { background: #888 !important; }
  .hero-figure { display: none !important; }
  .hero-inner {
    position: static !important;
    padding: 0 !important;
    max-width: none !important;
  }
  .hero-name {
    font-size: 28pt !important;
    color: #111 !important;
    line-height: 1.05 !important;
    margin-bottom: 3mm !important;
  }
  .hero-lead {
    color: #333 !important;
    font-size: 11pt !important;
    margin-bottom: 4mm !important;
  }
  .hero-meta li { color: #555 !important; }

  /* Single-column layout for everything */
  main,
  .statement,
  .work,
  .project,
  .about-grid,
  .skills,
  .contact { 
    display: block !important;
    grid-template-columns: 1fr !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: none !important;
    margin: 0 0 8mm 0 !important;
  }

  /* Section labels — small uppercase tag */
  .section-label,
  .pp-eyebrow {
    color: #888 !important;
    font-size: 7.5pt !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    margin-bottom: 3mm !important;
  }

  /* Statement quote */
  .statement-quote {
    font-size: 18pt !important;
    line-height: 1.25 !important;
    margin-bottom: 5mm !important;
    color: #111 !important;
  }
  .statement-body p { margin-bottom: 3mm !important; }

  /* Project blocks — keep image + text together if possible */
  .project {
    page-break-inside: avoid;
    margin-bottom: 10mm !important;
    border-bottom: 0.4pt solid #ddd;
    padding-bottom: 8mm !important;
  }
  .project-media,
  .project-text {
    width: 100% !important;
    padding: 0 !important;
  }
  .project-media {
    margin-bottom: 4mm !important;
  }
  .project-media img,
  .pp-hero img,
  .pp-shot img,
  .drawing-shot img {
    width: 100% !important;
    height: auto !important;
    max-height: 12cm !important;
    object-fit: contain !important;
    background: #fff !important;
  }
  .project-media--dark { background: transparent !important; }
  .project-num {
    background: transparent !important;
    color: #888 !important;
    font-size: 7.5pt !important;
    padding: 0 !important;
    position: static !important;
  }
  .project-title {
    font-size: 18pt !important;
    color: #111 !important;
    margin: 2mm 0 2mm 0 !important;
    line-height: 1.15 !important;
  }
  .project-kicker {
    color: #888 !important;
    font-size: 8pt !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    margin-bottom: 2mm !important;
  }
  .project-desc {
    color: #222 !important;
    font-size: 10pt !important;
    line-height: 1.5 !important;
  }

  /* Project detail pages */
  .pp { padding: 0 !important; max-width: none !important; }
  .pp-head { margin-bottom: 6mm !important; padding-bottom: 4mm !important; border-bottom: 0.4pt solid #ddd; }
  .pp-title { font-size: 22pt !important; color: #111 !important; line-height: 1.1 !important; }
  .pp-deck { color: #333 !important; font-size: 11pt !important; }
  .pp-body { grid-template-columns: 1fr !important; gap: 4mm !important; }
  .pp-facts { font-size: 9pt !important; color: #444 !important; }
  .pp-facts dt { color: #888 !important; }

  /* About + Skills */
  .about-portrait { max-width: 4cm !important; float: right; margin-left: 4mm; }
  .skills-list { display: block !important; }
  .skills-list li {
    display: inline-block;
    margin: 0 4mm 1mm 0;
    color: #222 !important;
    font-size: 10pt !important;
  }

  /* Page break before any project detail page article */
  .project-page .pp { page-break-before: avoid; }

  /* Ensure links read as plain text — recruiters can see the URL */
  a {
    color: #111 !important;
    text-decoration: none !important;
  }
  /* Append the URL for off-site links so it's visible on paper */
  a[href^="http"]:not(.brand):not(.site-nav a)::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #888;
  }

  /* Headings shouldn't sit alone at the bottom */
  h1, h2, h3, .project-title, .pp-title { page-break-after: avoid; }
  img, figure, .project { page-break-inside: avoid; }

  /* Reveal animation classes — make sure nothing is invisible */
  .reveal, [data-hero] { opacity: 1 !important; transform: none !important; }
}
