/* kelaiope.com — Milestone 0 stylesheet.
   Hand-written. Change anything. Colours and sizes live in the variables below.

   Look: the rainbow nebula fills the window behind everything; content sits on
   dark, rounded, slightly see-through panes over it. Dark mode is the default. */

/* Atkinson Hyperlegible Next, the site's one typeface, served from fonts/.
   Each file is a variable font covering every weight from 200 to 800. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext-Italic.ttf") format("truetype");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --space: #05030a;                    /* shows while the picture loads */
  --pane: rgb(10 8 18 / 0.78);         /* the panes: dark, a little see-through */
  --pane-edge: rgb(255 255 255 / 0.14);
  --ink: #f2f2f2;
  --muted: #b9b4c4;
  --focus: #ffffff;

  --radius: 1.25rem;                   /* how round the pane corners are */
  --measure: 42rem;                    /* comfortable line length */
  --gutter: 1rem;
  --font: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

/* Anything marked hidden stays hidden, whatever display style it has. */
[hidden] { display: none !important; }

/* One typeface everywhere, including form controls, which don't inherit it by default. */
button, input, select, textarea { font: inherit; }

html { background: var(--space); }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  padding: var(--gutter);
}

/* The nebula. A fixed layer behind the page, rather than
   background-attachment: fixed, which phones (iOS especially) ignore. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgb(0 0 0 / 0.25), rgb(0 0 0 / 0.45)),
    url("images/supernova.jpg") center / cover no-repeat;
}

/* Every block of content is a pane. */
.pane {
  max-width: var(--measure);
  margin: 0 auto var(--gutter);
  padding: 1.25rem 1.5rem;
  background: var(--pane);
  border: 1px solid var(--pane-edge);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: var(--gutter);
  top: var(--gutter);
  z-index: 1;
  background: var(--pane);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
}

header.pane {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  padding-block: 0.75rem;
}

/* Logo lockup: monogram on the left, name on the right (vision §13). */
.site-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.35rem;
  color: inherit;
  text-decoration: none;
}
.site-name img {
  height: 2.25rem;
  width: auto;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--gutter);
}

a { color: inherit; }

a[aria-current="page"] { font-weight: 700; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

h1 { margin-top: 0; line-height: 1.2; }

footer.pane {
  color: var(--muted);
  font-size: 0.95rem;
  padding-block: 0.5rem;
}

/* ---------- Added for post.html and thread.html ---------- */

/* Text for screen readers only: gives "Previous" and "Next" their context. */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.meta { color: var(--muted); font-size: 0.95rem; }

/* Marks the example pages. Remove with them. */
.note { font-size: 0.95rem; border-style: dashed; }

/* Stacked navigation (vision §4): one row for all posts, one per thread. */
.post-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}
.nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}
.nav-row:first-child {           /* the all-posts row stands apart from the thread rows */
  padding-bottom: 0.5rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--pane-edge);
}
.nav-row > * {
  display: block;
  padding: 0.6rem 0.5rem;        /* big enough to tap */
  border-radius: 0.6rem;
  text-decoration: none;
}
.nav-row a:hover { background: rgb(255 255 255 / 0.08); }
.nav-row .prev, .nav-row .next { white-space: nowrap; }
.nav-row .next { text-align: right; }
.nav-row .thread-name {
  text-align: center;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  overflow-wrap: break-word;
}
.nav-row [aria-disabled="true"] { color: var(--muted); opacity: 0.6; }

/* On a phone, Previous and Next shrink to their arrows so long thread names
   fit. Screen readers still hear the words. */
@media (max-width: 30rem) {
  .nav-row .word {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .nav-row .prev, .nav-row .next { min-width: 2.75rem; text-align: center; font-size: 1.35rem; line-height: 1; }
}

/* Thread page */
.subscribe {
  display: inline-block;
  padding: 0.6rem 1rem;
  border: 1px solid var(--pane-edge);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  font-weight: 700;
  text-decoration: none;
}
.subscribe .meta { font-weight: 400; }

.months {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.month {
  border-collapse: collapse;
  text-align: center;
  font-size: 0.95rem;
}
.month caption { font-weight: 700; padding-bottom: 0.25rem; text-align: left; }
.month th { color: var(--muted); font-weight: 400; }
.month th, .month td { width: 2.4rem; height: 2.4rem; padding: 0; }
.month td { color: var(--muted); }
.month .has-post a {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  margin: auto;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.18);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}
.month .count {                  /* more than one post that day */
  position: absolute;
  top: -0.3rem; right: -0.3rem;
  min-width: 1.1rem;
  font-size: 0.7rem;
  line-height: 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--space);
}

.entries { padding-left: 1.5rem; margin: 0; }
.entries li { margin-bottom: 0.4rem; }
.entries time { display: block; }

/* ---------- All posts page (posts.html) ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.pill {                           /* rounded buttons and button-like links */
  display: inline-block;
  padding: 0.55rem 1rem;
  border: 1px solid var(--pane-edge);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.08);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.pill[aria-expanded="true"] { background: rgb(255 255 255 / 0.2); }
.pill:disabled { opacity: 0.4; cursor: default; }

#filters {
  border: 1px solid var(--pane-edge);
  border-radius: 0.8rem;
  margin: 0 0 1rem;
  padding: 0.5rem 1rem 0.75rem;
}
#filters legend { padding: 0 0.4rem; color: var(--muted); font-size: 0.95rem; }
.filter-boxes { display: grid; gap: 0.25rem; }
.filter-boxes label { display: flex; align-items: center; gap: 0.6rem; padding: 0.3rem 0; }
.filter-boxes input { width: 1.25rem; height: 1.25rem; accent-color: #ffffff; }

.month-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; max-width: 18rem; }
.month-nav h2 { margin: 0; font-size: 1.15rem; }
.month-nav .pill { padding: 0.3rem 0.9rem; font-size: 1.2rem; line-height: 1.2; }
.calendar .month { margin-top: 0.5rem; }
.month .has-post a.selected { background: var(--ink); color: var(--space); outline: 2px solid var(--ink); outline-offset: 2px; }
.month .has-post a.selected .count { background: var(--space); color: var(--ink); }
.month .has-post a.off { background: none; color: var(--muted); font-weight: 400; pointer-events: none; }

.list-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.list-head h2 { margin: 0; }
.day { border-top: 1px solid var(--pane-edge); }
.day summary { padding: 0.7rem 0; cursor: pointer; font-weight: 700; }
.day summary .meta { font-weight: 400; margin-left: 0.4rem; }
.day-posts { list-style: none; margin: 0 0 0.75rem; padding: 0 0 0 1.1rem; }
.post-item h3 { margin: 0.25rem 0 0; font-size: 1.1rem; }
.post-item p { margin: 0.2rem 0; }
.chips { list-style: none; margin: 0.2rem 0 0.8rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; font-size: 0.85rem; color: var(--muted); }
.chips li { border: 1px solid var(--pane-edge); border-radius: 999px; padding: 0.05rem 0.6rem; }
.chips a { text-decoration: none; }

.nav-row:only-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }

/* ---------- Home: the feed ---------- */
.feed-post .post-title { margin: 0; font-size: 2rem; line-height: 1.2; }
.feed-post .post-title a { text-decoration: none; }
.feed-post .post-title a:hover { text-decoration: underline; }
.feed-post > .meta:last-child { margin-bottom: 0; }

/* Pictures and video in posts fit the pane on any screen. */
article img, article video { max-width: 100%; height: auto; border-radius: 0.6rem; }
