/* ── Theme variables ── */
:root {
  --accent: #60a5fa;
  --accent-dim: #2563eb;

  /* Dark scheme (default) */
  --s-bg:      #0d1b2a;
  --s-bg2:     #0a1628;
  --s-surface: rgba(26, 58, 92, 0.35);
  --s-border:  #1e3a5f;
  --s-text:    #e2e8f0;
  --s-muted:   #94a3b8;
  --s-card:    rgba(10, 22, 40, 0.55);
  --s-active:  rgba(26, 58, 92, 0.22);
  --s-nav:     rgba(13, 27, 42, 0.97);
  --s-num:     #1e3a5f;

  /* Neutral (same in both modes) */
  --light-bg:   #f8fafc;
  --white:      #ffffff;
  --text:       #111827;
  --text-muted: #6b7280;
  --b-light:    #e5e7eb;

  --radius: 8px;
  --max-w:  900px;
  --nav-h:  56px;
}

html.light {
  --s-bg:      #f8fafc;
  --s-bg2:     #ffffff;
  --s-surface: #ffffff;
  --s-border:  #e2e8f0;
  --s-text:    #111827;
  --s-muted:   #6b7280;
  --s-card:    #f1f5f9;
  --s-active:  #eff6ff;
  --s-nav:     rgba(248, 250, 252, 0.97);
  --s-num:     #dde6f0;
}

/* Smooth theme transitions */
body, nav, section, .panel-card, .journey-panel, .contact-link, footer {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 15px;
}

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--s-nav);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--s-border);
  padding: 0 1.5rem;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--s-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 1.5px solid var(--s-border);
  flex-shrink: 0;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 0;
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  border-radius: 999px;
  padding: 4px;
}
nav ul a {
  display: block;
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--s-muted);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
nav ul a:hover {
  background: var(--s-active);
  color: var(--s-text);
}
.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}
.ctrl-btn {
  background: var(--s-surface);
  border: 1px solid var(--s-border);
  color: var(--s-muted);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s;
  font-family: inherit;
  letter-spacing: 0.02em;
}
.ctrl-btn:hover { border-color: var(--accent); color: var(--accent); }
.ctrl-btn svg { width: 13px; height: 13px; }

/* ── Shared ── */
.container { max-width: var(--max-w); margin: 0 auto; }

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.accent-label { color: var(--accent); }
.dim-label    { color: var(--text-muted); }

.section-title { font-size: 1.65rem; font-weight: 700; }
.light-title   { color: var(--s-text); }
.dark-title    { color: var(--text); }

/* ── Hero ── */
#hero {
  background: var(--s-bg);
  padding: 80px 2rem 72px;
  border-bottom: 1px solid var(--s-border);
}
.hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.hero-photo {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--s-border);
  flex-shrink: 0;
  box-shadow: 0 0 30px rgba(96,165,250,0.12);
}
.hero-badge {
  display: inline-block;
  background: rgba(96,165,250,0.12);
  color: var(--accent);
  border: 1px solid rgba(96,165,250,0.3);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.hero-text h1 {
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--s-text);
  line-height: 1.15;
  margin-bottom: 0.35rem;
}
.hero-subtitle { color: var(--s-muted); font-size: 0.95rem; margin-bottom: 0.3rem; }
.hero-loc {
  color: var(--s-muted);
  font-size: 0.83rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--accent-dim); color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-outline {
  background: transparent;
  color: var(--s-text);
  border: 1px solid var(--s-border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── About ── */
#about {
  padding: 72px 2rem;
  background: var(--white);
}
#about .inner {
  max-width: 660px;
  margin: 0 auto;
}
#about .section-title { margin-bottom: 1.25rem; }
#about p {
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
#about p:last-child { margin-bottom: 0; }

/* ── Journey ── */
#journey { background: var(--s-bg); }

.journey-header {
  padding: 64px 2rem 40px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.journey-header p { color: var(--s-muted); font-size: 0.88rem; margin-top: 0.4rem; }
.journey-header .section-title { margin-bottom: 0.3rem; }

.journey-layout {
  display: grid;
  grid-template-columns: 55% 45%;
  border-top: 1px solid var(--s-border);
}

.map-sticky {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  background: #0a1628; /* map always dark */
}
#leaflet-map { width: 100%; height: 100%; }

/* Leaflet overrides */
.leaflet-control-attribution {
  background: rgba(10,22,40,0.8) !important;
  color: #475569 !important;
  font-size: 10px !important;
}
.leaflet-control-attribution a { color: var(--accent) !important; }

/* Progress overlay */
.map-progress-overlay {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: rgba(10,22,40,0.88);
  backdrop-filter: blur(10px);
  border: 1px solid #1e3a5f;
  border-radius: 999px;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  pointer-events: none;
}
.prog-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.prog-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #1e3a5f;
  border: 2px solid #2d5a8e;
  transition: all 0.4s;
  flex-shrink: 0;
}
.prog-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(96,165,250,0.5);
}
.prog-label {
  font-size: 8px;
  color: #475569;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}
.prog-line {
  width: 24px; height: 1px;
  background: #1e3a5f;
  flex-shrink: 0;
  margin-bottom: 14px;
  transition: background 0.4s;
}
.prog-line.active { background: var(--accent); }

/* Panels */
.panels-col { border-left: 1px solid var(--s-border); }

.journey-panel {
  min-height: 100vh;
  padding: 4rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: 1px solid var(--s-border);
  background: transparent;
}
.journey-panel:last-child { border-bottom: none; }
.journey-panel.panel-active { background: var(--s-active); }

.panel-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--s-num);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.panel-city {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--s-text);
  margin-bottom: 0.2rem;
}
.panel-country {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.75rem;
}
.panel-card {
  background: var(--s-card);
  border: 1px solid var(--s-border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 0.6rem;
}
.panel-active .panel-card { border-color: rgba(96,165,250,0.2); }

.card-type {
  display: inline-block;
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 0.35rem;
  background: rgba(96,165,250,0.12);
  color: var(--accent);
}
.card-type.stage    { background: rgba(251,191,36,0.1);  color: #fbbf24; }
.card-type.erasmus  { background: rgba(167,139,250,0.1); color: #a78bfa; }
.card-type.research { background: rgba(52,211,153,0.1);  color: #34d399; }
.card-type.current  { background: rgba(52,211,153,0.1);  color: #34d399; }

.panel-card strong {
  display: block;
  font-size: 0.85rem;
  color: var(--s-text);
  margin-bottom: 0.15rem;
}
.panel-card p {
  font-size: 0.77rem;
  color: var(--s-muted);
  line-height: 1.5;
}

/* ── Skills ── */
#skills { padding: 72px 2rem; background: var(--light-bg); }
#skills .section-title { margin-bottom: 2rem; }
.skills-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.skill-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  background: var(--white);
  border: 1px solid var(--b-light);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
}
.tag-accent { background: #eff6ff; border-color: #bfdbfe; color: var(--accent-dim); }

/* ── Contact ── */
#contact {
  padding: 72px 2rem;
  background: var(--s-bg);
  text-align: center;
  border-top: 1px solid var(--s-border);
}
#contact .section-label { margin-bottom: 0.4rem; }
#contact .section-title { margin-bottom: 0.5rem; }
.contact-sub {
  color: var(--s-muted);
  font-size: 0.9rem;
  margin: 0.5rem auto 2rem;
  max-width: 400px;
}
.contact-links { display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.3rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--s-border);
  color: var(--s-muted);
}
.contact-link:hover { border-color: var(--accent); color: var(--accent); }

/* ── Footer ── */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--s-muted);
  background: var(--s-bg);
  border-top: 1px solid var(--s-border);
}

/* ── Mobile ── */
@media (max-width: 760px) {
  nav { grid-template-columns: 1fr auto; }
  nav ul { display: none; }
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; }
  .hero-loc   { justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-text h1 { font-size: 1.7rem; }
  .journey-layout { grid-template-columns: 1fr; }
  .map-sticky { display: none; }
  .panels-col { border-left: none; }
  .journey-panel { min-height: auto; padding: 2.5rem 1.5rem; }
  #about, #skills, #contact { padding: 52px 1.25rem; }
  .journey-header { padding: 48px 1.25rem 28px; }
}
