/* Piano-key palette: off-white, off-black, one vermilion accent (used as a gradient on buttons).
   Radius system: frames 28px outer / 20px inner, everything interactive is a pill. */
:root {
  --bg: #f3f3f1;
  --surface: #ebebe8;
  --ink: #121214;
  --muted: #5d5d63;
  --line: #d4d4d0;
  --accent: #d9481f;
  --accent-hi: #f2724a;
  --accent-lo: #b5340f;
  --glow: rgb(217 72 31 / .14);
  --shell: color-mix(in srgb, var(--ink) 4%, transparent);
  --hairline: color-mix(in srgb, var(--ink) 8%, transparent);
  --highlight: inset 0 1px 0 rgb(255 255 255 / .6);
  --shadow: 0 30px 60px -30px rgb(18 18 20 / .28);
  --display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --ease-soft: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f11;
    --surface: #17171a;
    --ink: #ededea;
    --muted: #9a9aa1;
    --line: #2a2a2e;
    --accent: #e9582c;
    --glow: rgb(233 88 44 / .12);
    --highlight: inset 0 1px 0 rgb(255 255 255 / .06);
    --shadow: 0 30px 60px -30px rgb(0 0 0 / .8);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Faint paper grain, fixed so it never repaints on scroll. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 30; pointer-events: none; opacity: .05;
  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");
}
/* Display serif (classical engraving lineage) for headings; Geist stays for reading and controls. */
h1, h2, h3, .statement { margin: 0; font-family: var(--display); font-weight: 500; font-variant-numeric: lining-nums; letter-spacing: -0.01em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); text-decoration: none; }
.skip:focus { top: 16px; }

main > section:not(.hero), footer { max-width: 1240px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* Floating island nav, glass over the hero photos */
.nav-wrap { position: fixed; top: 16px; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none; }
.nav {
  pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 6px;
  border-radius: 999px; border: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: var(--highlight), 0 10px 30px -12px rgb(18 18 20 / .3);
}
.nav a { padding: 8px 16px; border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; transition: color .2s ease, background-color .2s ease; }
.nav .mark { color: var(--ink); font-weight: 600; letter-spacing: -0.02em; }
.nav a.active { color: var(--ink); background: var(--shell); }

/* Buttons: vermilion gradient, bevelled edge (light top, dark bottom), tinted drop shadow */
.btn {
  display: inline-flex; align-items: center; gap: 14px; padding: 8px 8px 8px 28px; border-radius: 999px;
  color: #fff; text-decoration: none; font-weight: 500; letter-spacing: -0.01em;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / .35),
    inset 0 -2px 0 rgb(0 0 0 / .18),
    0 1px 2px rgb(120 30 5 / .3),
    0 12px 28px -10px rgb(217 72 31 / .6);
  transition: transform .16s var(--ease), box-shadow .25s ease, filter .25s ease;
}
.btn-icon {
  flex: none; width: 40px; height: 40px; border-radius: 999px; display: inline-grid; place-items: center;
  background: linear-gradient(180deg, rgb(255 255 255 / .28), rgb(255 255 255 / .08));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -1px 0 rgb(0 0 0 / .12);
  transition: transform .3s var(--ease);
}
.btn-icon::after { content: ""; width: 11px; height: 12px; margin-left: 2px; background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.btn-icon.arrow::after { width: 12px; height: 12px; margin: 0; clip-path: polygon(20% 0, 100% 0, 100% 80%, 82% 80%, 82% 31%, 13% 100%, 0 87%, 69% 18%, 20% 18%); }
.btn:active { transform: translateY(1px) scale(.98); box-shadow: inset 0 1px 0 rgb(255 255 255 / .25), inset 0 -1px 0 rgb(0 0 0 / .18), 0 4px 12px -6px rgb(217 72 31 / .6); }
.btn-sm { padding: 5px 5px 5px 20px; font-size: 15px; gap: 10px; }
.btn-sm .btn-icon { width: 32px; height: 32px; }

.link { color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color .2s ease; }

/* Hero: full-bleed Ken Burns slideshow inside an inset rounded frame */
.hero {
  position: relative; min-height: 100dvh; margin: 0 12px; padding: 0 clamp(20px, 5vw, 72px) clamp(48px, 8vh, 96px);
  display: flex; align-items: flex-end; border-radius: 0 0 28px 28px; overflow: hidden; isolation: isolate;
  background: #0c0c0e; color: #f3f3f1;
}
.slides { position: absolute; inset: 0; z-index: -2; }
.slide {
  position: absolute; inset: 0; background: var(--img) var(--pos, center) / cover no-repeat;
  opacity: 0; animation: fade 21s infinite, burns 21s infinite; transform-origin: var(--from);
}
.slide:nth-child(2) { animation-delay: 7s; }
.slide:nth-child(3) { animation-delay: 14s; }
/* Scrim + warm gradient so the type always reads over any photo */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 80% at 0% 100%, rgb(12 12 14 / .9), transparent 60%),
    linear-gradient(180deg, rgb(12 12 14 / .35), transparent 30%, transparent 55%, rgb(12 12 14 / .75)),
    radial-gradient(60% 50% at 85% 15%, rgb(217 72 31 / .22), transparent 70%);
}
@keyframes fade {
  0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes burns {
  0% { transform: scale(1.04); transform-origin: var(--from); }
  40% { transform: scale(1.16); transform-origin: var(--to); }
  100% { transform: scale(1.16); transform-origin: var(--to); }
}
.hero h1 { font-size: clamp(68px, 11.5vw, 172px); font-weight: 500; letter-spacing: -0.02em; line-height: .9; text-shadow: 0 2px 30px rgb(0 0 0 / .3); }
.hero-copy p { margin-top: 24px; max-width: 30ch; font-size: 20px; color: rgb(243 243 241 / .78); }
.hero .btn { margin-top: 36px; }

/* Double-bezel frame: outer tray + inner core with concentric radius */
.frame { padding: 8px; border-radius: 28px; background: var(--shell); border: 1px solid var(--hairline); box-shadow: var(--shadow); }
.frame-core { border-radius: 20px; background: var(--surface); box-shadow: var(--highlight); overflow: hidden; position: relative; }

/* Works: soft vermilion glow behind the section */
section { padding-top: 128px; padding-bottom: 144px; }
.works { position: relative; }
.works::before {
  content: ""; position: absolute; z-index: -1; inset: 40px 0 auto; height: 70%; pointer-events: none;
  background: radial-gradient(50% 50% at 30% 40%, var(--glow), transparent 70%), radial-gradient(40% 40% at 80% 70%, rgb(90 110 160 / .08), transparent 70%);
}
.works h2, .about h2 { font-size: clamp(52px, 6.4vw, 84px); margin-bottom: 48px; }
.work p, .info p { color: var(--muted); }
.label { font-size: 13px; color: var(--accent); font-weight: 600; }
.year { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }

/* Click-to-load YouTube: only the thumbnail loads until someone presses play */
.video { position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer; background: #000; aspect-ratio: 16 / 9; overflow: hidden; }
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-soft), filter .4s ease; }
.video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgb(0 0 0 / .35)); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play {
  position: absolute; z-index: 1; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -2px 0 rgb(0 0 0 / .2), 0 14px 30px -8px rgb(217 72 31 / .7);
  transition: transform .2s var(--ease);
}
.play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 26%; height: 30%; transform: translateX(8%); background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.video:active .play { transform: scale(.95); }

.featured .frame-core { display: grid; grid-template-columns: 1.5fr 1fr; align-items: stretch; }
.featured .video { aspect-ratio: auto; min-height: 100%; }
.featured .info { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.featured h3 { font-size: clamp(46px, 5vw, 70px); margin: 8px 0 14px; }
.featured .btn { margin-top: 28px; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.card .info { padding: 28px 28px 32px; display: flex; flex-direction: column; align-items: flex-start; min-height: 230px; }
.card h3 { font-size: 36px; margin: 6px 0 10px; }
.card .btn, .card .link { margin-top: auto; }
.card p { margin-bottom: 24px; }
.more { display: inline-block; margin-top: 48px; }

/* About: statement + stacked body */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 96px; align-items: end; }
.statement { font-size: clamp(36px, 4.2vw, 58px); line-height: 1.1; font-style: italic; }
.about h2 { font-size: 26px; margin-bottom: 14px; }
.about-body p { color: var(--muted); max-width: 46ch; }
.about-body p + p { margin-top: 16px; }

/* Contact: framed panel with a warm gradient */
.contact { position: relative; }
.contact::before {
  content: ""; position: absolute; z-index: -1; inset: 40px 24px 60px; border-radius: 28px; pointer-events: none;
  background: radial-gradient(70% 90% at 100% 100%, var(--glow), transparent 70%), linear-gradient(160deg, var(--shell), transparent);
  border: 1px solid var(--hairline);
}
.contact h2, .contact .email { margin-left: clamp(0px, 4vw, 56px); }
.contact h2 { font-size: clamp(36px, 4.2vw, 58px); max-width: 26ch; line-height: 1.12; padding-top: 48px; }
.email {
  display: inline-flex; align-items: center; gap: 20px; margin-top: 40px; font-size: clamp(22px, 4vw, 52px);
  letter-spacing: -0.035em; text-decoration: none; overflow-wrap: anywhere; transition: color .2s ease;
}
.email .btn-icon {
  width: 56px; height: 56px; color: #fff;
  background: linear-gradient(180deg, var(--accent-hi), var(--accent) 55%, var(--accent-lo));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 0 -2px 0 rgb(0 0 0 / .18), 0 12px 28px -10px rgb(217 72 31 / .6);
}
.email .btn-icon::after { width: 16px; height: 16px; }

footer { display: flex; justify-content: space-between; padding: 32px 24px 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
footer a { text-decoration: none; }

/* Hover only where there is a real pointer, so taps on phones never stick */
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
  .btn:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), inset 0 -2px 0 rgb(0 0 0 / .18), 0 1px 2px rgb(120 30 5 / .3), 0 18px 36px -10px rgb(217 72 31 / .7); }
  .btn:hover .btn-icon { transform: translateX(3px) scale(1.05); }
  .btn:hover .btn-icon.arrow { transform: translate(2px, -2px) scale(1.05); }
  .video:hover img { transform: scale(1.04); filter: brightness(1.05); }
  .video:hover .play { transform: scale(1.08); }
  .link:hover, .email:hover { color: var(--accent); }
  .email:hover .btn-icon { transform: translate(3px, -3px) scale(1.05); }
  footer a:hover { color: var(--ink); }
}

/* Motion: hero rises on load, sections fade up out of a soft blur once. Off for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(24px); filter: blur(6px); animation: rise 1.1s var(--ease-soft) forwards; }
  .rise:nth-child(2) { animation-delay: .1s; }
  .rise:nth-child(3) { animation-delay: .2s; }
  .reveal { opacity: 0; transform: translateY(32px); filter: blur(6px); transition: opacity .9s var(--ease-soft), transform .9s var(--ease-soft), filter .9s var(--ease-soft); }
  .reveal.in { opacity: 1; transform: none; filter: none; }
  .pair .reveal:nth-child(2) { transition-delay: .08s; }
}
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
/* Reduced motion: show the first photo still, no zoom or crossfade */
@media (prefers-reduced-motion: reduce) {
  .slide { animation: none; }
  .slide:first-child { opacity: 1; }
}

/* Mobile: everything collapses to one column */
@media (max-width: 767px) {
  main > section:not(.hero), footer { padding-left: 16px; padding-right: 16px; }
  .hero { margin: 0; border-radius: 0 0 24px 24px; padding: 0 16px 56px; }
  .nav a { padding: 8px 12px; }
  section { padding-top: 88px; padding-bottom: 96px; }
  .featured .frame-core { grid-template-columns: 1fr; }
  .featured .video { aspect-ratio: 16 / 9; }
  .featured .info { padding: 28px 24px 32px; }
  .pair { grid-template-columns: 1fr; }
  .play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .contact::before { inset: 40px 8px 60px; }
  .contact h2, .contact .email { margin-left: 16px; margin-right: 16px; }
  .email .btn-icon { width: 44px; height: 44px; }
}

/* Smaller cards: play button sits bottom-left so it never covers title text in a thumbnail */
.card .play { left: 20px; top: auto; bottom: 20px; width: 56px; height: 56px; margin: 0; }
