:root {
  --bg: #fdfcf9;
  --ink: #1a1c1e;
  --ink-2: #43484e;
  --muted: #6c727a;
  --accent: #1973CD;
  --rule: #e4e1d8;
  --rule-dark: #1a1c1e;

  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.58;
}

.page {
  max-width: 860px;
  margin: 0 auto;
  padding: 3.75rem 1.75rem 4.5rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(25, 115, 205, 0.35);
  transition: text-decoration-color 150ms ease, color 150ms ease;
}

a:hover {
  text-decoration-color: var(--accent);
}

/* ---------- Masthead ---------- */
.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1.5px solid var(--rule-dark);
}

.name {
  font-family: var(--serif);
  font-size: clamp(1.95rem, 3.6vw, 2.55rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0 0 0.35rem;
  color: var(--accent);
}

.subtitle {
  margin: 0;
  font-size: 0.96rem;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.65rem 1.25rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav .nav-pdf {
  color: var(--accent);
  font-weight: 600;
}

.nav-lang {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  margin-left: 0.25rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--muted);
}

.lang-current {
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Intro ---------- */
.intro {
  padding: 2rem 0 2.25rem;
  border-bottom: 1px solid var(--rule);
}

.intro p {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.16rem;
  line-height: 1.62;
  color: var(--ink);
  max-width: 68ch;
}

.intro .intro-links {
  margin-top: 1rem;
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  align-items: center;
}

/* ---------- Sections ---------- */
.cv-section {
  padding-top: 3rem;
  scroll-margin-top: 1.5rem;
}

.section-heading {
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent);
}

.cv-list {
  display: flex;
  flex-direction: column;
}

.cv-row {
  display: grid;
  grid-template-columns: 195px 1fr;
  gap: 2rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rule);
}

.cv-row:last-child {
  border-bottom: none;
}

.cv-meta {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.cv-date {
  color: var(--ink-2);
  font-weight: 500;
}

.cv-place {
  margin-top: 0.2rem;
}

.cv-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.cv-logos img {
  display: block;
  height: 34px;
  width: auto;
  max-width: 82px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.cv-content {
  min-width: 0;
}

.cv-org {
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 500;
  line-height: 1.28;
  margin: 0 0 0.2rem;
  color: var(--ink);
  overflow-wrap: break-word;
}

.cv-role {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--accent);
}

.cv-note {
  display: block;
  margin-top: 0.15rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-2);
  font-size: 0.93rem;
}

.cv-bullets {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--ink-2);
  font-size: 0.96rem;
}

.cv-bullets li + li {
  margin-top: 0.35rem;
}

/* ---------- Skills Table ---------- */
.skills-table {
  margin: 0;
}

.skills-row {
  display: grid;
  grid-template-columns: 195px 1fr;
  gap: 2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--rule);
}

.skills-row:last-child {
  border-bottom: none;
}

.skills-row dt {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.skills-row dd {
  margin: 0;
  min-width: 0;
  font-size: 0.96rem;
  color: var(--ink-2);
}

/* ---------- Footer ---------- */
.footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .masthead {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.95rem;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15.5px;
  }

  .page {
    padding: 2rem 1.15rem 3rem;
  }

  .nav {
    gap: 0.5rem 1rem;
  }

  .nav-lang {
    margin-left: 0;
    padding-left: 0.7rem;
  }

  .cv-section {
    padding-top: 2.35rem;
  }

  .cv-row,
  .skills-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .cv-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
  }

  .cv-place {
    margin-top: 0;
  }

  .cv-place br {
    display: none;
  }

  .cv-logos {
    flex-basis: 100%;
    margin-top: 0.3rem;
  }

  .cv-logos img {
    height: 30px;
  }
}

/* ---------- Print ---------- */
@media print {
  .nav,
  .intro-links,
  .footer {
    display: none;
  }

  body {
    background: #fff;
    font-size: 10.5pt;
  }

  .page {
    max-width: none;
    padding: 0;
  }

  .cv-row {
    break-inside: avoid;
  }
}
