:root {
  --red: #e60012;
  --signal: #f68d1f;
  --amber: #ecab37;
  --nav-gold: #e9a22b;
  --canvas: #7a8aba;
  --canvas-soft: #a9c4e9;
  --lavender: #aeb6e6;
  --periwinkle: #8ba1d4;
  --chrome: #3d4f97;
  --muted-indigo: #60619c;
  --platinum: #dedede;
  --white: #fff;
  --carbon: #21242e;
  --ink: #21242e;
  --ink-soft: #3d4f97;
  --max: 1120px;
  --bevel: inset 1px 1px 0 rgba(255, 255, 255, .72), inset -1px -2px 0 #3d4f97, 0 2px 0 #2a376f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.28) 1px, transparent 1px) 0 0 / 4px 4px,
    #516295;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(30,35,62,.45), transparent 30%, transparent 70%, rgba(30,35,62,.38));
}
a { color: inherit; }
img { max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--carbon);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.site-shell {
  width: min(calc(100% - 24px), var(--max));
  margin: 18px auto;
  padding: 10px;
  background: var(--canvas);
  border: 1px solid #c5d7ff;
  box-shadow: 0 0 0 3px var(--chrome), 0 12px 30px rgba(14,18,37,.42);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}
.plate {
  background:
    linear-gradient(115deg, rgba(255,255,255,.14), transparent 30%),
    var(--periwinkle);
  border: 1px solid #c0d3f4;
  box-shadow: var(--bevel);
}
.chamfer {
  clip-path: polygon(16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%, 0 16px);
}
.carbon {
  color: white;
  background-color: var(--carbon);
  background-image: radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1.2px);
  background-size: 5px 5px;
  border: 1px solid #10131b;
  box-shadow: inset 0 1px 0 #4f566b, inset 0 -2px 0 #090b10;
}
.micro-label,
.eyebrow,
.panel-title,
.project-type,
.timeline-date,
.section-bar,
.date-chip {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.masthead { position: relative; }
.identity {
  min-height: 76px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nameplate {
  width: 54px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border: 3px solid var(--red);
  border-radius: 999px;
  background: white;
  color: var(--red);
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 18px;
  text-decoration: none;
  box-shadow: 0 2px 0 #8c1730;
}
.masthead-name {
  margin: 1px 0 0;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1;
}
.system-status {
  margin-left: auto;
  padding: 8px 10px;
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  background: rgba(255,255,255,.32);
  border: 1px solid var(--chrome);
}
.status-light {
  width: 9px;
  height: 9px;
  display: inline-block;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  border: 1px solid #a45800;
  box-shadow: 0 0 0 2px rgba(236,171,55,.18);
}
.primary-nav {
  min-height: 48px;
  margin-top: 8px;
  padding: 3px 10px;
  display: flex;
  align-items: stretch;
}
.primary-nav a {
  min-height: 44px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  color: var(--nav-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  border-right: 1px solid #484d60;
}
.primary-nav a:hover,
.primary-nav a.active { color: white; background: rgba(255,255,255,.08); }
.primary-nav a.active::before { content: ""; width: 7px; height: 7px; margin-right: 8px; background: var(--signal); }
.secondary-nav {
  min-height: 36px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--canvas-soft);
  border: 1px solid #d7e7ff;
  box-shadow: inset 0 -2px 0 var(--chrome);
}
.secondary-nav a {
  min-height: 30px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  border-right: 1px dotted var(--muted-indigo);
}
.secondary-nav a:hover { background: rgba(255,255,255,.35); }
.menu-toggle { display: none; }
main { display: grid; gap: 12px; margin-top: 12px; }
.hero {
  min-height: 410px;
  padding: clamp(24px, 5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, .65fr);
  align-items: center;
  gap: 28px;
  background:
    linear-gradient(90deg, rgba(40,69,130,.1) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(rgba(40,69,130,.1) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(135deg, #b7c9eb, var(--lavender));
}
.hero .eyebrow, .photo-hero .eyebrow { color: var(--chrome); }
.hero h1 {
  max-width: 760px;
  margin: 12px 0 16px;
  color: white;
  font-family: "Arial Black", Arial, sans-serif;
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: .98;
  letter-spacing: -.045em;
  -webkit-text-stroke: 2px var(--chrome);
  text-shadow: 4px 4px 0 #2a376f;
}
.hero-lede { max-width: 670px; margin: 0; font-size: clamp(15px, 2vw, 18px); font-weight: 700; }
.action-row { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.button {
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #70400d;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.7), 0 3px 0 #96550e;
  cursor: pointer;
}
.button:active { transform: translateY(2px); box-shadow: inset 1px 1px 0 rgba(0,0,0,.2), 0 1px 0 #96550e; }
.signal { color: white; background: var(--signal); }
.utility { background: var(--amber); }
.hero-console {
  padding: 15px;
  box-shadow: inset 0 1px 0 #4f566b, inset 0 -2px 0 #090b10, 4px 4px 0 #10131b;
}
.profile-readout { margin: 12px 0 0; }
.profile-readout div { padding: 10px 2px; border-top: 1px dotted #747b91; }
.profile-readout dt { color: var(--nav-gold); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.profile-readout dd { margin: 3px 0 0; font-size: 13px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 12px; align-items: start; }
.content-main, .content-rail { display: grid; gap: 12px; }
.module, .rail-module { padding: 8px; }
.section-bar {
  min-height: 34px;
  margin-bottom: 8px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: white;
  background: var(--chrome);
  border-top: 1px solid #aebfea;
  border-bottom: 2px solid #273773;
}
.project-list { display: grid; gap: 7px; }
.project-card {
  display: grid;
  grid-template-columns: 46px 1fr;
  background: var(--platinum);
  border: 1px solid #6a73a1;
  box-shadow: inset 1px 1px 0 white;
}
.project-index {
  padding: 16px 8px;
  display: flex;
  justify-content: center;
  color: var(--nav-gold);
  background: var(--carbon);
  font-size: 12px;
  font-weight: 700;
}
.project-body { padding: 14px; }
.project-heading { display: flex; justify-content: space-between; gap: 12px; }
.project-heading h2, .timeline h2, .skill-bank h2, .education-list h2, .small-panel h2 {
  margin: 3px 0 0;
  font-size: 17px;
  line-height: 1.25;
}
.project-type { color: var(--chrome); }
.project-year { font-size: 11px; font-weight: 700; }
.project-body > p { margin: 9px 0; }
.outcomes { margin: 9px 0; padding-left: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }
.tags span, .date-chip {
  padding: 4px 6px;
  color: var(--ink);
  background: var(--canvas-soft);
  border: 1px solid #7887b8;
}
.forward-link { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; color: var(--chrome); font-size: 12px; font-weight: 700; }
.forward-link span { color: var(--signal); }
.timeline { background: var(--platinum); border: 1px solid #6a73a1; }
.timeline article { padding: 14px; display: grid; grid-template-columns: 128px 1fr; gap: 14px; border-bottom: 1px dotted var(--muted-indigo); }
.timeline article:last-child { border-bottom: 0; }
.timeline-date { padding-top: 4px; color: var(--chrome); }
.timeline p { margin: 5px 0 0; }
.timeline .org { color: var(--chrome); font-weight: 700; }
.skill-bank, .education-list { display: grid; gap: 6px; }
.skill-bank > div, .education-list article, .small-panel {
  padding: 12px;
  background: var(--platinum);
  border: 1px solid #6a73a1;
  box-shadow: inset 1px 1px 0 white;
}
.skill-bank h2 { color: var(--chrome); text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }
.skill-bank p, .education-list p, .small-panel p { margin: 5px 0 0; font-size: 13px; }
.date-chip { display: inline-block; margin-bottom: 5px; font-size: 9px; }
.archive { display: grid; gap: 5px; }
.archive .section-bar { margin-bottom: 3px; }
.archive a { min-height: 44px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; background: white; color: var(--chrome); font-size: 12px; font-weight: 700; text-decoration: none; border: 1px solid #6a73a1; }
.archive a span:last-child { color: var(--signal); }
.world-layout { padding: clamp(12px, 3vw, 28px); display: grid; grid-template-columns: .7fr 1.3fr; align-items: center; gap: 24px; background: var(--platinum); border: 1px solid #6a73a1; }
.world-layout h2 { margin: 6px 0 8px; font-family: "Arial Black", Arial, sans-serif; font-size: clamp(25px, 4vw, 40px); line-height: 1.05; color: var(--chrome); }
.world-layout p { max-width: 430px; }
.map-status { min-height: 24px; color: var(--chrome); font-weight: 700; }
.map-canvas { width: 100%; min-height: 360px; background: #c4d4eb; border: 1px solid var(--chrome); box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 #596b9f; }
.map-canvas.large { min-height: 480px; }
.jvm-tooltip { background: var(--carbon); border: 1px solid var(--amber); border-radius: 0; font-family: Arial, sans-serif; font-size: 11px; }
.jvm-zoom-btn { width: 34px; height: 34px; padding: 6px; display: grid; place-items: center; border-radius: 0; background: var(--carbon); color: white; line-height: 1; }
.footer { margin-top: 12px; padding: 24px; display: grid; grid-template-columns: 1fr auto; gap: 16px 24px; align-items: end; }
.footer h2 { margin: 4px 0 0; font-family: "Arial Black", Arial, sans-serif; font-size: clamp(22px, 3.5vw, 34px); }
.footer .micro-label { color: var(--nav-gold); }
.social-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.social-links a { min-height: 44px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; color: white; font-size: 11px; font-weight: 700; text-decoration: none; border: 1px solid #5b6072; background: rgba(255,255,255,.05); }
.social-links img { width: 18px; height: 18px; filter: invert(1); }
.text-icon { color: var(--signal); font-size: 18px; }
.footer-note { grid-column: 1 / -1; margin: 5px 0 0; padding-top: 12px; color: #b9bfd0; font-size: 10px; border-top: 1px dotted #6c7283; }

.photo-hero {
  min-height: 330px;
  padding: clamp(28px, 6vw, 64px);
  background:
    linear-gradient(90deg, rgba(61,79,151,.14) 1px, transparent 1px) 0 0 / 26px 26px,
    linear-gradient(rgba(61,79,151,.14) 1px, transparent 1px) 0 0 / 26px 26px,
    var(--canvas-soft);
}
.photo-hero h1 { margin: 8px 0; color: white; font-family: "Arial Black", Arial, sans-serif; font-size: clamp(56px, 11vw, 112px); line-height: .9; -webkit-text-stroke: 2px var(--chrome); text-shadow: 5px 5px 0 #2a376f; }
.photo-hero > p:not(.eyebrow) { max-width: 650px; font-size: 17px; font-weight: 700; }
.photo-stats { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 7px; }
.photo-stats span { padding: 8px 12px; background: rgba(255,255,255,.55); border: 1px solid var(--chrome); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.photo-stats strong { color: var(--chrome); font-size: 17px; margin-right: 4px; }
.photo-map-layout { display: grid; grid-template-columns: 1fr 220px; gap: 8px; }
.selection-panel { padding: 16px; }
.selection-name { margin: 18px 0 5px; color: var(--nav-gold); font-family: "Arial Black", Arial, sans-serif; font-size: 26px; line-height: 1.05; }
.selection-panel .button { width: 100%; margin-top: 18px; }
.filter-row { padding: 8px; display: flex; gap: 6px; overflow-x: auto; background: var(--canvas-soft); border: 1px solid #6a73a1; }
.filter-chip { min-height: 44px; padding: 7px 11px; flex: none; color: var(--ink); background: white; border: 1px solid var(--chrome); font-size: 11px; font-weight: 700; cursor: pointer; }
.filter-chip.active { color: white; background: var(--carbon); box-shadow: inset 4px 0 0 var(--signal); }
.filter-chip span { margin-left: 4px; opacity: .72; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.photo-card { margin: 0; background: var(--platinum); border: 1px solid var(--chrome); }
.photo-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: cover; background: var(--canvas-soft); }
.photo-card figcaption { padding: 10px; }
.photo-card h2 { margin: 0; font-size: 14px; }
.photo-card p { margin: 4px 0 0; font-size: 12px; }
.photo-error { aspect-ratio: 4 / 3; padding: 20px; display: grid; place-items: center; text-align: center; background: var(--canvas-soft); color: var(--chrome); font-size: 11px; font-weight: 700; }
.empty-state { padding: clamp(28px, 6vw, 60px); text-align: center; background: var(--platinum); border: 1px solid #6a73a1; }
.empty-state h2 { margin: 8px 0; font-family: "Arial Black", Arial, sans-serif; color: var(--chrome); font-size: clamp(26px, 4vw, 42px); }
.empty-state > p { max-width: 550px; margin-left: auto; margin-right: auto; }
.empty-slots { max-width: 440px; margin: 0 auto 22px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.empty-slots span { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #a8b9db, #d5dfef); border: 1px solid var(--chrome); box-shadow: inset 1px 1px 0 white; }
.empty-slots span:nth-child(2) { transform: translateY(-8px); }
.index-intro { margin: 10px; }
.country-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.country-button { min-height: 46px; padding: 8px 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: var(--platinum); border: 1px solid #6a73a1; color: var(--ink); font-size: 11px; font-weight: 700; cursor: pointer; }
.country-button:hover, .country-button.active { color: white; background: var(--chrome); }
.country-button.is-empty { opacity: .4; }
.country-button.is-empty:hover { opacity: .72; }
.country-button.is-empty.active { opacity: 1; }
.country-button span { color: var(--chrome); padding: 2px 5px; background: var(--canvas-soft); border: 1px solid #6a73a1; }
.country-button.active span { color: var(--ink); }
[hidden] { display: none !important; }

@media (max-width: 840px) {
  .site-shell { width: min(calc(100% - 12px), var(--max)); margin: 8px auto; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-console { max-width: 520px; }
  .content-grid { grid-template-columns: 1fr; }
  .content-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-layout { grid-template-columns: 1fr; }
  .photo-map-layout { grid-template-columns: 1fr; }
  .selection-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 14px; }
  .selection-panel .panel-title { grid-column: 1 / -1; }
  .selection-panel .selection-name { margin: 8px 0 0; }
  .selection-panel p { margin: 0; }
  .selection-panel .button { width: auto; margin: 0; grid-column: 2; grid-row: 2 / 4; }
  .country-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .site-shell { padding: 7px; clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px); }
  .identity { min-height: 64px; padding: 8px; }
  .identity .micro-label { display: none; }
  .nameplate { width: 48px; height: 36px; }
  .system-status { font-size: 0; padding: 8px; }
  .menu-toggle { min-height: 46px; width: 100%; margin-top: 7px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; color: var(--nav-gold); background: var(--carbon); border: 1px solid #0d0f15; font-size: 12px; font-weight: 700; letter-spacing: .05em; cursor: pointer; }
  .primary-nav { display: none; margin-top: 0; padding: 4px; flex-direction: column; }
  .primary-nav.open { display: flex; }
  .primary-nav a { border-right: 0; border-bottom: 1px dotted #5f6474; }
  .secondary-nav { overflow-x: auto; }
  .secondary-nav a { flex: none; }
  .hero { padding: 30px 18px; gap: 20px; }
  .hero h1 { font-size: clamp(38px, 13vw, 58px); -webkit-text-stroke-width: 1.5px; text-shadow: 3px 3px 0 #2a376f; }
  .action-row .button { width: 100%; }
  .project-card { grid-template-columns: 32px 1fr; }
  .project-index { padding: 14px 4px; }
  .project-heading { display: block; }
  .project-year { display: block; margin-top: 4px; }
  .timeline article { grid-template-columns: 1fr; gap: 4px; }
  .content-rail { grid-template-columns: 1fr; }
  .world-layout { padding: 12px; }
  .map-canvas, .map-canvas.large { min-height: 300px; }
  .footer { grid-template-columns: 1fr; padding: 18px; }
  .social-links { justify-content: flex-start; }
  .photo-hero { min-height: 280px; }
  .photo-hero h1 { font-size: clamp(54px, 20vw, 82px); -webkit-text-stroke-width: 1.5px; text-shadow: 3px 3px 0 #2a376f; }
  .photo-grid { grid-template-columns: 1fr; }
  .country-grid { grid-template-columns: repeat(2, 1fr); }
  .selection-panel { display: block; }
  .selection-panel .button { margin-top: 14px; width: 100%; }
}

@media (max-width: 400px) {
  .country-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
