:root {
  --bg: #07101f;
  --bg-2: #0a1730;
  --surface: #102246;
  --ink: #e8f3ff;
  --ink-soft: #b7d0ef;
  --muted: #7ea0c7;
  --line: #2a4d86;
  --accent: #3d7eff;
  --accent-2: #7ec8ff;
  --gold: #ffe14d;
  --shadow: 6px 6px 0 #000;
  --header-h: 72px;
  --font: "Silkscreen", "Courier New", monospace;
  --font-display: "Press Start 2P", "Silkscreen", monospace;
  --mx: 0.5;
  --my: 0.5;
  --px: 0px;
  --py: 0px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  background: var(--bg);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-2);
  text-underline-offset: 0.22em;
}

a:hover {
  color: var(--gold);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.fx,
.pixel-layer,
.cursor {
  pointer-events: none;
}

.fx {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.fx-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(61, 126, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61, 126, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(280px 280px at calc(var(--mx) * 100%) calc(var(--my) * 100%), #000 0%, transparent 70%);
}

.fx-spot {
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 420px at calc(var(--mx) * 100%) calc(var(--my) * 100%), rgba(61, 126, 255, 0.16), transparent 55%);
}

.fx-scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(3, 10, 22, 0.18) 2px 3px
  );
  opacity: 0.55;
}

.pixel-layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: 100%;
  height: 100%;
}

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  display: none;
}

.cursor-core,
.cursor-ring {
  position: absolute;
  image-rendering: pixelated;
}

.cursor-core {
  inset: 10px;
  background: var(--gold);
  box-shadow: 0 0 0 2px #03101f;
}

.cursor-ring {
  inset: 0;
  border: 3px solid var(--accent-2);
  animation: cursor-pulse 0.9s steps(2, end) infinite;
}

@keyframes cursor-pulse {
  50% { transform: scale(0.72); opacity: 0.55; }
}

@media (hover: hover) and (pointer: fine) {
  body.has-pointer,
  body.has-pointer a,
  body.has-pointer button,
  body.has-pointer input {
    cursor: none;
  }

  body.has-pointer .cursor {
    display: block;
  }
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--gold);
  color: #04101f;
  padding: 0.55rem 0.8rem;
  z-index: 90;
  border: 3px solid #03101f;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.hero,
.section,
.stats,
.site-footer,
main {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0.75rem 6vw;
  background: rgba(7, 16, 31, 0.88);
  border-bottom: 3px solid var(--line);
}

.logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--accent);
  color: var(--gold);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 400;
  background: #0b1c38;
  box-shadow: 4px 4px 0 #000;
  image-rendering: pixelated;
}

.logo:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 3px solid var(--line);
  background: #0b1c38;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 3px;
  background: var(--ink);
  position: absolute;
  left: 11px;
}

.nav-toggle span {
  top: 20px;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
}

.nav-toggle span::before {
  top: -7px;
}

.nav-toggle span::after {
  top: 7px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--gold);
}

.nav-cta {
  padding: 0.4rem 0.85rem;
  border: 3px solid #03101f;
  color: #04101f !important;
  background: var(--accent);
  font-weight: 700;
  box-shadow: 4px 4px 0 #000;
}

.nav-cta:hover {
  color: #04101f !important;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.hero,
.section,
.stats,
.site-footer {
  width: min(1120px, 88vw);
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 4rem;
  align-items: end;
  padding: 4.5rem 0 3.2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 1rem;
  padding: 0.35rem 0.7rem;
  border: 3px solid var(--line);
  background: #0b1c38;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 600;
}

.blink {
  color: var(--gold);
  animation: blink 1s steps(1, end) infinite;
}

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

.hero h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.2vw, 1.85rem);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0;
  text-shadow: 4px 4px 0 #000;
}

.lede {
  max-width: 36rem;
  margin: 1.4rem 0 1.8rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.1rem;
  text-decoration: none;
  font-weight: 700;
  border: 3px solid #03101f;
  box-shadow: 5px 5px 0 #000;
  transition: transform 0.08s steps(2, end), box-shadow 0.08s steps(2, end);
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 #000;
}

.btn:active {
  transform: translate(5px, 5px);
  box-shadow: 0 0 0 #000;
}

.btn-primary {
  background: var(--accent);
  color: #04101f;
}

.btn-primary:hover {
  color: #04101f;
}

.btn-ghost {
  background: #0b1c38;
  color: var(--ink);
}

.btn-ghost:hover {
  color: var(--gold);
}

.hero-photo {
  margin: 0;
  perspective: 800px;
}

.photo-bezel {
  position: relative;
  padding: 10px;
  background: #0b1c38;
  border: 4px solid var(--accent);
  box-shadow: 8px 8px 0 #000;
  transform: rotateX(calc((0.5 - var(--my)) * 8deg)) rotateY(calc((var(--mx) - 0.5) * 10deg));
  transform-style: preserve-3d;
}

.photo-bezel::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08), transparent 30%),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(7, 16, 31, 0.18) 3px 4px);
}

.hero-photo img {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: contrast(1.08) saturate(0.92);
  transition: filter 0.2s steps(3, end), image-rendering 0s;
}

.hero-photo:hover img {
  image-rendering: auto;
  filter: contrast(1) saturate(1);
}

.hero-photo figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.stat {
  padding: 1.1rem 1rem 1.15rem;
  border: 3px solid var(--line);
  background: var(--surface);
  box-shadow: 5px 5px 0 #000;
  transition: transform 0.12s steps(2, end), box-shadow 0.12s steps(2, end);
}

.stat:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0 #000;
  border-color: var(--accent-2);
}

.stat strong {
  display: block;
  margin-bottom: 0.45rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 400;
  color: var(--gold);
}

.stat span {
  color: var(--muted);
  font-size: 0.92rem;
}

.section {
  padding: 5.2rem 0 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
}

.index {
  margin: 0;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 700;
}

.section h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.8vw, 1.15rem);
  line-height: 1.45;
  font-weight: 400;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
}

.about-lead {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.45;
  font-weight: 600;
}

.about-body p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 4px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 2rem;
  padding: 0 0 2.4rem 2rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.45rem;
  width: 12px;
  height: 12px;
  background: var(--accent);
  box-shadow: 3px 3px 0 #000;
}

.when {
  color: var(--muted);
  font-size: 0.92rem;
  padding-top: 0.2rem;
}

.role h3 {
  margin: 0 0 0.2rem;
  font-size: 1.15rem;
}

.org {
  margin: 0 0 0.7rem;
  color: var(--accent-2);
  font-weight: 700;
}

.role p {
  margin: 0;
  color: var(--ink-soft);
}

.tags,
.stack-list,
.edu-list,
.lang-list,
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.tags li {
  display: inline-flex;
  margin: 0;
  padding: 0.2rem 0.5rem;
  border: 3px solid var(--line);
  background: #0b1c38;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: transform 0.08s steps(2, end), background 0.08s steps(2, end), color 0.08s steps(2, end);
}

.tags li:hover {
  transform: translate(-2px, -2px);
  background: var(--accent);
  color: #04101f;
  border-color: #03101f;
}

.tags li::before {
  display: none;
}

.subroles {
  margin: 1rem 0 0;
}

.subroles div {
  padding: 0.75rem 0;
  border-top: 3px dashed var(--line);
}

.subroles dt {
  font-weight: 700;
}

.subroles dd {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
}

.small-title {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.stack-list li,
.edu-list li,
.lang-list li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.4rem;
  border-bottom: 3px solid var(--line);
  transition: background 0.1s steps(2, end), transform 0.1s steps(2, end);
}

.stack-list li:hover,
.edu-list li:hover,
.lang-list li:hover {
  background: rgba(61, 126, 255, 0.12);
  transform: translateX(6px);
}

.stack-list span,
.edu-list span,
.lang-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.lang-list {
  margin-top: 2rem;
}

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

blockquote {
  margin: 0;
  padding: 1.5rem 1.3rem 1.3rem;
  background: var(--surface);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 #000;
}

blockquote p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
  line-height: 1.5;
}

blockquote footer {
  color: var(--gold);
  font-size: 0.92rem;
}

.ask-intro {
  max-width: 38rem;
  color: var(--ink-soft);
}

.chat {
  margin-top: 1.4rem;
  background: #0b1c38;
  color: var(--ink);
  border: 4px solid var(--accent);
  padding: 1.2rem;
  box-shadow: 8px 8px 0 #000;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 160px;
  max-height: 340px;
  overflow: auto;
  padding: 0.4rem 0.2rem 1rem;
}

.bubble {
  max-width: min(42rem, 92%);
  padding: 0.8rem 0.95rem;
  line-height: 1.5;
  border: 3px solid var(--line);
}

.bubble.assistant {
  background: #102246;
}

.bubble.user {
  align-self: flex-end;
  background: var(--accent);
  color: #04101f;
  border-color: #03101f;
}

.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.suggestions button,
.chat-form button {
  font: inherit;
  cursor: inherit;
}

.suggestions button {
  background: #07101f;
  color: var(--ink);
  border: 3px solid var(--line);
  padding: 0.35rem 0.7rem;
  font-size: 0.88rem;
  box-shadow: 3px 3px 0 #000;
}

.suggestions button:hover {
  color: #04101f;
  background: var(--gold);
  border-color: #03101f;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.chat-form input {
  width: 100%;
  border: 3px solid var(--line);
  background: #07101f;
  color: var(--ink);
  min-height: 50px;
  padding: 0 0.9rem;
  font: inherit;
}

.chat-form input:focus {
  outline: 3px solid var(--gold);
  outline-offset: 0;
}

.chat-form button {
  background: var(--accent);
  color: #04101f;
  border: 3px solid #03101f;
  padding: 0 1.1rem;
  font-weight: 700;
  box-shadow: 4px 4px 0 #000;
}

.chat-form button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 2rem;
  margin-top: 6rem;
  padding: 2.4rem 0 3rem;
  border-top: 3px solid var(--line);
}

.footer-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.4;
  font-weight: 400;
}

.site-footer p {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.footer-links a {
  color: var(--ink);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--gold);
}

.copy {
  grid-column: 1 / -1;
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.6rem 6vw 1.2rem;
    background: #07101f;
    border-bottom: 3px solid var(--line);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
    padding: 0.7rem 0;
  }

  .hero,
  .about-grid,
  .split,
  .quote-grid,
  .stats,
  .timeline li,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 2.2rem;
    padding-top: 2.4rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .timeline li {
    padding-left: 1.4rem;
    gap: 0.35rem;
  }

  .photo-bezel {
    transform: none;
  }
}

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

  .blink,
  .cursor-ring,
  .photo-bezel,
  .fx-grid,
  .fx-spot {
    animation: none;
    transform: none;
    mask-image: none;
  }

  .pixel-layer,
  .cursor {
    display: none !important;
  }
}

@media print {
  .site-header,
  .ask,
  .hero-actions,
  .skip-link,
  .fx,
  .cursor,
  .pixel-layer {
    display: none;
  }

  body {
    background: white;
    color: #111;
  }
}
