:root {
  --bg: #0a0f1a;
  --bg2: #0e1524;
  --panel: #121a2b;
  --line: #243049;
  --text: #e9ecf2;
  --muted: #98a2b5;
  --accent: #c8a45a;
  --accent-soft: rgba(200, 164, 90, .14);
  --steel: #7ea6e0;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: flex-start; gap: 1rem;
  padding: .9rem clamp(1.5rem, 5vw, 4rem);
  background: rgba(10, 15, 26, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav .brand { font-family: var(--serif); font-size: 1.15rem; color: var(--text); text-decoration: none; letter-spacing: .02em; }
.nav-auth { margin-left: auto; position: relative; }
.nav-auth[hidden] { display: none; }
.nav-signin { font: 600 .72rem var(--sans); letter-spacing: .14em; text-transform: uppercase; padding: .5rem .95rem; border: 1px solid var(--accent); background: transparent; color: var(--accent); cursor: pointer; transition: background .2s, color .2s; }
.nav-signin:hover { background: var(--accent); color: var(--bg); }
.nav-avatar { width: 2.1rem; height: 2.1rem; padding: 0; border: 2px solid var(--accent); border-radius: 50%; overflow: hidden; background: var(--panel); cursor: pointer; display: block; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nav-menu { position: absolute; right: 0; top: calc(100% + .6rem); min-width: 13rem; background: var(--panel); border: 1px solid var(--line); border-top: 2px solid var(--accent); box-shadow: 0 14px 40px rgba(0, 0, 0, .5); display: flex; flex-direction: column; }
.nav-menu[hidden] { display: none; }
.nav-who { padding: .8rem 1rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .15rem; }
.nav-who b { font-size: .9rem; color: var(--text); }
.nav-who small { font-size: .75rem; color: var(--muted); word-break: break-all; }
.nav-menu a, .nav-menu button { padding: .7rem 1rem; text-align: left; font: 500 .75rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none; }
.nav-menu a:hover, .nav-menu button:hover { color: var(--accent); background: var(--accent-soft); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.8rem; }
.nav ul a { color: var(--muted); text-decoration: none; font-size: .78rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 500; transition: color .2s; }
.nav ul a:hover, .nav ul a.on { color: var(--accent); }

/* Hero */
.hero {
  position: relative; isolation: isolate;
  min-height: 400px;
  display: flex; align-items: center;
  padding: 2.5rem clamp(1.5rem, 5vw, 4rem);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.hero::before {
  z-index: -2;
  background: url("img/hero.jpg") right 3% top 52% / max(83%, 720px) auto no-repeat;
  filter: saturate(.88) contrast(.92) brightness(.97);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 93%, transparent 100%);
}
.hero::after {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 15, 26, .97) 25%, rgba(10, 15, 26, .55) 50%, rgba(10, 15, 26, 0) 68%),
    linear-gradient(0deg, var(--bg), transparent 12%);
}.hero-text { max-width: 44rem; width: 100%; max-width: 84rem; margin: 0 auto; }
.hero-text > * { max-width: 40rem; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .28em; font-size: .75rem; font-weight: 600; margin: 0 0 1rem; }
h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(2.5rem, 5.85vw, 4.3rem); margin: 0 0 .6rem; line-height: 1.05; letter-spacing: -.01em; }
.tagline { color: #c4cad6; font-size: 1.2rem; font-weight: 300; margin: 0 0 1.6rem; }
.links { margin: 0; }
.btn {
  display: inline-block; padding: .7rem 1.6rem; margin: .3rem .6rem .3rem 0;
  background: var(--accent); color: #0a0f1a; border: 1px solid var(--accent);
  text-decoration: none; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  transition: all .2s;
}
.btn:hover { background: #dcba72; border-color: #dcba72; }
.btn.ghost { background: transparent; color: var(--text); border-color: #4a5670; }
.btn.ghost:hover { color: var(--accent); border-color: var(--accent); background: transparent; }
.hero-cta { margin: 1.4rem 0 0; }
.ownerlink::before { content: " \00b7 "; color: var(--muted, #aab3c5); }
.talk { margin-top: 1.6rem; max-width: 40rem; }
.talk h2 { margin: 0 0 .5rem; font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.talk p { margin: 0; color: var(--muted, #aab3c5); line-height: 1.6; }
.talk .hero-cta { margin-top: 1rem; }

/* Layout */
main { max-width: 84rem; margin: 0 auto; padding: 1rem clamp(1.5rem, 5vw, 4rem) 3rem; }
section { padding: 4rem 0 1rem; }
.hero.slim + main section { padding-top: 2rem; }
h2 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin: 0 0 1.8rem; line-height: 1.2; position: relative; padding-top: 1.4rem;
}
h2::before { content: ""; position: absolute; top: 0; left: 0; width: 3.5rem; height: 2px; background: var(--accent); }
h3 { font-family: var(--serif); font-weight: 600; }
#about p { max-width: 62rem; font-size: 1.08rem; color: #d3d8e2; }
#about p:first-of-type { font-family: var(--serif); font-size: 1.55rem; line-height: 1.5; color: var(--text); }
#about p strong { color: var(--accent); font-weight: 600; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin: 0 0 1rem; border: 1px solid var(--line); background: var(--bg2); }
.metric { padding: 1.6rem 1.5rem; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric b { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--accent); line-height: 1.1; }
.metric span { color: var(--muted); font-size: .82rem; line-height: 1.4; display: block; margin-top: .4rem; }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.chips li { border: 1px solid var(--line); padding: .4rem 1rem; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Experience */
.org { margin-bottom: 3rem; }
.org > h3 { font-size: 1.6rem; margin: 0 0 .4rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .8rem; }
.org > h3 a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--accent); }
.org > h3 a:hover { color: var(--accent); }
.dates, .meta { color: var(--muted); font-size: .88rem; font-weight: 400; font-family: var(--sans); letter-spacing: .02em; }
.role { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 1.6rem 1.8rem; margin-bottom: 1.2rem; }
.role h4 { margin: 0; font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.meta { margin: .2rem 0 .8rem; }
.role ul { margin: 0; padding-left: 1.1rem; color: #bcc4d2; }
.role li { margin-bottom: .45rem; }
.role li strong { color: var(--text); }
.note { color: var(--muted); font-size: .92rem; font-style: italic; margin: 0 0 1.2rem; }
.headline { margin: 0 0 .8rem; color: var(--accent); font-style: italic; }

/* Maps */
.map { height: 640px; border: 1px solid var(--line); }
.map .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.8) contrast(.9) saturate(.7); }
.leaflet-tooltip { font-weight: 600; background: rgba(10, 15, 26, .9); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.leaflet-tooltip-right::before { border-right-color: var(--line); }
.leaflet-tooltip-top::before { border-top-color: var(--line); }
.viewbar { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
#minipop { position: absolute; right: 1.2rem; top: 0; width: min(440px, calc(100vw - 2.4rem)); z-index: 1500; background: rgba(10, 15, 26, .96); border: 1px solid var(--line); box-shadow: 0 10px 36px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
#minipop.open { opacity: 1; transform: none; pointer-events: auto; }
.minihead { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .5rem .5rem .5rem .9rem; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.minihead button { background: none; border: 0; color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 .4rem; }
.minihead button:hover { color: var(--accent); }
#minimap { height: 300px; }
.viewbar button { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: .4rem 1.1rem; font: inherit; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.viewbar button:hover { border-color: var(--accent); color: var(--accent); }
.legend { background: rgba(10, 15, 26, .94); color: var(--text); border: 1px solid var(--line); padding: .9rem 1.1rem; font-size: .82rem; line-height: 1.9; min-width: 15rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
.legend-title { cursor: pointer; user-select: none; display: flex; justify-content: space-between; gap: 1rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; font-size: .7rem; color: var(--accent); border-bottom: 1px solid var(--line); padding-bottom: .3rem; margin-bottom: .2rem; }
.legend-caret { transition: transform .15s; }
.legend.min { min-width: 0; padding: .5rem .8rem; }
.legend.min > :not(.legend-title) { display: none; }
.legend.min .legend-title { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.legend.min .legend-caret { transform: rotate(90deg); }
.legend-group { margin-top: .5rem; color: var(--muted); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.4; }
.legend label { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.legend input { accent-color: var(--accent); margin: 0; }
.legend .sw { width: 1.1rem; height: .8rem; border: 2px solid; flex: none; }
.legend-pin { display: flex; align-items: center; gap: .5rem; }
.legend .dot { width: .8rem; height: .8rem; border-radius: 50%; background: var(--accent); border: 2px solid #fff; flex: none; }
.leaflet-popup-content-wrapper { background: var(--panel); color: var(--text); border-radius: 2px; border: 1px solid var(--line); }
.leaflet-popup-tip { background: var(--panel); }
.leaflet-popup-content a { color: var(--accent); }

/* Flying */
.hero.slim { min-height: 0; padding-top: 3.5rem; padding-bottom: 3rem; background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.hero.slim::before, .hero.slim::after { display: none; }
.hero.slim .eyebrow a { color: inherit; text-decoration: none; }
.lede { font-family: var(--serif); font-size: 1.45rem; line-height: 1.55; max-width: 60rem; color: var(--text); }
.flystats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: 2rem 0 1.5rem; border: 1px solid var(--line); background: var(--bg2); }
.flystats div { padding: 1.3rem 1.5rem; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.flystats div:last-child { border-right: 0; }
.flystats b { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; color: var(--accent); line-height: 1.1; }
.flystats span { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.slicer { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1rem 1.4rem; border: 1px solid var(--line); background: var(--panel); margin-bottom: 1rem; }
.slicer .lbl { color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: .7rem; font-weight: 600; }
.slicer .yr { font-family: var(--serif); font-size: 1.5rem; min-width: 10rem; }
.range { position: relative; flex: 1; min-width: 16rem; height: 2rem; }
.range .track { position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; background: var(--line); }
.range .fill { position: absolute; top: 50%; height: 3px; margin-top: -1.5px; background: var(--accent); }
.range input { position: absolute; left: 0; width: 100%; top: 0; height: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--accent); cursor: pointer; }
.range input::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); cursor: pointer; }
.range input::-webkit-slider-runnable-track { background: none; }
.range input::-moz-range-track { background: none; }
.subhead { font-size: 1.5rem; margin: 3rem 0 0; }
.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1.4rem; margin-top: 1.5rem; }
.story { background: var(--panel); border: 1px solid var(--line); padding: 1.4rem; transition: border-color .2s; }
.story h3 { margin: .5rem 0 .1rem; font-size: 1.2rem; }
.story .photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .5rem; }
.story .photos img { width: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.story .photos video { grid-column: 1 / -1; width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; display: block; }
.story .photos .vwrap { grid-column: 1 / -1; position: relative; }
.story .photos img:first-child:nth-last-child(3) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.trip .route { font-size: .78rem; color: var(--muted); word-break: break-word; letter-spacing: .03em; }
.trip.active { border-color: var(--accent); }
.tripbtn { background: none; color: var(--accent); border: 1px solid var(--accent); padding: .35rem 1rem; font: inherit; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.tripbtn:hover { background: var(--accent); color: #0a0f1a; }

footer { text-align: center; padding: 3rem 2rem; color: var(--muted); border-top: 1px solid var(--line); font-size: .85rem; letter-spacing: .06em; }
.footlinks a { color: var(--muted); text-decoration: none; margin: 0 .8rem; text-transform: uppercase; font-size: .72rem; letter-spacing: .16em; }
.footlinks a:hover { color: var(--accent); }
.sig { height: 44px; filter: invert(1); opacity: .6; }
.muted { color: var(--muted); }

@media (max-width: 800px) {
  .nav ul { gap: 1rem; flex-wrap: wrap; }
  .map { height: 460px; }
  .metric, .flystats div { border-right: 0; border-bottom: 1px solid var(--line); }
  .hero::before { background-position: right center; background-size: cover; }
  .hero::after { background: rgba(10, 15, 26, .88); }
  .hero:not(.slim) { min-height: 0; }
}

.fine { font-size: .78rem !important; color: var(--muted) !important; font-family: var(--sans) !important; line-height: 1.6 !important; max-width: 62rem; }

.morebar { text-align: center; margin: 1.6rem 0 0; }
.footauth { text-align: right; margin: 1.2rem 0 0; font-size: .72rem; letter-spacing: .08em; }
.footauth a { color: var(--muted); opacity: .6; text-decoration: none; margin-left: 1rem; }
.footauth a:hover { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5, 8, 14, .94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-stage { max-width: 90vw; max-height: 72vh; display: flex; }
.lb-stage img, .lb-stage video { max-width: 90vw; max-height: 72vh; object-fit: contain; background: #000; }
.lb-cap { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: var(--muted); font-size: .85rem; letter-spacing: .08em; padding: 0 4rem; pointer-events: none; }
.lb-top { position: absolute; top: 1.1rem; left: 5rem; right: 5rem; text-align: center; pointer-events: none; }
.lb-title { display: block; color: #fff; font: 600 1.25rem Georgia, serif; }
.lb-date { display: block; color: var(--accent); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-top: .25rem; }
.lb-map { position: absolute; right: 1.2rem; top: 4.6rem; width: 280px; border: 1px solid rgba(255, 255, 255, .25); background: #0a0f1a; box-shadow: 0 6px 24px rgba(0, 0, 0, .6); }
#lbmap { height: 190px; }
.lb-route { display: block; padding: .3rem .5rem; font-size: .68rem; letter-spacing: .06em; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { .lb-stage, .lb-stage img, .lb-stage video { max-width: calc(100vw - 640px); } }
@media (max-width: 600px) { .lb-map { width: 150px; right: .6rem; top: 4.2rem; } #lbmap { height: 100px; } .lb-route { display: none; } .lb-cap { padding: 0 2rem; bottom: 1rem; } .lb-top { left: 3.5rem; right: 3.5rem; } .lb-title { font-size: 1rem; } .lb-stage, .lb-stage img, .lb-stage video { max-height: 66vh; } }
.lb-close, .lb-nav { position: absolute; background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(255, 255, 255, .2); cursor: pointer; line-height: 1; transition: background .2s; }
.lb-close:hover, .lb-nav:hover { background: var(--accent); color: #0a0f1a; }
.lb-close { top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.8rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 3rem; height: 4rem; font-size: 2.4rem; }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
body.lb-open { overflow: hidden; }
@media (max-width: 600px) { .lb-nav { width: 2.4rem; height: 3.2rem; } .lb-prev { left: .3rem; } .lb-next { right: .3rem; } }
.vexpand { position: absolute; top: .5rem; right: .5rem; width: 2.1rem; height: 2.1rem; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 15, 26, .7); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.vwrap:hover .vexpand, .vexpand:focus-visible { opacity: 1; }
@media (hover: none) { .vexpand { opacity: 1; } }
.vexpand { display: none; }
body.owner .vexpand { display: inline-block; }
body.owner .story .photos img { cursor: zoom-in; }
.story .credit { margin: .2rem 0 0; font-size: .88rem; color: var(--muted); }
body.owner .milestone .photos img { cursor: zoom-in; }
