:root {
  --background: #030806;
  --surface: #07100b;
  --phosphor: #9ee99a;
  --phosphor-bright: #c7ffc2;
  --muted: #83ad80;
  --border: #315a32;
  --focus: #e0ffdc;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

body {
  min-width: 280px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--background);
  color: var(--phosphor);
  font-family: "Courier New", Courier, monospace;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 20;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  transform: translateY(-200%);
  border: 1px solid var(--phosphor-bright);
  background: var(--background);
  color: var(--phosphor-bright);
}

.skip-link:focus {
  transform: translateY(0);
}

.scanlines {
  display: none;
}

.site-header,
main,
.site-footer,
.legal-main {
  width: min(calc(100% - 2.5rem), var(--max-width));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.65rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  color: var(--phosphor-bright);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.cursor {
  animation: blink 1.2s steps(1, end) infinite;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
}

nav a,
.text-link {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

nav a:hover,
.text-link:hover,
.email-link:hover {
  color: var(--phosphor-bright);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 5px;
}

.hero {
  max-width: 880px;
  padding-block: clamp(5rem, 11vw, 8rem);
}

.system-line,
.section-label,
.card-number {
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.13em;
}

.status-dot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.7rem;
  background: var(--phosphor);
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  max-width: 850px;
  margin-block: 1.4rem;
  color: var(--phosphor-bright);
  font-size: clamp(2.4rem, 7vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.hero h2 {
  max-width: 760px;
  margin-bottom: 1.25rem;
  color: var(--phosphor);
  font-size: clamp(1.05rem, 2.3vw, 1.4rem);
  font-weight: 400;
  line-height: 1.5;
}

.hero-description,
.content-section > p:not(.section-label),
.legal-content p,
.legal-content li {
  max-width: 760px;
  color: var(--muted);
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--phosphor);
}

.content-section {
  padding-block: clamp(4.5rem, 9vw, 7rem);
  border-top: 1px solid var(--border);
}

.content-section > h2,
.legal-content h1 {
  max-width: 760px;
  margin: 0.8rem 0 1.5rem;
  color: var(--phosphor-bright);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.2;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}

.research-card {
  min-height: 250px;
  padding: 1.75rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.research-card h3 {
  margin: 2.7rem 0 0.8rem;
  color: var(--phosphor-bright);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.research-card p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.contact-section {
  min-height: 420px;
}

.email-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--phosphor-bright);
  font-size: clamp(1rem, 3vw, 1.55rem);
  overflow-wrap: anywhere;
  text-underline-offset: 0.4rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding-block: 2rem 3.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
}

.site-footer p {
  margin: 0;
}

.legal-main {
  min-height: calc(100vh - 190px);
}

.legal-content {
  max-width: 820px;
  padding-block: clamp(4.5rem, 10vw, 7rem);
}

.legal-content ul {
  max-width: 760px;
  margin: 2rem 0;
  padding-left: 1.4rem;
}

.legal-content li + li {
  margin-top: 0.8rem;
}

@keyframes blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}

@media (max-width: 700px) {
  .research-grid {
    grid-template-columns: 1fr;
  }

  .research-card {
    min-height: 220px;
  }
}

@media (max-width: 520px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .site-header,
  main,
  .site-footer,
  .legal-main {
    width: min(calc(100% - 1.75rem), var(--max-width));
  }

  .site-footer {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor {
    animation: none;
  }
}
