/* ───────── Tokens ───────── */
:root {
  --paper: #F4F2EC;
  --ink: #111111;
  --muted: #5F5B53;
  --line: #DEDAD0;
  --accent: #C4B5FD;      /* lilac highlighter */
  --accent-deep: #6D4FE0; /* for strokes and small marks */

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

/* ───────── Base ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--ink); }

a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Content spans 90% of the viewport */
.wrap { width: 90%; margin-inline: auto; }

.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > span { display: inline-block; }

.hl {
  color: inherit;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 62% / 100% 80%;
  padding: 0 .08em;
  margin: 0 -.03em;
}

/* ───────── Nav ───────── */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color .4s, box-shadow .4s;
}
.nav.is-scrolled {
  background: rgb(244 242 236 / .85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; padding-block: 1rem; }
.brand { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.04em; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; font-size: .95rem; }

.btn {
  display: inline-flex;
  align-items: center;
  height: 2.6rem;
  padding: 0 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  transition: transform .4s var(--ease), background-color .3s, color .3s;
}
.btn:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.btn-sm { height: 2.4rem; padding: 0 1.1rem; font-size: .9rem; }

/* ───────── Info (hero) ───────── */
.hero {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem;
  padding-bottom: 4rem;
}
.hero-title {
  font-family: var(--display);
  font-size: clamp(3rem, 8.4vw, 9rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: .95;
}
.hero-sub {
  max-width: 52ch;
  margin-top: 2rem;
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  color: var(--muted);
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 3.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink);
}
.facts dt { font-size: .85rem; color: var(--muted); }
.facts dd { margin: .2rem 0 0; font-family: var(--display); font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; }

/* ───────── Projects ───────── */
.projects { padding-block: clamp(5rem, 12vh, 9rem); }
.h2 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1;
  margin-bottom: 3rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem clamp(1.25rem, 2vw, 2rem);
}
.project-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.25rem;
}
.project h3 { font-family: var(--display); font-size: clamp(1.2rem, 1.5vw, 1.4rem); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; }
.year { font-size: .9rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.project p { color: var(--muted); max-width: 52ch; margin-top: .5rem; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.tags li { font-size: .8rem; padding: .25rem .75rem; border-radius: 999px; border: 1px solid var(--line); }

/* Project artwork: drawn in CSS, inner layer moves for parallax */
.art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #E9E6DE;
}
.art-inner {
  position: absolute;
  inset: -12% -6%;
  display: grid;
  place-items: center;
  will-change: transform;
  transition: transform .9s var(--ease);
}
.project:hover .art-inner { transform: scale(1.04); }
/* Minimal gradient thumbnails: soft colour fields with a fine grain */
.art-inner { inset: -14%; }
.art::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  mix-blend-mode: soft-light;
  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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.g-rings .art-inner {
  background:
    radial-gradient(42% 52% at 28% 32%, #C4B5FD 0%, transparent 70%),
    radial-gradient(46% 50% at 74% 70%, #FFCFB0 0%, transparent 72%),
    #F2EEF8;
}
.g-grid .art-inner {
  background:
    radial-gradient(40% 50% at 70% 30%, #6D4FE0 0%, transparent 70%),
    radial-gradient(38% 44% at 26% 78%, rgb(196 181 253 / .55) 0%, transparent 72%),
    #14121B;
}
.g-stack .art-inner {
  background:
    radial-gradient(44% 52% at 30% 26%, #BFE6D8 0%, transparent 70%),
    radial-gradient(48% 54% at 76% 74%, #B8C9FF 0%, transparent 72%),
    #EEF1EE;
}
.g-arc .art-inner {
  background: linear-gradient(160deg, #F6E8DA 0%, #E8DEFB 52%, #B9A6FA 100%);
}

/* ───────── Footer / contact ───────── */
.footer { padding-top: clamp(4rem, 10vh, 7rem); border-top: 1px solid var(--line); }
.footer-email {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.15rem, 5vw, 4.75rem);
  font-weight: 700;
  letter-spacing: -.05em;
  line-height: 1.05;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 85% / 0% 30%;
  transition: background-size .6s var(--ease);
  overflow-wrap: anywhere;
}
.footer-email:hover { background-size: 100% 30%; }
.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .9rem;
  color: var(--muted);
}
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a:hover { color: var(--ink); }

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 800px) {
  .facts { grid-template-columns: 1fr 1fr; row-gap: 1.25rem; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .art { aspect-ratio: 16 / 10; }
}
@media (max-width: 480px) {
  .nav-links > a:not(.btn) { display: none; }
}

/* ───────── Initial states (motion only) ───────── */
.motion .nav, .motion .hero-sub, .motion .facts { opacity: 0; }
.motion .hero-title .line > span { transform: translateY(105%); }

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