/* ------------------------------------------------------------------
   Shared styles for every page.
   Calm and quiet: one paper background, ink text, and orange used
   only as a small accent. Change the tokens below to restyle the site.
------------------------------------------------------------------- */
:root {
  --paper: #f8f5ee;
  --ink: #1f1b16;
  --ink-soft: #57504a;
  --ink-faint: #9b9286;
  --line: #e7e0d3;
  --underline: #cdc3b3;
  --orange: #d9541e;
}
/* Light by default. Dark only when the visitor picks it with the moon button. */
:root[data-theme="dark"] {
  --paper: #161411; --ink: #ece6da; --ink-soft: #b0a798; --ink-faint: #7a7266;
  --line: #2a261f; --underline: #4a4338; --orange: #f07a45;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, -apple-system, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--orange); color: var(--paper); }

/* ---------- Layout: a quiet sidebar, then the page ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  padding: 40px 28px 28px;
  display: flex; flex-direction: column;
  font-size: 14px;
}
.me { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; color: var(--ink); text-decoration: none; font-weight: 600; }
.me:hover { color: var(--ink); }
.avatar {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--orange); color: var(--paper);
  display: grid; place-items: center; font-size: 10px; font-weight: 700; letter-spacing: .03em;
}

.nav-group { margin-bottom: 24px; }
.nav-label { font-size: 12px; color: var(--ink-faint); margin-bottom: 6px; }
.nav a {
  position: relative; display: block; padding: 3px 0;
  color: var(--ink-soft); text-decoration: none;
}
.nav a:hover { color: var(--ink); }
/* The page you're on: darker text and a small orange dot */
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--orange);
}
.nav .ext { color: var(--ink-faint); font-size: 11px; margin-left: 2px; }

.side-foot { margin-top: auto; display: flex; align-items: center; gap: 2px; margin-left: -7px; }
.icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; border-radius: 6px;
  color: var(--ink-faint); text-decoration: none; transition: color .15s;
}
.icon-btn:hover { color: var(--ink); }
.icon-btn svg { width: 15px; height: 15px; }
.side-foot .sep { width: 1px; height: 12px; background: var(--line); margin: 0 6px; }

.page { flex: 1; min-width: 0; }
.content { max-width: 600px; padding: 112px 40px 64px; margin-left: clamp(0px, 7vw, 140px); }

/* ---------- Type ---------- */
h1 { font-size: 16px; font-weight: 600; margin: 0 0 20px; }
h1.big { font-size: 24px; letter-spacing: -0.015em; }
h2.sub { font-size: 14px; font-weight: 600; margin: 56px 0 4px; }
p { margin: 0 0 18px; }
.soft { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }

a {
  color: var(--ink); text-decoration: underline; text-decoration-color: var(--underline);
  text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .15s, text-decoration-color .15s;
}
a:hover { color: var(--orange); text-decoration-color: var(--orange); }

ul.dots { margin: 0 0 18px; padding-left: 18px; }
ul.dots li { margin: 4px 0; padding-left: 2px; }
ul.dots li::marker { color: var(--ink-faint); }

/* Klara's own voice gets the serif italic, and nothing else does. */
.klara { font-family: Newsreader, Georgia, serif; font-style: italic; font-size: 1.15em; color: var(--ink); }
blockquote { margin: 28px 0; padding-left: 18px; border-left: 2px solid var(--orange); color: var(--ink-soft); }
blockquote p { margin: 0; }

/* "Life in a tweet" */
.tweet { margin: 0 0 40px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; }
.tweet p { margin: 0; color: var(--ink); }
.tweet .by { display: block; margin-top: 10px; font-size: 13px; color: var(--ink-faint); }

/* ---------- Home sections with "See all" ---------- */
.section { margin-top: 64px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.section-head h2 { font-size: 14px; font-weight: 600; margin: 0; }
.section-head a { font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.section-head a:hover { color: var(--orange); }
.stamp { font-size: 13px; color: var(--ink-faint); font-weight: 400; margin-left: 8px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:first-child { border-top: 1px solid var(--line); }
.rows .note { color: var(--ink-faint); font-size: 13.5px; white-space: nowrap; }
.rows a { text-decoration: none; }

.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.thumbs a { display: block; overflow: hidden; border-radius: 6px; }
.thumbs img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--line); transition: transform .4s ease, opacity .2s; }
.thumbs a:hover img { transform: scale(1.03); }

/* ---------- Projects page ---------- */
.projects { list-style: none; margin: 0; padding: 0; }
.projects li { padding: 20px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.projects .top { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.projects h3 { font-size: 16px; font-weight: 600; margin: 0; }
.projects h3 a { text-decoration: none; }
.projects .note { color: var(--ink-faint); font-size: 13px; white-space: nowrap; }
.projects p { margin: 6px 0 0; color: var(--ink-soft); font-size: 15px; }
.tag { color: var(--ink-faint); font-size: 12px; font-weight: 500; margin-left: 8px; }

/* ---------- Photos page ---------- */
figure { margin: 0 0 56px; scroll-margin-top: 24px; }
figure img { display: block; width: 100%; height: auto; border-radius: 8px; background: var(--line); }
figure.tall img { max-width: 360px; }
figcaption { font-size: 13.5px; color: var(--ink-faint); margin-top: 10px; }

.foot { margin-top: 88px; font-size: 13px; color: var(--ink-faint); }
.foot a { color: var(--ink-faint); }

/* ---------- Phones: sidebar becomes a simple top bar ---------- */
@media (max-width: 760px) {
  .shell { flex-direction: column; }
  .sidebar {
    position: static; width: auto; height: auto;
    padding: 20px 20px 0;
    flex-direction: row; flex-wrap: wrap; align-items: center;
  }
  .me { margin: 0 auto 0 0; }
  .side-foot { margin: 0 -7px 0 0; }
  .nav { order: 3; width: 100%; display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .nav-group { display: contents; }
  .nav-label { display: none; }
  .nav a[aria-current="page"]::before { display: none; }
  .nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 6px; text-decoration-thickness: 1.5px; }
  .content { padding: 44px 20px 40px; max-width: none; margin-left: 0; }
  .thumbs { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Writing, Books, Quotes ---------- */
.empty { color: var(--ink-faint); font-size: 15px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
ul:empty { display: none; }
ul:not(:empty) + .empty { display: none; }   /* the "coming soon" line hides itself once items exist */
.rows.dated li { justify-content: flex-start; }
.rows .date { color: var(--ink-faint); font-size: 13.5px; width: 84px; flex-shrink: 0; }
.books .author { color: var(--ink-faint); margin-left: 8px; font-size: 14.5px; }
.quotes { list-style: none; margin: 0; padding: 0; }
.quotes li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.quotes li:first-child { border-top: 1px solid var(--line); }
.quotes p { margin: 0; font-size: 17px; line-height: 1.6; }
.quotes .who { display: block; margin-top: 8px; font-size: 13.5px; color: var(--ink-faint); }
