/* ---------- Tokens ---------- */
:root {
  --bg: #f2f1ee;
  --ink: #141413;
  --muted: #6b6a64;
  --body: #4a4944;
  --rule: #d6d5d0;
  --hero-bg: #2b2a28;
  --dark: #050505;
  --light: #f5f5f3;
  --gutter: clamp(20px, 4vw, 48px);
  --sans: 'Geist', Helvetica, Arial, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  --plus-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 11 11'%3E%3Cpath d='M5.5 0v11M0 5.5h11' stroke='rgba(20,20,19,.22)'/%3E%3C/svg%3E");
  --plus-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 11 11'%3E%3Cpath d='M5.5 0v11M0 5.5h11' stroke='rgba(245,245,243,.2)'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); }
html { scrollbar-width: none; }
::-webkit-scrollbar { display: none; }
::selection { background: #111; color: var(--bg); }
body {
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .6; }
img { max-width: 100%; }

.label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.label-dark { color: #9a9994; margin-bottom: 24px; }

/* Elements revealed on scroll start hidden (JS animates them in). */
[data-reveal] { opacity: 0; }
.no-js [data-reveal] { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 22px var(--gutter);
  mix-blend-mode: difference; color: #fff;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.nav-name { font-weight: 500; }
.nav-links { display: flex; gap: 28px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 560px; overflow: hidden;
  color: var(--light);
  background-color: var(--hero-bg);
  /* fine matte grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)'/%3E%3C/svg%3E");
  background-blend-mode: overlay;
}
.hero-waves, .hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.hero-fx { z-index: 2; }
.hero-dot {
  position: absolute; top: 0; left: 0; z-index: 2;
  width: 8px; height: 8px; margin: -4px 0 0 -4px;
  background: #fff;
  box-shadow: 0 0 6px 1px rgba(255,255,255,.9), 0 0 22px 4px rgba(255,255,255,.35);
  opacity: 0; pointer-events: none; transition: opacity .3s; will-change: transform;
}
.hero-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 40%, rgba(0,0,0,.45) 100%);
}
.hero-inner {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--gutter) clamp(28px, 5vh, 48px);
}
.hero-name {
  margin: 0; min-height: 1.8em;
  font-weight: 500; font-size: clamp(56px, 12vw, 200px); line-height: .9; letter-spacing: -.045em;
  white-space: pre-line;
}
.hero-desc {
  margin: clamp(16px, 3vh, 28px) 0 0; min-height: 2.6em; max-width: 34ch;
  font-size: clamp(18px, 2vw, 28px); line-height: 1.3; letter-spacing: -.01em;
  color: #cfcfca; text-wrap: pretty;
}
.caret { display: none; }
.caret.on { display: inline-block; }
.caret-name { width: .06em; height: .78em; margin-left: .04em; background: var(--light); vertical-align: -.04em; }
.caret-desc { width: .5em; height: 1.05em; margin-left: .08em; background: #cfcfca; vertical-align: -.18em; }
.hero-meta {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  margin-top: clamp(24px, 5vh, 48px);
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #bdbdb8;
}
.line-mask { overflow: hidden; }
[data-line] { transform: translateY(110%); }

/* ---------- Work ---------- */
.work {
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 160' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='rgba(20,20,19,.07)'%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 80 C150 30 300 130 450 80 S750 30 900 80 S1100 125 1200 70'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 98 C150 48 300 148 450 98 S750 48 900 98 S1100 143 1200 88'/%3E%3C/g%3E%3C/svg%3E"),
    var(--plus-dark), var(--plus-dark), var(--plus-dark), var(--plus-dark);
  background-repeat: no-repeat;
  background-size: 100% 160px, 11px 11px, 11px 11px, 11px 11px, 11px 11px;
  background-position:
    0 clamp(36px, 6vh, 80px),
    left var(--gutter) top 28px, right var(--gutter) top 28px,
    left var(--gutter) bottom 28px, right var(--gutter) bottom 28px;
}
.work-head {
  display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px;
  margin-bottom: 40px;
}
.section-title {
  margin: 0; font-weight: 500; font-size: clamp(40px, 6vw, 84px); letter-spacing: -.04em; line-height: .95;
}
.filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.filter {
  font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer;
  padding: 9px 14px; border-radius: 999px; border: 1px solid var(--ink);
  background: transparent; color: var(--ink);
  transition: background .25s, color .25s;
}
.filter.active { background: var(--ink); color: var(--bg); }

/* 4 per row; wide column gaps keep tiles close to their old (5-per-row) size */
.work-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: clamp(20px, 5vw, 80px); row-gap: clamp(32px, 4vw, 56px);
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 28px; }
}
.tile { min-width: 0; }
.tile-inner { transition: opacity .4s ease; }
.tile.dim .tile-inner { opacity: .18; }
.tile-media {
  position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden;
  background: repeating-linear-gradient(135deg, #e4e3df 0 8px, #dcdbd6 8px 16px);
}
.tile-media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Hover: tile grows slightly (skipped on touch screens, reduced motion and filtered-out tiles) */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .tile-inner { transition: opacity .4s ease, transform .45s cubic-bezier(.2,.7,.1,1); }
  .tile:not(.dim):hover .tile-inner { transform: scale(1.04); }
  .tile:not(.dim):hover { position: relative; z-index: 1; }
}
.tile-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: #77766f; text-align: center; line-height: 1.5;
}
.tile-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  margin-top: 14px; font-size: clamp(13px, 1.1vw, 16px);
}
.tile-title { font-weight: 500; }
.tile-cat {
  font-family: var(--mono); font-size: clamp(11px, .85vw, 13px); text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); white-space: nowrap;
}

/* ---------- About ---------- */
.about {
  padding: clamp(72px, 12vh, 140px) var(--gutter);
  border-top: 1px solid var(--rule);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='rgba(20,20,19,.06)'%3E%3Ccircle cx='300' cy='300' r='130'/%3E%3Ccircle cx='300' cy='300' r='200'/%3E%3Ccircle cx='300' cy='300' r='270'/%3E%3C/g%3E%3C/svg%3E"),
    var(--plus-dark), var(--plus-dark);
  background-repeat: no-repeat;
  background-size: 600px 600px, 11px 11px, 11px 11px;
  background-position: right -160px bottom -220px, left var(--gutter) top 28px, right var(--gutter) top 28px;
}
.about-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: clamp(32px, 6vw, 96px); align-items: start;
}
.portrait { aspect-ratio: 4 / 5; max-width: 520px; border-radius: 6px; overflow: hidden; background: #e4e3df; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.about-text { display: flex; flex-direction: column; gap: 28px; }
.about-lead {
  margin: 0; font-size: clamp(26px, 3vw, 42px); line-height: 1.15; letter-spacing: -.025em; font-weight: 400; text-wrap: pretty;
}
.about-body { margin: 0; max-width: 52ch; font-size: 16px; line-height: 1.6; color: var(--body); text-wrap: pretty; }
.facts {
  margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  border-top: 1px solid var(--rule); font-size: 15px; line-height: 1.5;
}
.facts dt, .facts dd { margin: 0; border-bottom: 1px solid var(--rule); }
.facts dt {
  padding: 14px 0;
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.facts dd { padding: 12px 0; }

/* ---------- Contact ---------- */
.contact {
  background-color: var(--dark); color: var(--light);
  padding: clamp(80px, 16vh, 180px) var(--gutter) 32px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 300' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='rgba(245,245,243,.06)'%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 100 C200 50 400 150 600 100 S1000 50 1200 100'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 125 C200 72 400 178 600 125 S1000 72 1200 125'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 150 C200 94 400 206 600 150 S1000 94 1200 150'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 175 C200 116 400 234 600 175 S1000 116 1200 175'/%3E%3Cpath vector-effect='non-scaling-stroke' d='M0 200 C200 138 400 262 600 200 S1000 138 1200 200'/%3E%3C/g%3E%3C/svg%3E"),
    var(--plus-light), var(--plus-light);
  background-repeat: no-repeat;
  background-size: 100% 300px, 11px 11px, 11px 11px;
  background-position: 0 28%, left var(--gutter) top 28px, right var(--gutter) top 28px;
}
.contact-cta {
  display: block; font-weight: 500; font-size: clamp(40px, 8vw, 128px);
  letter-spacing: -.045em; line-height: .95; word-break: break-word;
}
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
  margin-top: clamp(80px, 14vh, 160px); padding-top: 24px; border-top: 1px solid #2a2a28;
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #bdbdb8;
}
.footer-links { display: flex; gap: 28px; }

/* ---------- Scroll rail + page curtain ---------- */
.rail {
  position: fixed; top: 12px; bottom: 12px; right: 6px; width: 14px; z-index: 60;
  mix-blend-mode: difference; cursor: pointer; display: flex; justify-content: center;
}
.rail-track { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.22); }
.rail-thumb { position: absolute; top: 0; width: 3px; height: 60px; border-radius: 2px; background: #fff; transition: width .2s; }
.rail:hover .rail-thumb { width: 5px; }
.curtain {
  position: fixed; inset: 0; z-index: 100; background: var(--dark);
  transform: translateY(100%); pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; }
  [data-line] { transform: none; }
}
