/* NOX — custom.css */

:root {
  --bg:        #000000;
  --text:      #d4cfc8;
  --muted:     #7a7470;
  --accent:    #c9a84c;
  --rule:      rgba(212,207,200,0.12);
  --width:     680px;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-ui:   system-ui, -apple-system, sans-serif;
}

html[data-theme="light"] {
  --bg:    #ece8e1;
  --text:  #2d2b28;
  --muted: #6a6058;
  --rule:  rgba(45,43,40,0.12);
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-title {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.site-logo {
  height: 30px;
  width: auto;
  display: block;
}

.logo-light { display: none; }
.logo-dark  { display: block; }

html[data-theme="light"] .logo-dark  { display: none; }
html[data-theme="light"] .logo-light { display: block; }

.site-nav {
  display: flex;
  gap: 2rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--text); }

/* ── Hamburger toggle ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 15px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1px;
  background: var(--muted);
  transition: background 0.2s;
}

.nav-toggle:hover span { background: var(--text); }

/* ── Main ── */
main {
  flex: 1;
  width: 100%;
  max-width: calc(var(--width) + 4rem);
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

/* ── Post list ── */
.post-list { list-style: none; }

.post-item {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.post-item:last-child { border-bottom: none; }

.post-title a {
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.post-title a:hover { color: var(--accent); }

.post-meta {
  margin-top: 0.3rem;
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── Single post ── */
.article-title {
  font-size: 1.8rem;
  font-weight: normal;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.article-meta {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.article-content { line-height: 1.82; }

.article-content p { margin-bottom: 1.4rem; }

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.5rem 2rem 2rem;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.06em;
}

.site-footer a { text-decoration: none; }

.footer-subscribe {
  margin-bottom: 1.5rem;
}

.footer-subscribe-text {
  font-size: 0.78rem;
  color: var(--text);
  letter-spacing: 0.06em;
  margin-bottom: 0.9rem;
}

.subscribe-btn {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--accent);
  padding: 0.5rem 1.4rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.subscribe-btn:hover { opacity: 0.85; }

.footer-copy {
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── Homepage hero ── */
.site-hero {
  text-align: center;
  padding: 5rem 0 4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 4rem;
}

.hero-wordmark {
  display: inline-block;
  line-height: 0;
  margin-bottom: 2rem;
}

.hero-logo {
  width: 260px;
  height: auto;
  display: block;
}

.hero-logo-light { display: none; }
.hero-logo-dark  { display: block; }

html[data-theme="light"] .hero-logo-dark  { display: none; }
html[data-theme="light"] .hero-logo-light { display: block; }

.orientation-line {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ── Page title (catalogue, constellation, about, colophon) ── */
.page-title {
  font-size: 0.72rem;
  font-family: var(--font-ui);
  font-weight: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

/* ── Page header (title + optional intro, unified block) ── */
.page-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.page-header .page-title {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.5rem;
}

.page-intro {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text);
  font-style: italic;
}

/* ── Catalogue entry (shared: home + catalogue page) ── */
.book-entry {
  display: flex;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid var(--rule);
}

.book-entry:last-child { border-bottom: none; }

.book-cover-wrap {
  flex-shrink: 0;
  width: 130px;
}

.book-cover-wrap img {
  width: 100%;
  height: auto;
  display: block;
}

.book-entry-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 0.2rem;
  gap: 0.55rem;
}

.book-entry-title {
  font-size: 1.15rem;
  font-weight: normal;
  line-height: 1.3;
}

.book-entry-title a {
  text-decoration: none;
  color: var(--text);
  transition: color 0.2s;
}

.book-entry-title a:hover { color: var(--accent); }

.book-entry-author {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.persona-tondo-sm {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.book-entry-date {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── Book page ── */
.book-page-upper {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--rule);
}

.book-page-cover {
  flex-shrink: 0;
  width: 220px;
}

.book-page-cover img {
  width: 100%;
  height: auto;
  display: block;
}

.book-page-header {
  flex: 1;
  padding-top: 0.25rem;
}

.book-page-title {
  font-size: 1.7rem;
  font-weight: normal;
  line-height: 1.25;
  margin-bottom: 0.8rem;
}

.book-page-byline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.book-page-byline a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.book-page-byline a:hover { color: var(--text); }

.book-description {
  line-height: 1.82;
  margin-bottom: 2.5rem;
}

.book-description p { margin-bottom: 1.2rem; }

.book-formats {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.book-formats .label { color: var(--text); }

.book-buy {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2.5rem;
}

.buy-link {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--text);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s;
}

.buy-link:first-child { border-top: 1px solid var(--rule); }
.buy-link:hover { color: var(--accent); }
.buy-link--secondary { color: var(--muted); }

.book-edition {
  font-family: var(--font-ui);
  font-size: 0.66rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

/* ── Constellation ── */
.persona-block {
  padding: 4rem 0;
  border-bottom: 1px solid var(--rule);
}

.persona-block:first-child { padding-top: 2rem; }
.persona-block:last-child { border-bottom: none; }

.persona-tondo-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin-bottom: 1.5rem;
}

.persona-name {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.persona-description {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.8rem;
  max-width: 480px;
}

.persona-site-link {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: color 0.2s;
}

.persona-site-link:hover { color: var(--text); }

.persona-title-list {
  list-style: none;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--muted);
}

.persona-title-list li { margin-bottom: 0.3rem; }

.persona-title-list a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.persona-title-list a:hover { color: var(--text); }

.persona-no-titles {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Text pages (About, Colophon) ── */
.text-content {
  line-height: 1.82;
}

.text-content p { margin-bottom: 1.4rem; }

.text-content h2 {
  font-size: 0.72rem;
  font-family: var(--font-ui);
  font-weight: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 2.5rem 0 0.9rem;
}

.text-content a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Impressum ── */
.impressum-wrap {
  max-width: 480px;
}

.impressum {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--text);
}

.impressum a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .book-page-upper {
    flex-direction: column;
  }

  .book-page-cover { width: 160px; }

  .book-entry { gap: 1.5rem; }
  .book-cover-wrap { width: 100px; }

  .hero-logo { width: 200px; }

  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 2rem 1rem;
    gap: 0;
    z-index: 100;
  }

  .site-nav.is-open { display: flex; }

  .site-nav a {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--rule);
  }

  .site-nav a:last-child { border-bottom: none; }
}

/* Tag pills */
.post-tags {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  text-decoration: none !important;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.tag-pill:hover { opacity: 1; }
