:root {
  --ground: #0E0D0C;
  --text: #EDE8DF;
  --text-strong: #F3EEE6;
  --text-soft: #C8C1B6;
  --muted: #9A938A;
  --rule: #2A2724;
  --accent: #C9B48A;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Jost', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text); text-decoration: none; transition: color .2s; }
a:hover, a:focus-visible { color: var(--accent); }
ul { list-style: none; margin: 0; padding: 0; }
p, h1 { margin: 0; }

.label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* Hero */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  padding: 4rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 1.75rem;
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--text-strong);
}
.subtitle {
  font-style: italic;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: var(--text-soft);
}

/* About */
.about {
  max-width: 46rem; margin: 0 auto; padding: 10rem 1.5rem;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2.5rem;
}
.statement {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.45;
}

/* Selected work */
.work {
  max-width: 56rem; margin: 0 auto; padding: 6rem 1.5rem 10rem;
  display: flex; flex-direction: column; gap: 3.5rem;
}
.projects li {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}
.projects li:last-child { border-bottom: 1px solid var(--rule); }
.project-title { font-size: clamp(1.75rem, 3.4vw, 2.75rem); color: var(--text-strong); }
.meta {
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}

/* Experience */
.experience {
  max-width: 46rem; margin: 0 auto; padding: 6rem 1.5rem 10rem;
  display: flex; flex-direction: column; gap: 3.5rem;
}
.roles { display: flex; flex-direction: column; gap: 2.75rem; }
.roles li {
  display: grid; grid-template-columns: minmax(6rem, 9rem) 1fr;
  gap: 1.5rem; align-items: baseline;
}
.roles li > div { display: flex; flex-direction: column; gap: 0.25rem; }
.dates { font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.12em; color: var(--muted); }
.role-title { font-size: 1.75rem; color: var(--text-strong); }
.company { font-style: italic; font-size: 1.25rem; color: var(--text-soft); }

/* Contact */
.contact {
  min-height: 70vh; padding: 8rem 1.5rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 2.5rem;
}
.email {
  font-style: italic;
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
.links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 2.5rem;
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.links a { color: var(--muted); padding: 0.75rem 0; }
.links a:hover, .links a:focus-visible { color: var(--accent); }

@media (max-width: 480px) {
  .roles li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* About note */
.note {
  font-style: italic;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.5;
  color: var(--text-soft);
  max-width: 36rem;
}

/* Key figures */
.figures { max-width: 56rem; margin: 0 auto; padding: 2rem 1.5rem 8rem; }
.figures ul {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 3rem 2rem; text-align: center;
}
.figures li { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; }
.figure { font-size: clamp(3rem, 6vw, 4.5rem); line-height: 1; color: var(--text-strong); }
.figures .meta { max-width: 14rem; line-height: 1.6; }

/* Ascension Festival gallery */
.festival {
  max-width: 72rem; margin: 0 auto; padding: 4rem 1.5rem 10rem;
  display: flex; flex-direction: column; gap: 3.5rem;
}
.festival-head { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; text-align: center; }
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.75rem;
}
.gallery figure {
  margin: 0; overflow: hidden; background: #171513;
  grid-column: span 4; aspect-ratio: 3 / 2;
}
/* Rows 1–2: wide lead + tall; rows 3–4: tall + wide; then three across */
.gallery .g-lead, .gallery .g-wide { grid-column: span 9; grid-row: span 2; }
.gallery .g-tall { grid-column: span 3; grid-row: span 2; aspect-ratio: auto; }
.gallery img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.85) brightness(0.8) contrast(1.05);
  transform: scale(1.001);
  transition: filter .8s ease, transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.gallery figure:hover img {
  filter: grayscale(0) brightness(1) contrast(1);
  transform: scale(1.04);
}
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .gallery figure { grid-column: span 1; }
  .gallery .g-lead, .gallery .g-wide { grid-column: span 2; grid-row: auto; aspect-ratio: 3 / 2; }
  .gallery .g-tall { grid-column: span 1; grid-row: auto; aspect-ratio: 2 / 3; }
  .gallery figure:last-child { grid-column: span 2; }
}
/* Touch screens have no hover: show photos in colour */
@media (hover: none) {
  .gallery img { filter: none; }
}

/* Animations */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.hero h1 { animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both .1s; }
.hero .subtitle { animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both .45s; }

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Hover details */
.projects li .project-title { transition: color .35s, transform .5s cubic-bezier(.2,.7,.2,1); }
.projects li:hover .project-title { color: var(--accent); transform: translateX(0.5rem); }
.projects li .meta { transition: color .35s; }
.projects li:hover .meta { color: var(--text-soft); }

.email, .links a { position: relative; }
.email::after, .links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -0.15em; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.links a::after { bottom: 0.5rem; }
.email:hover::after, .links a:hover::after,
.email:focus-visible::after, .links a:focus-visible::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Venture links */
.site-link {
  font-family: var(--sans); font-size: 0.8125rem;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
  position: relative; padding: 0.5rem 0;
}
.site-link::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0.3rem; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.site-link:hover::after, .site-link:focus-visible::after { transform: scaleX(1); }
.company a {
  color: inherit;
  text-decoration: underline; text-decoration-color: var(--rule);
  text-underline-offset: 0.2em; text-decoration-thickness: 1px;
  transition: color .3s, text-decoration-color .3s;
}
.company a:hover, .company a:focus-visible { color: var(--accent); text-decoration-color: var(--accent); }

/* Tim Clark highlight — three squares, kept compact: source images are small */
.festival.duo { max-width: 56rem; padding-top: 0; }
.gallery-duo { grid-template-columns: repeat(3, 1fr); }
.gallery-duo figure { grid-column: span 1; aspect-ratio: 1 / 1; }
@media (max-width: 760px) {
  .gallery-duo { grid-template-columns: repeat(2, 1fr); }
  .gallery-duo figure:first-child { grid-column: span 2; }
  .gallery-duo figure:last-child { grid-column: span 1; }
}

/* Education sits close under Experience */
.education { padding-top: 0; }

/* First-person story in a highlight section */
.story {
  max-width: 42rem;
  font-size: clamp(1.125rem, 1.8vw, 1.375rem);
  line-height: 1.6;
  color: var(--text);
}

/* Hero particle portrait (active only once js/particles.js has started) */
.hero-stage { display: contents; }
.hero-text { display: flex; flex-direction: column; align-items: center; gap: 1.75rem; }
.hero-canvas, .hero-figure { display: none; }

.has-particles .hero {
  display: block;
  min-height: 0;
  height: 175vh;
  height: 175svh;
  padding: 0;
}
.has-particles .hero-stage {
  display: block;
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.has-particles .hero-canvas {
  display: block;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
}
.has-particles .hero-figure {
  display: block;
  position: absolute;
  right: 4vw; bottom: 0;
  width: 56vw; height: 94%;
  pointer-events: none;
}
.has-particles .hero-text {
  position: absolute;
  left: 7vw; bottom: 16vh;
  max-width: min(38rem, 44vw);
  gap: 1.5rem;
  align-items: flex-start; text-align: left;
  opacity: calc(1 - var(--p, 0) * 1.8);
  transform: translateY(calc(var(--p, 0) * -60px));
  will-change: opacity, transform;
}
.has-particles .hero h1 { font-size: clamp(3rem, 6.5vw, 6.5rem); }

@media (max-width: 760px) {
  .has-particles .hero-figure {
    left: 0; right: 0; top: 6%;
    width: auto; height: auto;
  }
  .has-particles .hero-text {
    left: 1.5rem; right: 1.5rem; bottom: 9svh;
    max-width: none;
    text-align: center; align-items: center;
    text-shadow: 0 0 24px var(--ground), 0 0 8px var(--ground);
  }
}

/* Recommendation: a single pull quote */
.endorsement {
  max-width: 48rem; margin: 0 auto; padding: 4rem 1.5rem 10rem;
  display: flex; flex-direction: column; align-items: center; gap: 3rem;
  text-align: center;
}
.endorsement figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 2.5rem; }
.endorsement blockquote { margin: 0; position: relative; }
.endorsement blockquote::before {
  content: '\201C';
  display: block;
  font-size: 5rem; line-height: 0.6;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.endorsement blockquote p {
  font-style: italic;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  line-height: 1.45;
  color: var(--text-strong);
}
.endorsement figcaption { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.quote-name { font-size: 1.5rem; color: var(--text-strong); }
