/* =============================================================================
   Shimon Hermon — Résumé (interim)
   Screen layout + dedicated print styles. Depends on brand.css tokens.
   ========================================================================== */

/* --- Screen: utility bar (home + print) — never printed ------------------ */
.util-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 28px);
  background: rgba(242, 232, 219, 0.9);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--walnut-faint);
}
.util-home {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--walnut-soft);
}
.util-home:hover,
.util-home:focus-visible { color: var(--oxblood); }
.print-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--parchment);
  background: var(--indigo);           /* weathered indigo — quiet utility */
  border: 0;
  padding: 10px 16px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.print-btn:hover { background: #2E3B50; }

/* --- Document shell ------------------------------------------------------- */
.resume {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 64px) clamp(22px, 5vw, 56px) 72px;
}

/* --- Header --------------------------------------------------------------- */
.r-header { margin-bottom: 34px; }
.r-name {
  font-size: clamp(44px, 7.8vw, 68px);
  line-height: 1.0;
  letter-spacing: 0.005em;
}
.r-descriptor {
  font-family: var(--sans);
  font-size: clamp(11.5px, 1.35vw, 13px);   /* reduced prominence vs. the name */
  font-weight: 600;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--fox);
  margin: 18px 0 0;
}
.r-descriptor .sep { color: var(--walnut-faint); margin: 0 8px; font-weight: 400; }
.r-location {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--walnut-soft);
  margin: 8px 0 0;
}

.r-meta {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14.5px;
  color: var(--walnut-soft);
}
.r-meta .row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 4px; }
.r-meta .lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-right: 4px;
}
.r-meta .dot { color: var(--walnut-faint); margin: 0 8px; }
.r-meta a { color: var(--walnut); }
.r-meta a:hover { color: var(--oxblood); }

.r-rule { border: 0; border-top: 2px solid var(--walnut); margin: 24px 0 0; opacity: 0.85; }

/* --- Sections ------------------------------------------------------------- */
/* Each section carries a brand accent used as a quiet organizational cue
   (diamond marker, sub-labels, role lines) — never as a colour block. */
.section { margin-top: 52px; --accent: var(--fox); }
.section.sec-aubergine { --accent: var(--aubergine); }
.section.sec-indigo    { --accent: var(--indigo); }
.section.sec-fox       { --accent: var(--fox); }
.section.sec-sage      { --accent: var(--sage); }
.section.sec-oxblood   { --accent: var(--oxblood); }
.section.sec-walnut    { --accent: var(--walnut); }

/* Heading rule carries an extremely faint tint of the section accent. */
.section.sec-aubergine > h2 { border-bottom-color: rgba(59, 40, 75, 0.28); }
.section.sec-indigo    > h2 { border-bottom-color: rgba(58, 74, 99, 0.28); }
.section.sec-fox       > h2 { border-bottom-color: rgba(180, 90, 42, 0.32); }
.section.sec-sage      > h2 { border-bottom-color: rgba(122, 139, 115, 0.40); }
.section.sec-oxblood   > h2 { border-bottom-color: rgba(122, 31, 44, 0.30); }
.section.sec-walnut    > h2 { border-bottom-color: rgba(43, 30, 23, 0.18); }

.section > h2 {
  font-size: 23px;
  letter-spacing: 0.01em;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--walnut-faint);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.section > h2::before {
  content: "";
  width: 8px; height: 8px;
  flex: 0 0 auto;
  background: var(--accent);
  transform: rotate(45deg);
  opacity: 0.9;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.lead {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.55;
  color: var(--walnut);
  margin: 16px 0 0;
  max-width: 66ch;
}

/* --- Entry ---------------------------------------------------------------- */
.entry { margin-top: 24px; }
.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
  flex-wrap: wrap;
}
.entry-title { font-size: 17px; font-weight: 600; color: var(--walnut); }
.entry-title a { color: var(--walnut); }
.entry-title a:hover { color: var(--oxblood); }
.entry-dates {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--walnut-muted);
  white-space: nowrap;
}
.entry-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--accent);   /* section accent as a quiet organizational cue */
  margin: 3px 0 0;
}
.entry-note { font-size: 15.5px; line-height: 1.58; color: var(--walnut-soft); margin: 9px 0 0; max-width: 68ch; }
/* Clearly-clickable inline external link (e.g. venture website). */
.entry-dates a.ext { text-transform: none; color: var(--fox); font-weight: 600; }
.entry-dates a.ext:hover, .entry-dates a.ext:focus-visible { color: var(--oxblood); text-decoration: underline; text-underline-offset: 2px; }

ul.points {
  list-style: none;
  margin: 9px 0 0;
  padding: 0;
  display: grid;
  gap: 5px;
}
ul.points li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--walnut-soft);
  line-height: 1.55;
}
ul.points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.66em;
  width: 5px; height: 1px;
  background: var(--accent);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
/* Compact inline list of study strands. */
.strands { font-size: 14.5px; color: var(--walnut-soft); margin: 8px 0 0; line-height: 1.7; }
.strands .x { color: var(--walnut-faint); margin: 0 7px; }

/* --- Epigraph / testimonial (standalone, restrained editorial) ----------- */
.epigraph {
  margin: 26px 0 6px;
  padding: 20px clamp(20px, 3vw, 30px);
  background: var(--plum-wash);
  border-left: 3px solid var(--aubergine);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.epigraph blockquote {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 21px);
  line-height: 1.5;
  color: var(--walnut);
  max-width: 62ch;
}
.epigraph figcaption {
  margin-top: 12px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2D1F3A;   /* darker aubergine-plum — reads immediately */
}

/* --- Venues (teaching & speaking) ---------------------------------------- */
.venues { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 28px; }
.venues .v { font-size: 14.5px; color: var(--walnut-soft); }
.venues .v b { font-weight: 600; color: var(--walnut); }
.venues .v .city { color: var(--walnut-muted); }

/* --- Compact recruiting cluster ------------------------------------------ */
.cluster { margin-top: 10px; display: grid; gap: 4px; }
.cluster .c-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px 20px; flex-wrap: wrap;
  font-size: 14.5px;
}
.cluster .c-row b { font-weight: 600; color: var(--walnut); }
.cluster .c-row .c-role { color: var(--walnut-soft); font-style: italic; font-family: var(--serif); }
.cluster .c-row .c-date {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--walnut-muted); white-space: nowrap;
}

/* --- Writing list --------------------------------------------------------- */
.writing-label {
  margin: 12px 0 8px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.writing { display: grid; gap: 9px; }
.writing a.piece {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--oxblood);
  text-decoration: underline;
  text-decoration-color: rgba(122, 31, 44, 0.35);
  text-underline-offset: 3px;
}
.writing a.piece:hover,
.writing a.piece:focus-visible {
  color: var(--fox);
  text-decoration-color: currentColor;
}
.writing a.piece .ext-arrow { font-size: 0.78em; opacity: 0.9; flex: 0 0 auto; }

/* --- Education / languages simple rows ------------------------------------ */
.rows { margin-top: 12px; display: grid; gap: 10px; }
.rows .r-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; }
.rows .r-row b { font-weight: 600; color: var(--walnut); font-size: 16px; }
.rows .r-row .meta { font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--walnut-muted); }
.langs { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.langs .lang { font-size: 15px; color: var(--walnut-soft); }
.langs .lang b { color: var(--walnut); font-weight: 600; }

/* --- Foot ----------------------------------------------------------------- */
.r-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--walnut-faint);
  font-size: 12.5px;
  color: var(--walnut-muted);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.r-foot a { color: var(--walnut-soft); }

/* --- Mobile --------------------------------------------------------------- */
@media (max-width: 560px) {
  .venues { grid-template-columns: 1fr; }
  .entry-dates { font-size: 12px; }
  /* Slightly more air on small screens — never a shrunk desktop résumé. */
  .lead { line-height: 1.62; }
  .entry-note { line-height: 1.64; }
  ul.points li { line-height: 1.6; }
  ul.points { gap: 7px; }
}

/* =============================================================================
   PRINT  —  clean, professional, ~2–3 pages
   ========================================================================== */
@media print {
  @page { margin: 15mm 16mm; }

  html, body {
    background: #fff !important;
    background-image: none !important;
    color: #1c1712;
    font-size: 10.6pt;
    line-height: 1.42;
  }

  .util-bar, .print-btn, .util-home { display: none !important; }

  .resume { max-width: none; margin: 0; padding: 0; }

  /* Keep entries and sections whole across page breaks. */
  .entry, .cluster .c-row, .epigraph, .writing a.piece,
  .rows .r-row, .venues .v { break-inside: avoid; page-break-inside: avoid; }
  .section { break-inside: auto; }
  .section > h2 { break-after: avoid; page-break-after: avoid; }
  h1, h2, h3 { break-after: avoid; }

  /* Section accents (diamonds/marks + testimonial wash) still print; role
     lines shift to a dark, readable tone. */
  html, body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .r-name { font-size: 26pt; }
  .section > h2 { font-size: 14pt; border-color: #bcae98; }
  .r-descriptor { font-size: 9pt; }
  .lead { font-size: 11.5pt; }
  .entry-sub, .cluster .c-row .c-role { color: #4a3a2c; }
  .r-rule { border-top-color: #1c1712; }
  .epigraph { background: var(--plum-wash); }

  /* Links legible in print. */
  a { color: #1c1712; text-decoration: none; }
  .r-meta a, .writing a.piece, .entry-title a { text-decoration: underline; }
  .writing a.piece { font-size: 11pt; }

  .r-foot { border-top-color: #bcae98; color: #444; margin-top: 18pt; }

  /* Compact vertical rhythm so the document settles into ~2.5–3 pages. */
  .r-header { margin-bottom: 12pt; }
  .r-meta { margin-top: 9pt; gap: 3pt; font-size: 9pt; }
  .r-descriptor { margin-top: 7pt; }
  .r-rule { margin-top: 11pt; }
  .section { margin-top: 15.5pt; }
  .section > h2 { padding-bottom: 4pt; }
  .lead { margin-top: 6pt; }
  .entry { margin-top: 9pt; }
  .entry-sub { font-size: 10pt; }
  .entry-note { font-size: 9.6pt; margin-top: 4pt; line-height: 1.4; }
  ul.points { margin-top: 5pt; gap: 2pt; }
  ul.points li { font-size: 9.6pt; line-height: 1.35; }
  .strands, .venues .v, .cluster .c-row, .langs .lang, .rows .r-row b { font-size: 9.6pt; }
  .epigraph { padding: 9pt 12pt; margin: 10pt 0 4pt; }
  .epigraph blockquote { font-size: 11pt; }
  .writing-label { margin: 7pt 0 4pt; }
  .writing { gap: 4pt; margin-top: 0; }

  /* Nudge widows/orphans. */
  p { orphans: 2; widows: 2; }
}
