:root {
  --bg: #faf9f5;
  --ink: #171717;
  --mute: #6b6862;
  --ph: #eeece6;
  --pad: clamp(16px, 2.2vw, 28px);
  --top: 64px;
  --sans: "Poppins", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Poppins", system-ui, sans-serif; /* small text — was a typewriter font */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 12px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img[data-zoom] { cursor: zoom-in; }

/* ── header / footer ── */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  height: var(--top);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--pad);
  background: var(--bg);
}
.side { display: flex; gap: 2.6em; }
.side.right { justify-content: flex-end; }
.side a, .bottom a, .c-links a { transition: opacity .2s; }
.side a:hover, .bottom a:hover, .c-links a:hover { opacity: .45; }
.side a.on { text-decoration: underline; text-underline-offset: 4px; }
.mark { font: 400 32px/1 "Ballet", var(--serif); text-transform: capitalize; white-space: nowrap; padding-top: 6px; }
.menu-btn { display: none; justify-self: end; }

main { padding-top: var(--top); }
main.in { animation: fade .6s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.bottom {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 56px; padding: 0 var(--pad);
}
.bottom .r { justify-self: end; display: flex; gap: 2.2em; }

/* ── mobile menu ── */
.menu {
  position: fixed; inset: 0; z-index: 30; background: var(--bg);
  display: flex; flex-direction: column; padding: 0 var(--pad);
}
.menu[hidden] { display: none; }
.menu-row { height: var(--top); display: flex; justify-content: space-between; align-items: center; }
.menu-row.small { color: var(--mute); }
.menu nav {
  margin: auto 0; display: flex; flex-direction: column;
  font: 400 clamp(40px, 12vw, 60px)/1.08 var(--sans); letter-spacing: -.035em;
}
.menu nav a.on { font-family: var(--serif); font-style: italic; letter-spacing: -.01em; }

/* ── shared ── */
.page { padding: 0 var(--pad) 16vh; }
.label {
  display: flex; justify-content: space-between;
  padding: 9vh 0 16vh;
  font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute);
}
.ph {
  background: var(--ph); color: var(--mute);
  display: flex; align-items: flex-end; padding: 10px;
  font: 400 10px/1.4 var(--mono); word-break: break-all;
}
/* real project photos keep their own shape; empty slots get a placeholder ratio */
.r43, .r45 { width: 100%; height: auto; }
.ph.r43 { aspect-ratio: 4 / 3; }
.ph.r45 { aspect-ratio: 4 / 5; }
.r169 { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.r169.crop-top { object-position: top; }

/* ── home ── */
.home {
  height: calc(100svh - var(--top) - 56px);
  min-height: 420px;
  display: grid; grid-template-columns: 1fr 1fr auto 1fr 1fr; align-items: center;
  padding: 0 var(--pad);
}
.w2, .w3 { justify-self: center; }
.w4 { justify-self: end; }
.w4:hover { opacity: .45; }
.hero { position: relative; }

/* ── slideshows (landing photo + every project) ── */
.s-frame { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.s-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none;
  object-fit: cover; opacity: 0; transition: opacity .9s ease;
}
.s-frame img.on { opacity: 1; z-index: 1; }
.hero-slides .s-frame { height: min(54vh, 580px); aspect-ratio: 3 / 4; }
.hero-slides .s-frame img { cursor: pointer; }
.work-slides .s-frame { aspect-ratio: 4 / 3; max-height: 80vh; }
.work-slides .s-frame img { object-fit: contain; object-position: center bottom; }
.s-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1em;
  margin-top: 12px; min-height: 14px; font: 400 11px/1 var(--mono); color: var(--mute);
}
.count { display: flex; gap: 8px; margin-left: auto; white-space: nowrap; }
.count button { color: var(--mute); transition: color .2s; }
.count button.on, .count button:hover { color: var(--ink); }

/* ── about ── */
.intro {
  max-width: 860px; margin: 22vh auto 14vh;
  font: 300 clamp(21px, 2.4vw, 32px)/1.35 var(--sans); letter-spacing: -.015em;
}
.intro p + p { margin-top: .85em; text-indent: 2.4em; }
.intro p:first-child { font: italic 400 1.35em/1.1 var(--serif); letter-spacing: 0; margin-bottom: 1.1em; }
.strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1em 2.4em;
  max-width: 860px; margin: 0 auto 10vh;
  font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em;
}

/* ── projects & internships (one paragraph + images) ── */
.entry { margin-bottom: 28vh; }
.entry-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  column-gap: calc(var(--pad) * 2.5); align-items: end;
}
.e-main { grid-column: 1; }
.e-text { grid-column: 2; font: 400 13px/1.7 var(--mono); max-width: 60ch; padding-bottom: 26px; }
.e-text p + p { margin-top: 1em; }
.e-text .t { text-transform: uppercase; font-weight: 500; letter-spacing: .02em; }
.e-head {
  display: flex; align-items: baseline; gap: 1.2em;
  border-top: 1px solid #dedbd3; padding-top: 18px; margin-bottom: 4vh;
}
.e-n { font: 400 12px/1 var(--sans); color: var(--mute); letter-spacing: .06em; }
.e-head h2 { font: italic 400 clamp(26px, 3vw, 38px)/1.1 var(--serif); }
.next-sec {
  display: block; border-top: 1px solid #dedbd3; padding-top: 22px; margin-top: 4vh;
  font: 300 clamp(30px, 5vw, 64px)/1.1 var(--sans); letter-spacing: -.02em;
}
.next-sec span { display: block; font: 400 12px/1 var(--sans); color: var(--mute); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.next-sec:hover { opacity: .5; }
.e-text .lead { font-size: 15px; line-height: 1.55; font-weight: 500; }
.e-text .role { color: var(--ink); }
.avail { max-width: 860px; margin: 0 auto; text-align: center; font: 400 13px/1.6 var(--sans); color: var(--mute); }
.avail a { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; margin-left: .4em; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3f9b5a; margin-right: .6em; vertical-align: .1em; }
.dim { color: var(--mute); }

/* ── flip book ── */
.book-wrap { margin: 20vh auto 0; max-width: 1280px; }
.book-label { font: 400 10px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; text-align: center; margin-bottom: 4vh; }
.book { margin: 0 auto; }
.pg { background: #fff; overflow: hidden; }
.pg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg img:not([src]) { visibility: hidden; }
.book-nav {
  display: flex; justify-content: center; align-items: center; gap: 2.4em; margin-top: 3vh;
  font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
}
.book-nav button:hover { opacity: .45; }
.b-count { color: var(--mute); min-width: 11ch; text-align: center; }

/* ── projects page hero + full project viewer ── */
.sec-hero { display: flex; flex-direction: column; align-items: center; padding: 12vh 0 4vh; }
.sec-hero img { height: min(62vh, 640px); width: auto; max-width: 100%; }
.sec-hero figcaption { margin-top: 12px; font: 400 10px/1.4 var(--mono); color: var(--mute); }
.doc-open {
  font: 400 13px/1.7 var(--mono); color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px;
}
.doc-open:hover { opacity: .45; }
.doc {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column; padding: 0 var(--pad) 20px;
}
.doc[hidden] { display: none; }
.doc-bar {
  height: var(--top); flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
}
.doc-bar .d-close { justify-self: end; font: inherit; }
.doc-bar .d-count { color: var(--mute); }
.doc-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.doc-stage .slide { max-width: 100%; max-height: 100%; width: auto; height: auto; cursor: pointer; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.doc-stage .book { margin: 0 auto; }
.doc .book-nav { flex: none; }

/* ── films ── */
.film {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 6fr) minmax(0, 3fr);
  column-gap: calc(var(--pad) * 1.6); align-items: center;
  margin-bottom: 24vh;
}
.f-meta {
  justify-self: end; text-align: right;
  font: 400 10px/1.7 var(--mono); text-transform: uppercase; letter-spacing: .06em;
}
.f-still { position: relative; }
.f-still[data-video] { cursor: pointer; }
.f-still[data-video] .ph { background: #1c1b19; color: transparent; }
.play {
  position: absolute; left: 14px; bottom: 12px;
  font: 400 10px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em;
  color: #fff; mix-blend-mode: difference;
}
.f-text h2 { font: italic 400 30px/1.05 var(--serif); margin-bottom: 14px; }
.f-text p { font: 400 13px/1.7 var(--mono); max-width: 40ch; }
.f-text .url { margin-top: 1.2em; }
.f-text .url a:hover, .site .f-still:hover .play { opacity: .5; }
.site .f-still img { outline: 1px solid rgba(0, 0, 0, .06); }

/* ── contact ── */
.contact {
  min-height: calc(100svh - var(--top) - 56px);
  display: flex; flex-direction: column; justify-content: center; padding-bottom: 0;
  font: 400 clamp(30px, 5.6vw, 80px)/1.05 var(--sans); letter-spacing: -.035em;
}
.contact > a { align-self: flex-start; }
.contact > a:hover { font-family: var(--serif); font-style: italic; letter-spacing: -.01em; }
.contact .small { font: 400 13px/1.7 var(--sans); letter-spacing: 0; color: var(--mute); margin-bottom: 2.2em; max-width: 52ch; }
.c-links { display: flex; flex-wrap: wrap; gap: 2.2em; margin-top: 2.6em; font: 400 12px/1 var(--sans); letter-spacing: 0; }

/* ── lightbox ── */
.lb {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(250, 249, 245, .97);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
}
.lb[hidden] { display: none; }
.lb img { max-height: 88vh; max-width: 88vw; width: auto; height: auto; }
.lb iframe { width: min(88vw, calc(80vh * 16 / 9)); aspect-ratio: 16 / 9; border: 0; background: #000; }
.lb .x { position: fixed; top: 22px; right: var(--pad); }

/* ── phones ── */
@media (max-width: 760px) {
  :root { --top: 56px; }
  .top { grid-template-columns: 1fr auto; }
  .top .side { display: none; }
  .top .mark { justify-self: start; }
  .mark { font-size: 26px; }
  .menu-btn { display: block; }

  .home {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "a d" "h h" "b c";
    grid-template-rows: auto 1fr auto;
    align-items: center; padding: 3vh var(--pad) 2vh; gap: 2vh 0;
  }
  .w1 { grid-area: a; } .w4 { grid-area: d; } .w2 { grid-area: b; justify-self: start; } .w3 { grid-area: c; justify-self: end; }
  .hero { grid-area: h; justify-self: center; }
  .hero-slides .s-frame { height: min(56svh, 520px); max-width: 78vw; }

  .label { padding: 5vh 0 9vh; }
  .intro { margin-bottom: 16vh; }
  .strip { gap: .8em 1.6em; }

  .entry { margin-bottom: 18vh; }
  .entry-grid { grid-template-columns: 1fr; row-gap: 4vh; }
  .e-main, .e-text { grid-column: 1; }
  .e-text { padding-bottom: 0; }

  .film { grid-template-columns: 1fr; row-gap: 14px; margin-bottom: 16vh; }
  .f-meta { justify-self: start; text-align: left; order: 2; }
  .f-still { order: 1; }
  .f-text { order: 3; }

  .bottom { grid-template-columns: 1fr 1fr; height: auto; padding: 22px var(--pad); row-gap: 10px; }
  .bottom > span:nth-child(2) { justify-self: end; }
  .bottom .r { grid-column: 1 / -1; justify-self: start; }
}
