@font-face {
  font-family: "0xProto";
  src: url("fonts/0xProto-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "0xProto";
  src: url("fonts/0xProto-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #050507;
  --surface: #0d0e11;
  --steel: #2a2d33;
  --text: #c9ccd3;
  --muted: #5c6068;
  --red: #ff1e2d;
  --red-rgb: 255, 30, 45;
  --mono: "0xProto", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --logo-tracking: 0.12em;
  --logo-glow:
    0 0 4px rgba(var(--red-rgb), 1),
    0 0 12px rgba(var(--red-rgb), 0.9),
    0 0 32px rgba(var(--red-rgb), 0.6),
    0 0 64px rgba(var(--red-rgb), 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--text);
  font-family: var(--mono);
  font-size: 1rem;
  line-height: 1.6;
  background:
    /* red reactor glow behind the logo */
    radial-gradient(ellipse 60% 40% at 50% 22%, rgba(var(--red-rgb), 0.12), transparent 70%),
    /* vignette */
    radial-gradient(ellipse at center, transparent 35%, rgba(0, 0, 0, 0.75) 100%),
    /* steel deck plating */
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
}

/* Scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.3) 3px
  );
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  padding-top: 14vh;
  text-align: center;
}

/* Imperial HUD rules framing the logo */
header::before,
header::after {
  content: "";
  display: block;
  height: 8px;
  margin: 0 auto;
  max-width: 420px;
  background:
    linear-gradient(var(--red), var(--red)) center / 48px 2px no-repeat,
    repeating-linear-gradient(90deg, var(--steel) 0 2px, transparent 2px 12px) center / 100% 8px no-repeat;
  opacity: 0.8;
}

header::before {
  margin-bottom: 1.5rem;
}

header::after {
  margin-top: 1.5rem;
}

main {
  flex: 1;
  padding: 3rem 0;
}

/* Logo */
.logo {
  margin: 0;
  font-size: clamp(2.5rem, 12vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: var(--logo-tracking);
  /* cancel trailing letter-spacing so the word is optically centered and cannot overflow */
  margin-right: calc(-1 * var(--logo-tracking));
  color: #ffe5e7;
  text-shadow: var(--logo-glow);
  animation: neon-flicker 7s linear infinite;
}

.flip {
  display: inline-block;
  transform: scaleX(-1);
  /* letter-spacing sits inside the mirrored box and would flip to the left; move it outside */
  letter-spacing: 0;
  margin-right: var(--logo-tracking);
  animation: neon-twitch 4.3s linear infinite;
}

/* Long steady burn with brief, irregular drops in power */
@keyframes neon-flicker {
  0%, 18%, 21%, 23%, 54%, 56%, 100% {
    opacity: 1;
  }
  19%, 22% {
    opacity: 0.55;
  }
  20% {
    opacity: 0.85;
  }
  55% {
    opacity: 0.7;
  }
}

/* The mirrored N misfires on its own schedule, with a chromatic split */
@keyframes neon-twitch {
  0%, 61%, 66%, 100% {
    opacity: 1;
    text-shadow: var(--logo-glow);
  }
  62% {
    opacity: 0.25;
    text-shadow: var(--logo-glow);
  }
  63% {
    opacity: 1;
    text-shadow:
      3px 0 0 rgba(0, 200, 255, 0.7),
      -3px 0 0 rgba(var(--red-rgb), 0.9),
      0 0 24px rgba(var(--red-rgb), 0.8);
  }
  64% {
    opacity: 0.4;
    text-shadow: var(--logo-glow);
  }
  65% {
    opacity: 1;
  }
}

.tagline {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cursor {
  display: inline-block;
  width: 0.6em;
  /* match the uppercase tagline: cap height, resting on the baseline */
  height: 0.73em;
  height: 1cap;
  margin-left: 0.25em;
  vertical-align: baseline;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* Future application list */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 1rem;
  margin-bottom: 3rem;
}

.apps:empty {
  display: none;
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  font-style: normal;
  text-align: center;
}

.contact-label {
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channels a {
  display: inline-block;
  /* comfortable tap target around small text */
  padding: 0.75rem 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.2s, text-shadow 0.2s;
}

/* Red brackets that light up on hover */
.channels a::before,
.channels a::after {
  color: var(--red);
  opacity: 0.6;
  transition: opacity 0.2s, text-shadow 0.2s;
}

.channels a::before {
  content: "[ ";
}

.channels a::after {
  content: " ]";
}

.channels a:hover,
.channels a:focus-visible {
  color: #fff;
  text-shadow: 0 0 10px rgba(var(--red-rgb), 0.9);
}

.channels a:hover::before,
.channels a:hover::after,
.channels a:focus-visible::before,
.channels a:focus-visible::after {
  opacity: 1;
  text-shadow: 0 0 8px rgba(var(--red-rgb), 0.8);
}

.channels a:focus-visible {
  outline: 1px dashed var(--red);
  outline-offset: -0.25em;
}

/* Phones: one centered column instead of a ragged wrap */
@media (max-width: 480px) {
  .channels {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }
}

/* Footer */
footer {
  padding: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  margin: 0;
}

.legal {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  opacity: 0.6;
}

.heart {
  font-variant-emoji: text;
  color: var(--red);
  text-shadow:
    0 0 6px rgba(var(--red-rgb), 0.9),
    0 0 16px rgba(var(--red-rgb), 0.6);
}

@media (prefers-reduced-motion: reduce) {
  .logo,
  .flip,
  .cursor {
    animation: none;
  }

  .channels a,
  .channels a::before,
  .channels a::after {
    transition: none;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
