/* ==========================================================================
   Resume — design tokens
   ========================================================================== */
:root {
  /* Palette — the five colours a theme preset sets (see "theme" in resume.json;
     js/app.js writes them onto <html> as inline custom properties). */
  --navy:        #14213D;   /* sidebar, top of the gradient */
  --navy-deep:   #0E172B;   /* sidebar, bottom of the gradient */
  --accent:      #FCA311;
  --page-bg:     #E9ECF1;
  --ink:         #1A1A1A;

  /* Derived — everything below follows from the palette */
  --paper:       #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--accent) 16%, transparent);
  --ink-2:       color-mix(in srgb, var(--ink) 86%, var(--paper));
  --muted:       color-mix(in srgb, var(--ink) 62%, var(--paper));
  --rule:        color-mix(in srgb, var(--navy) 10%, var(--paper));
  --navy-tint:   color-mix(in srgb, var(--navy) 5%, var(--paper));   /* chips */
  --navy-tint-2: color-mix(in srgb, var(--navy) 2%, var(--paper));   /* project cards */
  --side-text:   #F5F6F8;   /* presets assume a dark sidebar */
  --side-muted:  color-mix(in srgb, var(--side-text) 68%, transparent);
  --side-rule:   color-mix(in srgb, var(--side-text) 12%, transparent);

  --font-head:   "Sora", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:   "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --side-w:      300px;
  --radius:      18px;
  --shadow:      0 24px 60px -24px color-mix(in srgb, var(--navy) 35%, transparent), 0 2px 6px color-mix(in srgb, var(--navy) 6%, transparent);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

ul { margin: 0; padding: 0; list-style: none; }
p  { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); line-height: 1.2; }

/* Print-only page wrapper (see index.html) — inert on screen */
.pg, .pg tbody, .pg tr, .pg td { display: block; padding: 0; border: 0; }
.pg thead, .pg tfoot { display: none; }

/* ==========================================================================
   Top bar (language switch + PDF)
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--page-bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--navy) 8%, transparent);
}

.topbar__inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar__actions { display: flex; gap: 8px; }

.lang {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--navy) 8%, transparent);
}

.lang__btn {
  appearance: none;
  border: 0;
  background: transparent;
  font: 600 12.5px/1 var(--font-head);
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang__btn:hover { color: var(--navy); }
.lang__btn.is-active {
  background: var(--navy);
  color: var(--side-text);
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 600 13.5px/1 var(--font-head);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--accent);
  color: var(--navy-deep);
  box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 70%, transparent);
}
.btn--primary:hover { box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--accent) 90%, transparent); }

.btn--ghost {
  background: transparent;
  color: var(--navy);
  border-color: color-mix(in srgb, var(--navy) 22%, transparent);
}
.btn--ghost:hover { background: color-mix(in srgb, var(--navy) 6%, transparent); }

/* ==========================================================================
   Sheet: two-column card
   ========================================================================== */
.sheet {
  max-width: 1040px;
  margin: 32px auto 64px;
  display: grid;
  grid-template-columns: var(--side-w) minmax(0, 1fr);
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* Keep a 16px gutter on narrow screens */
@media (max-width: 1080px) {
  .sheet { margin-left: 16px; margin-right: 16px; }
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.side {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--side-text);
  padding: 44px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.identity { display: flex; flex-direction: column; gap: 18px; }

.avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 4px solid var(--accent);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,.6);
  background: var(--navy-deep);
}
.avatar--photo { overflow: hidden; position: relative; }
/* The frame is exactly the circle; it carries the pan/zoom transform. The
   image inside is sized by its short side so any aspect ratio can be panned
   over its whole extent (object-fit would clip it to the frame first). */
.avatar__frame {
  position: absolute;
  inset: 0;
  transform-origin: center;
  will-change: transform;
}
.avatar__frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  max-width: none;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.avatar__frame img.is-landscape { width: auto; height: 100%; }
.avatar__frame img.is-portrait  { width: 100%; height: auto; }
.avatar--photo.is-adjustable { cursor: grab; touch-action: none; user-select: none; }
.avatar--photo.is-dragging { cursor: grabbing; }

.avatar--initials {
  display: grid;
  place-items: center;
  font: 700 40px/1 var(--font-head);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.identity__name {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--side-text);
}
.identity__title {
  margin-top: 6px;
  font: 500 14px/1.4 var(--font-head);
  color: var(--accent);
  letter-spacing: 0.02em;
}

.side__section { display: flex; flex-direction: column; gap: 12px; }

.side__heading {
  font: 600 11.5px/1 var(--font-head);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--side-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--side-rule);
}

.contact { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--side-text);
  overflow-wrap: anywhere;
}
.contact svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin-top: 3px;
  color: var(--accent);
}

.skillgroup + .skillgroup { margin-top: 12px; }
.skillgroup__name {
  font: 500 12px/1.3 var(--font-body);
  color: var(--side-muted);
  margin-bottom: 7px;
}
/* Label and chips on one line; a shared label width lines the chips up */
.skillgroup--inline { display: flex; align-items: center; gap: 8px; }
.skillgroup--inline .skillgroup__name { flex: 0 0 6em; margin-bottom: 0; }
.skillgroup:not(.skillgroup--inline) + .skillgroup--inline {
  padding-top: 12px;
  border-top: 1px solid var(--side-rule);
}
.skillgroup--accent .tag { border-color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--side-text) 9%, transparent);
  border: 1px solid color-mix(in srgb, var(--side-text) 8%, transparent);
  font: 500 12.5px/1 var(--font-body);
  color: var(--side-text);
}

.langs { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.langs li { display: flex; justify-content: space-between; gap: 12px; }
.langs__level { color: var(--side-muted); }

.edus { display: flex; flex-direction: column; gap: 12px; }
.edu { display: flex; flex-direction: column; gap: 2px; }
.edu__degree { font-size: 13.5px; font-weight: 600; color: var(--side-text); line-height: 1.35; }
.edu__school { font-size: 12.5px; color: var(--side-muted); line-height: 1.4; }
.edu__date { font: 500 12px/1.6 var(--font-head); color: var(--accent); }
.edu__note { font-size: 12.5px; color: var(--side-text); }

.interests { display: flex; flex-wrap: wrap; gap: 6px; }

/* --------------------------------------------------------------------------
   Main column
   -------------------------------------------------------------------------- */
.main {
  padding: 48px 52px 56px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.section { display: flex; flex-direction: column; gap: 20px; }

.section__heading {
  position: relative;
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
  padding-bottom: 12px;
}
.section__heading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--rule);
}
.section__heading::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 40px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  z-index: 1;
}

.summary {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 62ch;
}
.summary + .summary { margin-top: 0.6em; }

/* Timeline entries */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  --dot: 12px;
  --role-line: calc(16px * 1.2); /* .entry__role font-size × the h3 line-height */
}
.timeline::before {
  content: "";
  position: absolute;
  left: calc(var(--dot) / 2 - 1px); /* centres the 2px line under the dots */
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--rule);
}

.entry { position: relative; padding-left: 28px; }
.entry::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc((var(--role-line) - var(--dot)) / 2); /* centred on the role's first line */
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--accent-soft);
}

.entry__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
}
.entry__role {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.entry__org {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.entry__org a { color: var(--navy); font-weight: 500; }
.entry__org .sep { margin: 0 6px; opacity: .5; }
.entry__date {
  font: 500 12.5px/1.6 var(--font-head);
  color: var(--navy);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.bullets { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.bullets li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-2);
  font-size: 14.5px;
}
.bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.stack { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stack__label {
  font: 600 10.5px/1 var(--font-head);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 4px;
}
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font: 500 12px/1.4 var(--font-body);
  color: var(--navy);
  background: var(--navy-tint);
  border: 1px solid var(--rule);
}

/* Projects: small tiles; the GitHub link fills the grid's last cell */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.project {
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 10px;
  background: var(--navy-tint-2);
}
.project__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project__name { font-size: 15px; font-weight: 600; color: var(--navy); }
.project__name a { display: inline-flex; align-items: center; gap: 4px; }
.project__name svg { width: 13px; height: 13px; color: var(--muted); }
.project .stack { margin-top: 0; gap: 4px; }
.project__desc { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.project--accent { border-color: var(--accent); }
.project--more {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: transparent;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}

/* Education & certificates: compact rows */
.rows { display: flex; flex-direction: column; gap: 14px; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 16px;
  align-items: baseline;
}
.row__title { font-size: 15px; font-weight: 600; }
.row__sub   { font-size: 13.5px; color: var(--muted); grid-column: 1; }
.row__note  { font-size: 13px; color: var(--ink-2); grid-column: 1; }
.row__date  { font: 500 12.5px/1.6 var(--font-head); color: var(--muted); white-space: nowrap; }

.noscript {
  max-width: 1040px;
  margin: 24px auto;
  padding: 0 16px;
  text-align: center;
}

/* ==========================================================================
   Tools dock (dev aids; shown only with ?themes / ?photos in the URL)
   ========================================================================== */
.tools {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  width: min(360px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px 14px 12px;
  border-radius: 14px;
  background: var(--navy);
  color: var(--side-text);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,.6);
  font: 500 12px/1.4 var(--font-body);
}
.tool__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 600 11px/1 var(--font-head);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--side-muted);
  margin-bottom: 10px;
}
.tool__hint { margin-top: 8px; font-size: 11px; color: var(--side-muted); }

.tool__btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--side-text) 25%, transparent);
  background: transparent;
  color: var(--side-text);
  font: 600 11px/1 var(--font-head);
  letter-spacing: 0;
  text-transform: none;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.tool__btn:hover { background: color-mix(in srgb, var(--side-text) 10%, transparent); }
.tool__btn--accent { border-color: var(--accent); color: var(--accent); }
.tool__btn:disabled { opacity: .4; cursor: default; }
.tool__row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* Preset list */
.presets { display: flex; flex-direction: column; gap: 4px; }
.preset {
  appearance: none;
  border: 2px solid transparent;
  background: transparent;
  color: var(--side-text);
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.preset:hover { background: color-mix(in srgb, var(--side-text) 8%, transparent); }
.preset.is-active { border-color: var(--accent); }
.preset__swatch {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 12px);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35);
}
.preset__swatch i { display: block; height: 22px; }
.preset__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset__badge {
  font: 600 9.5px/1 var(--font-head);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Preset editor */
.editor { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.editor__name {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--side-text) 25%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--side-text) 8%, transparent);
  color: var(--side-text);
  font: 600 13px/1.2 var(--font-body);
  padding: 7px 9px;
}
.editor__colors { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.editor__color {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.editor__color input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}
.editor__color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.editor__color input[type="color"]::-webkit-color-swatch { border: 1px solid rgba(0,0,0,.35); border-radius: 8px; }
.editor__color input[type="color"]::-moz-color-swatch { border: 1px solid rgba(0,0,0,.35); border-radius: 8px; }
.editor__color span { display: flex; flex-direction: column; line-height: 1.25; }
.editor__color small { color: var(--side-muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }

/* Photo picker */
.picker__grid { display: flex; flex-wrap: wrap; gap: 8px; }
.picker__thumb {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--side-muted);
  font: 500 10.5px/1 var(--font-body);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.picker__thumb img, .picker__none {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  transition: border-color .12s, transform .12s;
}
.picker__none {
  display: grid;
  place-items: center;
  background: var(--navy-deep);
  color: var(--accent);
  font: 700 18px/1 var(--font-head);
}
.picker__add {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px dashed color-mix(in srgb, var(--side-text) 40%, transparent);
  color: var(--side-muted);
  font: 500 28px/1 var(--font-head);
  transition: border-color .12s, color .12s, transform .12s;
}
.picker__thumb:hover .picker__add { border-color: var(--accent); color: var(--accent); }
.picker__thumb:hover img, .picker__thumb:hover .picker__none, .picker__thumb:hover .picker__add { transform: translateY(-2px); }
.picker__thumb.is-active img, .picker__thumb.is-active .picker__none { border-color: var(--accent); }
.picker__thumb.is-active { color: var(--side-text); }
.picker__zoom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font: 500 12px/1 var(--font-body);
}
.picker__zoom input[type="range"] { flex: 1; accent-color: var(--accent); min-width: 0; }
.picker__zoom output { min-width: 3.4em; text-align: right; font-variant-numeric: tabular-nums; color: var(--side-text); }

.tool__code {
  display: block;
  margin: 10px 0 0;
  max-height: 180px;
  overflow: auto;
  white-space: pre;
  padding: 6px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--side-text) 8%, transparent);
  font-size: 11px;
  color: var(--side-text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .sheet {
    grid-template-columns: 1fr;
    margin-top: 16px;
    border-radius: 14px;
  }
  .side { padding: 32px 24px; gap: 26px; }
  .identity { flex-direction: row; align-items: center; gap: 18px; }
  .avatar { width: 88px; height: 88px; border-width: 3px; }
  .avatar--initials { font-size: 28px; }
  .identity__name { font-size: 23px; }
  .main { padding: 32px 24px 40px; gap: 32px; }
  .topbar__inner { padding: 8px 12px; }
  .btn { padding: 9px 13px; }
  .btn--ghost span { display: none; }
}

@media (max-width: 400px) {
  .btn--primary span { display: none; }
}

/* ==========================================================================
   Print — A4, sidebar band continues on every page
   --------------------------------------------------------------------------
   Page margins are 0 so the navy band (painted as the root background, which
   Chromium repeats on every page) can bleed to the edges. The per-page
   top/bottom margins come from the repeating <thead>/<tfoot> spacers instead.
   ========================================================================== */
@page { size: A4; margin: 0; }

@media print {
  :root {
    --side-w: 66mm;
    --page-margin: 11mm;
    --page-bg: var(--paper);
  }

  html {
    background: linear-gradient(90deg, var(--navy) 0 var(--side-w), var(--paper) var(--side-w));
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body { background: transparent; font-size: 10pt; line-height: 1.5; }

  .topbar, .noscript, .tools { display: none !important; }

  .pg { display: table; border-collapse: collapse; width: 210mm; }
  .pg thead { display: table-header-group; }
  .pg tfoot { display: table-footer-group; }
  .pg tbody { display: table-row-group; }
  .pg tr    { display: table-row; }
  .pg td    { display: table-cell; padding: 0; vertical-align: top; }
  .pg__spacer { height: var(--page-margin); }

  .sheet {
    max-width: none;
    width: 210mm;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }

  .side {
    background: transparent;        /* the root background provides the colour */
    padding: 2mm 6mm 0 6.5mm;
    gap: 4.8mm;
  }
  .main {
    background: transparent;
    padding: 1mm 9mm 0 9mm;
    gap: 7mm;
  }

  .avatar { width: 30mm; height: 30mm; border-width: 3px; box-shadow: none; }
  .avatar--initials { font-size: 24pt; }
  .identity { gap: 4mm; }
  .identity__name { font-size: 20pt; }
  .identity__title { font-size: 10.5pt; }
  .side__section { gap: 2.5mm; }
  .side__heading { font-size: 8pt; padding-bottom: 2mm; }
  .contact { font-size: 9pt; gap: 1.5mm; }
  .contact svg { width: 11px; height: 11px; margin-top: 2px; }
  .skillgroup + .skillgroup { margin-top: 2.2mm; }
  .skillgroup__name { font-size: 8.5pt; margin-bottom: 1.2mm; }
  .skillgroup:not(.skillgroup--inline) + .skillgroup--inline { padding-top: 2.2mm; }
  .tags { gap: 1.2mm; }
  .tag { font-size: 8.5pt; padding: 1.2mm 2.2mm; background: color-mix(in srgb, var(--side-text) 12%, transparent); }
  .langs { font-size: 9.5pt; gap: 1.5mm; }
  .edus { gap: 2.5mm; }
  .edu__degree { font-size: 9.5pt; }
  .edu__school { font-size: 8.6pt; }
  .edu__date { font-size: 8pt; }
  .edu__note { font-size: 8.6pt; }

  /* Main column: compact enough for a typical CV to fit one A4 page */
  .main { gap: 5.5mm; }
  .section { gap: 3.2mm; }
  .section__heading { font-size: 11.5pt; padding-bottom: 1.6mm; break-after: avoid; }
  .summary { font-size: 9.4pt; line-height: 1.5; max-width: none; }
  .timeline { gap: 4.5mm; --dot: 3mm; --role-line: calc(10.4pt * 1.2); }
  .entry { padding-left: 6.5mm; break-inside: avoid; }
  .entry::before { box-shadow: 0 0 0 2px var(--paper); }
  .entry__role { font-size: 10.4pt; }
  .entry__org { font-size: 9pt; margin-top: 0; }
  .entry__date { font-size: 8pt; padding: 0.4mm 2.2mm; }
  .bullets { margin-top: 1.4mm; gap: 0.8mm; }
  .bullets li { font-size: 9pt; line-height: 1.38; }
  .bullets li::before { top: 2mm; }
  .stack { margin-top: 1.2mm; gap: 1.2mm; }
  /* Stack + Skills share one line inside experience entries */
  .entry .stack { display: inline-flex; vertical-align: top; margin-right: 4mm; }
  .chip { font-size: 8pt; padding: 0.4mm 1.8mm; }
  .stack__label { font-size: 7pt; }

  /* Projects: one compact row each instead of the 2-column card grid */
  .projects { grid-template-columns: 1fr 1fr; gap: 2mm; }
  .project { padding: 1.6mm 2.6mm; border-radius: 2mm; break-inside: avoid; }
  .project__name { font-size: 9.2pt; }
  .project__name svg { width: 10px; height: 10px; }
  .project__desc { margin-top: 0.6mm; font-size: 8.6pt; }
  .project--more { font-size: 9pt; }

  .rows { gap: 2.5mm; }
  .row { break-inside: avoid; }
  .row__title { font-size: 10pt; }
  .row__sub, .row__note { font-size: 8.8pt; }
  .row__date { font-size: 8pt; }

  a[href]::after { content: none; }
}
