:root {
  --bg: #0f0f0f;
  --panel: #181818;
  --text: #f2f0ec;
  --muted: #9a958d;
  --accent: #e8b04a;
  --gap: clamp(8px, 1.4vw, 16px);
  --pad: clamp(16px, 4vw, 48px);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video, iframe { display: block; max-width: 100%; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--pad);
  background: linear-gradient(var(--bg) 60%, transparent);
}
.brand { font-weight: 700; letter-spacing: .02em; text-decoration: none; font-size: 1.1rem; }
.topbar nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.topbar nav a { text-decoration: none; color: var(--muted); font-size: .95rem; }
.topbar nav a:hover, .topbar nav a.active { color: var(--text); }

main { padding: 0 var(--pad) 64px; min-height: 70vh; }
.page-title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin: 32px 0 8px; letter-spacing: -.02em; }
.page-intro { color: var(--muted); max-width: 720px; margin: 0 0 32px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 56px 0 16px; }
.section-head h2 { margin: 0; font-size: 1.3rem; }
.section-head a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.rich a { color: var(--accent); }
.rich p { margin: 0 0 1em; }

/* Home */
.hero { position: relative; margin: 0 calc(-1 * var(--pad)); height: min(78vh, 900px); overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero .hero-text {
  position: absolute; inset: auto 0 0 0; padding: 48px var(--pad) 40px;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.hero h1 { margin: 0; font-size: clamp(2.6rem, 8vw, 6rem); line-height: .95; letter-spacing: -.03em; }
.hero p { margin: 10px 0 0; font-size: clamp(1rem, 2vw, 1.3rem); color: #ddd; }
.intro-plain { padding: 12vh 0 4vh; }
.intro-plain h1 { margin: 0; font-size: clamp(2.8rem, 9vw, 7rem); line-height: .95; letter-spacing: -.03em; }
.intro-plain p { color: var(--muted); font-size: 1.3rem; }

/* Cards */
.cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.card { text-decoration: none; display: block; cursor: pointer; background: none; border: 0; padding: 0; color: inherit; text-align: left; font: inherit; }
.card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); position: relative; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .thumb img { transform: scale(1.03); }
.card h3 { margin: 10px 0 0; font-size: 1rem; font-weight: 600; }
.card p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }
.play::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 2.4rem; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.6);
}

/* Masonry gallery */
.gallery { columns: 3 320px; column-gap: var(--gap); }
.gallery figure { margin: 0 0 var(--gap); break-inside: avoid; cursor: zoom-in; background: var(--panel); }
.gallery img { width: 100%; height: auto; }
.gallery figcaption { padding: 8px 2px 0; color: var(--muted); font-size: .85rem; background: var(--bg); }
.gallery .post-link { color: var(--accent); text-decoration: none; }

/* Video */
.video-list { display: grid; gap: 48px; }
.video-item { display: grid; gap: 24px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.video-frame { aspect-ratio: 16 / 9; background: #000; position: relative; }
.video-frame iframe, .video-frame video { width: 100%; height: 100%; border: 0; }
.video-frame button { all: unset; cursor: pointer; position: absolute; inset: 0; }
.video-frame button img { width: 100%; height: 100%; object-fit: cover; }
.video-item h3 { margin: 0 0 8px; font-size: 1.25rem; }
.video-item .rich { color: var(--muted); }
@media (max-width: 760px) { .video-item { grid-template-columns: 1fr; gap: 12px; } }

/* About */
.about { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: start; margin-top: 32px; }
.about img { width: 100%; height: auto; }
.about .rich { font-size: 1.1rem; }
.contact { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; }
.contact a { color: var(--accent); text-decoration: none; }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94);
  display: grid; grid-template-columns: 64px 1fr 64px; align-items: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; grid-column: 2; }
.lightbox img { max-height: 86vh; width: auto; object-fit: contain; }
.lightbox figcaption { color: #ccc; font-size: .95rem; text-align: center; max-width: 70ch; }
.lightbox figcaption a { color: var(--accent); }
.lightbox button { background: none; border: 0; color: #fff; font-size: 2.6rem; cursor: pointer; opacity: .7; }
.lightbox button:hover { opacity: 1; }
.lb-close { position: absolute; top: 12px; right: 20px; }
.lb-prev { grid-column: 1; }
.lb-next { grid-column: 3; }

.footer { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 32px var(--pad); color: var(--muted); font-size: .85rem; border-top: 1px solid #222; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }
.empty { color: var(--muted); padding: 10vh 0; }
.preview-banner { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 40; background: var(--accent); color: #111; padding: 8px 16px; border-radius: 99px; font-size: .85rem; font-weight: 600; }
