/* flynnkav.com: Field Notes
   Layout: a notebook page. Quiet top bar with the wordmark and a More menu,
   a serif headline, then hairline-ruled lists. Study guides lead. */
:root {
  --bg: #eaeee8;        /* cool grey-green paper */
  --surface: #f6f8f4;
  --ink: #1b2427;
  --muted: #5e6a65;
  --line: #b9c1b9;
  --accent: #2d47c2;    /* ink blue */
  --accent-ink: #ffffff;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;  /* light only, by choice: no dark mode */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }

.page {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1080px;
  margin: 0 auto;
  padding-block: 20px 28px;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

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

/* top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mark {
  font-family: var(--serif); font-style: italic; font-size: 28px; line-height: 1;
  color: var(--ink); text-decoration: none;
}

/* More menu (details/summary, works without JS) */
.more { position: relative; }
.more summary {
  list-style: none; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; gap: 9px;
  font: 500 14px/1 var(--sans);
  padding: 9px 16px; border: 1px solid var(--ink); border-radius: 999px;
  color: var(--ink);
}
.more summary::-webkit-details-marker { display: none; }
.more summary::after {
  content: ""; width: 6px; height: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.more[open] summary { background: var(--ink); color: var(--bg); }
.more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20;
  width: min(300px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--ink);
  padding: 18px 20px 8px;
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, .45);
}
.menu .label { margin-bottom: 6px; }
.menu a {
  display: grid; padding: 10px 0; border-top: 1px solid var(--line);
  color: var(--ink); text-decoration: none;
}
.menu .mn { font-family: var(--serif); font-size: 25px; line-height: 1.1; }
.menu .mu { font-size: 13px; color: var(--accent); }
.menu a:hover .mn { color: var(--accent); }
.menu .all { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }

/* shared labels */
.label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink);
}
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}

/* hero */
.hero {
  display: grid; gap: 18px;
  padding-block: 11vh 48px;
  border-bottom: 1px solid var(--ink);
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(60px, 12.5vw, 150px); line-height: .9; letter-spacing: -.025em;
  margin-top: 12px; text-wrap: balance;
}
.hero h1 em { color: var(--accent); }
.lede {
  font-family: var(--serif); font-size: clamp(22px, 3vw, 30px); line-height: 1.2;
  max-width: 22ch;
}
@media (min-width: 760px) {
  .hero { grid-template-columns: 1.7fr 1fr; align-items: end; gap: 56px; padding-block: 13vh 56px; }
  .lede { padding-bottom: 14px; }
}

/* sections */
.block { padding-top: 44px; }
.sechead {
  display: flex; gap: 12px; align-items: baseline; justify-content: space-between;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.sechead .note { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--muted); }
.sechead a.note { text-decoration: none; }
.sechead a.note:hover { color: var(--accent); }

/* featured guide */
.feature {
  display: grid; gap: 24px;
  padding-block: 24px 34px; border-bottom: 1px solid var(--line);
}
.feature .ftitle {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 6vw, 68px); line-height: 1.02; margin: 8px 0 4px;
}
.feature .what { color: var(--muted); font-size: 16px; }
.open {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none;
  font-weight: 600; font-size: 15px; padding: 12px 18px; border-radius: 2px;
  transition: gap .18s ease;
}
.open:hover { gap: 16px; }
.inside { list-style: none; margin: 0; padding: 0; }
.inside li { border-top: 1px solid var(--line); }
.inside li:last-child { border-bottom: 1px solid var(--line); }
.inside a {
  display: flex; gap: 12px; padding: 11px 0;
  color: var(--ink); text-decoration: none; font-size: 15px;
}
.inside a::before {
  content: "§"; color: var(--accent); font-family: var(--serif); font-size: 17px; line-height: 1.3;
}
.inside a:hover { color: var(--accent); }
@media (min-width: 760px) {
  .feature { grid-template-columns: 1.2fr 1fr; gap: 72px; padding-block: 30px 40px; }
}

/* page heads (projects, study guides index, 404) */
.head { display: grid; gap: 10px; padding-block: 9vh 28px; }
.head h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(52px, 9vw, 104px); line-height: .92; letter-spacing: -.02em;
}
.head h1 em { color: var(--accent); }
.back {
  justify-self: start; margin-bottom: 14px;
  display: inline-flex; gap: 8px; align-items: center;
  font-weight: 500; font-size: 15px; color: var(--ink); text-decoration: none;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
}
.back:hover { border-color: var(--ink); }

/* ruled list */
.list { list-style: none; margin: 0; padding: 0; }
.list li { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline; gap: 2px 24px;
  padding-block: 20px;
  color: var(--ink); text-decoration: none;
}
.row .name {
  font-family: var(--serif); font-size: clamp(30px, 4.6vw, 46px); line-height: 1.05;
  grid-column: 1; min-width: 0;
}
.row .what { grid-column: 1; color: var(--muted); font-size: 15px; }
.row .where {
  grid-column: 2; grid-row: 1; white-space: nowrap;
  font-size: 14px; font-weight: 500; color: var(--accent);
}
a.row:hover .name { color: var(--accent); }
.row.soon { cursor: default; }
.row.soon .name { font-style: italic; color: var(--muted); }
.group { margin-bottom: 6vh; }

/* footer */
.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 72px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.foot em, .foot a { font-family: var(--serif); font-size: 16px; color: inherit; text-decoration: none; }
.foot a:hover { color: var(--accent); }

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
  .row .where { grid-column: 1; grid-row: auto; margin-top: 4px; }
  .mark { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
