@font-face { font-family: "Space Grotesk"; src: url("assets/fonts/SpaceGrotesk-Variable.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/Inter-english.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --navy-900: #00132A;
  --navy-850: #021a37;
  --navy-700: #0D376A;
  --blue-800: #004190;
  --blue-700: #014BA6;
  --blue-600: #0064E3;
  --blue-500: #0B74F6;
  --steel-400: #5A8AC5;
  --steel-300: #96B1C7;
  --mist-100: #EAEFF4;
  --grey-300: #CDCDCD;

  --glass-1: rgba(255,255,255,0.03);
  --glass-2: rgba(255,255,255,0.05);
  --glass-3: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.15);
  --hairline: rgba(255,255,255,0.09);
  --blue-tint: rgba(11,116,246,0.19);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --r-sm: 12px; --r-md: 16px; --r-lg: 24px; --r-pill: 40px;

  /* Domain colours, tuned for the navy canvas */
  --d-air: #5BB4FF;
  --d-naval: #2DD4BF;
  --d-land: #E3B341;
  --d-joint: #A78BFA;
  --d-cyber: #F472B6;
  --d-space: #C4D3E3;
  --d-security: #FB923C;

  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--mist-100);
  font: 400 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-500); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; margin: 0; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

/* Header */
.site-header { border-bottom: 1px solid var(--hairline); position: relative; z-index: 2; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--mist-100); min-width: 0; }
.brand img { display: block; height: 30px; width: auto; flex: none; }
.brand-divider { width: 1px; height: 26px; background: var(--glass-border); flex: none; }
.brand-title { font: 500 18px/1.2 var(--font-display); letter-spacing: -0.01em; white-space: nowrap; }
@media (max-width: 420px) { .brand { gap: 12px; } .brand img { height: 24px; } .brand-title { font-size: 15px; } }

/* Hero */
.hero {
  position: relative;
  padding: 64px 0 56px;
  background:
    linear-gradient(180deg, rgba(0,19,42,.55) 0%, rgba(0,19,42,.75) 55%, var(--navy-900) 100%),
    url("assets/hero.png") center 30% / cover no-repeat;
}
.eyebrow {
  margin: 0 0 18px; color: var(--steel-300);
  font: 500 13px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue-500); margin-right: 10px; vertical-align: 1px;
  box-shadow: 0 0 12px var(--blue-500);
}
.hero h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.06; letter-spacing: -0.035em; max-width: 960px; }
.lede { color: var(--steel-300); font-size: clamp(16px, 1.6vw, 20px); font-weight: 300; margin: 18px 0 0; max-width: 720px; }

.stats { display: grid; grid-template-columns: 1fr 2.4fr; gap: 16px; margin-top: 40px; max-width: 760px; }
.stat {
  background: var(--glass-2); border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  padding: 20px 24px; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.stat-label { color: var(--steel-300); font-size: 13px; letter-spacing: .04em; }
.stat-value { font: 500 32px/1.1 var(--font-display); letter-spacing: -0.02em; }
.stat-next .stat-value { font-size: 22px; line-height: 1.25; }
.stat-next .stat-value small { display: block; color: var(--steel-300); font: 400 14px/1.4 var(--font-body); margin-top: 4px; }
.stat-next a { color: inherit; text-decoration: none; }
.stat-next a:hover { color: var(--blue-500); }
@media (max-width: 760px) {
  .stats { grid-template-columns: 1fr; }
}

/* Controls */
.controls {
  position: relative; z-index: 5;
  background: rgba(0,19,42,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  padding: 16px 0 12px;
}
@media (min-width: 961px) and (min-height: 700px) { .controls { position: sticky; top: 0; } }
.filter-row { display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: 12px; }
@media (max-width: 960px) { .filter-row { grid-template-columns: 1fr 1fr; } .field-search { grid-column: 1 / -1; } }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; color: var(--steel-300); letter-spacing: .04em; }
.field input, .field select {
  appearance: none; -webkit-appearance: none;
  width: 100%; height: 42px; padding: 0 14px;
  background: var(--glass-2); color: var(--mist-100);
  border: 1px solid var(--glass-border); border-radius: var(--r-sm);
  font: inherit; font-size: 15px;
}
.field select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%2396B1C7' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.field select option { background: var(--navy-900); }
.field input:focus, .field select:focus, button:focus-visible, .toggle input:focus-visible, a:focus-visible {
  outline: 2px solid var(--blue-500); outline-offset: 2px;
}
.filter-row-2 { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--glass-border); background: transparent; color: var(--mist-100);
  border-radius: var(--r-pill); padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.chip:hover { background: var(--glass-3); }
.chip[aria-pressed="true"] { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.chip .n { opacity: .65; margin-left: 4px; font-size: 12px; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--steel-300); cursor: pointer; }
.toggle input { accent-color: var(--blue-500); width: 16px; height: 16px; margin: 0; }
.reset { background: none; border: 0; color: var(--blue-500); font: inherit; font-size: 14px; cursor: pointer; padding: 4px 0; }
.reset:hover { text-decoration: underline; }

.view-row { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-top: 14px; }
.tabs { display: inline-flex; background: var(--glass-2); border: 1px solid var(--glass-border); border-radius: var(--r-pill); padding: 4px; }
.tabs button {
  background: none; border: 0; color: var(--steel-300); font: 500 14px/1 var(--font-body);
  padding: 9px 20px; border-radius: var(--r-pill); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--blue-500); color: #fff; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--steel-300); }
.legend span { display: inline-flex; align-items: center; gap: 6px; text-transform: capitalize; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--c, var(--steel-400)); }

/* Results */
.results { padding: 32px 0 48px; }
.empty { text-align: center; color: var(--steel-300); padding: 48px 0; }

/* Calendar view */
.calendar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1080px) { .calendar { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .calendar { grid-template-columns: minmax(0, 1fr); } }
.year-label {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 16px;
  font: 500 28px/1 var(--font-display); letter-spacing: -0.02em; margin-top: 16px;
}
.year-label:first-child { margin-top: 0; }
.year-label::after { content: ""; flex: 1; height: 1px; background: var(--navy-700); }
.month {
  background: var(--glass-1); border: 1px solid var(--glass-border); border-radius: var(--r-lg);
  padding: 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0;
}
.month.is-empty { opacity: .45; }
.month.is-current { border-color: var(--blue-500); box-shadow: 0 0 0 1px var(--blue-500) inset; }
.month-head { display: flex; justify-content: space-between; align-items: baseline; }
.month-head h3 { font-size: 22px; }
.month-head .count { font-size: 13px; color: var(--steel-300); }
.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.grid7 .dow { font-size: 11px; color: var(--steel-400); padding-bottom: 4px; }
.day {
  position: relative; font-size: 12px; color: var(--steel-300);
  height: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px;
}
.day.has { background: var(--glass-3); color: var(--mist-100); font-weight: 600; cursor: default; }
.day.today { outline: 1px solid var(--blue-500); outline-offset: -1px; color: var(--mist-100); }
.day .bars { position: absolute; bottom: 3px; left: 4px; right: 4px; display: flex; gap: 2px; justify-content: center; }
.day .bars i { height: 3px; flex: 1; max-width: 10px; border-radius: 2px; background: var(--c); }
.day.past { opacity: .45; }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ev {
  display: grid; grid-template-columns: 4px 1fr; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-sm); background: var(--glass-2);
  transition: background .15s;
}
.ev:hover { background: var(--glass-3); }
.ev .bar { border-radius: 2px; background: var(--c); }
.ev-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.ev-name a { color: var(--mist-100); text-decoration: none; }
.ev-name a:hover { color: var(--blue-500); text-decoration: underline; }
.ev-meta { font-size: 12.5px; color: var(--steel-300); margin-top: 2px; }
.ev.past { opacity: .5; }
.tbc-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--steel-400); margin: 4px 0 -2px; }

/* Tags */
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border); color: var(--steel-300); text-transform: capitalize; white-space: nowrap;
}
.tag-est { border-style: dashed; }
.tag-past { text-transform: none; }

/* List view */
.list { display: flex; flex-direction: column; gap: 28px; }
.list-month h3 {
  font-size: 15px; font-family: var(--font-body); font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--steel-300); padding-bottom: 10px; border-bottom: 1px solid var(--navy-700); margin-bottom: 4px;
}
.row {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px 24px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--hairline);
}
.row.past { opacity: .5; }
.row-date { font: 500 16px/1.3 var(--font-display); }
.row-date small { display: block; color: var(--steel-400); font: 400 12px/1.4 var(--font-body); margin-top: 2px; }
.row-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-title h4 { margin: 0; font: 500 19px/1.25 var(--font-display); letter-spacing: -0.01em; }
.row-where { color: var(--steel-300); font-size: 14px; margin-top: 2px; }
.row-focus { color: var(--grey-300); font-size: 14px; font-weight: 300; margin-top: 6px; }
.visit {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  color: var(--mist-100); text-decoration: none; font-size: 14px;
  border: 1px solid var(--glass-border); border-radius: var(--r-pill); padding: 9px 18px;
  transition: background .15s, border-color .15s;
}
.visit:hover { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }
.visit svg { width: 12px; height: 12px; }
@media (max-width: 720px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .visit { justify-self: start; }
}

/* Notes */
.notes { padding: 0 0 32px; }
.notes p { margin: 0 0 6px; max-width: 900px; color: var(--steel-400); font-size: 12px; line-height: 1.5; }
.notes strong { color: var(--steel-300); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--hairline); padding: 28px 0; color: var(--steel-300); font-size: 13px; }
.footer-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.built { margin-left: auto; color: var(--steel-400); }

/* Tooltip for calendar days */
.day[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--navy-850); border: 1px solid var(--glass-border); color: var(--mist-100);
  font-size: 12px; font-weight: 400; white-space: pre; text-align: left;
  padding: 8px 10px; border-radius: 10px; z-index: 3; pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
