/* benjaminoutram.com — dark gallery. See DESIGN.md */
:root {
  --bg: #0b0b10;
  --surface: #14141c;
  --surface-2: #1b1b26;
  --text: #ececf1;
  --muted: #9a9aac;
  --faint: #5d5d70;
  --line: rgba(255, 255, 255, .08);
  --accent: #ffb347;
  --accent-2: #6fd3ff;
  --serif: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; /* display face (name kept for brevity) */
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1160px;
  --measure: 68ch;
  --pad: clamp(20px, 4vw, 48px);
  --radius: 10px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p a, li a, cite a, .lede a { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; transition: color .15s, text-decoration-color .15s; }
p a:hover, li a:hover, cite a:hover, .lede a:hover { color: var(--accent-2); text-decoration-color: var(--accent-2); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 .4em; letter-spacing: -.022em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow, .label, .card-meta, .date, .tags span, .chip, .year { font-family: var(--mono); font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.eyebrow a { color: var(--muted); }
.eyebrow a:hover { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* header */
.site-header {
  max-width: var(--max); margin: 0 auto; padding: 22px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.nav { display: flex; gap: 26px; }
.nav a { font-size: .92rem; color: var(--muted); padding: 6px 0; border-bottom: 1px solid transparent; transition: color .15s, border-color .15s; }
.nav a:hover, .nav a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; transition: transform .2s, opacity .2s; }
@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; gap: 0; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px var(--pad); z-index: 20; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
}

main { max-width: var(--max); margin: 0 auto; padding: 24px var(--pad) 80px; }

/* hero */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); max-width: 900px; }
.hero h1 { font-size: clamp(2.2rem, 5.4vw, 4.1rem); margin: .3em 0 .6em; text-wrap: balance; font-weight: 600; }
.proof { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.proof li a { display: block; text-decoration: none; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .15s, transform .15s; }
.proof li a:hover { border-color: rgba(255, 179, 71, .5); transform: translateY(-2px); }
.proof .label { display: block; margin-bottom: 4px; color: var(--accent); }
.proof .proof-multi { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.proof .proof-multi a { display: block; font-size: .95rem; padding: 3px 0; border: 0; border-radius: 0; background: none; transform: none; transition: color .15s; }
.proof .proof-multi a + a { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.proof .proof-multi a:hover { color: var(--accent); }
.hero .hi { background: linear-gradient(90deg, #ffb347 0%, #ff6ad5 45%, #6fd3ff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .hero .hi { animation: hue 14s ease-in-out infinite alternate; }
  @keyframes hue { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
}
.proof span:not(.label) { font-size: .95rem; }

/* sections */
.section { padding: clamp(28px, 5vw, 56px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.more { font-size: .9rem; color: var(--muted); }
.more:hover { color: var(--accent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }

/* cards */
.cards { display: grid; gap: 22px; }
.cards-featured { grid-template-columns: repeat(2, 1fr); }
.cards-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-featured, .cards-grid { grid-template-columns: 1fr; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .18); }
.card-media { aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.cards-featured { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .cards-featured { grid-template-columns: repeat(2, 1fr); } }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 18px 20px 22px; }
.card-meta { display: flex; justify-content: space-between; margin-bottom: 8px; }
.card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.cards-featured .card-body { padding: 14px 16px 18px; }
.card[hidden] { display: none; }

/* quotes strip */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.quotes blockquote { margin: 0; }
.quotes p { font-family: var(--serif); font-weight: 500; font-size: 1.2rem; line-height: 1.4; margin: 0 0 10px; color: var(--text); letter-spacing: -.01em; }
.quotes cite { font-style: normal; font-size: .85rem; color: var(--muted); }
.quotes cite a { text-decoration: none; color: var(--accent); }

/* lists */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { border-top: 1px solid var(--line); }
.post-list li:last-child { border-bottom: 1px solid var(--line); }
.post-list a { text-decoration: none; display: grid; grid-template-columns: 150px 1fr; gap: 6px 20px; padding: 16px 0; align-items: baseline; transition: color .15s; }
.post-list a:hover .t { color: var(--accent); }
.post-list .t { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; line-height: 1.3; letter-spacing: -.015em; transition: color .15s; }
.post-list .date { white-space: nowrap; }
.post-list .x { grid-column: 2; color: var(--muted); font-size: .92rem; }
@media (max-width: 560px) { .post-list a { grid-template-columns: 1fr; } .post-list .x { grid-column: 1; } }
.year-group { margin-top: 34px; }
.year { color: var(--accent); margin-bottom: 6px; }

/* page heads */
.page-head { padding: clamp(24px, 5vw, 56px) 0 24px; }
.page-head .lede { font-size: 1.2rem; color: var(--muted); max-width: var(--measure); margin: 0; }
.page-head.narrow, .narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--text); background: var(--surface); transition: border-color .15s, background .15s, color .15s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 500; }
.btn-primary:hover { background: #ffc46e; color: #111; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip { background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.tags span { border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.project-top { display: grid; grid-template-columns: 1fr minmax(260px, 400px); gap: clamp(24px, 4vw, 56px); align-items: start; margin-bottom: 36px; }
.project-top .page-head { padding-top: clamp(16px, 3vw, 40px); }
.hero-media { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); aspect-ratio: 1; margin-top: clamp(16px, 3vw, 40px); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .project-top { grid-template-columns: 1fr; } .hero-media { max-width: 400px; margin-top: 0; } }
.project-banner { border-radius: var(--radius); overflow: hidden; background: var(--surface-2); margin-top: 8px; max-width: 820px; }
.project-banner img { width: 100%; height: auto; display: block; }
.project-top.no-cover { grid-template-columns: 1fr; margin-bottom: 8px; }
.project-top.no-cover .page-head { padding-top: clamp(12px, 2vw, 28px); }
.laurels { list-style: none; margin: 0 0 32px; padding: 20px 0 8px; display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; border-top: 1px solid var(--line); }
.laurels li { height: 96px; }
.laurels img { height: 100%; width: auto; max-width: 220px; object-fit: contain; }
.book { display: grid; grid-template-columns: minmax(160px, 220px) 1fr; gap: 28px; align-items: start; margin: 1.2em 0 2em; }
.book .img-link img { border-radius: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.5); }
.book > div > :first-child { margin-top: 0; }
@media (max-width: 560px) { .book { grid-template-columns: 1fr; } .book .img-link img { max-width: 220px; } }
.episodes { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.episode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 900px) { .episode-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .episode-grid { grid-template-columns: 1fr; } }
.episode { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.episode:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .18); }
.episode-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.episode:hover .episode-thumb img { transform: scale(1.03); }
.episode-thumb .embed-btn { width: 52px; height: 52px; margin: -26px 0 0 -26px; opacity: 0; transition: opacity .2s; }
.episode-thumb .embed-btn::after { left: 20px; top: 15px; border-width: 11px 0 11px 17px; }
.episode:hover .embed-btn { opacity: 1; background: rgba(255, 179, 71, .9); }
.episode-body { padding: 14px 16px 18px; }
.episode-body h3 { font-size: 1.05rem; margin: 6px 0 4px; }
.episode-body p { margin: 0; color: var(--muted); font-size: .85rem; line-height: 1.45; }
.video { margin: 1.4em 0; border-radius: var(--radius); overflow: hidden; background: #000; }
.video video { width: 100%; display: block; aspect-ratio: 16 / 9; }

/* prose */
.prose { max-width: var(--measure); }
.prose.narrow { margin-left: auto; margin-right: auto; max-width: 760px; }
.project .prose { max-width: 820px; }
.prose > * + * { margin-top: 1.1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { margin-top: 1.8em; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.25rem; }
.prose h4 { font-size: 1.05rem; }
.prose p:first-child { margin-top: 0; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--accent); color: var(--muted); }
.prose blockquote p { margin: .6em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: .86rem; line-height: 1.5; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .3em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose img { border-radius: 6px; }
.prose .img-link { display: block; }
.prose .img-link img { width: auto; max-width: 100%; margin: 0 auto; }
.prose .img-badge img { max-width: 420px; }
.prose .gallery-item img { width: 100%; height: 100%; }
.prose strong { font-weight: 600; }

/* galleries */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 1.4em 0; }
.gallery-item { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--surface-2); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; border-radius: 0; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item a { display: block; height: 100%; }

/* embeds */
.embed { margin: 1.4em 0; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; position: relative; }
.embed-play { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.embed-play img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.embed-play:hover img { opacity: 1; }
.embed-btn { position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); transition: background .2s, transform .2s; }
.embed-btn::after { content: ""; position: absolute; left: 29px; top: 22px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.embed-play:hover .embed-btn { background: rgba(255, 179, 71, .85); transform: scale(1.06); }
.embed-label { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); color: var(--muted); font-size: .85rem; }
.embed-vimeo { background: radial-gradient(circle at 50% 40%, #1e2a44, #0b0b10 70%); }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* pager */
.pager { display: flex; justify-content: space-between; gap: 20px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.pager a { max-width: 45%; font-family: var(--serif); font-weight: 600; font-size: 1rem; line-height: 1.3; }
.pager a:hover { color: var(--accent); }
.pager .label { display: block; margin-bottom: 4px; }
.pager .older { text-align: right; margin-left: auto; }

/* press page */
.press-list { border-top: 1px solid var(--line); }
.press-item { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.press-thumb { aspect-ratio: 3 / 2; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.press-thumb:empty { background: var(--surface); opacity: .5; }
.press-thumb a { display: block; height: 100%; }
.press-thumb img { width: 100%; height: 100%; object-fit: cover; }
.press-thumb img.contain { object-fit: contain; padding: 10px; box-sizing: border-box; background: var(--surface-2); }
.press-thumb img.contain.light { padding: 14px; background: #fff; }
.press-body { max-width: 720px; }
.press-body h2 { font-size: 1.2rem; margin: 4px 0 8px; }
.press-body h2 a:hover { color: var(--accent); }
.press-outlet { color: var(--accent); }
.press-body p { margin: .5em 0 0; color: var(--muted); font-size: .95rem; }
.press-body blockquote { margin: .8em 0 0; padding-left: 16px; border-left: 2px solid var(--line); }
.press-body blockquote p { color: var(--text); font-style: italic; }
.press-body blockquote strong, .press-body blockquote em { font-weight: 400; }
.press-body .embed { max-width: 560px; margin: 1em 0 0; }
@media (max-width: 640px) { .press-item { grid-template-columns: 1fr; } .press-thumb { max-width: 240px; } }

/* about */
.about-prose .img-link { margin-bottom: 2em; }
.about-prose h2 { font-size: 1.6rem; }
.about-prose ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.about-prose ul li a { text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; display: inline-block; }
.about-prose ul li a:hover { border-color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 48px; display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; align-items: start; }
.footer-inner p { margin: 4px 0 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--muted); font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-inner .small { grid-column: 1 / -1; color: var(--faint); }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(5, 5, 8, .92); }
.lightbox img { position: absolute; inset: 0; margin: auto; max-width: 96vw; max-height: 94vh; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lightbox-close { position: fixed; top: 14px; right: 18px; font-size: 32px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; opacity: .7; z-index: 2; }
.lightbox-close:hover { opacity: 1; }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
::selection { background: var(--accent); color: #111; }
