:root {
  color-scheme: light;
  --page-width: 48rem;
  --bg: #fdfdfd;
  --surface: #ffffff;
  --text: #282728;
  --muted: #6b6b6b;
  --line: #ece9e9;
  --accent: #006cac;
  --radius: 0px;
  --shadow: none;
  --font: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #212737;
  --surface: #212737;
  --text: #eaedf3;
  --muted: #c7cfdd;
  --line: #ab4b08;
  --accent: #ff6b01;
}

body.theme-ev0 {
  --page-width: 64rem;
  --bg: #fafafa;
  --surface: #fafafa;
  --text: #18181b;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #18181b;
  --radius: 18px;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
}

:root[data-theme="dark"] body.theme-ev0 {
  --bg: #18181b;
  --surface: #18181b;
  --text: #fafafa;
  --muted: #a1a1aa;
  --line: #3f3f46;
  --accent: #fafafa;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

body.theme-loveit {
  --page-width: 56rem;
  --bg: #ffffff;
  --surface: #ffffff;
  --text: #161209;
  --muted: #a9a9b3;
  --line: #f0f0f0;
  --accent: #2d96bd;
  --radius: 8px;
  --shadow: none;
  --font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] body.theme-loveit {
  --bg: #292a2d;
  --surface: #292a2d;
  --text: #a9a9b3;
  --muted: #5d5d5f;
  --line: #363636;
  --accent: #55bde2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}
a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}
img { max-width: 100%; height: auto; }
.page {
  width: min(var(--page-width), calc(100vw - 32px));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}
.site-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.site-nav {
  display: flex;
  gap: 1rem;
  margin-left: auto;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
}
.site-nav a:hover {
  color: var(--accent);
}
.brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0.2rem;
  cursor: pointer;
}
.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle-glyph {
  display: none;
}
body.theme-loveit .theme-toggle-glyph {
  display: inline;
  font-size: 1rem;
}
.theme-icon-sun,
.theme-icon-moon {
  display: inline-flex;
}
:root[data-theme="light"] .theme-icon-moon,
:root:not([data-theme]) .theme-icon-moon {
  display: none;
}
:root[data-theme="dark"] .theme-icon-sun {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.hero,
.archive-tools,
.post-shell,
.post,
.blog-list li {
  background: transparent;
  border: 0;
}
body.theme-ev0 .hero,
body.theme-ev0 .archive-tools,
body.theme-ev0 .post,
body.theme-ev0 .blog-list li,
body.theme-ev0 .post-card,
body.theme-ev0 .field input,
body.theme-ev0 .field select,
body.theme-ev0 .pagination-link,
body.theme-ev0 .pagination-arrow {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
body.theme-loveit .site-bar {
  position: sticky;
  top: 0;
  background: var(--bg);
}
.hero {
  padding: 1rem 0;
  margin-bottom: 1rem;
}
body.theme-ev0 .hero {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, 0.7fr);
  gap: 1.2rem;
}
.accent-title {
  color: var(--accent);
}
body.theme-ev0 .accent-title,
body.theme-loveit .accent-title {
  color: var(--text);
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.15;
}
body.theme-ev0 .hero h1 {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1;
}
.hero-summary,
.section-summary,
.search-state,
.blog-list p,
.meta,
.datetime {
  color: var(--muted);
}
.hero-meta,
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
  font-size: 0.95rem;
}
.feature-panel {
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
  text-decoration: none;
}
body.theme-ev0 .feature-panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0,0,0,0.02), transparent);
}
body.theme-loveit .feature-panel {
  color: var(--accent);
}
.feature-panel strong {
  font-size: 1rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-style: dashed;
}
body.theme-ev0 .feature-panel strong {
  text-decoration: none;
}
.archive-tools {
  display: grid;
  gap: 1rem;
  padding: 1rem 0;
  margin-bottom: 1rem;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
body.theme-ev0 .archive-tools,
body.theme-loveit .archive-tools {
  border-top-style: solid;
  border-bottom-style: solid;
}
body.theme-ev0 .archive-tools {
  padding: 1rem;
}
.archive-tools h2 {
  margin: 0;
  font-size: 1.125rem;
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 12rem);
  gap: 0.9rem;
}
.field {
  display: grid;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
body.theme-astropaper .field input,
body.theme-astropaper .field select {
  border-radius: 0;
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
body.theme-ev0 .eyebrow {
  letter-spacing: 0.06em;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  text-decoration: none;
}
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.theme-ev0 .post-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.post-card {
  margin: 1.5rem 0;
}
body.theme-ev0 .post-card {
  margin: 0;
  padding: 1rem;
}
body.theme-loveit .post-card {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.post-card-link {
  display: block;
  text-decoration: none;
}
.post-card h2 {
  margin: 0 0 0.2rem;
  font-size: 1.12rem;
  line-height: 1.5;
  text-decoration: underline;
  text-decoration-style: dashed;
}
body.theme-ev0 .post-card h2 {
  text-decoration: none;
  font-size: 1.2rem;
}
body.theme-loveit .post-card h2 {
  text-decoration: none;
}
.datetime {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
}
.post-card-body {
  display: block;
}
.post-card-body.with-thumb {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}
body.theme-ev0 .post-card-body.with-thumb {
  grid-template-columns: 1fr;
}
.post-card-thumb {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
}
body.theme-ev0 .post-card-thumb,
body.theme-loveit .post-card-thumb {
  border-radius: var(--radius);
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
}
body.theme-ev0 .pagination,
body.theme-loveit .pagination {
  border-top-style: solid;
}
.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.pagination-link,
.pagination-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.4rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--accent);
  text-decoration: none;
}
body.theme-ev0 .pagination-link,
body.theme-ev0 .pagination-arrow,
body.theme-loveit .pagination-link,
body.theme-loveit .pagination-arrow {
  border-radius: var(--radius);
}
.pagination-link.current {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--bg);
}
.pagination-arrow.disabled {
  opacity: 0.45;
}
.post-shell {
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
body.theme-ev0 .post-shell,
body.theme-loveit .post-shell {
  border-top-style: solid;
}
.post {
  padding: 0;
}
body.theme-ev0 .post,
body.theme-loveit .post {
  padding: 1.25rem;
}
.post-header h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.8rem, 5vw, 2.3rem);
  line-height: 1.25;
}
.content {
  line-height: 1.8;
  font-size: 1rem;
}
.content p,
.content ul,
.content ol,
.content blockquote,
.content pre,
.content h2,
.content h3 {
  margin-top: 1.2em;
  margin-bottom: 0;
}
.content h2,
.content h3 {
  color: var(--accent);
  line-height: 1.25;
}
body.theme-ev0 .content h2,
body.theme-ev0 .content h3,
body.theme-loveit .content h2,
body.theme-loveit .content h3 {
  color: var(--text);
}
.content blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.content pre {
  overflow: auto;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
}
body.theme-ev0 .content pre,
body.theme-loveit .content pre {
  border-radius: var(--radius);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.tags li {
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
}
body.theme-ev0 .tags li,
body.theme-loveit .tags li {
  border-radius: var(--radius);
}
.tags a {
  color: var(--accent);
  text-decoration: none;
}
.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.blog-list li {
  margin: 1.5rem 0;
}
body.theme-ev0 .blog-list li {
  padding: 1rem;
}
body.theme-loveit .blog-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.blog-list h2 {
  margin: 0 0 0.5rem;
  font-size: 1.12rem;
}
@media (max-width: 900px) {
  .filter-bar,
  body.theme-ev0 .post-list {
    grid-template-columns: 1fr;
  }
  .post-card-body.with-thumb {
    grid-template-columns: 1fr;
  }
  body.theme-ev0 .hero {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .page {
    width: min(100vw - 20px, var(--page-width));
    padding-top: 0.5rem;
  }
  .section-head,
  .site-bar,
  .pagination {
    align-items: flex-start;
  }
  .site-nav {
    display: none;
  }
}