/* blogs.getaurora.moe — shared stylesheet.
   Design tokens mirror the main site (getaurora.moe). One file, linked by
   every page, rather than the main site's inlined-and-duplicated approach. */

:root {
  --void: #06070b;
  --surface: #0c0e16;
  --surface-2: #12141f;
  --line: rgba(255, 255, 255, 0.08);
  --line-soft: rgba(255, 255, 255, 0.05);
  --text: #eef0f5;
  --text-dim: #c2cae0;
  --text-faint: #5c6178;
  --jade: #3ddc97;
  --violet: #a78bfa;
  --cyan: #6fe3ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--void);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--jade);
  color: #04120b;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 18px 44px;
  background: rgba(6, 7, 11, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  border-bottom: 1px solid rgba(255, 255, 255, 0);
  transition: background .4s ease, backdrop-filter .4s ease, border-color .4s ease;
}

header:hover,
header.scrolled {
  background: rgba(6, 7, 11, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  justify-self: start;
}

.brand svg,
.footer-brand svg {
  width: 20px;
  height: 20px;
  display: block;
}

.brand .brand-sub {
  color: var(--text-faint);
  font-weight: 400;
}

nav.links {
  display: flex;
  gap: 26px;
  justify-self: center;
}

nav.links a {
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color .2s;
}

nav.links a:hover,
nav.links a.active {
  color: var(--text);
}

.nav-right {
  justify-self: end;
}

.btn-solid {
  padding: 9px 17px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  background: linear-gradient(135deg, var(--jade), var(--cyan));
  color: #04140d;
  display: flex;
  align-items: center;
  gap: 6px;
}

@media(max-width:900px) {
  nav.links {
    gap: 18px;
  }

  header {
    padding: 16px 20px;
    grid-template-columns: auto 1fr;
  }

  .nav-right {
    display: none;
  }
}

/* ---------- Page shell ---------- */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 150px 48px 120px;
  min-height: 70vh;
}

.page-narrow {
  max-width: 760px;
}

@media(max-width:760px) {
  .page {
    padding: 120px 22px 80px;
  }
}

.kicker {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--jade);
  margin-bottom: 14px;
}

.page-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-style: italic;
  font-size: clamp(40px, 6vw, 66px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.page-intro {
  margin-top: 18px;
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.6;
  max-width: 560px;
}

/* ---------- Index listing ---------- */
.entry-list {
  margin-top: 64px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entry {
  display: block;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 26px 28px;
  background: var(--surface);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.entry:hover {
  border-color: rgba(61, 220, 151, 0.4);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.entry h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.entry p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.6;
  max-width: 720px;
}

.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-dim);
}

.tag-version {
  border-color: rgba(61, 220, 151, 0.35);
  color: var(--jade);
  font-family: 'JetBrains Mono', monospace;
}

.year-divider {
  margin: 46px 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.year-divider:first-child {
  margin-top: 0;
}

.empty-state {
  margin-top: 56px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 48px 28px;
  text-align: center;
  color: var(--text-faint);
  font-size: 14.5px;
}

/* ---------- Article ---------- */
.article-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 34px;
  margin-bottom: 44px;
}

.back-link {
  display: inline-block;
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 26px;
  transition: color .2s;
}

.back-link:hover {
  color: var(--jade);
}

.article-hero {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  margin-bottom: 40px;
  display: block;
}

/* Markdown body */
.prose {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--text-dim);
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
}

/* Body copy should start at h2 — the post title is the page's h1. Styled anyway
   so a stray `#` doesn't render as an unstyled browser default. */
.prose h1 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  margin-top: 2em;
}

.prose h2 {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 500;
  font-size: 30px;
  margin-top: 2em;
}

.prose h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 1.8em;
}

.prose h4 {
  font-size: 16.5px;
  font-weight: 600;
  margin-top: 1.6em;
}

.prose h2 .anchor,
.prose h3 .anchor,
.prose h4 .anchor {
  opacity: 0;
  margin-left: 9px;
  color: var(--jade);
  font-size: 0.72em;
  font-weight: 400;
  transition: opacity .2s;
}

.prose h2:hover .anchor,
.prose h3:hover .anchor,
.prose h4:hover .anchor {
  opacity: 1;
}

.prose a {
  color: var(--jade);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(61, 220, 151, 0.4);
  transition: text-decoration-color .2s;
}

.prose a:hover {
  text-decoration-color: var(--jade);
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose blockquote {
  border-left: 2px solid var(--jade);
  padding: 4px 0 4px 20px;
  color: var(--text-dim);
  font-style: italic;
}

/* Media. Everything is capped at the column width so the page body never
   scrolls sideways, however large the source file is. */
.prose figure {
  margin: 0;
}

.prose img,
.prose video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  background: var(--surface);
}

.prose video {
  width: 100%;
}

/* Embeds (YouTube et al) hold a 16:9 box rather than the iframe default 150px. */
.prose iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.prose figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-faint);
  text-align: center;
}

/* Side-by-side images: ![a](x) ![b](y) on one line */
.prose p:has(> img + img) {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media(max-width:600px) {
  .prose p:has(> img + img) {
    grid-template-columns: 1fr;
  }
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}

.prose code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  color: var(--cyan);
}

.prose pre {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-dim);
}

.table-scroll {
  overflow-x: auto;
}

.prose table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14.5px;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}

.prose th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}

/* GFM task lists. marked emits these as disabled inputs, and browsers ignore
   accent-color on a disabled control — so draw the box ourselves. Also drops the
   bullet that would otherwise sit next to every checkbox. */
.prose li:has(> input[type="checkbox"]) {
  list-style: none;
  margin-left: -1.4em;
}

.prose input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin: 0 9px 0 0;
  vertical-align: -3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  opacity: 1;
  transition: background .2s ease, border-color .2s ease;
}

.prose input[type="checkbox"]:checked {
  background: var(--jade);
  border-color: var(--jade);
}

/* Checkmark, drawn as two borders on a rotated box. */
.prose input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #04140d;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}


.prose .footnotes {
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-faint);
}

/* ---------- Prev/next ---------- */
.article-nav {
  margin-top: 72px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media(max-width:640px) {
  .article-nav {
    grid-template-columns: 1fr;
  }
}

.article-nav a {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color .25s ease, background .25s ease;
}

.article-nav a:hover {
  border-color: rgba(61, 220, 151, 0.4);
  background: var(--surface);
}

.article-nav span {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 7px;
}

.article-nav strong {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.article-nav .next {
  text-align: right;
}

/* ---------- Landing ---------- */
.landing-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

@media(max-width:860px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }
}

.landing-col h2 {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 18px;
}

.landing-col .entry-list {
  margin-top: 0;
}

.see-all {
  display: inline-block;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--jade);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 70px 48px 40px;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

@media(max-width:760px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  footer {
    padding: 50px 22px 34px;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 14px;
}

.footer-grid p {
  color: var(--text-faint);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-col h5 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-dim);
  margin-bottom: 11px;
}

.footer-col a:hover {
  color: var(--text);
}

.copyright {
  max-width: 1180px;
  margin: 60px auto 0;
  font-size: 12.5px;
  color: var(--text-faint);
}
