:root {
  --bg: #0e1a2b;
  --accent: #7fd3ff;
  --text: #e6efff;
  --muted: rgba(230, 239, 255, 0.6);
  --grid-line: rgba(255, 255, 255, 0.05);
  --grid-size: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100svh;
  overflow: hidden;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
}

.label,
.brand-mark,
.meta-line,
.link-list a {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.display-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: none;
}

.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;
}

body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  font-size: 11px;
  color: var(--muted);
}

.link-list {
  display: flex;
  gap: 20px;
}

.link-list a {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: lowercase;
  outline-offset: 4px;
}

.link-list a:focus-visible {
  outline: 1px solid var(--accent);
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  position: relative;
}

.hero-stack {
  max-width: 720px;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-rule {
  border: 0;
  border-top: 1px solid var(--muted);
  width: 120px;
  margin: 24px auto;
  opacity: 0.5;
}

.meta-line {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 3px;
}

/* Animation B — Type-out quote (two lines, sequential) */
.display-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.type-line {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  border-right: 2px solid transparent;
  animation-timing-function: steps(14, end);
  animation-fill-mode: forwards;
}

.type-line-1 {
  animation:
    type-line-1 0.9s steps(14, end) 1.6s forwards,
    caret-on 0s linear 1.6s forwards,
    caret-blink 0.7s step-end 1.6s 3,
    caret-off 0s linear 2.5s forwards;
}

.type-line-2 {
  animation:
    type-line-2 0.8s steps(11, end) 2.5s forwards,
    caret-on 0s linear 2.5s forwards,
    caret-blink 0.7s step-end 2.5s 4,
    caret-fade 0.4s ease-out 5.3s forwards;
}

@keyframes type-line-1 { to { width: 11.5ch; } }
@keyframes type-line-2 { to { width: 7.5ch; } }

@keyframes caret-blink {
  50% { border-right-color: transparent; }
}

@keyframes caret-on {
  to { border-right-color: var(--accent); }
}

@keyframes caret-off {
  to { border-right-color: transparent; }
}

@keyframes caret-fade {
  to { border-right-color: transparent; }
}

/* Animation D — Ink-bleed underline (grows from center on hover) */
.link-list a {
  position: relative;
  padding-bottom: 4px;
}

.link-list a::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1px;
  background-color: var(--accent);
  transition: left 0.25s ease, right 0.25s ease;
}

.link-list a:hover::after,
.link-list a:focus-visible::after {
  left: 0;
  right: 0;
}

/* Reduced motion — short-circuit timed animations, keep content visible */
@media (prefers-reduced-motion: reduce) {
  .type-line {
    width: auto;
    border-right: 0;
    animation: none;
  }

  .link-list a::after {
    transition: none;
    border-bottom: 1px dotted var(--accent);
    background-color: transparent;
    height: 0;
  }
  .link-list a:hover::after,
  .link-list a:focus-visible::after {
    left: 50%;
    right: 50%;
  }
}

/* Mobile breakpoint — header items wrap, hero stays centered */
@media (max-width: 600px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 20px 24px;
  }

  .link-list {
    align-self: flex-end;
    gap: 16px;
  }

  .link-list a {
    padding: 8px 4px;
    outline-offset: 2px;
  }

  .hero {
    padding: 0 24px;
  }

  .hero-rule {
    width: 80px;
    margin: 18px auto;
  }
}

/* Animation — Cyan radar sweep across the page */
.radar-sweep {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(127, 211, 255, 0.14) 50%, transparent 65%);
  animation: radar-sweep 7s ease-in-out infinite;
}

@keyframes radar-sweep {
  0%   { transform: translateX(-110%); }
  55%  { transform: translateX(110%); }
  100% { transform: translateX(110%); }
}

@media (prefers-reduced-motion: reduce) {
  .radar-sweep { display: none; }
}

/* 404 page additions */
a.brand-mark {
  color: inherit;
  text-decoration: none;
}

.hero-stack > .link-list {
  justify-content: center;
  margin-top: 18px;
}
