/* ==========================================================================
   John.CVLab — document base stylesheet.

   This file styles the PRINTED DOCUMENT. It is deliberately plain CSS, kept
   readable and hand-tunable for pagination (HANDOVER §4). Tailwind must never
   reach this subtree. Custom properties are injected from theme.json onto the
   .doc-root container — only through the validated whitelist in theme.ts.
   ========================================================================== */

/* --- Self-hosted fonts (HANDOVER §6): never a CDN. ----------------------- */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/fonts/space-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Newsreader';
  src: url('/fonts/newsreader-latin-wght-italic.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* --- Document ink (HANDOVER §9) ------------------------------------------ */
.doc-root {
  --ink-heading: #1a1a18;
  --ink-body: #26251f;
  --ink-secondary: #3a3832;
  --ink-muted: #56534c;
  --ink-hairline: #c9c4ba;
  --ink-footer: #777166;

  /* Overridden at runtime from validated theme.json values: */
  --doc-accent: #2a6b5f;
  --doc-base-size: 10.5pt;
  --doc-line-height: 1.55;
  --doc-display-font: 'Newsreader';
  --doc-body-font: 'Newsreader';

  /* theme.json `rules` maps to this via a class on .doc-root: */
  --rule-color: var(--ink-hairline);
}

.rules-hairline {
  --rule-color: var(--ink-hairline);
}
.rules-hairline-accent {
  --rule-color: color-mix(in srgb, var(--doc-accent) 45%, #e6e2d9);
}
.rules-none {
  --rule-color: transparent;
}

.doc {
  font-family: var(--doc-body-font), Georgia, serif;
  font-size: var(--doc-base-size);
  line-height: var(--doc-line-height);
  color: var(--ink-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.doc h1,
.doc h2,
.doc h3,
.doc p,
.doc ul {
  margin: 0;
  padding: 0;
}

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

.doc-name {
  font-family: var(--doc-display-font), Georgia, serif;
  color: var(--ink-heading);
}

.doc-contact {
  color: var(--ink-secondary);
}
.doc-contact-item + .doc-contact-item::before {
  content: '·';
  margin: 0 0.55em;
  color: var(--ink-muted);
}
.doc-contact a {
  color: var(--doc-accent);
}

.doc-section-title {
  font-family: var(--doc-display-font), Georgia, serif;
  color: var(--ink-heading);
}

.doc-entry-heading {
  font-size: 1em;
  color: var(--ink-heading);
}
.doc-entry-subheading {
  color: var(--ink-secondary);
}
.doc-entry-dates {
  color: var(--ink-muted);
  white-space: nowrap;
}

.doc-bullets {
  list-style: none;
}
.doc-bullets li {
  position: relative;
  padding-left: 1.1em;
}
.doc-bullets li::before {
  content: '';
  position: absolute;
  left: 0.15em;
  top: calc(0.5em * var(--doc-line-height) - 1.5px);
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--doc-accent);
}

/* List sections are one shared two-column grid: the label column sizes to the
   longest label in the section (kept on a single line up to half the page,
   after which it wraps rather than crush the text column). Entries dissolve
   into the grid so every row shares the same column edge. */
.doc-layout-list .doc-entries {
  display: grid;
  grid-template-columns: fit-content(50%) 1fr;
  gap: 0.3em 0.75em;
  align-items: baseline;
}
.doc-entry-list {
  display: contents;
}
.doc-list-heading {
  font-weight: 600;
  color: var(--ink-heading);
  grid-column: 1;
}
.doc-list-text {
  color: var(--ink-body);
  grid-column: 2;
}

.doc-entry-prose {
  color: var(--ink-body);
}

/* The visible footer line inside the flow is suppressed — the page footer is
   drawn by Paged.js margin boxes (from page 2 onward, so parsers never scoop
   it into the body of page 1 — HANDOVER §11). */
.doc-footer {
  display: none;
}
