/* ==========================================================================
   cv.css — the printable CV.
   Designed for paper first: single column, black on white, real selectable
   text so applicant tracking systems can read it. Deliberately plainer than
   the portfolio — a CV that looks designed gets read as a design portfolio.
   ========================================================================== */

:root {
  --ink: #101418;
  --ink-2: #333d45;
  --muted: #5d6b75;
  --rule: #c9d1d6;
  --accent: #b8391a;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

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

body {
  margin: 0;
  background: #e6e9eb;
  color: var(--ink);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- Screen-only toolbar ------------------------------------------------- */
.toolbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem clamp(1rem, 4vw, 2rem);
  background: var(--ink); color: #fff;
  font-family: var(--mono); font-size: .76rem;
}
.toolbar__back { color: #fff; text-decoration: none; opacity: .85; }
.toolbar__back:hover { opacity: 1; text-decoration: underline; }
.toolbar__right { display: flex; align-items: center; gap: 1rem; }
.toolbar__for { color: rgba(255,255,255,.6); letter-spacing: .04em; }
.toolbar__btn {
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  padding: .5rem .95rem; cursor: pointer;
  background: #fff; color: var(--ink); border: 0; border-radius: 3px;
}
.toolbar__btn:hover { background: var(--accent); color: #fff; }
.toolbar__btn:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; }

.toolbar__hint {
  max-width: 52rem; margin: 1rem auto -.25rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
  font-size: .8rem; color: #56646d;
}
@media (max-width: 620px) {
  .toolbar { flex-wrap: wrap; }
  .toolbar__for { display: none; }
}

/* --- The page ------------------------------------------------------------ */
.cv {
  max-width: 52rem;
  margin: 1.5rem auto 4rem;
  padding: clamp(2rem, 5vw, 3.25rem) clamp(1.5rem, 5vw, 3.25rem);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 12px 32px rgba(0,0,0,.08);
}

.cv__head { border-bottom: 2px solid var(--ink); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.cv__name {
  font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700;
  letter-spacing: -.02em; margin: 0 0 .25rem; line-height: 1.1;
}
.cv__title {
  font-family: var(--mono); font-size: .82rem; letter-spacing: .03em;
  color: var(--accent); margin: 0 0 .85rem;
}
.cv__contact {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .35rem 1.1rem;
  font-size: .82rem; color: var(--ink-2);
}
.cv__contact a { color: inherit; text-decoration: none; }
.cv__contact a:hover { text-decoration: underline; }

.cv__section { margin-bottom: 1.5rem; }
.cv__h2 {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 .7rem; padding-bottom: .35rem; border-bottom: 1px solid var(--rule);
}

.cv__summary { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--ink-2); }
.cv__focus { margin: 0; font-size: .86rem; line-height: 1.7; color: var(--ink-2); }

/* --- Experience ---------------------------------------------------------- */
.role { margin-bottom: 1.2rem; break-inside: avoid; }
.role:last-child { margin-bottom: 0; }
.role__top {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .25rem 1rem;
}
.role__title { font-size: 1rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.role__period {
  font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap;
}
.role__org { font-size: .86rem; color: var(--ink-2); margin: .1rem 0 .45rem; }
.role__org em { font-style: normal; color: var(--muted); }
.role__summary { font-size: .87rem; color: var(--ink-2); margin: 0 0 .45rem; }
.role__points { margin: 0; padding-left: 1.05rem; }
.role__points li {
  font-size: .87rem; line-height: 1.5; color: var(--ink-2); margin-bottom: .3rem;
}
.role__points li::marker { color: var(--muted); }

/* --- Education / publications / lists ------------------------------------ */
#cv-education { list-style: none; margin: 0; padding: 0; }
#cv-education li { margin-bottom: .7rem; break-inside: avoid; }
.edu__row {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .2rem 1rem;
}
.edu__q { font-size: .92rem; font-weight: 600; margin: 0; }
.edu__p { font-family: var(--mono); font-size: .72rem; color: var(--muted); white-space: nowrap; }
.edu__i { font-size: .85rem; color: var(--ink-2); margin: .1rem 0 0; }
.edu__n { font-size: .78rem; color: var(--muted); font-style: italic; }

.cv__pubs { margin: 0; padding-left: 1.15rem; }
.cv__pubs li { font-size: .85rem; line-height: 1.45; margin-bottom: .45rem; color: var(--ink-2); }
.cv__pubs a { color: inherit; }

.cv__plain { list-style: none; margin: 0; padding: 0; }
.cv__plain li { font-size: .86rem; color: var(--ink-2); margin-bottom: .3rem; }

.cv__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 560px) { .cv__cols { grid-template-columns: 1fr; gap: 0; } }

.cv__section--geo p { margin: 0; font-size: .86rem; color: var(--ink-2); }

/* --- Print --------------------------------------------------------------- */
@page { size: A4; margin: 14mm 14mm 12mm; }

@media print {
  body { background: #fff; font-size: 10.2pt; }
  .toolbar, .toolbar__hint { display: none !important; }
  .cv {
    max-width: none; margin: 0; padding: 0; box-shadow: none;
  }
  .cv__section { margin-bottom: 11pt; }
  .cv__h2 { font-size: 7.4pt; margin-bottom: 5pt; }
  .cv__name { font-size: 19pt; }
  .cv__title { font-size: 9pt; }
  .cv__contact { font-size: 8.4pt; }
  .cv__summary, .cv__focus { font-size: 9.2pt; line-height: 1.42; }
  .role { margin-bottom: 9pt; }
  .role__title { font-size: 10.6pt; }
  .role__points li, .role__summary, .role__org { font-size: 9pt; line-height: 1.38; }
  .cv__pubs li, .cv__plain li, .edu__i { font-size: 8.8pt; }
  .cv__section, .role, #cv-education li, .cv__pubs li { break-inside: avoid; }
  .cv__h2 { break-after: avoid; }
  a { text-decoration: none; color: inherit; }
}
