/* www.nkvtext.com
   Layout: a manuscript page. Desk photo behind the opening; below it one narrow text column with section names in the left margin.
   Fonts are served from /fonts (SIL Open Font License, see the OFL files there). */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/newsreader-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

/* Light theme first. The dark values apply when the system setting is dark, unless the visitor forced light with the
   theme button, or when the visitor forced dark (data-theme on <html>, set by theme-v1.1.js).
   --paper must stay the same as the theme-color meta tags in the HTML (phone top bar). */
:root {
  --paper: #f7f7f7;
  --ink: #18212b;
  --muted: #5b6672;
  --rule: #dce1e7;
  --accent: #2e5a88;
  --accent-soft: #e6edf5;
  --veil: rgba(247, 247, 247, 0);
  --veil-narrow: rgba(247, 247, 247, 0.75);
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111519; --ink: #e6eaee; --muted: #97a1ab; --rule: #2a323b;
    --accent: #8db4e0; --accent-soft: #1b2733;
    --veil: rgba(17, 21, 25, 0.9); --veil-narrow: rgba(17, 21, 25, 0.94);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111519; --ink: #e6eaee; --muted: #97a1ab; --rule: #2a323b;
  --accent: #8db4e0; --accent-soft: #1b2733;
  --veil: rgba(17, 21, 25, 0.9); --veil-narrow: rgba(17, 21, 25, 0.94);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}
.wrap { max-width: 880px; margin: 0 auto; padding-inline: 20px; }

/* The photo fades in from plain --paper at the top edge, so the phone's top bar (theme-color, or Safari's own
   sampling of the page) has the same colour as the top of the header. */
.hero {
  background: linear-gradient(var(--paper), var(--veil) 96px), url("../img/nkv-desk.webp") center / cover no-repeat, var(--paper);
  border-bottom: 1px solid var(--rule);
  min-height: min(44vw, 620px);
  display: flex;
}
.hero .wrap { width: 100%; padding-block: 24px 64px; display: flex; flex-direction: column; gap: 56px; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.wordmark span { color: var(--muted); font-weight: 400; }
.theme-btn { background: var(--paper); border: 1px solid var(--rule); color: var(--ink); border-radius: 999px; width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.intro { max-width: 540px; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2.1rem, 5vw, 3.2rem); line-height: 1.12; margin: 0 0 28px; text-wrap: balance; }
.intro p { margin: 0; color: var(--muted); }
.pair { display: grid; gap: 10px; }
.pair div { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.lang { font-family: var(--mono); font-size: 0.75rem; font-weight: 500; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 2px 0; text-align: center; }
.pair q { font-family: var(--display); font-size: 1.15rem; font-style: italic; quotes: none; }

.row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; padding-block: 36px; border-bottom: 1px solid var(--rule); }
.margin-note { font-family: var(--mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding-top: 4px; }

.list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.list dt { font-family: var(--display); font-weight: 500; font-size: 1.15rem; }
.list dd { margin: 0; color: var(--muted); padding-top: 2px; overflow-wrap: anywhere; }
.note { margin: 0; max-width: 60ch; }
a { color: var(--accent); text-underline-offset: 3px; }

footer { padding-block: 22px 40px; font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 24px; }

@media (max-width: 900px) {
  .hero { background: linear-gradient(var(--paper), var(--veil-narrow) 96px), url("../img/nkv-desk.webp") right center / cover no-repeat, var(--paper); }
}
@media (max-width: 640px) {
  .row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-block: 28px; }
  .margin-note { padding-top: 0; }
  .list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .list dd { margin-bottom: 12px; }
}
