/*
Theme Name: Austin Ginder v2
Theme URI: https://austinginder.com/
Author: Austin Ginder
Author URI: https://austinginder.com/
Description: Single-page personal site for Austin Ginder — hero, fleet, charts & instruments, ship's log timeline, contact. Day/night mode.
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: austinginder-v2
*/

/* ============================================================
   Fonts — Spectral (serif) and JetBrains Mono (mono)
   ============================================================ */

/* JetBrains Mono — 400 */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/8c18d7d0-3ea8-4bc6-887d-864ea9d64fa3.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/cbf04856-8887-4f4a-9e8c-b4bc361ab0db.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/4916d958-2770-4024-9a9f-5e6dd5a8fefd.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/bfba13fc-9f0b-4c68-a762-cc4dbc7953da.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/1f57caca-a202-4940-b4ff-e9d20895ea71.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/9a11e820-7f51-4c3d-994a-4f31866c2ae9.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* JetBrains Mono — 500 (shares subset files with 400) */
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/8c18d7d0-3ea8-4bc6-887d-864ea9d64fa3.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/cbf04856-8887-4f4a-9e8c-b4bc361ab0db.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/4916d958-2770-4024-9a9f-5e6dd5a8fefd.woff2") format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/bfba13fc-9f0b-4c68-a762-cc4dbc7953da.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/1f57caca-a202-4940-b4ff-e9d20895ea71.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url("assets/fonts/9a11e820-7f51-4c3d-994a-4f31866c2ae9.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Spectral italic 400 */
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/b1022812-82a6-4361-97a3-59485f8e1da2.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/8eadf21f-b98d-4c10-a137-9bd5920cf83a.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/a4f5a2bc-25f7-49dc-ac6b-370c0e7a13ae.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/8bbca808-c323-4052-9efe-cdf384ac728c.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Spectral'; font-style: italic; font-weight: 400; font-display: swap;
  src: url("assets/fonts/0ac1f82a-bbfb-4c6b-a8e0-e94e1f0a87ee.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Spectral 300 */
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 300; font-display: swap;
  src: url("assets/fonts/a480d70f-577c-47e3-be7d-2f38d1b55f4f.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 300; font-display: swap;
  src: url("assets/fonts/26dded1a-7e1f-433f-9065-c0dec731b541.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 300; font-display: swap;
  src: url("assets/fonts/8e571daf-044e-414a-94e6-9ac416ab453b.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 300; font-display: swap;
  src: url("assets/fonts/eaaa0088-a6e2-4a62-affc-9f5cee805088.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 300; font-display: swap;
  src: url("assets/fonts/681c91a3-a469-406b-9b45-7a0c7d480376.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Spectral 400 */
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/b4a651dc-6de2-4010-a8e5-8a5dbb1d18f4.woff2") format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/a9ae0add-ba88-4b9b-ad1b-21622c50d7cf.woff2") format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/242e67df-2d18-4b88-8ace-5bcd78120074.woff2") format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/2d938650-d30e-496e-a0f2-02d8070d4794.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Spectral'; font-style: normal; font-weight: 400; font-display: swap;
  src: url("assets/fonts/83a7cb4c-28a4-485f-b62a-9baa033016d6.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ============================================================
   Theme styles
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --fg: #e8e4d4;
  --dim: rgba(232, 228, 212, 0.58);
  --faint: rgba(232, 228, 212, 0.32);
  --rule: rgba(232, 228, 212, 0.10);
  --accent: #c9a14a;
  --violet: #8d7cff;

  --serif: "Spectral", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
}

[data-mode="day"] {
  --bg: #f3ecd9;
  --fg: #1a1d2b;
  --dim: rgba(26, 29, 43, 0.62);
  --faint: rgba(26, 29, 43, 0.28);
  --rule: rgba(26, 29, 43, 0.14);
  --accent: #1f3a6b;
  --violet: #5a3aa0;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--serif);
  font-weight: 300;
  font-size: 22px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 500ms ease, color 500ms ease;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 56px clamp(20px, 6vw, 32px) 80px;
}

/* top row: tiny mark + toggle */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--faint);
  letter-spacing: 0.04em;
  margin-bottom: 96px;
}
.top .mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.top button {
  background: none;
  border: 0;
  color: var(--faint);
  font: inherit;
  cursor: pointer;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
}
.top button:hover { color: var(--accent); }

/* icon helper */
.ic {
  width: 1.3em;
  height: 1.3em;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.12em;
  flex: none;
}

/* hero */
h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(28px, 4.4vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 0 0 28px;
  text-wrap: pretty;
}
h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 300;
}
h1 a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 200ms, text-decoration-color 200ms;
}
h1 a:hover { color: var(--accent); text-decoration-color: var(--accent); }

p { margin: 0 0 18px; }
p a {
  border-bottom: 1px solid var(--rule);
  transition: color 200ms, border-color 200ms;
}
p a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.meta {
  font-family: var(--mono);
  font-size: 15.5px;
  color: var(--dim);
  letter-spacing: 0.02em;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 28px;
}
.meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.meta .ic { color: var(--accent); }
.meta a {
  color: inherit;
  border-bottom: 1px solid var(--rule);
  transition: color 200ms, border-color 200ms;
}
.meta a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* section heads */
h2 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 80px 0 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}
h2 .ic { width: 18px; height: 18px; color: var(--accent); }

/* lists: vessels & links */
ul.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 12px;
  margin: 0 -12px;
  border-bottom: 1px solid var(--rule);
  border-radius: 4px;
  position: relative;
  transition: background-color 200ms ease;
}
ul.list li:first-child { border-top: 1px solid var(--rule); }
ul.list .ic {
  width: 22px; height: 22px;
  color: var(--accent);
  align-self: center;
  transition: transform 200ms ease;
}
ul.list a {
  display: contents;
}
ul.list .title {
  font-family: var(--serif);
  font-size: 22px;
  transition: color 200ms ease;
}
ul.list .desc {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 18px;
  color: var(--dim);
  margin-left: 8px;
  transition: color 200ms ease;
}
ul.list .arr {
  font-family: var(--mono);
  font-size: 17px;
  color: var(--faint);
  font-variant-emoji: text;
  transition: transform 200ms, color 200ms;
}

/* timeline */
.tl-year {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--faint);
  margin: 28px 0 10px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.tl-year:first-child { border-top: 0; padding-top: 0; margin-top: 4px; }
.tl-entry {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  gap: 18px;
  align-items: baseline;
  padding: 12px 0;
  color: inherit;
}
a.tl-entry { text-decoration: none; }
a.tl-entry:hover .tl-title { color: var(--accent); }
a.tl-entry:hover .tl-arr { transform: translateX(3px); color: var(--accent); }
.tl-date {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tl-title {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.35;
  transition: color 200ms;
}
.tl-arr {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--faint);
  transition: transform 200ms, color 200ms;
}

.tl-cat {
  display: inline-flex;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
  transition: color 200ms;
}
.tl-cat::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
  opacity: 0.9;
}
.tl-cat[data-cat="projects"] { color: var(--accent); }
.tl-cat[data-cat="talks"]    { color: var(--violet); }
.tl-cat[data-cat="notes"]    { color: var(--dim); }
.tl-cat-spacer { display: inline-block; }

@media (max-width: 520px) {
  .tl-entry { grid-template-columns: 56px 1fr auto; gap: 12px; }
  .tl-date { font-size: 12px; }
  .tl-title { font-size: 17px; }
  .tl-cat, .tl-cat-spacer { display: none; }
}

/* modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 5vh, 56px) 16px;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
  opacity: 0;
  transition: opacity 220ms ease;
}
[data-mode="day"] .modal { background: rgba(40, 38, 30, 0.55); }
.modal.open { display: flex; opacity: 1; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 720px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: clamp(28px, 5vw, 56px) clamp(24px, 5vw, 56px) clamp(40px, 6vw, 64px);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  transform: translateY(8px);
  transition: transform 240ms ease;
  overflow: hidden;
}
.modal.open .modal-card { transform: translateY(0); }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 200ms, border-color 200ms;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }
.modal-date {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 14px;
}
.modal-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0 0 24px;
  color: var(--fg);
}
.modal-body {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 19px;
  line-height: 1.65;
  color: var(--fg);
  padding-bottom: 72px;
}
.modal.no-nav .modal-body { padding-bottom: 0; }
.modal-body p { margin: 0 0 16px; }
.modal-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
}
.modal-body a:hover { border-bottom-color: var(--accent); }
.modal-body img,
.modal-body iframe,
.modal-body video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 18px 0;
  border-radius: 4px;
}

/* responsive WP embeds */
.modal-body figure,
.modal-body .wp-block-embed {
  margin: 22px 0;
  max-width: 100%;
}
.modal-body .wp-block-embed__wrapper,
.modal-body .wp-embed-aspect-16-9 .wp-block-embed__wrapper,
.modal-body .wp-has-aspect-ratio .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 4px;
}
.modal-body .wp-embed-aspect-4-3 .wp-block-embed__wrapper { aspect-ratio: 4 / 3; }
.modal-body .wp-embed-aspect-1-1 .wp-block-embed__wrapper { aspect-ratio: 1 / 1; }
.modal-body .wp-embed-aspect-9-16 .wp-block-embed__wrapper { aspect-ratio: 9 / 16; }
.modal-body .wp-block-embed__wrapper iframe,
.modal-body .wp-block-embed__wrapper embed,
.modal-body .wp-block-embed__wrapper object {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}
.modal-body > iframe,
.modal-body p > iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}
.modal-body blockquote.wp-embedded-content { display: none; }
.modal-body figcaption {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  margin-top: 8px;
  text-align: center;
}
.modal-body h1, .modal-body h2, .modal-body h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.25;
  margin: 28px 0 12px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--fg);
  display: block;
}
.modal-body h2 { font-size: 22px; }
.modal-body h3 { font-size: 19px; }
.modal-body blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 18px;
  border-left: 2px solid var(--accent);
  color: var(--dim);
  font-style: italic;
}
.modal-body pre, .modal-body code {
  font-family: var(--mono);
  font-size: 14px;
}
.modal-body pre {
  background: rgba(0,0,0,0.25);
  padding: 14px 16px;
  border-radius: 4px;
  overflow-x: auto;
}
[data-mode="day"] .modal-body pre { background: rgba(0,0,0,0.05); }
.modal-body ul, .modal-body ol { padding-left: 22px; }
.modal-body li { margin: 4px 0; }
.modal-link { display: none; }
.modal-hints {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  padding: 18px;
  margin: 32px calc(-1 * clamp(24px, 5vw, 56px)) calc(-1 * clamp(40px, 6vw, 64px));
  background: var(--bg);
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--faint);
  text-transform: uppercase;
  pointer-events: none;
}
.modal-hints .h {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.modal-hints kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  background: transparent;
}
.modal-loading {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--faint);
}
body.modal-open { overflow: hidden; }

/* Interactive-row hover/focus: tint the row, brighten title + description,
 * nudge icon and arrow. Scoped via :has(> a) so non-interactive
 * Charts & Instruments rows don't false-advertise. .opens-modal rows
 * share the same treatment via the block below. */
ul.list li:has(> a):hover,
ul.list li.opens-modal:hover,
ul.list li.opens-modal:focus-visible {
  background-color: color-mix(in srgb, var(--accent) 6%, transparent);
}
ul.list li:has(> a):hover .title,
ul.list li.opens-modal:hover .title,
ul.list li.opens-modal:focus-visible .title {
  color: var(--accent);
}
ul.list li:has(> a):hover .desc,
ul.list li.opens-modal:hover .desc,
ul.list li.opens-modal:focus-visible .desc {
  color: var(--fg);
}
ul.list li:has(> a):hover .ic,
ul.list li.opens-modal:hover .ic,
ul.list li.opens-modal:focus-visible .ic {
  transform: translateX(2px);
}
ul.list li:has(> a):hover .arr,
ul.list li.opens-modal:hover .arr,
ul.list li.opens-modal:focus-visible .arr {
  transform: translateX(3px);
  color: var(--accent);
}

@media (max-width: 520px) {
  ul.list li { grid-template-columns: 28px 1fr auto; }
  ul.list .desc { display: block; margin-left: 0; margin-top: 2px; }
}

/* rows that open the modal instead of linking out */
ul.list li.opens-modal {
  cursor: pointer;
  outline: none;
}
ul.list li.opens-modal:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ranked list inside the modal (Coffee picks, etc.) */
.modal-body .ranked-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.modal-body .ranked-list li {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: baseline;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.modal-body .ranked-list li:first-child { border-top: 1px solid var(--rule); }
.modal-body .ranked-list .rank {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.modal-body .ranked-list a {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--fg);
  text-decoration: none;
  border-bottom: 0;
  transition: color 200ms;
}
.modal-body .ranked-list a:hover {
  color: var(--accent);
  border-bottom: 0;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 50%, transparent);
  text-underline-offset: 0.18em;
}

/* hide post-navigation hints when modal is in custom (non-post) mode */
.modal.no-nav .modal-hints { display: none; }

/* inline link row (contact) */
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.02em;
}
.links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  transition: color 200ms;
}
.links a:hover { color: var(--accent); }
.links .ic { width: 20px; height: 20px; color: var(--accent); }

/* footer */
footer.site-footer {
  margin-top: 96px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 14.5px;
  color: var(--faint);
  letter-spacing: 0.06em;
}
footer.site-footer .ic { width: 18px; height: 18px; color: var(--accent); }

::selection { background: var(--accent); color: var(--bg); }
a:focus-visible, button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   Single post template (fallback when JS is off / direct visit)
   ============================================================ */

article.single {
  max-width: 720px;
  margin: 0 auto;
  padding: 0;
}
article.single .modal-date { margin-top: 32px; }
article.single .modal-title { font-size: clamp(28px, 4vw, 38px); }
article.single .single-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 4px;
}
article.single .single-back:hover { color: var(--accent); border-bottom-color: var(--accent); }
