:root {
  --bg: #091428;
  --bg-2: #0a1e2c;
  --card: #0e2333;
  --gold: #c8aa6e;
  --gold-light: #f0e6d2;
  --gold-dark: #785a28;
  --teal: #0ac8b9;
  --text: #cdd6dc;
  --muted: #8a9ba8;
  --line: rgba(200, 170, 110, 0.35);
  --max: 1000px;
  --pad: max(1rem, calc((100% - var(--max)) / 2));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: radial-gradient(ellipse at top, var(--bg-2), var(--bg) 60%) fixed, var(--bg);
  color: var(--text);
  line-height: 1.65;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: "Cinzel", Georgia, serif; color: var(--gold-light); letter-spacing: 0.04em; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem var(--pad);
  background: rgba(9, 20, 40, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--gold); font-size: 1.15rem; font-weight: 700; }
.brand:hover { text-decoration: none; }
.nav ul { display: flex; gap: 1.4rem; list-style: none; align-items: center; }
.nav ul a { color: var(--text); font-size: 0.92rem; }
.nav ul a:hover, .nav ul a.active { color: var(--gold); text-decoration: none; }
.nav ul a.active { border-bottom: 1px solid var(--gold); padding-bottom: 2px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--gold); font-size: 1.2rem; padding: 0.1rem 0.6rem; cursor: pointer; }
.lang {
  background: transparent; color: var(--gold); cursor: pointer;
  border: 1px solid var(--gold); padding: 0.25rem 0.6rem;
  font: 600 0.8rem "Inter", sans-serif; letter-spacing: 0.08em;
}
.lang:hover { background: var(--gold); color: var(--bg); }
@media (max-width: 760px) {
  .nav { flex-wrap: wrap; }
  .menu-toggle { display: block; }
  .nav ul { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 0.9rem; padding: 0.8rem 0 0.4rem; }
  .nav.open ul { display: flex; }
}
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center;
  padding: 5rem var(--pad) 4.5rem;
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 140px;
  transform: translateY(-50%); z-index: -1;
  background: linear-gradient(90deg, transparent, rgba(10, 200, 185, 0.18), rgba(10, 120, 200, 0.12), transparent);
  filter: blur(30px);
  animation: glow 8s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: 0.5; } to { opacity: 1; } }
.portrait {
  width: 220px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; object-position: center 30%;
  border: 3px solid var(--gold);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--gold-dark), 0 0 40px rgba(10, 200, 185, 0.35);
}
.eyebrow { color: var(--teal); text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.8rem; font-weight: 600; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.1; margin: 0.4rem 0 1rem; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 55ch; color: var(--muted); font-size: 1.1rem; }
.btns { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.btn {
  display: inline-block; padding: 0.65rem 1.4rem; font-weight: 600; font-size: 0.92rem;
  border: 1px solid var(--gold); color: var(--gold-light);
  background: linear-gradient(180deg, rgba(200, 170, 110, 0.15), transparent);
}
.btn:hover { text-decoration: none; background: var(--gold); color: var(--bg); }
.btn.ghost { border-color: var(--teal); color: var(--teal); background: none; }
.btn.ghost:hover { background: var(--teal); color: var(--bg); }
@media (max-width: 700px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 3rem; gap: 2rem; }
  .portrait { width: 170px; margin: 0 auto; }
  .hero p { margin: 0 auto; }
  .btns { justify-content: center; }
}

/* Sections */
section { padding: 4rem var(--pad); }
.section-title { text-align: center; margin-bottom: 2.5rem; }
.section-title h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.section-title p { color: var(--muted); margin-top: 0.4rem; }
.divider {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem; margin-top: 0.8rem;
}
.divider::before, .divider::after { content: ""; height: 1px; width: 70px; background: linear-gradient(90deg, transparent, var(--gold)); }
.divider::after { transform: scaleX(-1); }
.divider span { width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); }

/* Framed cards with gold corner accents */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; }
.card {
  position: relative; padding: 1.6rem;
  background: linear-gradient(180deg, var(--card), rgba(14, 35, 51, 0.6));
  border: 1px solid var(--line);
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card::before, .card::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold);
}
.card::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.card::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.card:hover { transform: translateY(-3px); border-color: var(--gold); box-shadow: 0 8px 30px rgba(10, 200, 185, 0.12); }
.card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.card p, .card li { color: var(--muted); font-size: 0.95rem; }
.card .icon { font-size: 1.6rem; margin-bottom: 0.6rem; display: block; }
.meta { color: var(--teal); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; margin-bottom: 0.6rem; }
.card ul { padding-left: 1.1rem; }

/* About */
.about { max-width: 70ch; margin: 0 auto; text-align: center; font-size: 1.05rem; }
.about p + p { margin-top: 1rem; }

/* Timeline */
.timeline { max-width: 760px; margin: 0 auto; border-left: 1px solid var(--line); padding-left: 1.8rem; }
.tl-item { position: relative; padding-bottom: 2rem; }
.tl-item::before {
  content: ""; position: absolute; left: calc(-1.8rem - 6px); top: 0.45rem;
  width: 11px; height: 11px; background: var(--bg); border: 2px solid var(--gold); transform: rotate(45deg);
}
.tl-item h3 { font-size: 1.05rem; }
.tl-item p, .tl-item li { color: var(--muted); font-size: 0.95rem; }
.tl-item ul { padding-left: 1.1rem; margin-top: 0.3rem; }
.sub-title { text-align: center; color: var(--gold); font-family: "Cinzel", serif; margin: 3rem 0 1.5rem; font-size: 1.2rem; }

/* Skills */
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.tag {
  padding: 0.2rem 0.65rem; font-size: 0.82rem; color: var(--gold-light);
  border: 1px solid var(--line); background: rgba(200, 170, 110, 0.06);
}

/* Map cards */
.map-thumb {
  height: 150px; margin: -1.6rem -1.6rem 1.2rem; border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(10, 200, 185, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, rgba(10, 200, 185, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    radial-gradient(circle at 30% 40%, rgba(10, 200, 185, 0.25), transparent 50%),
    radial-gradient(circle at 75% 70%, rgba(200, 170, 110, 0.2), transparent 45%),
    var(--bg-2);
  display: grid; place-items: center; color: var(--gold); font-size: 2rem;
}
.soon { display: inline-block; margin-top: 0.8rem; font-size: 0.78rem; color: var(--teal); border: 1px solid var(--teal); padding: 0.1rem 0.5rem; letter-spacing: 0.06em; text-transform: uppercase; }
.center { text-align: center; margin-top: 2rem; }

/* Contact & footer */
.contact { text-align: center; }
.contact p { color: var(--muted); }
.contact .btns { justify-content: center; }
footer {
  padding: 2rem var(--pad); text-align: center; color: var(--muted); font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

/* Subpage header */
.page-head { padding-top: 3.5rem; padding-bottom: 0; }
.page-head + section { padding-top: 1rem; }

/* Home map */
.map-section { padding-left: max(1rem, calc((100% - 1200px) / 2)); padding-right: max(1rem, calc((100% - 1200px) / 2)); }
.map-wrap { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
#nl-map { width: 100%; min-width: 0; height: min(75vh, 720px); min-height: 480px; padding: 0; background: var(--bg-2); }
#nl-map:hover { transform: none; }
.map-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.8rem; }
.place {
  display: flex; align-items: center; gap: 0.9rem; text-align: left; cursor: pointer;
  font: inherit; color: var(--text); padding: 0.9rem 1.1rem;
}
.place strong { display: block; font-family: "Cinzel", serif; color: var(--gold-light); }
.place small { color: var(--muted); font-size: 0.85rem; }
.place .dot { flex: none; width: 14px; height: 14px; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 12px var(--c); }
.map-legend .btn { cursor: pointer; font: 600 0.92rem "Inter", sans-serif; }
@media (max-width: 800px) {
  .map-legend { grid-template-columns: 1fr; }
  #nl-map { height: 70vh; min-height: 420px; }
}

/* Leaflet in site colors */
.leaflet-container { background: var(--bg-2); font-family: "Inter", sans-serif; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip, .leaflet-tooltip {
  background: var(--card); color: var(--text); border: 1px solid var(--gold); border-radius: 0; box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}
.leaflet-popup-content strong { color: var(--gold-light); font-family: "Cinzel", serif; }
.leaflet-tooltip::before { display: none; }
.leaflet-tooltip .muted { color: var(--muted); }
.leaflet-tooltip.place-label {
  background: none; border: 0; box-shadow: none; color: #fff; font-weight: 600;
  text-shadow: 0 0 4px #000, 0 0 8px #000;
}
.leaflet-bar a { background: var(--card); color: var(--gold); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--gold); color: var(--bg); }
.leaflet-control-attribution { background: rgba(9,20,40,0.8) !important; color: var(--muted); }
.leaflet-control-attribution a { color: var(--teal); }
.basemap { filter: invert(1) grayscale(1) brightness(0.7) sepia(0.6) hue-rotate(170deg) saturate(2.2) contrast(0.9); }
