/* =====================================================================
   CV stylesheet — mirrors the navy/gray theme of generate_cv.py
   NAVY #1F3864 · GRAY #595959 · Calibri
   ===================================================================== */

:root {
  --navy: #1F3864;
  --gray: #595959;
  --ink: #222;
  --bg: #e9edf2;
  --paper: #ffffff;
  --page-pad: 0.6in;
  --font: Calibri, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 11pt;
  line-height: 1.4;
}

/* ---- Controls bar ---- */
.controls {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--navy);
  flex-wrap: wrap;
}

.lang-toggle {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  overflow: hidden;
}

.lang-toggle button {
  background: transparent;
  color: #fff;
  border: none;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.lang-toggle button.active {
  background: #fff;
  color: var(--navy);
}

.download-btn {
  background: #fff;
  color: var(--navy);
  border: none;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.download-btn:hover { background: #f0f0f0; }

/* ---- The "paper" page ---- */
.page {
  background: var(--paper);
  width: 8.27in;            /* A4 width */
  max-width: 100%;
  margin: 1.5rem auto;
  padding: var(--page-pad);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.15);
}

/* ---- Header ---- */
.cv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.name {
  color: var(--navy);
  font-size: 20pt;
  font-weight: 700;
  margin: 0 0 2px;
}

.role {
  color: var(--gray);
  font-size: 12pt;
  letter-spacing: 0.5px;
  margin: 0 0 6px;
}

.location,
.contact {
  color: var(--gray);
  font-size: 10pt;
  margin: 1px 0;
}

.contact { display: flex; flex-direction: column; }
.contact a { color: var(--navy); text-decoration: underline; }

.cv-header-photo img {
  width: 2.35cm;
  height: auto;
  display: block;
  border-radius: 3px;
}

/* ---- Section titles ---- */
.section-title {
  color: var(--navy);
  font-size: 12pt;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 16px 0 6px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--navy);
}

section { break-inside: auto; }

/* ---- Generic entries (education / experience) ---- */
.entry { margin-bottom: 8px; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.entry-title { font-size: 11pt; }
.entry-title strong { font-weight: 700; }

.entry-dates {
  color: var(--gray);
  font-style: italic;
  font-size: 10pt;
  white-space: nowrap;
}

.entry-subtitle {
  color: var(--gray);
  font-style: italic;
  font-size: 10.5pt;
  margin: 2px 0 0;
}

/* ---- Profile ---- */
.profile { margin: 0; }

/* ---- Bullets ---- */
.bullets {
  margin: 4px 0 0;
  padding-left: 1.1rem;
}

.bullets li {
  margin-bottom: 4px;
  break-inside: avoid;
}

/* ---- Skills ---- */
.skill-group { margin: 4px 0; break-inside: avoid; }

/* ---- Languages ---- */
.languages { margin: 4px 0; }
.lang-item { margin-right: 1.5rem; }

/* ---- Projects ---- */
.project { margin-bottom: 10px; break-inside: avoid; }

.project-name {
  color: var(--navy);
  font-weight: 700;
  font-size: 11pt;
  margin: 0 0 2px;
}

.project-status {
  color: var(--gray);
  font-style: italic;
  font-weight: 400;
  font-size: 10.5pt;
}

.project-stack {
  color: var(--gray);
  font-style: italic;
  font-size: 10pt;
  margin: 0 0 2px;
}

.project-stack strong { color: var(--ink); font-style: normal; }

.project-desc { margin: 0; }

/* ---- Footer ---- */
.footer {
  text-align: center;
  color: var(--gray);
  font-size: 9pt;
  padding: 1rem;
}

.footer a { color: var(--navy); }

/* =====================================================================
   PRINT — produce a clean PDF (Save as PDF) matching the office CV
   ===================================================================== */
@page {
  size: A4;
  margin: 0.6in;
}

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

  .no-print { display: none !important; }

  .page {
    width: auto;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  a { color: var(--navy); text-decoration: none; }

  .section-title { margin-top: 12px; }
}
