/* ============================================================
   cv.css — The Record
   One card, read like a pager: chrome above, status line below,
   the whole working life in between. Colours come from the shared
   semantic tokens, so this page follows the chosen side.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background-color: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-bottom: var(--switch-room);
}
html.no-motion { scroll-behavior: auto; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  background: var(--bg);
  min-height: 100vh;
}

::selection { background: var(--text); color: var(--invert-text); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 2px; }
.ph { border-bottom: 1px dotted var(--dotted); }

.skip-link {
  position: fixed; top: -4rem; left: 1rem; z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--text); color: var(--invert-text);
  border-radius: 0.5rem; text-decoration: none;
  transition: top 200ms ease;
}
.skip-link:focus { top: 3.4rem; }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

/* The machine bar lives in bar.css, shared across the subpages. */

/* ---------- page head -------------------------------------------- */
.record { max-width: 76rem; margin-inline: auto; padding: clamp(6rem, 12vh, 8rem) clamp(1rem, 3.5vw, 2.5rem) clamp(3rem, 7vh, 4.5rem); }
.record__head { text-align: center; margin-bottom: clamp(2.2rem, 5vh, 3.5rem); }
.record__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  font-weight: 540;
  font-variation-settings: "opsz" 90;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-2);
}
.record__sub { color: var(--text-2); max-width: 52ch; margin-inline: auto; }
.record__keys {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-3);
}

/* ---------- the pager card --------------------------------------- */
.pager {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 30px 60px -26px rgba(0, 0, 0, 0.38);
  overflow: clip;
}
.pager__bar, .pager__status {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  background: var(--panel-bg);
  color: var(--panel-dim);
}
.pager__bar { padding: 0.55rem 1.1rem; border-bottom: 1px solid var(--panel-line); }
.pager__status {
  padding: 0.45rem 1.1rem;
  border-top: 1px solid var(--panel-line);
  /* The % line closes the card rather than riding the viewport. Sticky, it
     sat over the record itself — 366px of the grid at a mid-page read — so
     it stays in flow at the end of the component, where the reader arrives
     with the rest of the page. It no longer needs to clear the mode pill. */
  justify-content: space-between;
}
.pager__host { color: var(--panel-text); }
.pager__file { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager__dl { color: var(--panel-text); text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
#pagerPct { color: var(--panel-text); }

.pager__grid {
  display: grid;
  grid-template-columns: 19rem minmax(0, 1fr);
}

/* ---------- left pane -------------------------------------------- */
.pane { border-right: 1px solid var(--line-soft); background: var(--surface-2); }
.pane__inner {
  position: sticky; top: 4.5rem;
  padding: clamp(1.4rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 1.5rem;
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  scrollbar-width: thin;
}
.pane__name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 560;
  font-variation-settings: "opsz" 40;
  line-height: 1.16;
  margin-bottom: 0.35rem;
}
.pane__role { font-size: var(--text-small); color: var(--text-2); }
.pane__h {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.pane__list li {
  display: grid; grid-template-columns: 4.6rem 1fr;
  gap: 0.6rem;
  font-size: var(--text-small);
  margin-bottom: 0.4rem;
  overflow-wrap: anywhere;
}
.pane__list li > span:first-child {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-3);
}
.pane__list a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pane__toc li { margin-bottom: 0.3rem; }
.pane__toc a {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--dur-breath) var(--ease-sand);
}
.pane__toc a:hover { color: var(--text); }

.langs li {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-small);
  margin-bottom: 0.35rem;
}
/* Proficiency in words. This was three dots, one to three of them filled,
   which is a scale nobody defined: "two out of three" is a number the widget
   invented. The CV says Native and Fluent, so the sidebar says so. */
.langs__level {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text-3);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips li {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  padding: 0.24rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-2);
  background: var(--surface-2);
}

/* ---------- right pane: the document ------------------------------ */
.doc { padding: clamp(1.6rem, 3.5vw, 2.8rem); min-width: 0; }
.doc__section { margin-bottom: clamp(2.2rem, 5vh, 3.2rem); scroll-margin-top: 5rem; }
.doc__h {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
  margin-bottom: 1.4rem;
}
.entry { margin-bottom: 1.8rem; padding-left: 1.1rem; border-left: 2px solid rgba(98, 98, 98, 0.25); }
.entry:last-child { margin-bottom: 0; }
.entry__years {
  font-family: var(--font-mono);
  font-size: var(--text-micro);
  color: var(--text);
  margin-bottom: 0.25rem;
}
.entry__role {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 540;
  font-variation-settings: "opsz" 40;
  line-height: 1.2;
}
.entry__note { font-family: var(--font-body); font-size: 0.8em; font-weight: 400; color: var(--text-3); }
.entry__org { font-size: var(--text-small); color: var(--text-2); margin-top: 0.15rem; }
.entry__body { color: var(--text-2); font-size: var(--text-small); line-height: 1.75; margin-top: 0.6rem; max-width: 68ch; }
.entry__body + .entry__body { margin-top: 0.75rem; }

.doc__certs li {
  font-size: var(--text-small);
  color: var(--text-2);
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.4rem;
}
.doc__certs li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 0.6rem; height: 2px;
  background: var(--text-3);
}

.doc__end {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  border-top: 1px dashed rgba(62, 62, 62, 0.2);
  padding-top: 1.6rem;
}
.doc__aside { font-size: var(--text-small); color: var(--text-3); }

.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--text-small);
  text-decoration: none;
  transition: box-shadow var(--dur-breath) var(--ease-sand);
}
.btn--sand {
  background: var(--invert-bg);
  border: 1px solid var(--invert-bg);
  color: var(--invert-text);
  box-shadow: var(--shadow-card);
}
.btn--sand:hover { filter: brightness(1.25); }

/* The footer lives in bar.css too. */

/* ---------- responsive -------------------------------------------- */
@media (max-width: 900px) {
  .pager__grid { grid-template-columns: 1fr; }
  .pane { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .pane__inner { position: static; max-height: none; overflow: visible; }
  .record__keys { display: none; }
}

@media (max-width: 560px) {
  .bar { gap: 0.6rem; }
  .bar__path { display: none; }
  .pager__file { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
