/* ── FONTS (self-hosted, variable, subset latin/latin-ext) ─ */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-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: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/mono-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('fonts/mono-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;
}

/* ── DESIGN TOKENS ─────────────────────────────────── */
:root {
  --bg:       #0c0c0e;
  --surface:  #131316;
  --border:   rgba(255,255,255,0.07);
  --text:     #ededf0;
  --muted:    #5c5c6e;
  --accent:   #f97316;
  --green:    #22c55e;
  --tint-soft:    rgba(255,255,255,0.04);
  --tint-med:     rgba(255,255,255,0.06);
  --tint-strong:  rgba(255,255,255,0.10);
  --border-hover: rgba(255,255,255,0.14);
  --gap:      10px;
  --radius:   14px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:       #f7f7f5;
  --surface:  #ffffff;
  --border:   rgba(0,0,0,0.08);
  --text:     #18181b;
  --muted:    #71717a;
  --tint-soft:    rgba(0,0,0,0.04);
  --tint-med:     rgba(0,0,0,0.05);
  --tint-strong:  rgba(0,0,0,0.08);
  --border-hover: rgba(0,0,0,0.18);
  color-scheme: light;
}

html, body { transition: background-color 0.2s ease, color 0.2s ease; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding: 1.25rem;
}

/* ── TOPBAR (sub-pages) ────────────────────────────── */
.topbar {
  max-width: 760px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0.2rem;
}

.back-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }
.back-link::before { content: '←'; color: var(--muted); }

/* ── TOPBAR ACTIONS (lang + theme) ─────────────────── */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.theme-btn {
  background: var(--tint-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.32rem 0.55rem;
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1;
  font-family: 'JetBrains Mono', monospace;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.theme-btn:hover { color: var(--text); border-color: var(--border-hover); }
.theme-icon-moon { display: none; }
:root[data-theme="light"] .theme-icon-sun { display: none; }
:root[data-theme="light"] .theme-icon-moon { display: inline; }

/* ── LANG TOGGLE (shared) ──────────────────────────── */
.lang-toggle {
  display: flex;
  gap: 2px;
  background: var(--tint-soft);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 3px;
  width: fit-content;
}
.lang-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}
.lang-btn.active {
  background: var(--accent);
  color: #fff;
}

/* ── PAGE LAYOUT (sub-pages) ───────────────────────── */
.page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 0.2rem 2rem;
}

.page-header {
  margin-bottom: 1.5rem;
}
.page-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}
.page-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 0.7rem;
}
.page-lead {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 60ch;
}

/* ── CARD (sub-page section container) ─────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin-bottom: var(--gap);
}
.card-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  display: block;
}
.card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}
.card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}
.card p + p { margin-top: 0.7rem; }
.card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.card ul li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  padding-left: 1.1rem;
  position: relative;
}
.card ul li::before {
  content: '·';
  color: var(--accent);
  font-weight: 900;
  position: absolute;
  left: 0.3rem;
  font-size: 1.2rem;
  line-height: 1;
  top: 0.05rem;
}
.card strong { color: var(--text); font-weight: 600; }

/* footnote (citation, quote) */
.pull {
  border-left: 2px solid var(--accent);
  padding: 0.4rem 0 0.4rem 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.55;
}
.pull cite {
  display: block;
  margin-top: 0.35rem;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}

/* skills list with self-assessment bars */
.competence-row {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}
.competence-row:last-child { border-bottom: none; }
.competence-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.competence-head h3 {
  font-size: 0.92rem;
  font-weight: 600;
  margin: 0;
}
.competence-level {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.competence-row p {
  font-size: 0.84rem;
  margin-top: 0.35rem;
}

/* references grid */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}
.ref-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.ref-name { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.015em; }
.ref-role { font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.ref-rel  { font-size: 0.72rem; color: var(--accent); font-family: 'JetBrains Mono', monospace; margin-top: 0.6rem; }
.ref-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s;
}
.ref-link:hover { border-color: var(--accent); }

/* contact list */
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contact-list a {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.contact-list a:hover { color: var(--accent); }
.contact-list a:last-child { border-bottom: none; }
.contact-icon {
  font-style: normal;
  width: 22px;
  text-align: center;
  color: var(--muted);
}

/* ── FOOTER ────────────────────────────────────────── */
.page-footer {
  max-width: 760px;
  margin: 2rem auto 0;
  padding: 1rem 0.2rem 0;
  border-top: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.page-footer a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.page-footer a:hover { color: var(--text); }

/* ── PRINT (A4, 1 sub-page = 1 PDF page) ───────────── */
@media print {
  :root {
    --bg: #fff;
    --surface: #fff;
    --text: #111;
    --muted: #444;
    --border: rgba(0,0,0,0.12);
    --accent: #b85a16;
  }
  @page { size: A4; margin: 1.6cm 1.4cm; }

  body {
    background: #fff;
    color: #111;
    padding: 0;
    font-size: 10.5pt;
  }

  .topbar, .lang-toggle, .page-footer { display: none !important; }

  .page { max-width: none; padding: 0; }
  .card, .ref-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    page-break-inside: avoid;
    margin-bottom: 0.6rem;
  }
  a { color: #111; }
  .page-title { font-size: 28pt; }

  /* hide the home bento from print — print sub-pages instead */
  .bento { display: none !important; }
}
