:root {
  --bg: #0c0a09;
  --bg-2: #13100e;
  --surface: #1a1512;
  --line: #2d241e;
  --text: #ede5dc;
  --muted: #a8978a;
  --dim: #6f6259;
  --ember: #ff6a1a;
  --amber: #ffb02e;
  --flare: #ff3d1f;
  --glow: rgba(255, 106, 26, .35);
  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --serif: 'Newsreader', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --wrap: 1120px;
  --read: 42rem;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.125rem/1.7 var(--serif);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* film grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none; z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--ember); color: #160b05; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(12, 10, 9, .92), rgba(12, 10, 9, .72));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 106, 26, .12);
}
.page-home .topbar { position: absolute; left: 0; right: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; border: 0; }
.brand img { display: block; width: 150px; height: auto; }
.topbar nav { display: flex; gap: 4px; font: 600 .78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.topbar nav a { padding: 9px 12px; text-decoration: none; color: var(--muted); border-radius: 4px; transition: color .2s, background .2s; }
.topbar nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.topbar nav a[aria-current] { color: var(--ember); }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: min(88vh, 760px);
  display: grid; align-items: end;
  padding: 120px var(--gutter) clamp(48px, 8vw, 96px);
  overflow: hidden;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .85; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(12, 10, 9, .35) 0%, rgba(12, 10, 9, .1) 40%, rgba(12, 10, 9, .6) 80%, var(--bg) 100%),
    radial-gradient(ellipse 60% 45% at 22% 72%, rgba(255, 90, 20, .26), transparent 70%);
}
.hero-inner { width: 100%; max-width: var(--wrap); margin: 0 auto; }
.hero-prompt { margin: 0 0 18px; font: 400 .9rem/1 var(--mono); color: var(--muted); }
.prompt { color: var(--ember); margin-right: .5ch; }
.cursor { display: inline-block; width: .6em; height: 1.05em; margin-left: .35ch; vertical-align: -.18em; background: var(--ember); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-title {
  margin: 0;
  font: 900 clamp(4rem, 14vw, 11.5rem)/.82 var(--display);
  text-transform: uppercase; letter-spacing: -.01em;
  display: flex; flex-direction: column;
}
.hero-title span { display: block; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.hero-title span + span { animation-delay: .12s; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(180deg, var(--amber) 10%, var(--ember) 55%, var(--flare) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 28px var(--glow));
}
.hero-tag { margin: 22px 0 0; max-width: 34ch; font: italic 400 clamp(1.15rem, 2.2vw, 1.5rem)/1.4 var(--serif); color: var(--muted); animation: rise .9s .26s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { transform: translateY(.3em); } }

/* ---------- listings ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 10vw, 120px); }
.listhead { padding: clamp(40px, 7vw, 72px) 0 22px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.listhead-sub { padding-top: 72px; }
.listhead h1, .listhead h2 { margin: 0; font: 800 clamp(2rem, 5vw, 3.2rem)/1 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.listhead-sub h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); color: var(--muted); }
.eyebrow { order: 2; margin: 0; font: 400 .78rem/1 var(--mono); color: var(--dim); }
.page-list .listhead { flex-direction: column; align-items: flex-start; }
.page-list .eyebrow { order: 0; color: var(--ember); }

.syslog { margin: 0 0 10px; font: 400 .74rem/1.5 var(--mono); color: var(--dim); letter-spacing: .01em; }
.syslog time { color: var(--muted); margin-right: 1ch; }
.mnemonic { color: var(--ember); margin-right: .5ch; }

.card { position: relative; display: grid; gap: 18px; align-content: start; }
.card-img { display: block; overflow: hidden; border-radius: 6px; background: var(--surface); aspect-ratio: 1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s; filter: saturate(.9); }
.card:hover .card-img img { transform: scale(1.04); filter: saturate(1.1); }
.card-title { margin: 0 0 10px; font: 800 1.65rem/1.02 var(--display); text-transform: uppercase; letter-spacing: .01em; }
.card-title a { text-decoration: none; background: linear-gradient(var(--ember), var(--ember)) 0 100% / 0 2px no-repeat; transition: background-size .35s; }
.card:hover .card-title a { background-size: 100% 2px; }
.card-title a::after { content: ''; position: absolute; inset: 0; }
.card-excerpt { margin: 0 0 14px; color: var(--muted); font-size: 1.02rem; line-height: 1.6; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.card-lead .card-excerpt { -webkit-line-clamp: 5; line-clamp: 5; }
.card-more { position: relative; font: 600 .78rem/1 var(--mono); color: var(--ember); text-decoration: none; letter-spacing: .04em; }
.card-more span { display: inline-block; transition: transform .25s; }
.card:hover .card-more span, .card-more:hover span { transform: translateX(4px); }

.card-lead { grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.card-lead .card-img { aspect-ratio: 1; box-shadow: 0 30px 80px -30px var(--glow); }
.card-lead .card-title { font-size: clamp(2.4rem, 5.5vw, 4.4rem); line-height: .92; margin-bottom: 18px; }
.card-lead .card-excerpt { font-size: 1.15rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 48px 32px; }
.page-list .grid { margin-top: 8px; }

/* ---------- post ---------- */
.post > .prose, .post > .post-head { max-width: var(--read); margin-left: auto; margin-right: auto; }
.post-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(40px, 7vw, 80px) 0 clamp(40px, 6vw, 72px); margin-bottom: clamp(32px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.post-head { padding: clamp(48px, 8vw, 88px) 0 28px; }
.post-top .post-head { padding: 0; }
.post-head h1 { margin: 0; font: 900 clamp(2.8rem, 7vw, 5.6rem)/.9 var(--display); text-transform: uppercase; letter-spacing: -.005em; text-wrap: balance; }
.post-head .syslog { margin-bottom: 18px; }
.post-dek { margin: 22px 0 0; max-width: 36ch; font: italic 400 1.2rem/1.5 var(--serif); color: var(--muted); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.post-cover { margin: 0; border-radius: 8px; overflow: hidden; box-shadow: 0 40px 100px -40px var(--glow); transform: rotate(1.5deg); }
.post-cover img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.prose img { background: #f4efe9; }

.prose { font-size: clamp(1.1rem, 1.6vw, 1.22rem); line-height: 1.75; }
.prose > * { margin: 0 0 1.25em; }
.prose h2, .prose h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: .01em; line-height: 1; margin: 2.2em 0 .6em; }
.prose h2 { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 800; }
.prose h2::before { content: '#'; color: var(--ember); margin-right: .25em; font-weight: 700; opacity: .8; }
.prose h3 { font-size: 1.6rem; font-weight: 700; color: var(--amber); }
.prose a { color: var(--amber); text-decoration-color: rgba(255, 176, 46, .4); text-underline-offset: .18em; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--amber); }
.prose strong { color: #fff; font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose ul li::marker { content: '▸  '; color: var(--ember); }
.prose ol li::marker { font: 600 .9em var(--mono); color: var(--ember); }
.prose hr, .prose .wp-block-separator { border: 0; height: 1px; margin: 3em auto; background: linear-gradient(90deg, transparent, var(--ember), transparent); opacity: .6; }
.prose blockquote, .prose .wp-block-quote {
  position: relative; margin: 2em 0; padding: .2em 0 .2em 1.4em;
  border-left: 3px solid var(--ember);
  font-style: italic; font-size: 1.15em; color: #fff;
}
.prose blockquote p { margin: 0 0 .5em; }
.prose blockquote cite { display: block; font: normal .75rem/1.4 var(--mono); color: var(--muted); }
.prose figure { margin: 2em 0; }
.prose figure img, .prose > p > img { border-radius: 6px; display: block; }
.prose .aligncenter, .prose .aligncenter img { margin-left: auto; margin-right: auto; }
.prose .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 45%; }
.prose .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 45%; }
.prose figcaption { margin-top: .6em; text-align: center; font: .8rem/1.4 var(--mono); color: var(--dim); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose td, .prose th { border: 1px solid var(--line); padding: .6em .8em; }
.prose code { font: .85em var(--mono); background: var(--surface); padding: .12em .4em; border-radius: 3px; color: var(--amber); }
.prose::after { content: ''; display: block; clear: both; }

.callout, .series {
  position: relative; clear: both;
  margin: 2.2em 0; padding: 1.2em 1.4em 1.2em 1.4em;
  background: linear-gradient(135deg, rgba(255, 106, 26, .1), rgba(255, 106, 26, .02));
  border: 1px solid rgba(255, 106, 26, .28); border-radius: 6px;
}
.callout-tag { display: block; margin-bottom: .5em; font: 600 .7rem/1 var(--mono); letter-spacing: .1em; color: var(--ember); }
.callout-title { margin: 0; font: 700 clamp(1.35rem, 2.6vw, 1.7rem)/1.15 var(--display); text-transform: uppercase; letter-spacing: .01em; color: #fff; }
.callout p:not(.callout-title) { margin: .5em 0 0; }
.callout-title.callout-long { font: italic 400 1.08rem/1.6 var(--serif); text-transform: none; letter-spacing: 0; color: var(--text); }
.series { font: .85rem/1.7 var(--mono); color: var(--muted); }
.series strong { display: block; color: var(--text); font-weight: 600; }
.series a { color: var(--amber); }

.about-mark { float: right; width: 38%; max-width: 220px; margin: 0 0 1em 1.5em; filter: drop-shadow(0 0 40px var(--glow)); }

.postnav { max-width: var(--read); margin: clamp(56px, 8vw, 88px) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; }
.pn { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font: 800 1.25rem/1.05 var(--display); text-transform: uppercase; transition: border-color .2s, background .2s; }
.pn span { display: block; margin-bottom: 8px; font: 400 .72rem/1 var(--mono); text-transform: none; color: var(--ember); }
.pn:hover { border-color: var(--ember); background: rgba(255, 106, 26, .05); }
.pn-next { text-align: right; }

/* ---------- 404 ---------- */
.notfound { max-width: var(--read); padding-top: clamp(64px, 12vw, 140px); }
.notfound h1 { margin: 0; font: 900 clamp(7rem, 26vw, 15rem)/.8 var(--display); background: linear-gradient(180deg, var(--amber), var(--flare)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { color: var(--muted); }

/* ---------- footer ---------- */
.footer { position: relative; isolation: isolate; overflow: hidden; padding: clamp(56px, 9vw, 110px) var(--gutter) 28px; border-top: 1px solid rgba(255, 106, 26, .2); }
.footer-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; }
.footer::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, var(--bg) 0%, rgba(12, 10, 9, .55) 45%, rgba(12, 10, 9, .25) 100%); }
.footer-inner { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: clamp(32px, 6vw, 80px); align-items: start; }
.footer-brand img { width: 170px; display: block; margin-bottom: 18px; }
.footer-brand p { margin: 0 0 14px; max-width: 36ch; color: var(--muted); font-size: 1rem; }
.footer-links { display: flex; gap: 18px; font: 600 .75rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--ember); }

.ticket { padding: 22px; background: rgba(12, 10, 9, .72); border: 1px solid rgba(255, 106, 26, .25); border-radius: 8px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ticket-head { margin: 0 0 16px; font: 400 .85rem/1 var(--mono); color: var(--muted); }
.ticket label { display: block; margin-bottom: 12px; }
.ticket label > span { display: block; margin-bottom: 6px; font: 600 .68rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.ticket input, .ticket textarea {
  width: 100%; padding: 11px 12px;
  font: 400 .9rem/1.4 var(--mono); color: var(--text);
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 4px;
  transition: border-color .2s, background .2s;
  resize: vertical;
}
.ticket input:focus, .ticket textarea:focus { outline: none; border-color: var(--ember); background: rgba(255, 106, 26, .06); }
.ticket ::placeholder { color: var(--dim); }
.ticket-row { display: flex; align-items: end; gap: 12px; }
.ticket .captcha { display: flex; align-items: center; gap: 10px; margin: 0; }
.ticket .captcha span { margin: 0; font-size: .8rem; letter-spacing: 0; color: var(--muted); }
.ticket .captcha input { width: 56px; text-align: center; }
.ticket button {
  margin-left: auto; padding: 12px 22px; cursor: pointer;
  font: 700 .8rem/1 var(--mono); letter-spacing: .14em; color: #160b05;
  background: linear-gradient(180deg, var(--amber), var(--ember)); border: 0; border-radius: 4px;
  box-shadow: 0 8px 30px -8px var(--glow);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.ticket button:hover { transform: translateY(-1px); box-shadow: 0 12px 34px -8px rgba(255, 106, 26, .6); }
.ticket button:disabled { filter: grayscale(.6); cursor: wait; }
.ticket-status { margin: 12px 0 0; min-height: 1.3em; font: .8rem/1.4 var(--mono); color: var(--muted); }
.ticket-status.ok { color: #7ee787; }
.ticket-status.err { color: #ff7b72; }
.copyright { max-width: var(--wrap); margin: clamp(48px, 7vw, 80px) auto 0; font: .72rem/1 var(--mono); color: var(--dim); }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .card-lead { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .post-top { grid-template-columns: 1fr; }
  .post-cover { max-width: 420px; transform: none; }
  .prose .alignright, .prose .alignleft { float: none; margin: 1.5em auto; max-width: 100%; }
}
@media (max-width: 520px) {
  .brand img { width: 120px; }
  .topbar nav a { padding: 8px 9px; }
  .hero { min-height: 78vh; }
  .postnav { grid-template-columns: 1fr; }
  .pn-next { text-align: left; }
  .ticket-row { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-video, .footer-video { display: none; }
  .hero { background: url(/assets/media/hero.jpg) center / cover; }
  .footer { background: url(/assets/media/flames.jpg) center / cover; }
}
