/* ==========================================================
   Emilio Martínez-Núñez · shared stylesheet
   ========================================================== */
:root {
  --bg: #070b16;
  --bg-2: #0c1324;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.09);
  --ink: #eef2f8;
  --muted: #9aa6bb;
  --teal: #2dd4bf;
  --cyan: #38bdf8;
  --amber: #fbbf24;
  --accent: #38bdf8;
  --radius: 18px;
  --maxw: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; display: block; }
h1, h2, h3 {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
.grad-text { color: inherit; }

/* ---------- Background glow ---------- */
.glow {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  display: none;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--panel-border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 18px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 18px;
}
.brand:hover { color: var(--ink); }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.nav-links { display: flex; gap: 6px; }
.nav-links a {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 14px; border-radius: 999px; transition: all 0.2s;
}
.nav-links a:hover { color: var(--ink); background: var(--panel); }
.nav-links a.active { color: var(--bg); background: var(--ink); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--panel-border);
  color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 18px; cursor: pointer;
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 28px 80px;
}
#network {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--teal); }
.hero h1 { font-size: clamp(44px, 6.4vw, 82px); margin-bottom: 18px; }
.hero .subtitle { font-size: 20px; color: var(--muted); max-width: 560px; margin: 0 0 34px; }
.hero .subtitle strong { color: var(--ink); font-weight: 600; }

.portrait-wrap { position: relative; justify-self: center; }
.portrait-wrap::after {
  content: ""; position: absolute; inset: -50px; border-radius: 50%; z-index: -1;
  display: none;
}
.portrait {
  position: relative; width: 340px; height: 340px; border-radius: 50%;
  object-fit: cover; object-position: center 30%;
  border: 3px solid rgba(255,255,255,0.14);
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint span {
  width: 22px; height: 36px; border: 2px solid var(--muted); border-radius: 12px; position: relative;
}
.scroll-hint span::after {
  content: ""; position: absolute; top: 6px; left: 50%; width: 4px; height: 8px; margin-left: -2px;
  background: var(--teal); border-radius: 2px; animation: wheel 1.8s infinite;
}
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  position: relative; padding: 180px 28px 90px; overflow: hidden;
  border-bottom: 1px solid var(--panel-border);
}
.page-head .inner { max-width: var(--maxw); margin: 0 auto; }
.page-head h1 { font-size: clamp(42px, 6vw, 72px); margin-bottom: 18px; }
.page-head p { font-size: 20px; color: var(--muted); max-width: 720px; margin: 0; }

/* ---------- Buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary { background: var(--accent); color: #04121a; }
.btn-primary:hover { color: #04121a; transform: translateY(-2px); background: #7dd3fc; }
.btn-ghost { border: 1px solid var(--panel-border); color: var(--ink); background: var(--panel); }
.btn-ghost:hover { color: var(--ink); border-color: var(--cyan); transform: translateY(-2px); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Sections ---------- */
.section { padding: 110px 28px; }
.section .inner { max-width: var(--maxw); margin: 0 auto; }
.section-title { font-size: clamp(32px, 4vw, 46px); margin-bottom: 18px; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 720px; margin: 0 0 56px; }
.kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--teal); margin-bottom: 14px;
}
.alt { background: rgba(255,255,255,0.015); }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--panel); border: 1px solid var(--panel-border);
  border-radius: var(--radius); padding: 34px;
  transition: transform 0.35s, border-color 0.35s, background 0.35s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  display: none;
  opacity: 0; transition: opacity 0.35s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(56,189,248,0.35); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 22px; margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; font-size: 16px; }
.card .icon {
  width: 52px; height: 52px; border-radius: 14px; margin-bottom: 22px;
  display: grid; place-items: center; font-size: 24px;
  background: rgba(56,189,248,0.10);
  border: 1px solid rgba(56,189,248,0.25);
}
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag {
  font-size: 12.5px; font-weight: 500; color: var(--ink);
  padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.06);
  border: 1px solid var(--panel-border);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

a.card { display: block; color: var(--ink); }
a.card:hover { color: var(--ink); }
.card .more { display: inline-block; margin-top: 20px; color: var(--cyan); font-weight: 600; font-size: 15px; }

/* ---------- Stats ---------- */
.stat { text-align: left; }
.stat .num {
  font-family: "Space Grotesk", sans-serif; font-size: 56px; font-weight: 600; line-height: 1;
  color: var(--ink);
}
.stat .label { color: var(--muted); font-size: 15px; margin-top: 10px; }

/* ---------- Bio ---------- */
.bio { display: grid; grid-template-columns: 1fr 1.3fr; gap: 70px; align-items: start; }
.bio p { color: var(--muted); margin: 0 0 18px; }
.bio p strong { color: var(--ink); font-weight: 600; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px;
  background: var(--accent);
}
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -34px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--cyan); box-shadow: 0 0 12px rgba(56,189,248,0.6);
}
.tl-year { font-family: "Space Grotesk", sans-serif; color: var(--teal); font-weight: 600; font-size: 15px; }
.tl-text { color: var(--ink); }
.tl-text span { color: var(--muted); }

/* ---------- Pipeline (AutoMeKin) ---------- */
.pipeline { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 18px; align-items: stretch; }
.pipe-arrow { display: grid; place-items: center; color: var(--cyan); font-size: 28px; opacity: 0.7; }
.step-num {
  font-family: "Space Grotesk", sans-serif; font-size: 15px; font-weight: 600; color: var(--teal);
  letter-spacing: 0.1em; margin-bottom: 14px;
}

/* ---------- Code block ---------- */
.code {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px;
  background: #050811; border: 1px solid var(--panel-border); border-radius: 14px;
  padding: 22px 24px; color: #cfe7f5; overflow-x: auto; line-height: 1.8;
}
.code .c { color: #5e6b82; }
.code .k { color: var(--teal); }
.code .v { color: var(--amber); }

/* ---------- Highlight banner ---------- */
.banner {
  position: relative; border-radius: 24px; padding: 54px;
  background: var(--panel);
  border: 1px solid rgba(56,189,248,0.25); overflow: hidden;
}
.banner h3 { font-size: 30px; margin-bottom: 14px; }
.banner p { color: var(--muted); margin: 0 0 28px; max-width: 680px; }

/* ---------- References ---------- */
.refs { list-style: none; padding: 0; margin: 0; counter-reset: ref; }
.refs li {
  counter-increment: ref; position: relative; padding: 22px 0 22px 64px;
  border-bottom: 1px solid var(--panel-border); color: var(--muted);
}
.refs li::before {
  content: counter(ref, decimal-leading-zero); position: absolute; left: 0; top: 20px;
  font-family: "Space Grotesk", sans-serif; font-size: 24px; font-weight: 600; color: rgba(255,255,255,0.18);
}
.refs li strong { color: var(--ink); font-weight: 600; display: block; }

/* ---------- Courses ---------- */
.course {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 24px 28px; border-radius: 14px; background: var(--panel); border: 1px solid var(--panel-border);
  margin-bottom: 14px; transition: border-color 0.3s, transform 0.3s;
}
.course:hover { border-color: rgba(45,212,191,0.4); transform: translateX(6px); }
.course h3 { font-size: 19px; margin-bottom: 4px; }
.course p { margin: 0; color: var(--muted); font-size: 15px; }
.course .level {
  flex-shrink: 0; font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; color: var(--teal); border: 1px solid rgba(45,212,191,0.35);
}
.course .level.master { color: #c4b5fd; border-color: rgba(167,139,250,0.4); }

/* ---------- Contact ---------- */
.contact-email {
  display: inline-block; font-family: "Space Grotesk", sans-serif;
  font-size: clamp(28px, 4.4vw, 54px); font-weight: 600; letter-spacing: -0.02em;
  color: var(--ink);
  border-bottom: 2px solid rgba(56,189,248,0.3); padding-bottom: 6px; margin: 10px 0 60px;
}
.contact-email:hover { border-bottom-color: var(--cyan); }
.label-sm {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 12px;
}
.profile-links a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--panel-border); color: var(--ink); font-weight: 500;
}
.profile-links a:hover { color: var(--cyan); }
.profile-links a span { color: var(--muted); transition: transform 0.2s; }
.profile-links a:hover span { transform: translate(3px, -3px); color: var(--cyan); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--panel-border); padding: 44px 28px; }
.footer .inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  color: var(--muted); font-size: 14px;
}
.footer a { color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer .links { display: flex; gap: 22px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.1s; } .d2 { transition-delay: 0.2s; } .d3 { transition-delay: 0.3s; } .d4 { transition-delay: 0.4s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .bio { grid-template-columns: 1fr; gap: 50px; }
  .portrait-wrap { order: -1; }
  .portrait { width: 240px; height: 240px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr; }
  .pipe-arrow { transform: rotate(90deg); }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; padding: 14px 20px 20px; gap: 4px;
    background: rgba(7, 11, 22, 0.96); border-bottom: 1px solid var(--panel-border);
  }
  .nav-links.open { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 80px 22px; }
  .card, .banner { padding: 28px; }
  .course { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 110px; }
  .scroll-hint { display: none; }
}

/* ---------- Research illustrations ---------- */
.art-card { padding: 0; }
.art-card > h3, .art-card > p, .art-card > .tags { margin-left: 34px; margin-right: 34px; }
.art-card > .tags { margin-bottom: 34px; }
.art-card > h3 { margin-top: 28px; }
.art {
  aspect-ratio: 2 / 1; overflow: hidden; border-bottom: 1px solid var(--panel-border);
}
.card-art { width: 100%; height: 100%; display: block; transition: transform 0.6s ease; }
.art-card:hover .card-art { transform: scale(1.04); }
@media (max-width: 720px) {
  .art-card > h3, .art-card > p, .art-card > .tags { margin-left: 24px; margin-right: 24px; }
}

/* ---------- Publications ---------- */
.pub {
  display: grid; grid-template-columns: 400px 1fr; gap: 40px; align-items: center;
  padding: 40px 0; border-bottom: 1px solid var(--panel-border);
}
.pub:first-child { padding-top: 0; }
.pub-art {
  display: block; aspect-ratio: 2 / 1; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--panel-border); transition: border-color 0.3s, transform 0.3s;
}
.pub-art:hover { border-color: rgba(56,189,248,0.45); transform: translateY(-4px); }
.pub-art svg { width: 100%; height: 100%; display: block; }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.pub-tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--teal); padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(45,212,191,0.35);
}
.pub-journal { font-size: 14px; color: var(--muted); font-style: italic; }
.pub h3 { font-size: 23px; margin-bottom: 10px; }
.pub h3 a { color: var(--ink); }
.pub h3 a:hover { color: var(--cyan); }
.pub-authors { font-size: 14.5px; color: var(--muted); margin: 0 0 12px; }
.pub-authors b { color: var(--ink); font-weight: 600; }
.pub-desc { font-size: 16px; color: var(--muted); margin: 0 0 14px; }
.pub-link { font-weight: 600; font-size: 15px; }
@media (max-width: 960px) {
  .pub { grid-template-columns: 1fr; gap: 22px; }
}

/* ---------- News ---------- */
.news { display: flex; flex-direction: column; gap: 14px; }
.news-item {
  display: grid; grid-template-columns: 110px 1fr 30px; gap: 28px; align-items: center;
  padding: 26px 30px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-border);
  color: var(--ink); transition: border-color 0.3s, transform 0.3s;
}
a.news-item:hover { color: var(--ink); border-color: rgba(56,189,248,0.4); transform: translateX(6px); }
.news-date {
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  border-right: 1px solid var(--panel-border); padding-right: 20px;
}
.news-date span {
  display: block; font-family: "Space Grotesk", sans-serif; font-size: 38px; line-height: 1.05; letter-spacing: -0.02em;
  text-transform: none; color: var(--ink);
}
.news-tag {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--amber); margin-bottom: 6px;
}
.news-body h3 { font-size: 20px; margin-bottom: 6px; }
.news-body p { margin: 0; color: var(--muted); font-size: 15.5px; }
.news-arrow { color: var(--muted); font-size: 20px; transition: color 0.2s, transform 0.2s; }
a.news-item:hover .news-arrow { color: var(--cyan); transform: translate(3px, -3px); }
@media (max-width: 720px) {
  .news-item { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
  .news-date { border-right: none; padding-right: 0; display: flex; align-items: baseline; gap: 8px; }
  .news-date span { display: inline; font-size: 26px; }
  .news-arrow { display: none; }
}

/* ---------- Formic acid interactive network ---------- */
.fa-grid-wrap { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; }
.fa-panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: var(--radius); padding: 24px; }
.fa-diagram-panel svg { width: 100%; height: auto; display: block; }
.fa-axis { stroke: #475569; stroke-width: 1; }
.fa-grid { stroke: rgba(255,255,255,0.05); stroke-width: 1; }
.fa-tick { fill: var(--muted); font-size: 11px; font-family: "Inter", sans-serif; }
.fa-link { stroke: #3b4a66; stroke-width: 1.6; stroke-dasharray: 4 4; fill: none; transition: stroke 0.2s; }
.fa-link.active { stroke: var(--cyan); stroke-dasharray: none; stroke-width: 2.2; }
.fa-level { cursor: pointer; outline: none; }
.fa-bar { stroke-width: 4; stroke-linecap: round; transition: stroke-width 0.2s; }
.fa-min .fa-bar { stroke: #2dd4bf; }
.fa-ts .fa-bar { stroke: #fbbf24; }
.fa-prod .fa-bar { stroke: #a78bfa; }
.fa-lab { fill: var(--ink); font: 600 12px "Inter", sans-serif; }
.fa-en { fill: var(--muted); font: 500 11px "Inter", sans-serif; }
.fa-level:hover .fa-bar, .fa-level.active .fa-bar { stroke-width: 7; filter: drop-shadow(0 0 6px currentColor); }
.fa-level.active .fa-lab { fill: var(--cyan); }
.fa-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.fa-legend i { display: inline-block; width: 16px; height: 4px; border-radius: 2px; margin-right: 7px; vertical-align: middle; }
.lg-min { background: #2dd4bf; } .lg-ts { background: #fbbf24; } .lg-prod { background: #a78bfa; }
.fa-viewer { display: flex; flex-direction: column; }
.fa-viewer canvas {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; display: block;
  background: #050811;
}
.fa-info h3 { font-size: 21px; margin: 18px 0 6px; }
.fa-info p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.fa-props { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.fa-props div { background: rgba(255,255,255,0.03); border: 1px solid var(--panel-border); border-radius: 10px; padding: 10px 14px; }
.fa-props span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.fa-props b { font-family: "Space Grotesk", sans-serif; font-size: 19px; font-weight: 600; }
.fa-info .fa-mode { font-size: 13.5px; color: var(--amber); margin: 0; }
.fa-h { font-size: 19px; margin-bottom: 14px; }
#fa-kin { width: 100%; height: auto; display: block; }
.fa-bar-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 14px; align-items: center; margin: 18px 0; }
.fa-bar-label { font-size: 15px; }
.fa-bar-track { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.06); overflow: hidden; }
.fa-bar-fill { height: 100%; width: 0; border-radius: 6px; transition: width 1.6s ease; }
.reveal.visible .fa-bar-fill { width: var(--w); }
.fa-bar-row b { font-family: "Space Grotesk", sans-serif; font-size: 18px; }
.fa-note { color: var(--muted); font-size: 14px; margin: 22px 0 0; line-height: 1.6; }
@media (max-width: 960px) { .fa-grid-wrap { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .fa-bar-row { grid-template-columns: 1fr auto; } .fa-bar-track { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 720px) {
  .fa-diagram-panel { overflow-x: auto; padding: 16px; }
  .fa-diagram-panel svg { min-width: 680px; }
  .fa-props b { font-size: 16px; }
}

/* ---------- Language switch ---------- */
.nav-inner { gap: 16px; }
.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--panel-border); border-radius: 999px; }
.lang-switch a {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted);
  padding: 4px 9px; border-radius: 999px;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a.active { background: rgba(255,255,255,0.10); color: var(--ink); }
.nav-links { margin-left: auto; }
@media (max-width: 720px) {
  .nav-links { margin-left: 0; }
  .lang-switch { margin-left: auto; }
}
.brand { white-space: nowrap; }
@media (max-width: 720px) {
  #network { opacity: 0.45; }
  .brand { font-size: 15px; }
}
@media (max-width: 420px) {
  .brand { font-size: 0; gap: 0; }
}

/* ---------- Collapsed menu below 1080px (7 menu items + language switch) ---------- */
@media (max-width: 1080px) {
  .nav-toggle { display: block; order: 2; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0; margin-left: 0;
    flex-direction: column; padding: 14px 20px 20px; gap: 4px;
    background: #070b16; border-bottom: 1px solid var(--panel-border); z-index: 60;
  }
  .nav-links.open { display: flex; }
  .lang-switch { margin-left: auto; order: 1; }
}

