:root {
  color-scheme: dark;
  --bg: #06110f;
  --bg-2: #0b1918;
  --panel: rgba(13, 29, 27, 0.72);
  --panel-strong: rgba(19, 38, 35, 0.92);
  --text: #edf7f4;
  --muted: #9eb5ae;
  --line: rgba(164, 255, 224, 0.18);
  --accent: #6ef0c2;
  --accent-2: #7aa7ff;
  --alert: #ffcf6f;
  --danger: #ff6f91;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Beautiful dual-tone interactive spotlight and background gradients */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(110, 240, 194, 0.15) 0%, rgba(122, 167, 255, 0.08) 50%, transparent 100%),
    radial-gradient(circle at 18% 14%, rgba(110, 240, 194, 0.14), transparent 30rem),
    radial-gradient(circle at 78% 20%, rgba(122, 167, 255, 0.14), transparent 27rem),
    linear-gradient(140deg, #04100d 0%, #071817 44%, #121814 100%);
  pointer-events: none;
  z-index: -5;
}

/* Cybernetic grid overlay in the background */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(110, 240, 194, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 240, 194, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: -4;
  mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle 400px at var(--mouse-x, 50%) var(--mouse-y, 50%), black 20%, transparent 80%);
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

#matrix,
#particles {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#matrix {
  opacity: 0.15;
  z-index: -3;
}

#particles {
  opacity: 0.55;
  z-index: -2;
}

.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 100% 4px;
  mix-blend-mode: overlay;
  opacity: 0.26;
  z-index: 10;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid transparent;
  transition: background 260ms ease, border-color 260ms ease, backdrop-filter 260ms ease;
}

.site-header.scrolled {
  background: rgba(4, 16, 13, 0.78);
  border-color: var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(110, 240, 194, 0.48);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(110, 240, 194, 0.24), rgba(122, 167, 255, 0.12));
  color: var(--accent);
  font-family: "SFMono-Regular", "Consolas", monospace;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 25, 22, 0.58);
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: rgba(110, 240, 194, 0.12);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 25, 22, 0.72);
  color: var(--text);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

main {
  position: relative;
  z-index: 1;
}

.section-panel {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 112px 0;
}

.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
  align-items: center;
  gap: clamp(32px, 6vw, 84px);
  padding-top: 132px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font: 700 0.78rem/1.4 "SFMono-Regular", "Consolas", monospace;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.9rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
  line-height: 1.2;
}

.hero-lead,
.large-text,
.contact-copy p {
  color: #d8e8e4;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.65;
}

.hero-actions,
.signal-row,
.timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover,
.chip:hover {
  transform: translateY(-2px);
  border-color: rgba(110, 240, 194, 0.62);
}

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

.btn.ghost,
.chip {
  background: rgba(12, 29, 26, 0.72);
  color: var(--text);
}

.chip.active {
  background: rgba(122, 167, 255, 0.18);
  border-color: rgba(122, 167, 255, 0.62);
}

.signal-row {
  margin-top: 34px;
}

.signal-row article {
  min-width: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 25, 22, 0.58);
  box-shadow: var(--shadow);
}

.signal-row strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font: 800 1.45rem/1 "SFMono-Regular", "Consolas", monospace;
}

.signal-row span,
.timeline-item span,
.contact-card p {
  color: var(--muted);
  line-height: 1.45;
}

.hero-visual {
  display: grid;
  place-items: center;
}

.orbital-shell {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(transparent 95%, rgba(110, 240, 194, 0.14) 96%),
    linear-gradient(90deg, transparent 95%, rgba(110, 240, 194, 0.14) 96%),
    rgba(6, 18, 16, 0.66);
  background-size: 38px 38px;
  box-shadow: var(--shadow), inset 0 0 70px rgba(110, 240, 194, 0.08);
  overflow: hidden;
}

#threat-map {
  width: 100%;
  height: 100%;
  display: block;
}

.identity-card {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border: 1px solid rgba(110, 240, 194, 0.26);
  border-radius: 8px;
  background: rgba(4, 16, 13, 0.72);
  backdrop-filter: blur(14px);
}

.identity-card p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font: 700 0.75rem/1 "SFMono-Regular", "Consolas", monospace;
  text-transform: uppercase;
}

.identity-card strong {
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.section-heading {
  margin-bottom: 40px;
}

.profile-grid,
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.terminal-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 11, 10, 0.84);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  gap: 7px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--danger);
}

.terminal-bar span:nth-child(2) {
  background: var(--alert);
}

.terminal-bar span:nth-child(3) {
  background: var(--accent);
}

pre {
  margin: 0;
  padding: 22px;
  overflow: auto;
  color: #bdfde7;
  font: 500 0.88rem/1.8 "SFMono-Regular", "Consolas", monospace;
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.strength-card,
.stack-column,
.timeline-item,
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 300ms ease,
              background 300ms ease,
              box-shadow 300ms ease;
}

.strength-card:hover,
.stack-column:hover,
.timeline-item:hover,
.contact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(110, 240, 194, 0.45);
  background: rgba(19, 38, 35, 0.82);
  box-shadow: 0 20px 40px rgba(110, 240, 194, 0.05), var(--shadow);
}

.strength-card {
  min-height: 250px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.strength-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: scaleX(0);
  transition: transform 260ms ease;
}

.strength-card:hover::after {
  transform: scaleX(1);
}

.strength-card span {
  display: inline-block;
  margin-bottom: 38px;
  color: var(--accent-2);
  font: 800 0.88rem/1 "SFMono-Regular", "Consolas", monospace;
}

.strength-card p,
.timeline-item p {
  color: #c7d8d4;
  line-height: 1.65;
}

.timeline-section {
  width: min(980px, calc(100% - 36px));
}

.timeline-controls {
  margin-bottom: 24px;
}

.timeline {
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 10px;
  width: 1px;
  background: linear-gradient(var(--accent), rgba(122, 167, 255, 0.2));
}

.timeline-item {
  position: relative;
  margin-left: 42px;
  margin-bottom: 16px;
  padding: 24px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 28px;
  left: -37px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(110, 240, 194, 0.74);
}

.timeline-item.is-hidden {
  display: none;
}

.timeline-item time {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font: 700 0.78rem/1 "SFMono-Regular", "Consolas", monospace;
  text-transform: uppercase;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stack-column {
  padding: 24px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag-cloud span {
  border: 1px solid rgba(158, 181, 174, 0.22);
  border-radius: 999px;
  padding: 8px 10px;
  color: #dce9e6;
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
}

.contact {
  align-items: center;
}

.contact-card {
  display: grid;
  gap: 14px;
  padding: 26px;
  background: var(--panel-strong);
}

.contact-card a {
  overflow-wrap: anywhere;
  color: #dffef2;
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 960px) {
  .hero,
  .profile-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 116px;
  }

  .strength-grid,
  .stack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 14px 18px;
  }

  .brand span:last-child {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    inset: 72px 18px auto;
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 8px;
    background: rgba(4, 16, 13, 0.94);
    box-shadow: var(--shadow);
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease, transform 200ms ease;
  }

  body.menu-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .section-panel {
    width: min(100% - 28px, 1180px);
    padding: 64px 0;
  }

  .hero {
    padding-top: 98px;
    gap: 26px;
  }

  h1 {
    font-size: clamp(2.35rem, 12vw, 3.5rem);
  }

  .hero-lead {
    font-size: 1rem;
    line-height: 1.55;
  }

  .hero-actions {
    margin-top: 20px;
  }

  .strength-grid,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .signal-row article {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 14px;
  }

  .signal-row article:last-child {
    flex-basis: 100%;
  }

  .signal-row strong {
    font-size: 1.08rem;
  }

  .orbital-shell {
    width: min(100%, 360px);
  }
}

@media (max-width: 420px) {
  .hero-actions .btn {
    width: 100%;
  }

  .timeline-item {
    margin-left: 28px;
    padding: 20px;
  }

  .timeline::before {
    left: 5px;
  }

  .timeline-item::before {
    left: -30px;
  }
}
