/* =============================================================================
   E1 — CV page styles (editorial, monochrome). Loaded AFTER global.css.
   Scope: /cv/ only. May override global tokens for this page.
   ============================================================================= */

/* -----------------------------------------------------------------------------
   PAGE-LOCAL TOKENS — monochrome editorial palette (overrides global on /cv/)
   ----------------------------------------------------------------------------- */

.cv {
  --cv-ink: #111111;
  --cv-paper: #ffffff;
  --cv-muted: #555555;       /* on #fff → ~7.5:1 contrast */
  --cv-hairline: #d8d8d8;
  --cv-hairline-strong: #111111;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono-label: "IBM Plex Mono", var(--font-mono);

  color: var(--cv-ink);
  background-color: var(--cv-paper);
}

/* On the CV page, links are part of the monochrome system (no blue accent). */
.cv a {
  color: var(--cv-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.cv a:hover {
  color: var(--cv-muted);
}

.cv a:focus-visible {
  outline: 2px solid var(--cv-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Reusable mono-label treatment. */
.cv-label {
  font-family: var(--font-mono-label);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-muted);
}

/* -----------------------------------------------------------------------------
   HERO — full-bleed, monochrome, image-driven.
   `main` (global.css) caps width at --max-width-content with --space-8 padding;
   break the hero out of that box, then return the body to a readable column.
   ----------------------------------------------------------------------------- */

.cv-hero {
  position: relative;
  margin-inline: calc(50% - 50vw);     /* full-bleed escape from <main> */
  margin-top: calc(-1 * var(--space-8));
  width: 100vw;
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 2px solid var(--cv-hairline-strong);
  background-color: var(--cv-paper);
}

.cv-hero__media {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  border-right: 1px solid var(--cv-hairline);
}

.cv-hero__photo {
  width: 100%;
  height: 100%;
  min-height: 22rem;
  object-fit: cover;
  object-position: center 25%;
  filter: grayscale(100%) contrast(1.05);
}

.cv-hero__intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-12) clamp(var(--space-6), 6vw, var(--space-16));
}

.cv-hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.cv-hero__headline {
  font-family: var(--font-display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  line-height: 1.35;
  color: var(--cv-muted);
  max-width: 34ch;
}

.cv-hero__location {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: var(--font-size-base);
}

.cv-hero__contact {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
  list-style: none;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--cv-hairline);
}

.cv-hero__contact a {
  font-family: var(--font-mono-label);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

/* -----------------------------------------------------------------------------
   SECTION RHYTHM
   ----------------------------------------------------------------------------- */

.cv-section {
  padding-top: var(--space-12);
  margin-top: var(--space-12);
  border-top: 1px solid var(--cv-hairline);
}

.cv-section:first-of-type {
  border-top: none;
}

.cv-section__title {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}

.cv-section__num {
  font-family: var(--font-mono-label);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--cv-muted);
  letter-spacing: 0.05em;
}

.cv-summary {
  font-size: var(--font-size-lg);
  line-height: 1.7;
  max-width: 68ch;
  color: var(--cv-ink);
}

/* -----------------------------------------------------------------------------
   TAG LISTS — competencies, skills
   ----------------------------------------------------------------------------- */

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  list-style: none;
}

.cv-tag {
  border: 1px solid var(--cv-hairline-strong);
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
  line-height: 1.2;
}

.cv-tags--mono .cv-tag {
  font-family: var(--font-mono-label);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  border-color: var(--cv-hairline);
}

/* -----------------------------------------------------------------------------
   TIMELINE — experience & education
   ----------------------------------------------------------------------------- */

.cv-timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.cv-entry {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: var(--space-4) var(--space-8);
  align-items: start;
}

.cv-entry__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.cv-entry__role {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-xl);
  line-height: 1.2;
}

.cv-entry__org {
  font-size: var(--font-size-base);
  color: var(--cv-ink);
}

.cv-entry__loc {
  color: var(--cv-muted);
}

.cv-entry__period {
  margin-top: var(--space-1);
}

.cv-entry__highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 70ch;
}

.cv-entry__highlights li {
  position: relative;
  padding-left: var(--space-6);
  line-height: 1.6;
}

.cv-entry__highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: var(--space-3);
  height: 1px;
  background-color: var(--cv-hairline-strong);
}

.cv-entry__thesis {
  grid-column: 2;
  line-height: 1.6;
  color: var(--cv-ink);
  max-width: 70ch;
}

.cv-entry__thesis .cv-label {
  display: inline-block;
  margin-right: var(--space-2);
}

/* -----------------------------------------------------------------------------
   LANGUAGES
   ----------------------------------------------------------------------------- */

.cv-languages {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-width: 36rem;
}

.cv-language {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--cv-hairline);
}

.cv-language__name {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
}

/* -----------------------------------------------------------------------------
   SIMPLE LISTS — publications, awards
   ----------------------------------------------------------------------------- */

.cv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 72ch;
}

.cv-list li {
  position: relative;
  padding-left: var(--space-6);
  line-height: 1.6;
}

.cv-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: var(--space-3);
  height: 1px;
  background-color: var(--cv-hairline-strong);
}

/* -----------------------------------------------------------------------------
   PROJECTS
   ----------------------------------------------------------------------------- */

.cv-projects {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-6);
}

.cv-project {
  border: 1px solid var(--cv-hairline);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cv-project__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--font-size-lg);
  line-height: 1.25;
}

.cv-project__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  color: var(--cv-muted);
  font-size: var(--font-size-sm);
  margin-top: auto;
}

/* -----------------------------------------------------------------------------
   RESPONSIVE
   ----------------------------------------------------------------------------- */

@media (max-width: 800px) {
  .cv-hero {
    grid-template-columns: 1fr;
  }

  .cv-hero__media {
    border-right: none;
    border-bottom: 1px solid var(--cv-hairline);
  }

  .cv-hero__photo {
    min-height: 18rem;
    max-height: 60vh;
  }

  .cv-entry {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .cv-entry__thesis {
    grid-column: 1;
  }
}
