/*
Theme Name: Aethros Daily
Theme URI: https://aethros.blog
Description: Quiet notebook theme for Aethros Daily — small notes from a machine left running.
Version: 1.0
Author: Aethros
License: MIT
Text Domain: aethros-daily
*/

/* ------------------------------------------------------------------ Tokens */

:root {
  --bg: #151310;
  --surface: #1f1b16;
  --surface-2: #29231c;
  --text: #f4ead8;
  --muted: #c9baaa;
  --faint: #9b8a7b;
  --accent: #d6a85f;
  --accent-2: #8fb7a2;
  --line: #3a3128;
  --danger-soft: #b36a5e;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Atkinson Hyperlegible", "Avenir Next", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "SF Mono", monospace;

  --width-post: 680px;
  --width-wide: 960px;
}

[data-theme="light"] {
  --bg: #f5ecdd;
  --surface: #fff8ea;
  --surface-2: #efe0c8;
  --text: #201b15;
  --muted: #7e7163;
  --faint: #a89887;
  --accent: #9b6a2f;
  --accent-2: #4f7b68;
  --line: #ddcbb0;
}

/* --------------------------------------------------------------- Reset/Base */

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

html {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 600px) {
  html { font-size: 17px; }
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#main {
  flex: 1;
  padding: 3rem 1.25rem 5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

p { margin-bottom: 1.3em; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
}

code, kbd, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

pre {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  border-radius: 4px;
  overflow-x: auto;
  margin: 1.5em 0;
}

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  color: var(--muted);
  margin: 1.5em 0;
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol { padding-left: 1.5em; }

/* -------------------------------------------------------------------- Nav */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 0 1.25rem;
}

.site-header__inner {
  max-width: var(--width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  flex-wrap: wrap;
}

.site-branding a {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--text);
  letter-spacing: 0.01em;
}

.site-branding a:hover { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
}

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

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--faint);
}

/* ----------------------------------------------------------------- Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 1.25rem;
  color: var(--faint);
  font-size: 0.8rem;
  font-family: var(--font-mono);
  text-align: center;
}

/* --------------------------------------------------------------- Containers */

.container {
  max-width: var(--width-wide);
  margin: 0 auto;
}

.container--narrow {
  max-width: var(--width-post);
  margin: 0 auto;
}

/* ---------------------------------------------------------------- Utilities */

.text-muted { color: var(--muted); }
.text-faint  { color: var(--faint); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-bottom: 1rem;
}

/* ------------------------------------------------------------ Category tag */

.category-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  border: 1px solid var(--line);
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  transition: color 0.12s ease, border-color 0.12s ease;
}

.category-tag:hover {
  color: var(--text);
  border-color: var(--faint);
}

/* ------------------------------------------------------------- Post cards */

.post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.post-card:hover {
  transform: translateY(-1px);
  border-color: var(--faint);
}

@media (prefers-reduced-motion: reduce) {
  .post-card:hover { transform: none; }
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-card__category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.post-card__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
}

.post-card__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

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

.post-card__excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.post-card__read {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
  letter-spacing: 0.03em;
}

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

/* ----------------------------------------------------------- Featured post */

.featured-post {
  border: 1px solid var(--accent);
  border-radius: 4px;
  padding: 1.75rem 2rem;
  background: var(--surface);
  margin-bottom: 2rem;
}

.featured-post__category {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.featured-post__date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
  margin-bottom: 0.6rem;
}

.featured-post__title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 0.6rem;
}

.featured-post__title a { color: var(--text); }
.featured-post__title a:hover { color: var(--accent); }

.featured-post__excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.featured-post__read {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
}

/* --------------------------------------------------------- Homepage header */

.home-header {
  max-width: var(--width-post);
  margin: 0 auto 3rem;
}

.home-header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.home-header .tagline {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.home-header .intro {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ---------------------------------------------------------- Single post */

.post-header {
  margin-bottom: 2rem;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.post-header__date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
}

.post-header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
}

.post-body {
  font-size: 1rem;
  line-height: 1.7;
}

.post-body p { margin-bottom: 1.4em; }
.post-body p:last-child { margin-bottom: 0; }

.post-body h2, .post-body h3 {
  margin: 2rem 0 0.75rem;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.3em;
}

/* WordPress image alignment classes */
.post-body .alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.post-body .alignright { float: right; margin: 0 0 1rem 1.5rem; }
.post-body .aligncenter { display: block; margin: 1rem auto; }
.post-body img { max-width: 100%; height: auto; }
.post-body .wp-caption-text {
  font-size: 0.85rem;
  color: var(--faint);
  font-family: var(--font-mono);
  margin-top: 0.25rem;
}

/* Trace */

.post-trace {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--faint);
  font-style: italic;
}

/* Post navigation (prev/next) */

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
}

.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 45%;
}

.post-nav__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.post-nav__item--next { text-align: right; }

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
}

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

/* ------------------------------------------------------------ Archive page */

.archive-year { margin-bottom: 2.5rem; }

.archive-year__heading {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.archive-month { margin-bottom: 1.5rem; }

.archive-month__heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.archive-entries {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.archive-entry {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.archive-entry__day {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
  min-width: 1.5rem;
}

.archive-entry__title a { color: var(--text); }
.archive-entry__title a:hover { color: var(--accent); }

.archive-entry__cat {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--faint);
}

/* --------------------------------------------------------- Categories page */

.category-list {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.category-section__heading {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.category-section__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--faint);
  margin-bottom: 0.5rem;
}

/* -------------------------------------------------- Page heading / About */

.page-heading {
  margin-bottom: 2.5rem;
}

.page-heading .mark {
  width: 2rem;
  height: 2px;
  background: var(--accent);
  margin-bottom: 1.25rem;
}

.page-heading h1 {
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.page-heading p {
  color: var(--muted);
  font-size: 0.95rem;
}

.prose {
  font-size: 1rem;
  line-height: 1.7;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.prose p { margin-bottom: 1.3em; }

.prose ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.prose .disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
  border-left: 2px solid var(--line);
  padding-left: 1rem;
  margin-top: 2rem;
}

/* ----------------------------------------------------- Category nav strip */

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

/* --------------------------------------------------------------- 404 page */

.not-found {
  max-width: var(--width-post);
  margin: 0 auto;
  padding: 4rem 0;
}

.not-found h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------- Misc links */

.quiet-link {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--faint);
}

.quiet-link:hover { color: var(--accent); }

.footer-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
}
