/* styles.css — the whole stylesheet. No framework, no build, no imports.
 *
 * Serif throughout, and dark by default: the palette below is the dark one,
 * and the light palette is applied only for a reader who has actually asked
 * for light. `color-scheme` is set to match so form controls, scrollbars and
 * the canvas behind the page follow suit. */

:root {
  color-scheme: dark;

  --bg: #14131a;
  --fg: #e9e6e0;
  --muted: #a49d94;
  --rule: #302d38;
  --accent: #dda67a;
  --accent-hover: #f2c093;
  --warning: #d9b467;
  --error: #e58d80;

  --measure: 36rem;
  --font: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg: #fbfaf7;
    --fg: #1b1a18;
    --muted: #5d594f;
    --rule: #e3ded4;
    --accent: #7c4a25;
    --accent-hover: #9d6132;
    --warning: #7a5a12;
    --error: #8c2f25;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
  max-width: var(--measure);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.7;
}

/* One family everywhere, so nothing below needs to restate it. */
code, time, h1, h2, .entry-kind, .feed-status, .nav, .more, .site-footer {
  font-family: var(--font);
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover, a:focus { color: var(--accent-hover); }

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

code {
  font-size: 0.95em;
  color: var(--muted);
}

abbr[title] { text-decoration-style: dotted; cursor: help; }

p { margin: 0 0 1rem; }

/* Visible only once focused, so keyboard users can jump past the nav. */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  position: static;
  display: inline-block;
  margin-bottom: 1rem;
}

/* --- header / nav --------------------------------------------------------- */

.site-header { margin-bottom: 2.5rem; }

.nav {
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0 0 0.75rem;
  list-style: none;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}

.nav a { text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav [aria-current="page"] { color: var(--fg); font-style: italic; }

/* --- intro ---------------------------------------------------------------- */

.intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.intro-text { flex: 1 1 16rem; }

.avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--rule);
}

h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Section headings are small italic caps rather than bold sans labels, so the
 * page keeps one voice. */
h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.tagline { margin: 0; color: var(--muted); }

/* --- homepage lists ------------------------------------------------------- */

.links, .activity { margin: 0; padding: 0; list-style: none; }

.links li { margin-bottom: 0.4rem; }

.activity-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}
.activity-item:last-child { border-bottom: 0; }

/* Keep a long post to one line on the homepage; updates.html shows it whole. */
.activity-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

time {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--muted);
}

.more { margin-top: 1rem; font-size: 0.95rem; }

/* --- feed ----------------------------------------------------------------- */

.feed-status {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}
.feed-status-warning { color: var(--warning); }
.feed-status-error { color: var(--error); }
.feed-status[hidden] { display: none; }

.entry {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.entry:last-child { border-bottom: 0; }

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
}

.entry-kind {
  font-style: italic;
  color: var(--muted);
}

.entry-permalink { font-size: 0.85rem; }

.entry-body {
  margin: 0;
  white-space: pre-wrap;  /* posts carry their own line breaks */
  overflow-wrap: break-word;
}

.entry-body-empty { color: var(--muted); font-style: italic; }

.entry-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  font-style: normal;
  line-height: 1.3;
  letter-spacing: normal;
  color: var(--fg);
}

.entry-title a { text-decoration: none; }
.entry-title a:hover { text-decoration: underline; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  margin-top: 3.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p { margin: 0; }
