:root {
  --bg: #0a0a0f;
  --card: #0f0f1a;
  --panel: #13142a;
  --text: #f5f5f5;
  --text-2: #d6dde8;
  --muted: #8b95a8;
  --border: #1d2034;
  --cyan: #00e5ff;
  --green: #39ff6a;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--mono); line-height: 1.15; margin: 0; }

.sr-only, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--cyan); color: var(--bg); padding: .5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }

.wrap { width: min(72rem, 100% - 2.5rem); margin-inline: auto; }
.wrap-wide { width: min(60rem, 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(42rem, 100% - 2.5rem); margin-inline: auto; }

.label {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 1rem;
}
.muted { color: var(--muted); }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: rgb(10 10 15 / .82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 3.75rem; gap: 1rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.mark { width: .7rem; height: .7rem; border: 2px solid var(--cyan); transform: rotate(45deg); }
nav { display: flex; gap: 1.4rem; }
nav a { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--cyan); }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); min-height: min(38rem, 82vh); display: flex; align-items: flex-end; }
.hero-sky { position: absolute; inset: 0; }
.hero-sky svg { width: 100%; height: 100%; display: block; }
.sky-tall { display: none; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(10 10 15 / .92) 0%, rgb(10 10 15 / .55) 45%, rgb(10 10 15 / 0) 75%), linear-gradient(0deg, var(--bg) 0%, rgb(10 10 15 / 0) 40%); pointer-events: none; }
.hero-text { position: relative; z-index: 1; padding-block: 7rem 3.5rem; }
.hero h1 { font-size: clamp(3rem, 9vw, 6.5rem); letter-spacing: -.04em; margin-bottom: 1.25rem; }
.tagline { max-width: 34rem; font-size: 1.1rem; color: var(--text-2); margin: 0 0 2.5rem; }
.cursor { color: var(--cyan); margin-left: .25rem; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sky-caption { font-family: var(--mono); font-size: .7rem; color: var(--muted); margin: 0; }

/* brackets: HUD corners */
.brackets { position: relative; }
.brackets::before, .brackets::after { content: ""; position: absolute; width: 1.1rem; height: 1.1rem; border-color: var(--cyan); border-style: solid; pointer-events: none; z-index: 2; }
.brackets::before { top: -.4rem; left: -.4rem; border-width: 2px 0 0 2px; }
.brackets::after { bottom: -.4rem; right: -.4rem; border-width: 0 2px 2px 0; }

/* featured */
.featured-wrap { padding-block: 3.5rem 1rem; }
.featured { display: grid; grid-template-columns: 1.15fr 1fr; background: var(--card); border: 1px solid var(--border); text-decoration: none; }
.featured-img { overflow: hidden; border-right: 1px solid var(--border); }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: clamp(1.5rem, 3vw, 2.5rem); display: flex; flex-direction: column; justify-content: center; }
.featured h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -.02em; margin: .9rem 0 .8rem; }
.featured:hover h2 { color: var(--cyan); }
.featured p { margin: 0 0 1.5rem; max-width: 60ch; }
.read { font-family: var(--mono); font-size: .85rem; color: var(--cyan); text-decoration: none; }
.read::after { content: " ›"; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.tag { color: var(--green); border: 1px solid rgb(57 255 106 / .3); padding: .05rem .5rem; border-radius: 2px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--mono); font-size: .68rem; }

/* entry list */
.entries { padding-block: 3rem 1rem; }
.rule-label { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rule-label .label { margin: 0; color: var(--muted); }
.rule-label span { flex: 1; border-top: 1px solid var(--border); }
.entry-list { list-style: none; margin: 0; padding: 0; }
.entry-list a { display: grid; grid-template-columns: 10rem 1fr; gap: 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.entry-meta { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; font-family: var(--mono); font-size: .72rem; color: var(--muted); }
.entry-list h3 { font-size: 1.1rem; margin-bottom: .4rem; }
.entry-list a:hover h3 { color: var(--cyan); }
.entry-list p { margin: 0; }

/* subscribe */
.subscribe { padding-block: 4rem 5rem; }
.subscribe-inner { border: 1px solid var(--border); background: var(--card); padding: clamp(1.5rem, 4vw, 3rem); }
.subscribe h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: .6rem; }
.subscribe p { max-width: 48ch; }
.sub-form { display: flex; gap: .75rem; margin-top: 1.5rem; max-width: 30rem; }
.sub-form input { flex: 1; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--border); padding: .75rem .9rem; font: inherit; }
.sub-form input:focus { border-color: var(--cyan); outline: none; }
.sub-form button { background: var(--cyan); color: var(--bg); border: 0; padding: .75rem 1.3rem; font-family: var(--mono); font-weight: 700; font-size: .85rem; cursor: pointer; }
.sub-form button:hover { background: #7ff2ff; }
.sub-form button[disabled] { opacity: .6; cursor: wait; }
.sub-status { min-height: 1.5rem; margin: .75rem 0 0; font-family: var(--mono); font-size: .8rem; }
.sub-status.ok { color: var(--green); }
.sub-status.err { color: #ff7a7a; }

/* posts */
.post { padding-top: 3rem; }
.post-head { margin-bottom: 2.5rem; }
.back { font-family: var(--mono); font-size: .8rem; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 2rem; }
.back::before { content: "‹ "; }
.back:hover { color: var(--cyan); }
.post-head h1 { font-size: clamp(2rem, 5.5vw, 3.1rem); letter-spacing: -.03em; margin: 1rem 0 1rem; }
.lede { font-size: 1.15rem; color: var(--text-2); margin: 0; }
.post-cover { margin-bottom: 3rem; }
.post-cover img { width: 100%; border: 1px solid var(--border); }

.prose { font-size: 1.07rem; color: var(--text-2); }
.prose > * + * { margin-top: 1.25em; }
.prose p { margin: 0; }
.prose h2 { font-size: 1.35rem; color: var(--text); margin-top: 2.6em; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.prose h3 { font-size: 1.02rem; color: var(--cyan); margin-top: 2em; }
.prose h2 + *, .prose h3 + * { margin-top: .8em; }
.prose a { color: var(--cyan); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--cyan); }
.prose blockquote { margin-inline: 0; padding-left: 1.2rem; border-left: 2px solid var(--cyan); color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .88em; background: var(--panel); padding: .1em .35em; }
.prose pre { background: var(--card); border: 1px solid var(--border); padding: 1rem; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose img { border: 1px solid var(--border); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin-block: 2.5em; }

.video { position: relative; aspect-ratio: 16 / 9; background: var(--card); border: 1px solid var(--border); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.post-nav a { text-decoration: none; font-family: var(--mono); font-size: .9rem; max-width: 48%; }
.post-nav a:hover { color: var(--cyan); }
.post-nav .label { display: block; margin-bottom: .3rem; color: var(--muted); }
.post-nav .next { text-align: right; margin-left: auto; }

.message { padding-block: 7rem; }
.message h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: 1rem; }

/* footer */
.site-footer { border-top: 1px solid var(--border); }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.5rem; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.footer-row a { margin-left: 1.2rem; text-decoration: none; }
.footer-row a:hover { color: var(--cyan); }

@media (max-width: 760px) {
  .featured { grid-template-columns: 1fr; }
  .featured-img { border-right: 0; border-bottom: 1px solid var(--border); }
  .entry-list a { grid-template-columns: 1fr; gap: .6rem; }
  .entry-meta { flex-direction: row; align-items: center; gap: 1rem; }
  .sub-form { flex-direction: column; }
  .hero-text { padding-block: 16rem 2.5rem; }
  .sky-wide { display: none; }
  .sky-tall { display: block; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 0%, rgb(10 10 15 / .8) 40%, rgb(10 10 15 / 0) 70%); }
  nav { gap: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
}
