/* ==========================================================================
   NEMEVORA - CV service page
   Extends css/styles.css. Same tokens, same restraint; this file only adds the
   pieces the CV page needs. The sample previews are sanitized, flattened
   images built by tools/build_cv_portfolio.py.
   ========================================================================== */

/* --- Intro ----------------------------------------------------------------- */

.cv-intro { padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2rem, 4vw, 3rem); }

.cv-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-block: 1.1rem 1.3rem;
}
.cv-head h1 { font-size: clamp(2.4rem, 1.6rem + 3.4vw, 4rem); }

/* --- The three approaches, before the samples themselves ------------------- */

.cv-styles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cv-style {
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--glass);
  box-shadow: var(--shadow-sm);
}
.cv-style h3 { font-size: 1.5rem; margin-bottom: 0.45rem; }
.cv-style p { color: var(--text-soft); font-size: 0.98rem; line-height: 1.75; }

.cv-style-for {
  display: block;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line-soft);
  font-size: 0.9rem;
  color: var(--text-faint);
}

/* --- ATS, explained without promises ---------------------------------------- */

.cv-ats-note {
  max-width: 44rem;
  margin-top: 1.75rem;
  padding: 0.15rem 1rem;
  border-inline-start: 2px solid var(--gold);
  color: var(--text-soft);
  font-size: 0.99rem;
}

/* --- The samples ------------------------------------------------------------
   Three previews, each keeping its own design language. The page frames them;
   it does not restyle them. */

.cv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: inherit;
  cursor: zoom-in;
}

/* The preview sits on a sheet, the same paper language as the specimens */
.cv-sheet {
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-cream);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--slow) var(--ease-out), box-shadow var(--slow) var(--ease-out);
}

.cv-sheet img {
  display: block;
  width: 100%;
  height: auto;
}

.cv-open:hover .cv-sheet { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.cv-open:focus-visible { outline: none; }
.cv-open:focus-visible .cv-sheet {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  box-shadow: var(--shadow-md);
}

.cv-meta { display: block; padding-top: 1.1rem; }

.cv-kind {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.cv-note {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.cv-cue {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
}
.cv-cue::before {
  content: "";
  width: 1.1rem;
  height: 1px;
  background: var(--gold);
  transition: width var(--medium) var(--ease);
}
.cv-open:hover .cv-cue::before { width: 1.9rem; }

/* Quiet reassurance, not a disclaimer */
.cv-privacy {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: clamp(2.25rem, 4vw, 3.25rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* The larger view. A native dialog, so Esc and focus already behave. */
.cv-viewer {
  width: fit-content;
  max-width: 94vw;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-cream);
  color: var(--text);
  box-shadow: var(--shadow-lg);
}

.cv-viewer::backdrop { background: rgba(6, 36, 69, 0.66); }

.cv-viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem clamp(0.9rem, 3vw, 1.5rem);
  border-bottom: 1px solid var(--line-soft);
}

.cv-viewer-title {
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.cv-viewer-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.cv-viewer-close:hover { background: var(--navy); color: var(--on-navy); }

.cv-viewer-image {
  display: block;
  width: auto;
  height: auto;
  max-width: min(94vw, 44rem);
  max-height: calc(94vh - 4.2rem);
  margin-inline: auto;
}

/* --- Responsive ------------------------------------------------------------- */

@media (max-width: 1080px) {
  /* Two previews per row keeps each page readable */
  .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-styles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  /* One preview per row, held to a comfortable reading width */
  .cv-grid { grid-template-columns: minmax(0, 1fr); }
  .cv-card { width: 100%; max-width: 24rem; margin-inline: auto; }
  .cv-privacy { align-items: flex-start; }
  .cv-privacy .mark { margin-top: 0.75rem; }
  .cv-styles { grid-template-columns: minmax(0, 1fr); }
}
