/* Classic CV: one column, serif, A4. Light only — it is a paper document. */
:root {
  --ink: #1a1a1a;
  --muted: #555;
  --rule: #b8b8b8;
  --accent: #1f3a5f;
  --desk: #e7e9ee;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--desk); color: var(--ink); font-family: var(--serif); }

.toolbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 210mm; margin: 0 auto; padding: 12px 16px;
  background: var(--desk); font-family: var(--sans);
}
.tb-link { color: var(--accent); text-decoration: none; font-size: 0.95rem; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; border: 1px solid #c3c8d2; border-radius: 8px; overflow: hidden; background: #fff; }
.lang-switch a { font: 600 0.78rem var(--sans); color: var(--muted); text-decoration: none; padding: 8px 9px; line-height: 1; }
.lang-switch a + a { border-left: 1px solid #c3c8d2; }
.lang-switch a[aria-current="true"] { color: #fff; background: var(--accent); }
.tb-btn {
  font: 600 0.95rem var(--sans); color: #fff; background: var(--accent);
  border: 0; border-radius: 8px; padding: 9px 18px; cursor: pointer;
}
.tb-btn:hover { filter: brightness(1.15); }
.tb-btn:focus-visible, .tb-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tb-hint { max-width: 210mm; margin: 0 auto 12px; padding: 0 16px; font: 0.85rem var(--sans); color: var(--muted); }

.paper {
  width: 210mm; max-width: calc(100% - 32px); min-height: 297mm;
  margin: 0 auto 40px; padding: 18mm 18mm 16mm;
  background: #fff; box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12);
  font-size: 10.5pt; line-height: 1.45;
}
@media (max-width: 640px) { .paper { padding: 24px 18px; min-height: 0; } }

/* Header */
.cv-head { text-align: center; padding-bottom: 10px; border-bottom: 1.5px solid var(--accent); }
.cv-head h1 { margin: 0; font-size: 24pt; font-weight: 600; letter-spacing: 0.04em; color: var(--accent); }
.cv-head .title { margin: 2px 0 6px; font-size: 12pt; font-style: italic; color: var(--muted); }
.cv-head .contact { margin: 0; font: 9pt var(--sans); color: var(--muted); }
.cv-head .contact a { color: inherit; text-decoration: none; }
.cv-head .contact span + span::before { content: "·"; margin: 0 8px; color: var(--rule); }

/* Sections */
.cv-sec { margin-top: 14px; }
.cv-sec h2 {
  margin: 0 0 6px; padding-bottom: 2px; border-bottom: 0.75px solid var(--rule);
  font-size: 10.5pt; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.cv-sec p { margin: 0 0 5px; }

.entry { margin-bottom: 9px; break-inside: avoid; }
.entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.entry-head b { font-size: 11pt; }
.entry-head .when { font: 9pt var(--sans); color: var(--muted); white-space: nowrap; }
.entry-sub { font-style: italic; color: var(--muted); }
.entry ul { margin: 3px 0 0; padding-left: 16px; }
.entry li { margin-bottom: 1px; }
.entry .stack { margin-top: 2px; font: 8.5pt var(--sans); color: var(--muted); }

.skills-table { width: 100%; border-collapse: collapse; }
.skills-table th {
  width: 30%; padding: 2px 10px 2px 0; text-align: left; vertical-align: top; font-weight: 600;
}
.skills-table td { padding: 2px 0; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 3px; }
.rows .when { font: 9pt var(--sans); color: var(--muted); white-space: nowrap; }

.todo { color: #b45309; }
.refs { margin-top: 3px; font-size: 9.5pt; }
.refs b { font-weight: 600; }
.refs .contact-bits { font: 8.5pt var(--sans); color: var(--muted); }
.on-request { font-style: italic; color: var(--muted); margin-top: 2px; }

@page { size: A4; margin: 14mm 16mm; }
@media print {
  body { background: #fff; }
  .toolbar, .tb-hint { display: none; }
  .paper { width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .cv-sec h2 { break-after: avoid; }
  a { color: inherit; }
}

/* Sections switched off on the admin page get [hidden]; it must win over
   the display values above. Until the settings have been applied the page is
   invisible (no flash of a switched-off section); the animation shows it
   anyway after 2 s if the script never gets there. */
[hidden] { display: none !important; }
.cfg-loading main, .cfg-loading .paper { visibility: hidden; animation: cfg-show 0s 2s forwards; }
@keyframes cfg-show { to { visibility: visible; } }
.hero.no-term { grid-template-columns: 1fr; }
