/* ZALACO — Mission Control site
   Locked palette sampled from UCF Space U mission patches */

:root {
  --black: #000000;
  --space: #0A0E14;
  --orbit: #1B3A5C;
  --canaveral: #4098D0;
  --halo: #6BB5E0;
  --silver: #A0A0A0;
  --silver-dim: #5A6068;
  --white: #FFFFFF;
  --white-dim: #C9CDD3;

  --display: "Chakra Petch", "Bank Gothic", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(64px, 8vw, 120px);
  --radius: 4px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ----- Type ----- */
h1, h2, h3, h4, h5 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}
h1 { font-size: clamp(50px, 6vw, 110px); line-height: 1.02; letter-spacing: 0.01em; }
h2 { font-size: clamp(40px, 4vw, 70px); line-height: 1.05; }
h3 { font-size: 28px; }
h4 { font-size: 22px; letter-spacing: 0.06em; }
h5 { font-size: 15px; letter-spacing: 0.18em; color: var(--canaveral); }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--canaveral);
  margin: 0 0 16px;
}

.lede {
  color: var(--canaveral);
  font-size: clamp(19px, 1.6vw, 22px);
  max-width: 50ch;
}

.link {
  color: var(--canaveral);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.link:hover { color: var(--halo); }

/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 17px 28px;
  border-radius: var(--radius);
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-sm { padding: 11px 20px; font-size: 15px; }
.btn-primary {
  background: var(--canaveral);
  color: var(--black);
}
.btn-primary:hover { background: var(--halo); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: var(--white-dim);
}
.btn-ghost:hover { border-color: var(--canaveral); color: var(--canaveral); }

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--gutter);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(64, 152, 208, 0.12);
}
.site-header .logo img { height: 48px; }
.primary-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.primary-nav a {
  color: var(--white);
  position: relative;
  padding: 4px 0;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--canaveral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.primary-nav a:hover::after { transform: scaleX(1); }

/* Mobile hamburger toggle (hidden on desktop) */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid rgba(64, 152, 208, 0.4);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { border-color: var(--canaveral); }
.nav-toggle-bars { display: flex; flex-direction: column; gap: 5px; width: 22px; }
.nav-toggle-bars span {
  display: block;
  height: 2px;
  background: var(--canaveral);
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: clamp(560px, 80vh, 760px);
  padding: var(--section-y) var(--gutter);
  overflow: hidden;
  isolation: isolate;
}
.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 48px;
  align-items: end;
  min-height: clamp(440px, 60vh, 580px);
}
.hero-copy h1 { margin-bottom: 24px; }

/* personable three-line headline */
.hero-headline {
  text-transform: none;
  letter-spacing: 0;
  line-height: 1;
}
.hero-headline .hi,
.hero-headline .name,
.hero-headline .invite {
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 0.95;
}
.hero-headline .hi,
.hero-headline .name { display: inline-block; vertical-align: baseline; }
.hero-headline .invite { display: block; margin-top: 12px; }
.hero-headline .hi {
  text-transform: uppercase;
  color: var(--white);
  margin-right: 0.3em;
}
.hero-headline .name {
  text-transform: uppercase;
  color: var(--white);
}
.hero-headline .invite {
  text-transform: uppercase;
  color: var(--white);
}
.hero-headline .dots { color: var(--canaveral); }

.cta-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* Starfield (CSS-generated tiny dots) */
.starfield {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255,255,255,0.6), transparent 60%),
    radial-gradient(1px 1px at 78% 18%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 28% 72%, rgba(107,181,224,0.7), transparent 60%),
    radial-gradient(1px 1px at 60% 50%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1.6px 1.6px at 88% 78%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(1px 1px at 8% 86%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 50% 14%, rgba(64,152,208,0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 38% 38%, rgba(255,255,255,0.4), transparent 60%),
    radial-gradient(1px 1px at 92% 32%, rgba(255,255,255,0.5), transparent 60%);
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.7; } to { opacity: 1; } }

/* Orbital rings — back inside the hero, scrolls away with the page.
   Rings are static; satellites orbit on independent ambient timers. */
.orbital {
  position: absolute;
  right: -200px;
  top: 50%;
  transform: translateY(-50%);
  width: 1400px;
  height: 700px;
  z-index: -1;
  opacity: 0.22;
}
.orbital ellipse {
  fill: none;
  stroke: var(--canaveral);
  stroke-width: 1;
}
.orbital .satellite {
  fill: var(--canaveral);
  filter: drop-shadow(0 0 6px rgba(64, 152, 208, 0.7));
}
.orbital .satellite-outer {
  offset-path: path("M 1680 400 A 780 340 0 1 1 120 400 A 780 340 0 1 1 1680 400");
  animation: orbit 38s linear infinite;
}
.orbital .satellite-mid {
  offset-path: path("M 1460 400 A 560 240 0 1 1 340 400 A 560 240 0 1 1 1460 400");
  animation: orbit 26s linear infinite reverse;
}
.orbital .satellite-inner {
  offset-path: path("M 1240 400 A 340 140 0 1 1 560 400 A 340 140 0 1 1 1240 400");
  animation: orbit 18s linear infinite;
}
@keyframes orbit { to { offset-distance: 100%; } }

/* ----- HUD widget ----- */
.hud {
  background: rgba(10, 14, 20, 0.85);
  border: 1px solid var(--canaveral);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-family: var(--mono);
  width: 100%;
  max-width: 320px;
  justify-self: end;
  position: relative;
}
.hud::before, .hud::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1px solid var(--canaveral);
}
.hud::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.hud::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.hud-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--silver);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(64, 152, 208, 0.25);
}
.hud-title { color: var(--canaveral); flex: 1; }
.hud-id { color: var(--silver); font-size: 12px; }
.hud-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--canaveral);
  box-shadow: 0 0 8px var(--canaveral);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hud-readouts {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
}
.hud-readouts > div {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: baseline;
  gap: 12px;
}
.hud-readouts dt {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--silver);
}
.hud-readouts dd {
  margin: 0;
  font-size: 18px;
  color: var(--white);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.hud-readouts dd.status { color: var(--canaveral); font-size: 16px; letter-spacing: 0.05em; }
.hud-readouts #years-decimal {
  color: var(--canaveral);
  font-variant-numeric: tabular-nums;
}
.waveform {
  width: 100%;
  height: 32px;
  margin-top: 14px;
  display: block;
}
.waveform polyline {
  fill: none;
  stroke: var(--canaveral);
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: trace 3s linear infinite;
}
@keyframes trace { to { stroke-dashoffset: 0; } }

/* Narrow divider band — same rule + bg treatment as the logo/toolchain strips,
   used to break the orbital hero from the section below on pages without content. */
.divider-band {
  padding: 14px var(--gutter);
  border-top: 1px solid rgba(64, 152, 208, 0.25);
  border-bottom: 1px solid rgba(64, 152, 208, 0.25);
  background: rgba(10, 14, 20, 0.6);
}

/* ----- Social-proof logo strip (homepage, under hero) ----- */
.logo-strip {
  padding: clamp(28px, 3.2vw, 44px) var(--gutter);
  border-top: 1px solid rgba(64, 152, 208, 0.25);
  border-bottom: 1px solid rgba(64, 152, 208, 0.25);
  background: rgba(10, 14, 20, 0.6);
}
.logo-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(28px, 4vw, 64px);
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
}
.logo-strip-list li {
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-strip-list img {
  height: clamp(28px, 3vw, 38px);
  width: auto;
  max-width: 200px;
  object-fit: contain;
  opacity: 0.55;
  filter: grayscale(1);
  transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}
.logo-strip-list li:hover img {
  opacity: 1;
  filter: grayscale(1) brightness(0.95) drop-shadow(0 0 8px rgba(64, 152, 208, 0.4));
  transform: translateY(-1px);
}

/* ----- Services ----- */
.services {
  padding: var(--section-y) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
}
.service-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 36px;
}
.service {
  padding: 8px 32px;
  border-left: 1px solid rgba(64, 152, 208, 0.25);
}
.service:first-child { border-left: 0; padding-left: 0; }
.service:last-child { padding-right: 0; }
.service-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  stroke: var(--canaveral);
  stroke-width: 1.5;
  fill: var(--canaveral);
  fill-opacity: 0;
}
.service-icon line { stroke: var(--canaveral); }
.service h3 { color: var(--white); margin-bottom: 6px; }
.service-sub {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--canaveral);
  margin: 0 0 14px;
}
.service p { color: var(--white-dim); font-size: 14.5px; }

/* ----- Work grid ----- */
.work {
  padding: var(--section-y) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 28px;
}
.section-head .eyebrow { margin: 0; }
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.work-card {
  display: block;
  border: 1px solid rgba(64, 152, 208, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
  background: rgba(10, 14, 20, 0.7);
}
.work-card:hover { border-color: var(--canaveral); transform: translateY(-2px); }
.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--space);
  overflow: hidden;
}
.work-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}
.work-card:hover .work-media img { transform: scale(1.03); }
.tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  background: var(--canaveral);
  color: var(--black);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  padding: 4px 8px;
  border-radius: 2px;
}
.work-card h4 {
  padding: 18px 18px 4px;
  color: var(--white);
}
.work-card .meta {
  padding: 0 18px 18px;
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ----- Stats ----- */
.stats {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 32px;
  padding: var(--section-y) var(--gutter);
  max-width: var(--max);
  margin: 0 auto;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
}
.stat { text-align: center; flex: 1; max-width: 240px; }
.stat-num {
  display: block;
  font-family: var(--display);
  font-size: clamp(55px, 6vw, 90px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--canaveral);
}
.stat-divider {
  width: 1px;
  background: rgba(64, 152, 208, 0.3);
}

/* ----- CTA ----- */
.cta {
  padding: var(--section-y) var(--gutter);
}
.cta-card {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid var(--canaveral);
  border-radius: var(--radius);
  text-align: center;
  background:
    radial-gradient(ellipse 600px 240px at 50% 0%, rgba(64,152,208,0.10), transparent 70%),
    var(--space);
  position: relative;
}
.cta-card::before, .cta-card::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--canaveral);
}
.cta-card::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.cta-card::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.cta-card h2 { margin-bottom: 12px; }
.cta-card p { color: var(--white-dim); margin-bottom: 28px; }

/* ============================================================
   SERVICES PAGE (services.html) — Capabilities Matrix
   ============================================================ */

/* Toolchain strip — SolidWorks lockup under the hero */
.toolchain-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px var(--gutter);
  border-top: 1px solid rgba(64, 152, 208, 0.25);
  border-bottom: 1px solid rgba(64, 152, 208, 0.25);
  background: rgba(10, 14, 20, 0.6);
}
.toolchain-tag {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--canaveral);
}
.toolchain-logo {
  height: 28px;
  width: auto;
  opacity: 0.95;
  filter: grayscale(1);
}

/* Personable blurb between toolchain strip and matrix */
.services-blurb {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter) clamp(8px, 1vw, 16px);
  text-align: center;
}
.services-blurb p {
  font-family: var(--body);
  font-size: clamp(21px, 1.7vw, 26px);
  line-height: 1.55;
  color: var(--white);
  margin: 0;
}

/* Matrix container */
.capabilities-matrix {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--gutter);
}
.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(64, 152, 208, 0.25);
  border-bottom: 1px solid rgba(64, 152, 208, 0.25);
}
.matrix-col {
  padding: clamp(28px, 3vw, 40px) clamp(20px, 2.4vw, 32px);
  border-left: 1px solid rgba(64, 152, 208, 0.15);
  display: flex;
  flex-direction: column;
}
.matrix-col:first-child { border-left: 0; }

/* Featured middle column — Engineering Documentation gets the visual weight */
.matrix-col--featured {
  background:
    linear-gradient(180deg, rgba(64, 152, 208, 0.05), rgba(10, 14, 20, 0)),
    rgba(10, 14, 20, 0.4);
  position: relative;
}
.matrix-col--featured::before, .matrix-col--featured::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 1px solid var(--canaveral);
}
.matrix-col--featured::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.matrix-col--featured::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.matrix-col-head { margin-bottom: 24px; }
.matrix-num {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--canaveral);
  margin: 0 0 12px;
}
.matrix-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(25px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 14px;
}
.matrix-sub {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.55;
  color: var(--white-dim);
  margin: 0;
}

.matrix-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border-top: 1px solid rgba(64, 152, 208, 0.12);
}
.matrix-list li {
  position: relative;
  padding: 9px 0 9px 22px;
  border-bottom: 1px solid rgba(64, 152, 208, 0.08);
  font-family: var(--body);
  font-size: 14.5px;
  color: var(--white);
}
.matrix-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18px;
  width: 10px;
  height: 1px;
  background: var(--canaveral);
}

.matrix-footnote {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--silver);
  margin: auto 0 0;
  font-style: italic;
}

/* Standards chip strip (inside featured column) */
.standards-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px;
}
.standards-strip .chip {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--canaveral);
  border: 1px solid rgba(64, 152, 208, 0.4);
  padding: 4px 8px;
  border-radius: 2px;
  white-space: nowrap;
}

/* GD&T symbol palette accent (decorative, behind the standards) */
.gdt-row {
  font-family: "Cambria Math", "STIX Two Math", serif;
  font-size: 28px;
  letter-spacing: 0.08em;
  color: rgba(64, 152, 208, 0.75);
  margin: 0 0 18px;
  line-height: 1;
  user-select: none;
}

/* CTA on services page */
.services-cta {
  padding: clamp(24px, 4vw, 56px) var(--gutter) var(--section-y);
}
.services-cta .cta-card {
  max-width: 720px;
}

/* Responsive: stack matrix columns under 900px */
@media (max-width: 900px) {
  .matrix-grid { grid-template-columns: 1fr; }
  .matrix-col { border-left: 0; border-top: 1px solid rgba(64, 152, 208, 0.15); }
  .matrix-col:first-child { border-top: 0; }
  .toolchain-strip { flex-direction: column; gap: 14px; padding: 20px var(--gutter); }
}

/* ============================================================
   CONTACT PAGE (contact.html)
   ============================================================ */
.contact-page {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 40px) var(--gutter) var(--section-y);
}

/* Calendar embed (Google Appointment Scheduling iframe in a branded frame) */
.calendar-embed {
  border: 1px solid var(--canaveral);
  border-radius: 4px;
  background: var(--space);
  position: relative;
  overflow: hidden;
  padding: 2px;
}
.calendar-embed::before, .calendar-embed::after {
  content: ""; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--canaveral);
  background: var(--space);
  z-index: 2;
}
.calendar-embed::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.calendar-embed::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.calendar-embed iframe {
  display: block;
  width: 100%;
  /* Height steps up at narrower viewports because Google's appointment widget
     stacks calendar-on-top + time-slots-below instead of side-by-side. */
  height: 900px;
  border: 0;
  border-radius: 2px;
  background: #ffffff; /* invert filter flips this to ~dark; do NOT change to dark */
  /* Hacky dark-mode reskin: invert flips light↔dark, hue-rotate swings hues back. */
  filter: invert(0.92) hue-rotate(180deg);
}
@media (max-width: 820px) {
  .calendar-embed iframe { height: 1080px; }
}
@media (max-width: 600px) {
  .calendar-embed iframe { height: 1300px; }
}
@media (max-width: 440px) {
  .calendar-embed iframe { height: 1480px; }
}
.calendar-fallback {
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.08em;
  color: var(--silver);
}
.calendar-fallback a {
  color: var(--canaveral);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.calendar-fallback a:hover { border-bottom-color: var(--canaveral); }

/* Email card */
.email-card {
  margin-top: clamp(28px, 3vw, 40px);
  padding: 32px clamp(24px, 4vw, 40px);
  border: 1px solid rgba(64, 152, 208, 0.35);
  border-radius: 4px;
  background: rgba(10, 14, 20, 0.6);
  text-align: center;
}
.email-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--canaveral);
  margin: 0 0 16px;
}
.email-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: clamp(25px, 2.4vw, 35px);
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  border-bottom: 1px solid var(--canaveral);
  padding: 4px 0 6px;
  transition: color 0.15s ease, border-color 0.15s ease;
  word-break: break-all;
}
.email-link:hover { color: var(--canaveral); border-bottom-color: var(--halo); }
.email-link .at, .email-link .dot { color: var(--canaveral); margin: 0 4px; }
.email-hint {
  font-family: var(--body);
  font-size: 16px;
  color: var(--silver);
  margin: 18px 0 0;
}

/* ----- Footer ----- */
.site-footer {
  margin-top: clamp(48px, 6vw, 88px);
  padding: 26px var(--gutter);
  border-top: 1px solid rgba(64, 152, 208, 0.15);
  border-bottom: 1px solid rgba(64, 152, 208, 0.15);
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 32px;
}
.site-footer .logo { justify-self: start; }
.site-footer .logo img { height: 48px; }

.copyright {
  margin: 0;
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--silver);
  text-align: center;
  justify-self: center;
}

.footer-nav-simple {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  justify-self: end;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.footer-nav-simple a {
  color: var(--white-dim);
  padding: 2px 0;
  position: relative;
  transition: color 0.15s ease;
}
.footer-nav-simple a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--canaveral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.2s ease;
}
.footer-nav-simple a:hover { color: var(--white); }
.footer-nav-simple a:hover::after { transform: scaleX(1); }

/* ============================================================
   WORK PAGE (work.html)
   ============================================================ */

.page-hero {
  position: relative;
  padding: clamp(48px, 5vw, 72px) var(--gutter) clamp(28px, 3.5vw, 48px);
  overflow: hidden;
  isolation: isolate;
}
.page-hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
}
.page-hero-title {
  font-size: clamp(48px, 6.5vw, 88px);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 6px 0 8px;
}
.page-hero-subtitle {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 1.6vw, 28px);
  letter-spacing: 0.05em;
  color: var(--canaveral);
  margin: 0;
  text-transform: none;
}
.page-hero-role {
  font-family: var(--body);
  font-size: clamp(16px, 1.2vw, 19px);
  letter-spacing: 0.02em;
  color: var(--white-dim);
  margin: 4px 0 0;
}
.page-hero .lede { max-width: 60ch; margin-top: 16px; }

.work-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 32px) var(--gutter) var(--section-y);
}

.work-entry {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 72px) 0;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
  scroll-margin-top: 100px;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  border-radius: 4px;
}
.work-entry:first-of-type { border-top: 0; }
.work-entry.flip .work-entry-text { order: 2; }
.work-entry.flip .work-entry-img-col { order: 1; }

.work-entry-text { padding: 0 8px; }
.work-entry-title {
  font-size: clamp(45px, 4.5vw, 75px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 0 0 22px;
}
.work-entry-body p {
  font-family: var(--body);
  color: var(--white-dim);
  font-size: 20px;
  line-height: 1.6;
  margin: 0 0 14px;
}

.work-entry-img-col { display: flex; align-items: center; justify-content: center; }
.work-entry-img {
  width: 100%;
  background: var(--space);
  display: block;
  overflow: hidden;
  border: 1px solid rgba(64, 152, 208, 0.25);
  border-radius: 4px;
}
.work-entry-img img { width: 100%; height: auto; display: block; }

.work-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--canaveral);
  color: var(--canaveral);
  font-family: var(--display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.work-readmore:hover { color: var(--halo); border-bottom-color: var(--halo); }

.work-expanded {
  display: none;
  padding: clamp(40px, 5vw, 60px) var(--gutter);
  margin: 0 calc(var(--gutter) * -1);
  border-top: 1px solid rgba(64, 152, 208, 0.2);
  border-bottom: 1px solid rgba(64, 152, 208, 0.2);
  background: rgba(10, 14, 20, 0.5);
}
.work-expanded.is-open { display: block; }
.work-expanded-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--canaveral);
  text-align: center;
  margin: 0 0 32px;
}
.work-expanded-item { max-width: 880px; margin: 0 auto 56px; }
.work-expanded-item:last-of-type { margin-bottom: 24px; }
.work-expanded-img {
  border: 1px solid rgba(64, 152, 208, 0.25);
  border-radius: 4px;
  overflow: hidden;
  background: var(--space);
}
.work-expanded-img img { display: block; width: 100%; height: auto; }
.work-expanded-caption {
  padding: 22px 0 0;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.work-expanded-cap-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 8px;
}
.work-expanded-cap-body {
  font-family: var(--body);
  font-size: 19px;
  line-height: 1.6;
  color: var(--white-dim);
  margin: 0;
}
.work-expanded-close-row {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
  margin-top: 24px;
}
.work-expanded-close {
  background: transparent;
  border: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--silver);
  cursor: pointer;
  padding: 4px 8px;
}
.work-expanded-close:hover { color: var(--canaveral); }

@keyframes deeplink-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(64, 152, 208, 0); background: transparent; }
  20%  { box-shadow: 0 0 0 2px rgba(64, 152, 208, 0.6); background: rgba(64, 152, 208, 0.06); }
  100% { box-shadow: 0 0 0 0 rgba(64, 152, 208, 0); background: transparent; }
}
.work-entry.is-deeplink-target {
  animation: deeplink-pulse 2.4s ease-out;
}

.primary-nav a[aria-current="page"] { color: var(--canaveral); }
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ============================================================
   ABOUT PAGE (about.html)
   ============================================================ */

.about-page {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 64px) var(--gutter) var(--section-y);
}

/* --- Intro: text on left, portrait on right --- */
.about-intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  padding-bottom: clamp(56px, 7vw, 96px);
  border-bottom: 1px solid rgba(64, 152, 208, 0.15);
}
.about-intro-text .eyebrow { margin-bottom: 14px; }

.about-section-title {
  font-size: clamp(45px, 4.6vw, 75px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  color: var(--white);
  margin: 0 0 28px;
}

.about-body {
  font-family: var(--body);
  font-size: 21px;
  line-height: 1.65;
  color: var(--white-dim);
  margin: 0 0 18px;
  max-width: 56ch;
}

/* Lead paragraph (first bio paragraph, slightly larger) */
.about-body.lead {
  font-size: 24px;
  line-height: 1.6;
  color: var(--white);
}

/* Highlights the Za / La / Co letters in the name-origin sentence */
.brand-mark {
  color: var(--canaveral);
  font-weight: 600;
}

.about-portrait-stack {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.about-portrait { margin: 0; }
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(64, 152, 208, 0.3);
  border-radius: 4px;
  background: var(--space);
}
.about-portrait figcaption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 12px 4px 0;
  flex-wrap: wrap;
}

.cap-mono {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--canaveral);
  white-space: nowrap;
}
.cap-text {
  font-family: var(--body);
  font-size: 16px;
  color: var(--silver);
  font-style: italic;
}

/* --- Bio pull-quote (lives inside the about-intro prose column) --- */
.bio-pullquote {
  margin: 28px 0 0;
  padding: 18px 0 18px 24px;
  border-left: 3px solid var(--canaveral);
}
.bio-pullquote p {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(25px, 2vw, 32px);
  line-height: 1.35;
  letter-spacing: 0.005em;
  color: var(--white);
  text-transform: none;
}

/* --- Closing photo: kept roughly grid-tile size, centered --- */
.about-closing {
  margin: clamp(56px, 7vw, 96px) auto 0;
  max-width: 600px;
}
.about-closing img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid rgba(64, 152, 208, 0.25);
  border-radius: 4px;
  background: var(--space);
}
.about-closing figcaption {
  text-align: center;
  padding: 14px 4px 0;
}

/* --- About sections (Experience, Education) --- */
.about-section {
  padding: clamp(56px, 7vw, 96px) 0;
  border-top: 1px solid rgba(64, 152, 208, 0.15);
}
.about-section:first-of-type { border-top: 0; }
.about-section-head { margin-bottom: clamp(40px, 5vw, 64px); max-width: 56ch; }
.about-section-head .eyebrow { margin-bottom: 14px; }
.about-section-head .about-section-title { margin: 0; }

/* --- CV entries (Experience timeline) --- */
.cv-entry {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(36px, 5vw, 56px) 0;
  border-top: 1px solid rgba(64, 152, 208, 0.12);
}
.cv-entry:first-of-type { border-top: 1px solid var(--canaveral); }
.cv-meta {
  position: sticky;
  top: 100px;
  align-self: start;
}
.cv-years {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 2vw, 35px);
  letter-spacing: 0.04em;
  color: var(--canaveral);
  margin: 0 0 6px;
  text-transform: uppercase;
}
.cv-location {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
  margin: 0;
}
.cv-content {}
.cv-role {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(32px, 3vw, 45px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  margin: 0 0 4px;
}
.cv-company {
  font-family: var(--display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--canaveral);
  margin: 0 0 16px;
  text-transform: uppercase;
}
.cv-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--silver);
  border: 1px solid rgba(64, 152, 208, 0.4);
  padding: 4px 10px;
  border-radius: 2px;
  margin: 0 0 22px;
}
.cv-entry.current .cv-tag {
  background: var(--canaveral);
  color: var(--black);
  border-color: var(--canaveral);
}
.cv-body p,
.cv-body li {
  font-family: var(--body);
  font-size: 20px;
  line-height: 1.62;
  color: var(--white-dim);
}
.cv-body p { margin: 0 0 14px; }
.cv-body ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}
.cv-body li {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid rgba(64, 152, 208, 0.08);
}
.cv-body li:first-child { border-top: 0; padding-top: 4px; }
.cv-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  width: 10px;
  height: 1px;
  background: var(--canaveral);
}
.cv-body li:first-child::before { top: 14px; }
.cv-body strong {
  color: var(--white);
  font-weight: 600;
  font-family: var(--body);
}


/* ----- Responsive ----- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hud { justify-self: stretch; max-width: none; }
  .service-row { grid-template-columns: 1fr; gap: 32px; }
  .service { border-left: 0; padding: 0; padding-bottom: 32px; border-bottom: 1px solid rgba(64,152,208,0.2); }
  .service:last-child { border-bottom: 0; padding-bottom: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .stats { flex-direction: column; gap: 32px; }
  .stat-divider { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .site-footer .logo { justify-self: center; }
  .footer-nav-simple { align-items: center; justify-self: center; }
  .site-header { gap: 14px; position: relative; }

  /* Show hamburger, hide desktop CTA on mobile (Contact lives in the menu) */
  .nav-toggle { display: inline-flex; }
  .site-header > .btn { display: none; }

  /* Primary nav becomes a dropdown panel below the header */
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(64, 152, 208, 0.25);
    padding: 10px 0;
    margin: 0;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a {
    padding: 14px var(--gutter);
    font-size: 19px;
    border-bottom: 1px solid rgba(64, 152, 208, 0.08);
  }
  .primary-nav a:last-child { border-bottom: 0; }
  .primary-nav a::after { display: none; }
  .primary-nav a[aria-current="page"] { color: var(--canaveral); background: rgba(64, 152, 208, 0.06); }

  /* Animate hamburger to X when open */
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Work page collapses to single column with image below text */
  .work-entry {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .work-entry .work-entry-text { order: 1 !important; }
  .work-entry .work-entry-img-col { order: 2 !important; }
  .work-entry-text { padding: 0; }

  /* About page collapses */
  .about-intro { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait-stack { position: static; }
  .cv-entry { grid-template-columns: 1fr; gap: 18px; }
  .cv-meta { position: static; }
}
