/* ---------------------------------------------------------------------------
   Design tokens — editorial refined-paper look (warm serif, centered masthead)
--------------------------------------------------------------------------- */
:root {
  /* Ink */
  --ink:        #211d18;   /* body text                      */
  --ink-soft:   #5f574c;   /* contact / secondary text       */
  --lead:       #37312a;   /* summary / lead paragraph        */
  --date:       #9a9080;   /* entry dates (warm gray)         */

  /* Accents */
  --accent-red:  #c0655b;  /* "Curriculum Vitae" kicker       */
  --accent-blue: #4a7a8a;  /* section titles + links + discs  */
  --org:         #7a8a86;  /* institution / company names     */

  /* Surface */
  --bg:    #fdfaf3;        /* warm paper                      */
  --rule:  #e7dfce;        /* hairline rules                  */

  --max-width: 44rem;
  --space:     1.5rem;

  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype",
                "Book Antiqua", Palatino, "Hoefler Text", Georgia,
                "Times New Roman", serif;
}

/* ---------------------------------------------------------------------------
   Newsreader — self-hosted variable font (weights 400–700, optical sizing)
--------------------------------------------------------------------------- */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
   Dark mode — warm dark paper (screen only; print always uses the light palette)
--------------------------------------------------------------------------- */
@media screen and (prefers-color-scheme: dark) {
  :root {
    --ink:        #e9e3d6;   /* warm off-white body text        */
    --ink-soft:   #b3ab9b;
    --lead:       #d8d1c3;
    --date:       #8f8674;

    --accent-red:  #d98b80;  /* lifted for dark paper           */
    --accent-blue: #83b4c3;  /* lifted for dark paper           */
    --org:         #93aaa4;

    --bg:    #1b1917;        /* warm near-black paper           */
    --rule:  #383229;
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-serif);
  font-optical-sizing: auto;
  font-size: 17.5px;
  line-height: 1.55;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-blue) 35%, transparent);
}
a:hover { border-bottom-color: var(--accent-blue); }

/* ---------------------------------------------------------------------------
   Language switching — show only the active language
--------------------------------------------------------------------------- */
html[data-lang="en"] [lang="de"] { display: none; }
html[data-lang="de"] [lang="en"] { display: none; }

.lang-switch {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.95rem;
}
.lang-switch button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--ink-soft);
  cursor: pointer;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] {
  color: var(--accent-red);
  font-weight: 700;
}
.lang-switch__sep { color: var(--rule); }

/* ---------------------------------------------------------------------------
   Layout
--------------------------------------------------------------------------- */
.cv {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 4.5rem var(--space) 5.5rem;
}

/* ---------------------------------------------------------------------------
   Landing page — name and links, set in the top-left corner
--------------------------------------------------------------------------- */
.landing { padding: clamp(1.5rem, 5vw, 4rem); }
.landing__name {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.landing__links {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------
   Header — centered masthead
--------------------------------------------------------------------------- */
.header {
  text-align: center;
  padding-bottom: 1.75rem;
  margin-bottom: 0.5rem;
}
.title {
  margin: 0;
  font-size: 3rem;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.title__kicker {
  display: block;
  margin-bottom: 0.9rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--accent-red);
}
.contact {
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.3rem 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.contact li { margin: 0; }

/* ---------------------------------------------------------------------------
   Summary / lead
--------------------------------------------------------------------------- */
.summary {
  margin: 1.75rem 0 0;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--lead);
}

/* ---------------------------------------------------------------------------
   Sections — small-caps blue titles trailing into a hairline rule
--------------------------------------------------------------------------- */
.section { margin-top: 2.6rem; }

.section__title {
  margin: 0 0 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-blue);
}
.section__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* ---------------------------------------------------------------------------
   Entries
--------------------------------------------------------------------------- */
.entry { margin-bottom: 1.7rem; }
.entry:last-child { margin-bottom: 0; }

.entry__date {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--date);
}

.entry__title {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.2rem;
  font-weight: 400;
}
.entry__title strong { font-weight: 700; }
.entry__org { font-size: 0.98rem; color: var(--org); }

/* ---------------------------------------------------------------------------
   Bulleted lists (skills, experience points, certifications)
--------------------------------------------------------------------------- */
.points {
  margin: 0.4rem 0 0;
  padding-left: 1.3rem;
}
.points li { margin: 0.3rem 0; }
.points li::marker { color: var(--accent-blue); }
.points strong { font-weight: 700; }

/* ---------------------------------------------------------------------------
   Small screens
--------------------------------------------------------------------------- */
@media (max-width: 30rem) {
  .cv { padding: 3rem 1.25rem 4rem; }
  .title { font-size: 2.2rem; }
  .lang-switch { top: 0.6rem; right: 0.6rem; }
}

/* ---------------------------------------------------------------------------
   Print — clean A4 output, "Save as PDF" ready
--------------------------------------------------------------------------- */
@media print {
  :root { --bg: #fff; }
  body { font-size: 10pt; line-height: 1.4; }
  .lang-switch { display: none; }
  .cv { padding: 0; max-width: none; }

  /* Tighter vertical rhythm on paper */
  .header { padding-bottom: 0.9rem; margin-bottom: 0; }
  .title { font-size: 2.1rem; }
  .title__kicker { margin-bottom: 0.5rem; }
  .contact { margin-top: 0.6rem; }
  .summary { margin-top: 1rem; line-height: 1.5; }
  .section { margin-top: 1.1rem; }
  .section__title { margin-bottom: 0.7rem; }
  .entry { margin-bottom: 1rem; }
  .points li { margin: 0.15rem 0; }

  /* Let long sections flow across pages, but keep headings from being
     stranded at a page edge and each entry on a single page. */
  .section__title, .entry__date, .entry__title { break-after: avoid; }
  .points li, .entry { break-inside: avoid; }

  @page { margin: 1.2cm 1.5cm; }
}
