/* ==================================================================
   CV PAGE — layout only. Colours, base type, and the emboss/tint SVG
   filters all come from global.css + shell.html; this file positions
   things and sets the CV-specific type rules.

   Type rule for this page only: Cormorant Garamond throughout, never
   Ballet — a CV reads as a document, not a signature. Section titles
   are uppercase; everything else keeps normal case.

   Every direct child of .cv__container (the header, the education/
   download row, and each section below) shares the same max-width +
   side padding, so the left edge of Education and the right edge of
   the Download-CV frame set the gutter for the whole page — Skills,
   Experience, Leadership Experience and Extracurriculars all line up
   under them exactly.
================================================================== */

.cv { position: relative; padding-top: var(--nav-height); overflow: hidden; }

.cv__container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ==================================================================
   HEADER — name/eyebrow on the left, contact details on the right,
   both riding the same container gutter as everything under it.
================================================================== */
.cv__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(2rem, 5vh, 3rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
}
.cv__eyebrow { margin-bottom: 0.6rem; }
.cv__name {
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.cv__role {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.cv__contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  text-align: right;
  flex-shrink: 0;
}
.cv__contact a {
  font-size: 0.95rem;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: color var(--dur-med) var(--ease-editorial), border-color var(--dur-med) var(--ease-editorial);
}
.cv__contact a:hover,
.cv__contact a:focus-visible {
  color: var(--burgundy);
  border-color: var(--burgundy);
}

/* ==================================================================
   SECTION TITLES — shared by every section on the page (Education
   included). Uppercase, wide tracking, thin rule underneath to keep
   the page feeling like a set document rather than loose blocks.
================================================================== */
.cv__section-title {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

/* ==================================================================
   TOP ROW — Education (3/5) + Download-CV frame (2/5)
================================================================== */
.cv__top {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  margin-bottom: clamp(3rem, 7vh, 5rem);
}

/* ---------- Education entry tweak ---------- */
.cv__detail-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  margin-bottom: 0.4rem;
}

/* ==================================================================
   DOWNLOAD CV — the ornate frame, layered three times for the emboss
   effect (base ink line-art + a highlight rim + a shadow rim), with
   "Download CV" set centred inside it. [data-emboss] is picked up by
   router.js's IntersectionObserver, which toggles .is-embossed on
   scroll-into-view; :hover / :focus-visible force the same state so
   the relief is also felt as an interaction, not just a reveal.
================================================================== */
.cv__download { display: flex; align-items: center; justify-content: center; }

.cv__download-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 500 / 284;
  contain: layout;      /* belt-and-braces: keeps the 3 layers contained to this box even if position:relative above ever gets lost in editing */
  overflow: hidden;      /* if sizing ever goes wrong anyway, clip instead of spilling across the page */
}

.cv__frame-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cv__frame-layer--base {
  filter: url(#tintInk);
  opacity: 0.82;
  transition: opacity var(--dur-slow) var(--ease-editorial);
}
.cv__frame-layer--highlight {
  filter: url(#embossHighlight);
  mix-blend-mode: screen;
  opacity: var(--corner-rest);
  transition: opacity var(--dur-slow) var(--ease-editorial);
}
.cv__frame-layer--shadow {
  filter: url(#embossShadow);
  mix-blend-mode: multiply;
  opacity: var(--corner-rest);
  transition: opacity var(--dur-slow) var(--ease-editorial);
}
.cv__download-frame.is-embossed .cv__frame-layer--highlight,
.cv__download-frame.is-embossed .cv__frame-layer--shadow,
.cv__download-frame:hover .cv__frame-layer--highlight,
.cv__download-frame:hover .cv__frame-layer--shadow,
.cv__download-frame:focus-visible .cv__frame-layer--highlight,
.cv__download-frame:focus-visible .cv__frame-layer--shadow {
  opacity: var(--corner-active);
}
.cv__download-frame:hover .cv__frame-layer--base,
.cv__download-frame:focus-visible .cv__frame-layer--base {
  opacity: 1;
}

.cv__download-label {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}
.cv__download-text {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink);
  transition: color var(--dur-med) var(--ease-editorial);
}
.cv__download-frame:hover .cv__download-text,
.cv__download-frame:focus-visible .cv__download-text {
  color: var(--burgundy-deep);
}

/* ==================================================================
   SECTIONS — Skills / Experience / Leadership Experience /
   Extracurriculars. Full container width, consistent rhythm.
================================================================== */
.cv__section { margin-bottom: clamp(3rem, 7vh, 5rem); }
.cv__section--last { margin-bottom: clamp(2rem, 5vh, 3rem); }

/* ---------- Entries (Education / Experience / Leadership /
   Extracurriculars all reuse this) ---------- */
.cv__entry { margin-bottom: 2rem; }
.cv__entry:last-child { margin-bottom: 0; }

.cv__entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.cv__entry-title {
  font-size: 1.15rem;
  font-weight: 600;
}
.cv__entry-date {
  font-size: 0.88rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.cv__entry-org {
  margin: 0.2rem 0 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
}
.cv__work-title { color: var(--burgundy); }

.cv__bullets { margin-top: 0.5rem; }
.cv__bullets li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.5rem;
  line-height: 1.55;
}
.cv__bullets li:last-child { margin-bottom: 0; }
.cv__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--burgundy);
}

/* ---------- Skills groups + tag lists (also used by Clubs/Societies
   in Extracurriculars) ---------- */
.cv__skills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
}
.cv__skills-label,
.cv__entry--tags .cv__entry-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--burgundy);
  margin-bottom: 0.9rem;
}
.cv__taglist { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cv__taglist li {
  font-size: 0.9rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}
.cv__entry--tags { margin-bottom: 1.5rem; }

/* ==================================================================
   MOBILE — top row collapses to one column; Download CV comes first
   (centred), Education follows, then the rest of the page in the
   same order as desktop.
================================================================== */
@media (max-width: 780px) {
  .cv__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
  .cv__contact { align-items: flex-start; text-align: left; }

  .cv__top {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .cv__download { order: -1; }
  .cv__download-frame { max-width: 320px; margin: 0 auto; }

  .cv__skills { grid-template-columns: 1fr; gap: 1.75rem; }

  .cv__entry-head { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
}