/* =====================================================================
   noullet.tech - Kristian Noullet
   Plain CSS, no external resources (no Google Fonts: GDPR-friendly).
   ===================================================================== */

:root {
  --bg: #f6f7fb;
  --bg-alt: #eef1f8;
  --surface: #ffffff;
  --text: #182033;
  --muted: #586379;
  --border: #e1e6f0;
  --accent: #2b59c3;
  --accent-2: #0f9d8f;
  --accent-3: #e39058;   /* soft apricot: outer orbit dot */
  --accent-soft: rgba(43, 89, 195, 0.09);
  --accent-text: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px -12px rgba(16, 24, 40, 0.14);
  --radius: 14px;
  --radius-sm: 8px;
  --header-h: 64px;
  --maxw: 1140px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg: #0c111d;
  --bg-alt: #111827;
  --surface: #151d2e;
  --text: #e7ebf3;
  --muted: #9aa5ba;
  --border: #253048;
  --accent: #7d9bff;
  --accent-2: #3fd3c3;
  --accent-3: #f6b88a;
  --accent-soft: rgba(125, 155, 255, 0.12);
  --accent-text: #0c111d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -14px rgba(0, 0, 0, 0.6);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .25s ease, color .25s ease;
}

/* Avoid flashing English text while another language loads */
html.i18n-pending body { visibility: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: 650; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--accent); color: var(--accent-text);
  padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 600;
}
.skip-link:focus { top: 12px; text-decoration: none; }

/* ------------------------------ Header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: .8rem; letter-spacing: .04em;
}

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 2px; list-style: none; }
.site-nav a {
  display: block; padding: 6px 10px; border-radius: 8px;
  color: var(--muted); font-size: .9rem; font-weight: 550; white-space: nowrap;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.site-nav a.active { color: var(--accent); }

.header-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch {
  display: flex; padding: 3px; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.lang-switch button {
  display: inline-flex; align-items: center; gap: 4px;
  font: inherit; font-size: .75rem; font-weight: 650; letter-spacing: .04em;
  border: 0; background: transparent; color: var(--muted);
  padding: 4px 7px; border-radius: 7px; cursor: pointer;
}
.lang-flag { display: block; width: 18px; height: auto; flex: 0 0 auto; border-radius: 1px; box-shadow: 0 0 0 1px rgb(0 0 0 / 12%); }
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
.nav-toggle { display: none; }

/* ------------------------------ Hero ------------------------------ */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 0 56px;
  background:
    radial-gradient(900px 420px at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(700px 380px at 5% 90%, color-mix(in srgb, var(--accent-2) 13%, transparent), transparent 70%);
}
.hero::before {
  /* subtle "knowledge graph" dot grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 35%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 85%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px 5px 10px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: .85rem; font-weight: 600; color: var(--text); box-shadow: var(--shadow-sm);
}
.pulse { position: relative; width: 9px; height: 9px; border-radius: 50%; background: #16a34a; }
.pulse::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid #16a34a; opacity: 0; animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .02em; margin-bottom: 8px; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 4.4rem); font-weight: 800; letter-spacing: -0.035em; }
.hero h1 .suffix { font-size: .38em; font-weight: 600; color: var(--muted); letter-spacing: 0; vertical-align: .9em; }
.hero-focus { margin: 14px 0 18px; font-size: 1.08rem; font-weight: 600; color: var(--muted); }
.hero-motto {
  margin: 10px 0 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 750; letter-spacing: -.01em;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-intro { font-size: 1.15rem; max-width: 40em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 650; font-size: .98rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-primary { background: var(--accent); color: var(--accent-text); box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-lg { padding: 13px 22px; font-size: 1rem; }

.social { display: flex; gap: 10px; list-style: none; }
.social a {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  color: var(--muted); border: 1px solid var(--border); background: var(--surface);
  transition: color .15s ease, border-color .15s ease;
}
.social a:hover { color: var(--accent); border-color: var(--accent); }
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* Avatar with orbiting topic labels (sizes relative to the square container) */
.hero-visual {
  position: relative; display: grid; place-items: center;
  width: min(100%, 440px); aspect-ratio: 1; justify-self: center;
}
.avatar {
  position: relative; width: 54%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 30px 60px -25px color-mix(in srgb, var(--accent) 65%, transparent), 0 0 0 10px var(--surface), 0 0 0 11px var(--border);
}
.avatar-initials { color: #fff; font-size: clamp(2.6rem, 5.2vw, 4.4rem); font-weight: 800; letter-spacing: -.02em; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Rotating rings, each carrying a small glowing dot. --start (degrees clockwise from the top) sets
   where each dot is on load: green two-thirds through Entity linking, blue just beside Semantic Web
   and orange just before it, so the dots are visibly moving into and out of labels. */
.hero-visual { --t1: 45s; --t2: 70s; --t3: 95s; }
.orbit {
  position: absolute; border: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent); border-radius: 50%;
  animation: spin 60s linear infinite;
}
.orbit::after {
  content: ""; position: absolute; top: -4px; left: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent-2) 60%, transparent);
}
.orbit-1 { --start: 195; width: 62%; height: 62%; animation-duration: var(--t1); animation-delay: calc(var(--t1) * var(--start) / -360); }
.orbit-2 { --start: 355; width: 75%; height: 75%; animation-duration: var(--t2); animation-direction: reverse; animation-delay: calc(var(--t2) * (360 - var(--start)) / -360); }
.orbit-2::after { background: var(--accent); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent) 60%, transparent); }
.orbit-3 { --start: 338; width: 88%; height: 88%; animation-duration: var(--t3); animation-delay: calc(var(--t3) * var(--start) / -360); }
.orbit-3::after { background: var(--accent-3); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--accent-3) 60%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Static labels on the rings (--deg = angle from the top, clockwise). A label glows in the dot's
   colour while any ring's dot passes under it (class "lit", set by main.js from the real positions). */
.nodes { position: absolute; inset: 0; pointer-events: none; }
.node {
  --a: calc(var(--deg) * 1deg);
  --node-color: var(--text);
  --node-border: var(--border);
  --float-delay: 0s;
  position: absolute; z-index: 1;
  left: calc(50% + var(--r) * sin(var(--a)));
  top: calc(50% - var(--r) * cos(var(--a)));
  transform: translate(-50%, -50%);
  padding: 4px 11px; border-radius: 999px; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--node-border); box-shadow: var(--shadow-sm);
  font-size: .78rem; font-weight: 650; color: var(--node-color);
  animation: float 7s ease-in-out var(--float-delay) infinite;
  transition: color .9s ease, border-color .9s ease, box-shadow .9s ease;
}
.node:nth-child(3n+2) { --float-delay: -2.3s; }
.node:nth-child(3n) { --float-delay: -4.6s; }
.on-1 { --r: 33.5%; }
.on-2 { --r: 37.5%; }
.on-3 { --r: 44%; }
.node-quality {
  --node-color: var(--accent-2);
  --node-border: color-mix(in srgb, var(--accent-2) 45%, var(--border));
  background: color-mix(in srgb, var(--accent-2) 8%, var(--surface));
}
/* personal interests: quieter, dashed outline */
.node-personal {
  --node-color: var(--muted);
  --node-border: color-mix(in srgb, var(--muted) 55%, var(--border));
  border-style: dashed;
}
.node.lit {
  --hl: var(--accent-2);
  color: var(--hl); border-color: var(--hl);
  box-shadow: 0 0 0 1px var(--hl), 0 0 18px 3px color-mix(in srgb, var(--hl) 45%, transparent);
  transition-duration: .3s;
}
.node.lit-blue { --hl: var(--accent); }
.node.lit-orange { --hl: var(--accent-3); }
@keyframes float {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 4px)); }
}
/* Browsers without CSS trigonometry: show just the rings */
@supports not (left: calc(1px * sin(1deg))) { .nodes { display: none; } }

/* Key figures */
.stats {
  position: relative; list-style: none; margin-top: 56px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px;
  background: var(--border); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.stats li { background: var(--surface); padding: 20px 18px; display: flex; flex-direction: column; gap: 4px; }
.stats strong {
  font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.stats strong small { font-size: .5em; font-weight: 550; letter-spacing: normal; }

/* ------------------------------ Sections ------------------------------ */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.kicker {
  display: inline-block; margin-bottom: 10px;
  font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
}
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 780; }
.section-lead { margin-top: 14px; font-size: 1.1rem; color: var(--muted); }
.sub-head { font-size: 1.25rem; margin: 0 0 18px; }
.sub-head:not(:first-child) { margin-top: 40px; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 26px 28px;
}

/* About */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: start; }
.prose p { font-size: 1.1rem; }
.glance h3 { font-size: 1.05rem; margin-bottom: 16px; }
.glance dl { margin: 0; display: grid; gap: 14px; }
.glance dt { font-size: .75rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.glance dd { margin: 2px 0 0; font-weight: 550; }
.glance-languages { display: flex; flex-wrap: wrap; gap: 6px 14px; list-style: none; }
.glance-languages li { display: inline-flex; align-items: center; gap: 6px; }

/* Timeline */
.timeline { list-style: none; position: relative; display: grid; gap: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 190px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-2)); opacity: .35; border-radius: 2px;
}
.tl-item { display: grid; grid-template-columns: 190px 1fr; gap: 0; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 184px; top: 28px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--surface); border: 3px solid var(--accent); box-sizing: border-box;
}
.tl-meta { display: flex; flex-direction: column; padding: 22px 28px 0 0; text-align: right; }
.tl-date { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }
.tl-place { color: var(--muted); font-size: .88rem; }
.tl-body { margin-left: 28px; }
.tl-body h3 { font-size: 1.2rem; }
.tl-org { color: var(--accent); font-weight: 600; margin: 4px 0 12px; }

.bullets { list-style: none; display: grid; gap: 8px; }
.bullets li { position: relative; padding-left: 20px; }
.bullets li::before {
  content: ""; position: absolute; left: 2px; top: .68em; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent-2); transform: rotate(45deg);
}

.tags, .chips, .facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags { margin-top: 16px; }
.tags li {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  padding: 3px 9px; border-radius: 6px; background: var(--bg-alt); border: 1px solid var(--border);
}
.section-alt .tags li { background: var(--bg); }

/* Projects */
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.project { display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease; }
.project:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.project-date { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.project h3 { font-size: 1.18rem; }
.project-org { color: var(--accent); font-weight: 600; margin: 6px 0 14px; }
.facts { margin-bottom: 16px; }
.facts li {
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  color: var(--accent); background: var(--accent-soft);
}
.gar { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; }
.gar dt {
  font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-2); padding-top: .32em; white-space: nowrap;
}
.gar dd { margin: 0; }
.project-compact { background: linear-gradient(160deg, var(--surface), var(--bg-alt)); }

/* Research & teaching */
.thesis { margin-bottom: 40px; border-left: 4px solid var(--accent); }
.thesis-title { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-bottom: 8px; }
.thesis-meta { color: var(--muted); font-size: .92rem; }
.research-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: start; }

.pubs { list-style: none; display: grid; gap: 16px; }
.pubs li { display: grid; grid-template-columns: 52px 1fr; gap: 12px; }
.pub-year {
  font-size: .8rem; font-weight: 800; color: var(--accent); background: var(--accent-soft);
  border-radius: 6px; padding: 3px 0; text-align: center; height: fit-content; margin-top: 2px;
}
.pub-title { font-weight: 650; margin: 0; line-height: 1.4; }
.pub-authors, .pub-venue { margin: 2px 0 0; font-size: .9rem; color: var(--muted); }
.pub-venue { font-style: italic; }
.more-link { margin-top: 18px; font-weight: 650; }

.teach-list { list-style: none; display: grid; gap: 14px; }
.teach-list .card { padding: 18px 22px; }
.teach-date { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.teach-list h4 { font-size: 1.02rem; margin-bottom: 4px; }
.teach-meta { font-size: .88rem; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.teach-list p:not(.teach-date):not(.teach-meta) { font-size: .95rem; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.chips li {
  font-size: .86rem; font-weight: 550; padding: 5px 11px; border-radius: 8px;
  background: var(--bg-alt); border: 1px solid var(--border);
}
.chips li.chip-strong { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.chip-legend { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: .8rem; color: var(--muted); }
.chip-strong-dot { width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--accent); }
.lang-list { list-style: none; display: grid; gap: 10px; }
.lang-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.lang-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.lang-level { font-size: .78rem; font-weight: 700; color: var(--accent-2); padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; }

/* Personal */
.personal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.personal-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.personal-card .chips { margin-top: 16px; }
.personal-icon {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 16px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.personal-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Contact */
.contact { padding-top: 40px; }
.contact-card {
  position: relative; overflow: hidden; text-align: center;
  padding: 64px 32px; border-radius: 22px; color: #fff;
  background: linear-gradient(135deg, #1f3f94 0%, #2b59c3 45%, #0f9d8f 100%);
  box-shadow: 0 30px 60px -30px rgba(31, 63, 148, .6);
}
.contact-card::before {
  content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none;
  background-image: radial-gradient(#fff 1px, transparent 1px); background-size: 22px 22px;
}
.contact-card > * { position: relative; }
.contact-card .kicker { color: rgba(255, 255, 255, .8); }
.contact-card h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; margin-bottom: 14px; }
.contact-card p { max-width: 640px; margin: 0 auto; font-size: 1.12rem; color: rgba(255, 255, 255, .9); }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.contact-card .btn-primary { background: #fff; color: #1f3f94; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .4); }
.contact-card .btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.contact-card .btn-ghost:hover { border-color: #fff; }

/* Footer */
.site-footer { padding: 40px 0 48px; color: var(--muted); font-size: .88rem; }
.footer-inner { display: grid; gap: 8px; text-align: center; }
.footer-privacy { max-width: 760px; margin: 0 auto; font-size: .8rem; }

/* Scroll reveal (only when JS is active; respects reduced motion) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .orbit, .node, .pulse::after { animation: none; }
  .orbit { transform: rotate(calc(var(--start) * 1deg)); }
  .btn, .project { transition: none; }
}

/* ------------------------------ Responsive ------------------------------ */
@media (max-width: 1450px) {
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 10px 16px 16px; max-width: var(--maxw); margin: 0 auto; }
  .site-nav a { padding: 10px 12px; font-size: 1rem; }
  .header-tools { margin-left: auto; }
  .stats { grid-template-columns: repeat(3, 1fr); }
}

/* Tablets and phones: compact hero (no rings), single-column sections */
@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; width: auto; aspect-ratio: auto; justify-self: start; }
  .avatar { width: 120px; box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--border); }
  .avatar-initials { font-size: 2.3rem; }
  .orbit, .nodes { display: none; }
  .about-grid, .research-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .skills-grid, .personal-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { left: 7px; }
  .tl-item { grid-template-columns: 1fr; padding-left: 30px; }
  .tl-item::before { left: 0; top: 4px; }
  .tl-meta { flex-direction: row; gap: 10px; padding: 0 0 8px; text-align: left; }
  .tl-place::before { content: "·"; margin-right: 10px; }
  .tl-body { margin-left: 0; }
  .section { padding: 72px 0; }
}

@media (max-width: 620px) {
  .container { padding: 0 18px; }
  .brand-name { display: none; }
  .lang-switch button { width: 25px; height: 25px; justify-content: center; padding: 4px; font-size: 0; }
  .lang-switch .lang-flag { width: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .skills-grid, .personal-grid { grid-template-columns: 1fr; }
  .card { padding: 22px 20px; }
  .gar { grid-template-columns: 1fr; gap: 2px; }
  .gar dd { margin-bottom: 10px; }
  .contact-card { padding: 48px 20px; }
}

/* ------------------------------ Print ------------------------------ */
@media print {
  :root, [data-theme="dark"] {
    --bg: #fff; --bg-alt: #fff; --surface: #fff; --text: #000; --muted: #444; --border: #ccc;
    --accent: #1f3f94; --accent-2: #0b6e64; --shadow: none; --shadow-sm: none;
  }
  html.i18n-pending body { visibility: visible; }
  .site-header, .hero-visual, .hero-actions, .skip-link, .status-pill, .contact-actions, .footer-privacy { display: none !important; }
  .hero { padding: 0 0 12px; background: none; }
  .hero::before, .contact-card::before { display: none; }
  .hero-inner { display: block; }
  .section { padding: 18px 0; }
  .js .reveal { opacity: 1; transform: none; }
  .card, .stats, .project { box-shadow: none; break-inside: avoid; }
  .contact-card { background: none; color: #000; padding: 0; text-align: left; }
  .contact-card p, .contact-card .kicker { color: #000; }
  .stats strong, .hero-motto { color: var(--accent); background: none; }
}
