:root {
  --bg: #07080d;
  --bg-soft: #0d121c;
  --line: rgba(173, 210, 255, 0.12);
  --text: #e8eef8;
  --muted: #8b97ab;
  --cyan: #4de8ff;
  --violet: #c4b5fd;
  --pink: #f472b6;
  --amber: #fbbf24;
  --mint: #34d399;
  --nav-h: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(77, 232, 255, 0.07), transparent 42%),
    radial-gradient(ellipse at 70% 80%, rgba(167, 139, 250, 0.05), transparent 40%),
    linear-gradient(180deg, #07080d 0%, #090b12 100%);
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

#brain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: auto;
  touch-action: none;
}

body:not(.is-home) #brain {
  pointer-events: none;
}

.nav-hotzone {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 88px;
  z-index: 28;
  pointer-events: auto;
}

body:not(.is-home) .nav-hotzone {
  display: none;
}

body.is-home:has(.nav-hotzone:hover) .navbar,
body.is-home:has(.navbar:hover) .navbar {
  opacity: 1;
  pointer-events: auto;
}

.region-hits {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
}

body:not(.is-home) .region-hits {
  display: none;
}

.region-hits button {
  position: absolute;
  width: 120px;
  height: 120px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 14px;
  background: transparent;
  transition: opacity 0.45s var(--ease);
}

body:not(.is-home) .navbar {
  border-bottom: 1px solid rgba(173, 210, 255, 0.08);
}

body.is-home .navbar {
  opacity: 0;
  pointer-events: none;
}

body.is-home .navbar.is-revealed,
body.is-home .navbar:focus-within {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: none) and (pointer: coarse) {
  body.is-home .navbar {
    opacity: 1;
    pointer-events: auto;
  }
}

.logo-hit {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(77, 232, 255, 0.28), 0 0 22px rgba(77, 232, 255, 0.12);
}

.logo-hit:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: 3px;
}

body.is-home .logo-hit {
  box-shadow: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 6px;
  padding: 4px;
  position: relative;
  z-index: 2;
  background: rgba(10, 14, 22, 0.82);
  border: 1px solid rgba(173, 210, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.nav-links a {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d7e2f2;
  padding: 10px 12px;
  border-radius: 999px;
  transition: color 0.25s ease, background 0.25s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a[data-page="about"].is-active { color: var(--cyan); }
.nav-links a[data-page="ai"].is-active { color: var(--violet); }
.nav-links a[data-page="projects"].is-active { color: var(--pink); }
.nav-links a[data-page="career"].is-active { color: var(--amber); }
.nav-links a[data-page="contact"].is-active { color: var(--mint); }

.wordmark {
  font-family: Syne, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.03em;
  margin-right: 8px;
  white-space: nowrap;
}

body.is-home .wordmark,
body.is-home .nav-meta {
  display: none;
}

.nav-meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
}

.landing {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 24px 36px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

body.is-home .landing {
  opacity: 1;
  transform: none;
}

.landing-kicker,
.page-kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 10px;
}

.landing h1,
.page h1 {
  font-family: Syne, sans-serif;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin: 0;
}

.landing h1 {
  font-size: clamp(40px, 7vw, 88px);
  line-height: 0.95;
}

.landing p.hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.region-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, min(38vh, 280px));
  z-index: 12;
  pointer-events: none;
  font-family: Syne, sans-serif;
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: -0.04em;
  opacity: 0;
  transition: opacity 0.25s ease;
  text-shadow: 0 0 40px currentColor;
}

body.is-home .region-toast.is-on {
  opacity: 0.88;
}

.stage {
  position: relative;
  z-index: 8;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 28px) 8vw 80px;
  opacity: 0;
  transform: translateY(28px);
  pointer-events: none;
  transition: transform 0.7s var(--ease);
}

body:not(.is-home) .stage {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.page {
  display: none;
  max-width: 1080px;
  margin: 0 auto;
}

.page.is-active {
  display: block;
}

.page h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  margin-bottom: 18px;
}

.lede {
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.5;
  color: #c9d3e3;
  max-width: 720px;
  margin: 0 0 42px;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.grid.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card,
.bio,
.timeline li {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.card {
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.35s var(--ease), border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(173, 210, 255, 0.28);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
}

.card .body,
.bio {
  padding: 20px 22px 22px;
}

.card h3,
.bio h2 {
  font-family: Syne, sans-serif;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

.card p,
.bio p,
.copy p,
.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.meta {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.bio {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  padding: 22px;
  align-items: center;
}

.bio img {
  width: 180px;
  height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}

.copy p + p {
  margin-top: 16px;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.pills span {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #d5def0;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.timeline li {
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
}

.timeline time {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--amber);
  letter-spacing: 0.08em;
}

.contact-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.contact-row a {
  display: block;
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}

.contact-row a:hover {
  border-color: var(--mint);
  transform: translateY(-3px);
}

.contact-row strong {
  display: block;
  font-family: Syne, sans-serif;
  font-size: 20px;
  margin-bottom: 6px;
}

.footer-note {
  margin-top: 48px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 860px) {
  .navbar {
    padding: 0 14px;
  }

  .nav-meta,
  .wordmark {
    display: none;
  }

  .nav-links {
    gap: 0;
    overflow-x: auto;
  }

  .nav-links a {
    padding: 10px 8px;
    font-size: 11px;
  }

  .grid.two,
  .split,
  .bio,
  .timeline li {
    grid-template-columns: 1fr;
  }

  .bio img {
    width: 100%;
    height: 240px;
  }

  .stage {
    padding: calc(var(--nav-h) + 18px) 20px 64px;
  }

  .landing {
    padding-bottom: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
