/* Cinematic dark: near-black monochrome, light sans headings, full-width bands */
:root {
  --bg: #0a0a0b;
  --band: #0f0f11;
  --line: rgba(255, 255, 255, .12);
  --ink: #f2f2f2;
  --ink-2: #a3a3a8;
  --ink-3: #6e6e74;
  --max: 1160px;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 300 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -0.02em; }
s { text-decoration: none; }

.label { margin: 0 0 14px; font-size: 11px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-3); }

/* nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 18px max(20px, calc((100vw - var(--max)) / 2));
  background: rgba(10, 10, 11, .72); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mark { font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.mark span { color: var(--ink-3); }
.mark-sig { display: block; line-height: 0; }
.mark-sig img { height: 44px; width: auto; opacity: .92; transition: opacity .2s; }
.mark-sig:hover img { opacity: 1; }
.nav nav { display: flex; gap: 40px; font-size: 13px; font-weight: 400; }
.nav nav a { color: var(--ink-2); transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.talk {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px; border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 4px; font-size: 13px; font-weight: 400; transition: background .2s, color .2s;
}
.talk:hover { background: var(--ink); color: var(--bg); }
.talk i { font-style: normal; }

/* hero */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden;
  padding: 120px max(20px, calc((100vw - var(--max)) / 2)) 80px;
}
.hero-photo {
  position: absolute; inset: 0 0 0 38%;
  background: url("assets/img/bg-hero-astronaut.jpg") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 80%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 30%, #000 80%, transparent 100%);
  opacity: .9;
}
.hero::after { content: ""; position: absolute; inset: auto 0 0; height: 30%; background: linear-gradient(transparent, var(--bg)); }
.hero-text { position: relative; z-index: 2; max-width: 520px; }
.hero h1 { font-size: clamp(44px, 6vw, 76px); line-height: 1.02; margin-bottom: 26px; font-weight: 500; }
.hero h1 .dim { color: #b9b9be; font-weight: 300; }
.intro { color: var(--ink-2); font-size: 16px; max-width: 30em; margin: 0 0 34px; }
.more { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--line); padding-bottom: 6px; transition: border-color .3s; }
.more b { display: inline-block; font-weight: 400; transition: transform .3s cubic-bezier(.2, .7, .3, 1); }
.more:hover { border-color: rgba(255, 255, 255, .6); }
.links { display: flex; flex-wrap: wrap; gap: 36px; margin: 0; }
.more:hover b { transform: translateX(8px); }

/* bands */
.band {
  position: relative; display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; overflow: hidden;
  padding: 110px max(20px, calc((100vw - var(--max)) / 2)); border-top: 1px solid rgba(255, 255, 255, .05);
  background: var(--band);
}
.band-left { grid-template-columns: 1.15fr 1fr; }
.band::before {
  content: ""; position: absolute; inset: 0; background: var(--photo, none) center / cover no-repeat; opacity: .55;
}
.band::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 50%, transparent 30%, rgba(10, 10, 11, .85)); }
.band > * { position: relative; z-index: 1; }
.num { display: flex; align-items: center; gap: 16px; margin: 0 0 30px; font-size: 12px; color: var(--ink-2); }
.num::after { content: ""; width: 44px; height: 1px; background: rgba(255, 255, 255, .35); }
.band h2 { font-size: clamp(38px, 4.6vw, 58px); line-height: 1.05; margin-bottom: 16px; }
.sub { font-size: 18px; color: var(--ink); margin: 0 0 18px; font-weight: 400; max-width: 26em; }
.desc { color: var(--ink-2); margin: 0 0 26px; max-width: 32em; font-size: 15px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.pills span { font-size: 12px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); color: #d4d4d8; }

/* media: print, phone, browser / terminal window */
.zoom { cursor: zoom-in; }
.print { display: block; padding: 10px; background: #e9e7e2; box-shadow: 0 40px 80px -30px #000; transform: rotate(-1.5deg); transition: transform .4s; }
.print:hover { transform: rotate(0); }
.sources { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.sources a { width: 76px; height: 54px; overflow: hidden; border-radius: 4px; border: 1px solid var(--line); }
.sources img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.4); transition: filter .3s; }
.sources a:hover img { filter: none; }
.sources span { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); margin-left: 8px; }

.band-media { position: relative; }
.phone {
  display: block; border: 10px solid #050505; border-radius: 30px; overflow: hidden; aspect-ratio: 20 / 9;
  box-shadow: 0 0 0 1px #2a2a2e, 0 50px 90px -30px #000; background: #000;
  transform: perspective(1400px) rotateY(12deg) rotateX(4deg); transition: transform .5s;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.phone:not(.phone-back):hover { transform: perspective(1400px) rotateY(4deg); }
.phone-back { position: absolute; width: 62%; right: -6%; bottom: -26%; transform: perspective(1400px) rotateY(12deg) rotateX(4deg) scale(.9); opacity: .85; }

.window {
  display: block; border-radius: 10px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px #2c2c30, 0 50px 90px -40px #000;
}
.bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; background: #1a1a1d; border-bottom: 1px solid #2c2c30; }
.bar i { width: 10px; height: 10px; border-radius: 50%; background: #3d3d42; }
.url {
  flex: 1; margin-left: 12px; max-width: 60%; padding: 3px 12px; border-radius: 6px; background: #0e0e10;
  font-size: 12px; color: var(--ink-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.viewport { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #f5f3ee; }
/* the page scrolls top to bottom while hovered: the image is 2.236x as tall as it is wide, the viewport 0.625x */
.viewport.scroll img { width: 100%; height: auto; transform: translateY(0); transition: transform 7s ease-in-out; }
.window:hover .viewport.scroll img { transform: translateY(-72%); transition-duration: 9s; }
.hint { margin: 14px 0 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.viewport.terminal { background: #07070a; } .terminal { padding: 26px; font: 13px/1.75 ui-monospace, SFMono-Regular, Consolas, monospace; color: #d9d9dd; }
.terminal em { font-style: normal; color: var(--ink-3); }
.terminal s { color: #9be3a8; font-weight: 600; }

/* more builds */
.more-builds, .process, .resume { width: min(var(--max), 100% - 40px); margin: 0 auto; padding: 100px 0 0; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mini article { background: var(--bg); padding: 30px 28px; }
.mini h3 { font-size: 22px; margin-bottom: 10px; }
.mini p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* process */
.process h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 44px; max-width: 18em; }
.process ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 34px; }
.process li { border-top: 1px solid var(--line); padding-top: 22px; }
.process li b { display: block; font-size: 12px; font-weight: 400; color: var(--ink-3); margin-bottom: 18px; }
.process h3 { font-size: 20px; margin-bottom: 8px; }
.process p { color: var(--ink-2); font-size: 14px; margin: 0; }

/* résumé */
.resume-row { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.resume-row a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 20px; padding: 28px 4px; border-bottom: 1px solid var(--line); }
.resume-row a + a { padding-left: 28px; border-left: 1px solid var(--line); }
.resume-row span { font-size: 24px; font-weight: 400; }
.resume-row small { grid-row: 2; color: var(--ink-3); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.resume-row b { grid-row: span 2; font-size: 20px; font-weight: 300; transition: transform .3s cubic-bezier(.2, .7, .3, 1); }
.resume-row a:hover b { transform: translateY(6px); }

/* contact */
.cta {
  position: relative; margin-top: 110px; display: flex; justify-content: space-between; align-items: center; gap: 40px; overflow: hidden;
  padding: 120px max(20px, calc((100vw - var(--max)) / 2));
}
.cta::before { content: ""; position: absolute; inset: 0; background: var(--photo, none) center 70% / cover no-repeat; opacity: .5; }
.cta::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 10, 11, .9), rgba(10, 10, 11, .2)); }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(34px, 4.4vw, 54px); margin-bottom: 14px; }
.signature { text-align: right; margin: 0; }
.signature img { display: block; width: clamp(200px, 24vw, 320px); height: auto; margin-left: auto; opacity: .88; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .8)); }
.signature small { display: block; margin-top: 18px; font-size: 10px; letter-spacing: .32em; text-transform: uppercase; color: var(--ink-2); line-height: 1.9; }

.footer {
  display: flex; align-items: center; gap: 40px; padding: 30px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3);
}
.footer p { margin: 0; flex: 1; }
.footer nav { display: flex; gap: 32px; }
.footer nav a:hover { color: var(--ink); }

/* case-study pages (projects/*.html) */
.case { width: min(var(--max), 100% - 40px); margin: 0 auto; }
.case-hero { padding: 150px 0 50px; }
.back { display: inline-flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 44px; }
.back b { font-weight: 400; transition: transform .3s cubic-bezier(.2, .7, .3, 1); }
.back:hover { color: var(--ink); }
.back:hover b { transform: translateX(-6px); }
.case-hero h1 { font-size: clamp(36px, min(11vw, 7.5vw + 14px), 104px); overflow-wrap: anywhere; line-height: 1; font-weight: 300; letter-spacing: -.035em; margin-bottom: 22px; }
.case-hero .sub { font-size: clamp(18px, 2vw, 22px); max-width: 34em; color: #d4d4d8; }
.facts-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 48px 0 0; padding: 26px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts-row dt { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.facts-row dd { margin: 0; font-size: 15px; color: var(--ink); }
.case-figure { margin: 50px 0 0; }
.case-figure img { width: 100%; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), 0 50px 100px -50px #000; }
.case-figure figcaption, .gallery figcaption { margin-top: 12px; font-size: 13px; color: var(--ink-3); }
.case-section { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 90px 0 0; }
.case-section h2 { font-size: 13px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3); padding-top: 8px; }
.case-section p, .case-section li { color: #c9c9ce; font-size: 17px; }
.case-section p { margin: 0 0 18px; }
.case-section p strong, .case-section li strong { color: var(--ink); font-weight: 500; }
.case-section ol, .case-section ul { margin: 0; padding-left: 22px; }
.case-section li { margin-bottom: 12px; padding-left: 6px; }
.case-section .big { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.35; color: var(--ink); font-weight: 300; }
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 60px 0 0; }
.gallery figure { margin: 0; }
.gallery .wide { grid-column: span 2; }
.gallery.three { grid-template-columns: repeat(3, 1fr); }
.gallery.three img { aspect-ratio: 4 / 3; object-fit: cover; }
.link-u { border-bottom: 1px solid var(--line); }
.link-u:hover { border-color: var(--ink); }
.gallery img { width: 100%; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 8px; }
.stats div { background: var(--bg); padding: 26px 24px; }
.stats b { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 300; letter-spacing: -.02em; }
.stats span { font-size: 13px; color: var(--ink-2); }
.next-project { display: block; margin-top: 120px; padding: 70px max(20px, calc((100vw - var(--max)) / 2)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-project .label { margin-bottom: 10px; }
.next-project span { display: inline-flex; align-items: center; gap: 24px; font-size: clamp(40px, 6vw, 80px); font-weight: 300; letter-spacing: -.03em; }
.next-project b { font-weight: 200; transition: transform .4s cubic-bezier(.2, .7, .3, 1); }
.next-project:hover b { transform: translateX(14px); }
@media (max-width: 900px) {
  .facts-row { grid-template-columns: 1fr 1fr; }
  .case-section { grid-template-columns: 1fr; gap: 14px; padding-top: 64px; }
  .gallery, .gallery.three { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: auto; }
  .stats { grid-template-columns: 1fr; }
}

/* background dust (particles.js): above section backgrounds, below the nav and the lightbox, never takes clicks */
.dust { position: fixed; inset: 0; z-index: 10; width: 100%; height: 100%; pointer-events: none; }
/* on the reading-heavy project pages the dust sits behind the text instead */
.case-page .dust { z-index: 0; }
.case-page main, .case-page .next-project, .case-page .footer { position: relative; z-index: 1; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: rgba(4, 4, 5, .95); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 82vh; }
.lb-caption { color: var(--ink-2); margin: 16px 0 0; text-align: center; font-size: 14px; }
.lb-close { position: absolute; top: 16px; right: 20px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 26px; font-weight: 300; cursor: pointer; }

/* tablets and phones */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .hero { min-height: auto; padding-top: 110px; flex-direction: column; align-items: flex-start; }
  .hero-photo { position: relative; inset: auto; order: -1; width: calc(100% + 40px); margin: 0 -20px 10px; aspect-ratio: 4 / 3;
    -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 15%, #000 70%, transparent); }
  .band, .band-left { grid-template-columns: 1fr; gap: 44px; padding-top: 80px; padding-bottom: 80px; }
  .band-left .band-media { order: 2; }
  .phone-back { display: none; }
  .phone { transform: none; }
  .mini, .resume-row { grid-template-columns: 1fr; }
  .resume-row a + a { padding-left: 4px; border-left: 0; }
  .process ol { grid-template-columns: 1fr 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .signature { text-align: left; }
  .signature img { margin-left: 0; }
  .footer { flex-wrap: wrap; gap: 14px 30px; }
}
@media (max-width: 520px) {
  .process ol { grid-template-columns: 1fr; }
  .sources a { width: 60px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .print, .phone, .more b, .resume-row b, .viewport.scroll img { transition: none; }
}
