:root {
  --bg: #07111f;
  --surface: #0e2032;
  --surface-2: #132b40;
  --line: #1b3a52;
  --blue: #16b9e8;
  --cyan: #61f1dd;
  --sand: #e6bd70;
  --text: #eff8f8;
  --muted: #9ab0bd;
  --ink: #04202b;
  --danger: #ff857c;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 90% -10%, #10415c 0, transparent 34rem),
    radial-gradient(circle at -10% 40%, #0c273c 0, transparent 28rem),
    var(--bg);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, sans-serif;
}
a { color: var(--cyan); }
a:hover { color: #a1fff2; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--sand);
  outline-offset: 3px;
}
.shell { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.site-header { border-bottom: 1px solid var(--line); }
.nav {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { color: var(--text); font-weight: 900; letter-spacing: .06em; text-decoration: none; }
.brand span { color: var(--blue); }
.brand small { color: var(--sand); font-size: .65rem; letter-spacing: .14em; }
.nav-links, .footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; }
.nav-links a, .footer-links a { color: var(--muted); text-decoration: none; font-size: .94rem; }
.nav-links a:hover, .footer-links a:hover { color: var(--text); }
.page { padding: 2rem 0 8rem; }
.blog-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr);
  gap: 3rem;
  align-items: center;
  min-height: 450px;
}
.hero-copy { max-width: 760px; }
.eyebrow, .section-kicker {
  color: var(--sand);
  font: 700 .76rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.section-kicker { margin-bottom: .4rem; }
h1, h2, h3 { line-height: 1.08; letter-spacing: -.035em; }
h1 { max-width: 920px; margin: .65rem 0 1.25rem; font-size: clamp(2.7rem, 7vw, 6.3rem); }
h2 { margin: .35rem 0 1rem; font-size: clamp(1.8rem, 3.4vw, 3rem); }
h3 { margin: .55rem 0 .5rem; font-size: 1.4rem; }
h1 a, h2 a, h3 a { color: inherit; text-decoration: none; }
.lede, .article-dek { max-width: 720px; color: var(--muted); font-size: 1.18rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }
.button, .like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: .75rem 1.15rem;
  text-decoration: none;
}
.button:hover { background: #a1fff2; color: var(--ink); }
.text-link { font-weight: 750; text-decoration: none; }
.hero-mark {
  position: relative;
  display: grid;
  min-height: 330px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #22617a;
  border-radius: 2rem;
  background: linear-gradient(145deg, #16b9e8, #075078 52%, #0d1c2b);
  box-shadow: 0 22px 70px #0009;
  transform: rotate(2deg);
}
.hero-mark::after {
  position: absolute;
  inset: 12%;
  border: 1px solid #a2fff299;
  border-radius: 50%;
  content: "";
}
.hero-mark-orbit { position: absolute; width: 78%; height: 35%; border: 1px solid #e6bd7066; border-radius: 50%; transform: rotate(-30deg); }
.hero-mark-letter { color: #eaffff; font-size: 12rem; font-weight: 950; line-height: 1; text-shadow: 12px 16px 0 #07446a; }
.hero-mark-label { position: absolute; right: 1.4rem; bottom: 1.2rem; color: var(--sand); font: 700 .72rem/1.25 ui-monospace, monospace; letter-spacing: .14em; }
.featured-layout { margin: 2.5rem 0 5rem; }
.featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
  gap: 2rem;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid #24617b;
  border-radius: 1.4rem;
  background: linear-gradient(145deg, #102f47, #0b1929 70%);
}
.featured-post h2 { max-width: 760px; font-size: clamp(2rem, 4vw, 4rem); }
.featured-post .text-link { display: inline-block; margin-top: 1.4rem; }
.featured-image, .featured-art { width: 100%; min-height: 250px; border-radius: 1rem; object-fit: cover; }
.featured-art { display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), #074b73 45%, var(--sand)); }
.featured-art span { color: #eaffff; font-size: 10rem; font-weight: 950; text-shadow: 10px 14px 0 #07446a; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 3.5rem 0 1.2rem; }
.section-head h2 { margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: linear-gradient(145deg, var(--surface), #0b1929);
}
.post-card:hover { border-color: #28728a; transform: translateY(-2px); transition: transform .2s ease, border-color .2s ease; }
.post-card-image { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); }
.post-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 1.15rem; }
.post-card p { color: var(--muted); margin: .4rem 0 1.2rem; }
.post-meta, .article-byline, .meta { display: flex; flex-wrap: wrap; gap: .75rem 1rem; color: var(--muted); font: .76rem ui-monospace, SFMono-Regular, Menlo, monospace; }
.topic-band { display: grid; grid-template-columns: .7fr 1.3fr; gap: 2rem; align-items: center; margin-top: 5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.topic-list { display: flex; flex-wrap: wrap; gap: .6rem; }
.topic-pill, .chip { border: 1px solid #286179; border-radius: 999px; color: var(--cyan); padding: .35rem .75rem; text-decoration: none; }
.topic-pill span { color: var(--muted); font-size: .8em; }
.page-heading { max-width: 800px; padding: 3.5rem 0 1rem; }
.page-heading.compact { padding-bottom: 0; }
.archive-toolbar { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; margin-bottom: 1.5rem; }
.pagination { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
.pagination span { color: var(--muted); }
.empty-state { grid-column: 1 / -1; border: 1px dashed #28516b; border-radius: 1rem; padding: 2rem; }
.search-form { max-width: 760px; margin: 2rem 0 3rem; }
.search-form label, label { display: block; color: var(--muted); font-size: .9rem; margin-bottom: .35rem; }
.search-row { display: flex; gap: .65rem; }
input, textarea {
  width: 100%;
  border: 1px solid #28516b;
  border-radius: .55rem;
  background: #071725;
  color: var(--text);
  font: inherit;
  padding: .72rem .85rem;
}
textarea { min-height: 140px; resize: vertical; }
.search-row input { flex: 1; }
.search-results-head { align-items: center; }
.article { max-width: 1000px; margin: 2.5rem auto 0; }
.article-header { max-width: 860px; }
.article-header h1 { font-size: clamp(2.6rem, 6vw, 5.8rem); }
.article-dek { font-size: 1.35rem; }
.article-byline { margin: 1.4rem 0; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.chip { font-size: .78rem; padding: .15rem .55rem; }
.article-hero { display: block; width: 100%; max-height: 580px; margin: 2.5rem 0; border-radius: 1.2rem; object-fit: cover; }
.toc { border-left: 3px solid var(--sand); background: #0d2133; color: var(--muted); margin: 2rem 0; padding: 1rem 1.2rem; }
.toc p { margin: 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 780px) 180px; gap: 3rem; align-items: start; margin: 2.5rem auto; }
.prose { color: #d4e5e7; font-size: 1.08rem; }
.prose > *:first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 2.2em; }
.prose h2 { font-size: 2rem; }
.prose h3 { font-size: 1.45rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table { margin: 1.15em 0; }
.prose li { margin: .4em 0; }
.prose blockquote { border-left: 3px solid var(--blue); color: var(--muted); margin-left: 0; padding-left: 1.2rem; }
.prose code { border-radius: .25rem; background: #10283b; color: #b7fff5; padding: .12em .3em; font-size: .9em; }
.prose pre { overflow: auto; border: 1px solid var(--line); border-radius: .7rem; background: #06101b; padding: 1rem; }
.prose pre code { background: transparent; padding: 0; }
.prose img { display: block; max-width: 100%; height: auto; border-radius: .7rem; }
.prose table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: .55rem .7rem; text-align: left; }
.prose th { color: var(--text); background: var(--surface-2); }
.article-aside { position: sticky; top: 1rem; }
.aside-card { border-top: 2px solid var(--sand); padding-top: .75rem; }
.copy-button { border: 1px solid #286179; border-radius: 999px; background: transparent; color: var(--cyan); cursor: pointer; padding: .45rem .75rem; }
.engagement { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.like-button { background: var(--surface-2); color: var(--text); border: 1px solid #286179; }
.like-button.liked { background: var(--cyan); color: var(--ink); }
.comments-section, .related { margin-top: 4rem; }
.comment { border-left: 2px solid #28516b; padding: .2rem 0 .2rem 1rem; margin: 1.4rem 0; }
.comment-author { color: var(--text); font-weight: 800; }
.comment p { white-space: pre-wrap; margin: .4rem 0 0; color: #d4e5e7; }
.comment-form { max-width: 760px; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg, var(--surface), #0b1929); margin-top: 2rem; padding: 1.2rem; }
.comment-form .button { margin-top: .7rem; }
.form-note { color: var(--muted); font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.flash-stack { display: grid; gap: .6rem; margin-bottom: 1rem; }
.flash { border-radius: .6rem; padding: .75rem 1rem; }
.flash.success { border: 1px solid #347b70; background: #0c302f; color: #b7fff5; }
.flash.error { border: 1px solid #8b4647; background: #351d29; color: #ffd4d0; }
.narrow-page { max-width: 780px; margin: 4rem auto; }
.narrow-page h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.error-page { max-width: 700px; min-height: 55vh; padding-top: 8rem; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); padding: 2.5rem 0; }
.footer-inner { display: grid; grid-template-columns: 1fr auto auto; gap: 2rem; align-items: end; }
.footer-inner p { margin: .35rem 0 0; }
.compact-card { min-height: 100%; }

@media (max-width: 760px) {
  .nav { align-items: flex-start; flex-direction: column; padding: 1rem 0; }
  .nav-links { gap: .8rem; }
  .blog-hero, .featured-post, .topic-band, .article-layout { grid-template-columns: 1fr; }
  .blog-hero { min-height: 0; padding: 3rem 0 2rem; }
  .hero-mark { min-height: 230px; }
  .hero-mark-letter { font-size: 8rem; }
  .featured-post { padding: 1.2rem; }
  .article-aside { position: static; }
  .form-grid, .footer-inner { grid-template-columns: 1fr; }
  .footer-links { gap: .7rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
