/*
 * banast.as homepage in Repertory's chrome, shared with books.banast.as and
 * dev.banast.as, with banast.as yellow in place of cyan as the one lit accent.
 * Ink background, off-white type, thin borders, magenta only as the accent's
 * ghost, faint scanlines. Archivo Black for the name, Silkscreen for display,
 * JetBrains Mono for the interface, Archivo for reading text.
 */

@font-face { font-family: 'Silkscreen'; src: url('/assets/silkscreen.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo Black'; src: url('/assets/archivo-black.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/assets/archivo-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/assets/jetbrains-mono.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --surface: #060709;
  --raised: #101114;
  --overlay: #1c1e22;
  --text: #eeeee9;
  --text-2: #b6b6b0;
  --muted: #96968f;
  --accent: #fccd03;
  --accent-rgb: 252, 205, 3;
  --accent-dim: #8a7208;
  --ghost: #ff2bcc;
  --ghost-rgb: 255, 43, 204;
  --line: #2c2e32;
  --line-strong: #5f6168;
  --font-display: 'Silkscreen', monospace;
  --font-heavy: 'Archivo Black', 'Archivo', system-ui, sans-serif;
  --font-body: 'Archivo', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--surface); color: var(--text-2); font: 16px/1.6 var(--font-mono); -webkit-font-smoothing: antialiased; scroll-padding-top: 84px; scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; }
body::after { content: ''; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .022) 0 1px, transparent 1px 3px); }
a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
h1, h2, h3 { color: var(--text); font-weight: 400; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { color: var(--surface); background: var(--accent); }

.shell { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 40px; }
main { flex: 1; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 200; padding: 8px 12px; background: var(--accent); color: var(--surface); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.skip-link:focus { top: 12px; color: var(--surface); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 60px; }
.wordmark { justify-self: start; color: var(--text); font: 16px var(--font-display); letter-spacing: -.06em; text-shadow: -1px 0 rgba(var(--accent-rgb), .75), 1px 0 rgba(var(--ghost-rgb), .7); white-space: nowrap; }
.wordmark:hover { text-decoration: underline; text-underline-offset: 5px; }
.section-nav { display: flex; gap: 2px; }
.section-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.section-nav a span { font-size: 10px; opacity: .7; }
.section-nav a:hover { color: var(--text); }
.section-nav a:focus-visible, .section-nav a:active { color: var(--surface); background: var(--accent); outline: none; }
.header-cta { justify-self: end; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: transparent; padding: 6px 12px; font: 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.btn:hover { color: #fff; border-color: var(--accent-dim); }
.btn-primary { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.btn-primary:hover { color: var(--surface); background: #fff; border-color: #fff; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start; padding: 64px 0 56px; border-bottom: 1px dashed var(--line); }
.hero-kicker { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-kicker::before { content: '> '; color: var(--accent); }
.hero-name { margin-top: 18px; font: clamp(44px, 7.4vw, 92px)/.9 var(--font-heavy); letter-spacing: -.035em; text-transform: uppercase; text-wrap: balance; text-shadow: -.04em 0 rgba(var(--accent-rgb), .6), .04em 0 rgba(var(--ghost-rgb), .55); }
.hero-statement { margin-top: 28px; max-width: 34ch; font: clamp(18px, 2vw, 22px)/1.5 var(--font-body); color: var(--text); text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }

/* Portrait: treated like a cover on the shelf, with pixel lock-on brackets. */
.portrait { position: relative; display: block; width: 100%; max-width: 300px; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; }
.portrait:focus-visible { outline-offset: 10px; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; border: 1px solid var(--line); background: var(--raised); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .12), -6px -6px 0 rgba(var(--ghost-rgb), .08); transition: transform .2s steps(4); }
.portrait::before, .link-card::before {
  --c: var(--accent); content: ''; position: absolute; inset: -7px; z-index: 2; opacity: 0; transform: scale(1.04); transition: opacity .15s steps(2), transform .2s steps(3); pointer-events: none;
  background:
    linear-gradient(var(--c), var(--c)) top left/14px 3px, linear-gradient(var(--c), var(--c)) top left/3px 14px,
    linear-gradient(var(--c), var(--c)) top right/14px 3px, linear-gradient(var(--c), var(--c)) top right/3px 14px,
    linear-gradient(var(--c), var(--c)) bottom left/14px 3px, linear-gradient(var(--c), var(--c)) bottom left/3px 14px,
    linear-gradient(var(--c), var(--c)) bottom right/14px 3px, linear-gradient(var(--c), var(--c)) bottom right/3px 14px;
  background-repeat: no-repeat; }
.portrait:hover::before, .portrait:focus-visible::before, .portrait[aria-pressed="true"]::before { opacity: 1; transform: none; }
.portrait:hover img { transform: translateY(-5px); }


.facts > div { display: contents; }
.facts { margin-top: 28px; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--line); font-size: 12px; }
.facts dt, .facts dd { padding: 8px 0; border-bottom: 1px solid var(--line); }
.facts dt { padding-right: 24px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.facts dd { color: var(--text); }
.facts dd a { color: var(--accent); }
.facts dd a:hover { color: #fff; }

/* Sections */
.section { padding: 56px 0; border-bottom: 1px dashed var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 28px; }
.section-label { display: flex; align-items: baseline; gap: 14px; font: clamp(20px, 2.6vw, 28px)/1.2 var(--font-display); letter-spacing: -.04em; text-transform: uppercase; text-shadow: -.04em 0 rgba(var(--accent-rgb), .6), .04em 0 rgba(var(--ghost-rgb), .55); }
.section-num { font: 12px var(--font-mono); letter-spacing: .08em; color: var(--accent); text-shadow: none; }
.section-dek { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.about { display: grid; gap: 16px; max-width: 62ch; font: 17px/1.7 var(--font-body); color: var(--text-2); }
.about a, .timeline-summary a { color: var(--accent); border-bottom: 1px solid var(--accent-dim); }
.about a:hover, .timeline-summary a:hover { color: #fff; border-color: #fff; }

/* Work: each role is a catalog entry. */
.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 140px 1fr; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.timeline-date { padding-top: 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.timeline-item--active .timeline-date { color: var(--accent); }
.timeline-item--active .timeline-date::before { content: '\25CF  '; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.timeline-content { display: flex; flex-direction: column; min-width: 0; }
.timeline-company { align-self: flex-start; font: 20px/1.2 var(--font-display); letter-spacing: -.03em; text-transform: uppercase; color: var(--text); }
.timeline-company:hover::before { content: '> '; color: var(--accent); font-family: var(--font-mono); }
.timeline-role { margin-top: 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.timeline-loc { margin-top: 2px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.timeline-summary { margin-top: 10px; max-width: 60ch; font: 15px/1.6 var(--font-body); color: var(--text-2); }

.timeline-roles { margin-top: 14px; border-left: 1px solid var(--line); }
.timeline-step { position: relative; display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; padding: 4px 0 14px 18px; }
.timeline-step::before { content: ''; position: absolute; left: -4px; top: 9px; width: 7px; height: 7px; background: var(--surface); border: 1px solid var(--line-strong); }
.timeline-step:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline-step-date { grid-row: span 2; padding-top: 2px; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.timeline-step .timeline-role { margin-top: 0; }
.timeline-step .timeline-summary { margin-top: 4px; font-size: 14px; }

.project-list { margin-top: 16px; border-top: 1px dashed var(--line); }
.project-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.project-name { min-width: 0; font: 14px/1.4 var(--font-body); color: var(--text); }
.project-name a { color: var(--text); }
.project-row:hover .project-name::before { content: '> '; color: var(--accent); font-family: var(--font-mono); }
.project-name a:hover { color: var(--accent); }
.project-meta { flex: none; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.timeline-more { margin-top: 12px; }
.timeline-more > summary { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); padding: 4px 10px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); cursor: pointer; list-style: none; }
.timeline-more > summary::-webkit-details-marker { display: none; }
.timeline-more > summary::before { content: '+'; color: var(--accent); }
.timeline-more[open] > summary::before { content: '\2212'; }
.timeline-more > summary:hover { color: #fff; border-color: var(--accent-dim); }
.timeline-more[open] > summary { color: var(--surface); background: var(--accent); border-color: var(--accent); }
.timeline-more[open] > summary::before { color: var(--surface); }
.timeline-more .project-list { margin-top: 12px; }

/* Elsewhere: link cards as category tiles. */
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.link-card { position: relative; display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--line); padding: 18px; color: var(--text); transition: border-color .15s; }
.link-card svg { color: var(--accent); margin-bottom: 18px; }
.link-card:hover { border-color: var(--accent-dim); }
.link-card:hover::before { opacity: 1; transform: none; }
.link-card-label { font: 14px/1.4 var(--font-display); text-transform: uppercase; letter-spacing: .01em; }
.link-card:hover .link-card-label::before { content: '> '; color: var(--accent); font-family: var(--font-mono); }
.link-card-url { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.social { display: flex; gap: 6px; margin-top: 28px; }
.social-link { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--line); color: var(--text-2); }
.social-link:hover { color: var(--surface); background: var(--accent); border-color: var(--accent); }

footer.site-footer { border-top: 1px solid var(--line); }
.footer-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-block: 22px 40px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer-bar a { color: var(--muted); }
.footer-bar a:hover { color: var(--text); }


/* 3. Client strip, spanning the hero. */
.clients { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.clients-label { flex: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.clients ul { display: flex; flex-wrap: wrap; gap: 6px 0; }
.clients li { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; }
.clients li:not(:last-child)::after { content: '/'; margin: 0 12px; color: var(--line-strong); }

/* 5. Behind-the-scenes photos: the only other real color on the page. */
.bts { margin-top: 18px; max-width: 520px; }
.bts a { position: relative; display: block; }
.bts img { display: block; width: 100%; height: auto; border: 1px solid var(--line); box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .12), -6px -6px 0 rgba(var(--ghost-rgb), .08); transition: transform .2s steps(4); }
.bts a:hover img { transform: translateY(-4px); }
.bts figcaption { margin-top: 12px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bts figcaption b { font-weight: 400; color: var(--accent); }
.timeline-step:has(.bts-step) { grid-template-columns: 96px 1fr 220px; grid-template-rows: auto auto 1fr; }
.lightbox { width: min(1200px, calc(100vw - 32px), calc((100dvh - 150px) * 1.5)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); overflow: hidden; }
.lightbox:focus { outline: none; }
.lightbox::backdrop { background: rgba(6, 7, 9, .9); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-figure { display: flex; flex-direction: column; min-height: 0; }
.lightbox-media { position: relative; aspect-ratio: 3 / 2; background: #000; }
.lightbox-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.lightbox-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox-caption { padding: 14px 16px 0; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lightbox-caption a, .lightbox-title { color: var(--text); }
.lightbox-caption a:hover { color: var(--accent); }
.lightbox-controls { display: flex; align-items: center; gap: 8px; padding: 12px 16px 16px; }
.lightbox-count { margin-right: auto; font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.lightbox[data-mode="video"] .lightbox-step { display: none; }
.lightbox-btn { padding: 6px 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 11px/1.4 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.lightbox-btn:hover { border-color: var(--accent); color: var(--accent); }
.lightbox-close, .lightbox-close:hover { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.bts-step { grid-column: 3; grid-row: 1 / -1; margin-top: 0; max-width: none; }
.bts-step img { aspect-ratio: 3 / 2; object-fit: cover; box-shadow: 4px 4px 0 rgba(var(--accent-rgb), .12), -4px -4px 0 rgba(var(--ghost-rgb), .08); }
.bts-step figcaption { margin-top: 10px; line-height: 1.5; }
.bts-step figcaption a { display: inline; color: var(--text); }
.bts-step figcaption a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .timeline-step:has(.bts-step) { grid-template-columns: 96px 1fr; grid-template-rows: none; }
  .bts-step { grid-column: 2; grid-row: auto; margin-top: 12px; max-width: 320px; }
}
@media (max-width: 640px) {
  .timeline-step:has(.bts-step) { grid-template-columns: 1fr; }
  .bts-step { grid-column: auto; max-width: none; }
}

/* 4. Easter egg: img.js toggles body.glitch while the track plays. */
body.glitch::after { background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .05) 0 1px, transparent 1px 3px); animation: roll 6s linear infinite; }
body.glitch .hero-name, body.glitch .section-label, body.glitch .wordmark { animation: split .9s steps(2) infinite; }
body.glitch .portrait img { animation: rgb 1.4s steps(4) infinite; }
body.glitch .timeline-item--active .timeline-date::before { animation-duration: .3s; }
@keyframes roll { to { background-position: 0 300px; } }
@keyframes split {
  0%, 100% { text-shadow: -.04em 0 rgba(var(--accent-rgb), .6), .04em 0 rgba(var(--ghost-rgb), .55); transform: none; }
  25% { text-shadow: -.12em 0 rgba(var(--accent-rgb), .85), .1em 0 rgba(var(--ghost-rgb), .8); transform: translateX(2px); }
  50% { text-shadow: .08em 0 rgba(var(--accent-rgb), .8), -.08em 0 rgba(var(--ghost-rgb), .75); transform: translateX(-2px) skewX(-4deg); }
  75% { text-shadow: -.02em 0 rgba(var(--accent-rgb), .9), .16em 0 rgba(var(--ghost-rgb), .7); transform: none; }
}
@keyframes rgb {
  0%, 100% { box-shadow: 6px 6px 0 rgba(var(--accent-rgb), .35), -6px -6px 0 rgba(var(--ghost-rgb), .3); filter: none; }
  33% { box-shadow: -10px 4px 0 rgba(var(--accent-rgb), .5), 10px -4px 0 rgba(var(--ghost-rgb), .45); filter: contrast(1.25) saturate(1.3); }
  66% { box-shadow: 14px -2px 0 rgba(var(--accent-rgb), .45), -14px 2px 0 rgba(var(--ghost-rgb), .5); filter: hue-rotate(-14deg) contrast(1.1); }
}

@media (max-width: 860px) {
  .header-bar { grid-template-columns: 1fr auto; }
  .section-nav { display: none; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 44px; }
  .hero-panel { display: grid; grid-template-columns: 140px 1fr; gap: 24px; align-items: start; }
  .facts { margin-top: 0; }
}
@media (max-width: 640px) {
  .clients { flex-direction: column; gap: 8px; }
  .shell { padding-inline: 16px; }
  .timeline-item { grid-template-columns: 1fr; gap: 10px; }
  .timeline-step { grid-template-columns: 1fr; }
  .timeline-step-date { grid-row: auto; }
  .project-row { flex-direction: column; gap: 2px; }
  .hero-panel { grid-template-columns: 1fr; }
  .portrait { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
