:root {
  --bg: #121212;
  --surface: #1b1b1b;
  --surface-2: #242424;
  --line: #2e2e2e;
  --text: #ecebe6;
  --muted: #9a9890;
  --accent: #ff7a45;
  --danger: #ff6b6b;
  --radius: 10px;
  --gutter: clamp(16px, 4vw, 48px);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
a { color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; text-decoration: none; letter-spacing: .01em; }
.topbar nav { display: flex; gap: clamp(12px, 3vw, 28px); font-size: 14px; }
.topbar nav a { text-decoration: none; color: var(--muted); }
.topbar nav a:hover { color: var(--text); }

/* hero */
.hero { padding: clamp(64px, 12vw, 160px) var(--gutter) clamp(40px, 6vw, 80px); max-width: 1100px; }
.hero h1 { font: 400 clamp(52px, 11vw, 132px)/.95 var(--serif); margin: 0 0 20px; letter-spacing: -.01em; }
.hero-title { font-size: clamp(18px, 2.2vw, 22px); margin: 0 0 8px; color: var(--accent); }
.hero-tagline { color: var(--muted); max-width: 52ch; margin: 0; }

.reel { padding: 0 var(--gutter); }
.reel .media { margin: 0; }

/* sections */
.section { padding: clamp(48px, 7vw, 96px) var(--gutter) 0; }
.section h2 { font: 400 clamp(32px, 4.5vw, 48px)/1.1 var(--serif); margin: 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 6px 14px; font: 13px var(--sans); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card { text-decoration: none; display: block; }
.card-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-thumb img { transform: scale(1.04); }
.card-meta { padding: 12px 2px 0; }
.card-meta h3 { margin: 0; font-size: 17px; font-weight: 500; }
.card-meta p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.badge { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.7); color: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .08em; padding: 4px 8px; border-radius: 4px; }
.badge.inline { position: static; display: inline-block; margin-bottom: 12px; color: var(--accent); background: var(--surface-2); }
.loading { min-height: 120px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* unlock */
.unlock { display: flex; gap: 20px; padding: clamp(20px, 3vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); max-width: 640px; }
.unlock-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.unlock-body { flex: 1; min-width: 0; }
.unlock-lead { margin: 0 0 16px; }
.unlock-row { display: flex; gap: 10px; }
.unlock-row input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; font: 15px var(--sans); }
.unlock-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.unlock-status { min-height: 1.6em; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.unlock-status.error { color: var(--danger); }
.unlock-note { margin: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .unlock { flex-direction: column; } .unlock-row { flex-direction: column; } }

.btn { background: var(--accent); color: #1a0d06; border: 0; border-radius: 8px; padding: 10px 18px; font: 600 14px var(--sans); cursor: pointer; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: none; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--muted); }

/* about / contact */
.about-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; margin-top: 24px; max-width: 1000px; }
.about-body p { margin: 0 0 1em; color: #cfcdc6; }
.skills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.skills li { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .about-body { grid-template-columns: 1fr; } }

.contact-email { display: inline-block; margin-top: 20px; font: 400 clamp(26px, 5vw, 56px)/1.1 var(--serif); text-decoration-thickness: 1px; text-underline-offset: 6px; word-break: break-word; }
.contact-email:hover { color: var(--accent); }
.links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 20px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--text); }

.footer { padding: 80px var(--gutter) 32px; color: var(--muted); font-size: 13px; }

/* viewer */
.viewer { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; }
.viewer-bar { position: sticky; top: 0; z-index: 2; padding: 14px var(--gutter); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.viewer-body { position: relative; padding: clamp(32px, 5vw, 64px) var(--gutter) 80px; max-width: 1280px; margin: 0 auto; }
.viewer-head { max-width: 760px; margin-bottom: 40px; }
.viewer-head h2 { font: 400 clamp(40px, 7vw, 80px)/1 var(--serif); margin: 0 0 24px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 24px; margin: 0 0 24px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.desc { color: #cfcdc6; }
.viewer-media { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.media { margin: 0; }
.media img, .media video { width: 100%; height: auto; border-radius: var(--radius); background: var(--surface); }
.media figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-error { padding: 40px; text-align: center; color: var(--danger); background: var(--surface); border-radius: var(--radius); }

/* light deterrent on NDA pages: watermark + no drag/select of media */
.viewer.private .media img, .viewer.private .media video { -webkit-user-drag: none; user-select: none; }
.viewer.private::after {
  content: attr(data-watermark);
  position: fixed; right: var(--gutter); bottom: 16px; z-index: 3; pointer-events: none;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.35);
}
