@font-face {
  font-family: 'Raleway';
  src: url('/assets/fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Raleway';
  src: url('/assets/fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/Montserrat-Italic-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #00171F;
  --text: #FFFFFF;
  --muted: #9FC9DD;
  --panel: #003459;
  --border: #007EA7;
  --accent: #007EA7;
  --accent-strong: #00A8E8;
}

/* Dark, muted grayscale theme (near-black, not mid-grey) — the landing page
   and any other page opted in via the "mono" body class, kept separate from
   layout so this doesn't drag in the landing page's flex-centered card. */
body.home,
body.mono {
  --bg: #101010;
  --text: #D8D5CC;
  --muted: #7E7C74;
  --panel: #302F2B;
  --border: #4A4944;
  --accent: #6E6C64;
  --accent-strong: #E8E3C8;
  font-family: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
}

#bg-fx {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ---------- home: centered welcome card ---------- */
.page.home {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.welcome-card {
  position: relative;
  border: 1px solid var(--border);
  padding: 2.25rem 2.75rem 1.75rem;
  text-align: center;
  min-width: 260px;
}

.welcome-card .tab {
  position: absolute;
  top: -0.85em;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.15em 0.9em;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

nav.menu-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  margin: 1.5rem 0 1.75rem;
  font-size: 1.4rem;
}

nav.menu-centered a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

nav.menu-centered a:hover,
nav.menu-centered a:focus-visible {
  color: var(--accent-strong);
  text-shadow: 0 0 10px rgba(0, 168, 232, 0.7);
}

.pill-row {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.pill-row + .pill-row {
  margin-top: 0.6rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  padding: 0.35rem 0.9rem;
  min-width: 4.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pill:hover,
.pill:focus-visible {
  border-color: var(--accent-strong);
  color: var(--accent-strong);
}

.pill:not(.deco):hover,
.pill:not(.deco):focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 168, 232, 0.35);
}

.pill.deco {
  cursor: default;
  letter-spacing: 0.1em;
  border-color: rgba(0, 126, 167, 0.4);
  color: var(--muted);
  opacity: 0.7;
}
.pill.deco:hover {
  border-color: rgba(0, 126, 167, 0.4);
  color: var(--muted);
}

/* These three use hardcoded rgba rather than the palette variables, so the
   body.home override above doesn't reach them automatically — restate them
   in grayscale here. */
body.home nav.menu-centered a:hover,
body.home nav.menu-centered a:focus-visible {
  text-shadow: 0 0 10px rgba(232, 227, 200, 0.5);
}
body.home .pill:not(.deco):hover,
body.home .pill:not(.deco):focus-visible {
  box-shadow: 0 4px 12px rgba(74, 73, 68, 0.5);
}
body.home .pill.deco,
body.home .pill.deco:hover {
  border-color: rgba(74, 73, 68, 0.5);
}

/* ---------- sub pages (about/blog/contact) ---------- */
.page.sub {
  padding: 2rem 1.5rem;
}

/* Vertically centers .content in the viewport — text/back-link stay
   left-aligned as they were, only the block's vertical position moves. */
.page.center-v {
  display: flex;
  align-items: center;
}

.content {
  max-width: 640px;
  margin: 0 auto;
}

.content h2 {
  margin-top: 1rem;
}

a.back-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 0.95rem;
}
a.back-link:hover { color: var(--text); }

form#contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-message {
  color: var(--accent-strong);
}

/* Visually hidden but still reachable by screen readers — used for labels
   the design doesn't have room to show, e.g. next to placeholder-only
   inputs. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: hidden from real users, but not via display:none/visibility,
   which some screen readers and bots alike simply ignore. Off-screen
   positioning is more reliably invisible while staying in the tab/DOM flow
   for anything that doesn't respect the hiding technique. */
.honeypot {
  position: absolute;
  left: -9999px;
}

form#contact-form input,
form#contact-form textarea {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.6rem;
  font-family: inherit;
}

form#contact-form textarea {
  min-height: 8rem;
}

form#contact-form button {
  background: var(--accent-strong);
  color: var(--bg);
  border: none;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  align-self: flex-start;
  transition: background 0.2s ease;
}
form#contact-form button:hover { background: var(--accent); }

@media (max-width: 600px) {
  .page.sub { padding: 1.5rem 1rem; }
  .welcome-card { padding: 1.75rem 1.5rem 1.5rem; }
}
