:root {
  color-scheme: dark;
  --bg: #05070b;
  --bg-soft: rgba(13, 19, 29, 0.74);
  --text: #eef7ff;
  --muted: #8ca1b7;
  --line: rgba(159, 216, 255, 0.16);
  --cyan: #58e7ff;
  --lime: #b7ff5f;
  --pink: #ff4fd8;
  --steel: #182331;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 78% 12%, rgba(255, 79, 216, 0.16), transparent 26rem),
    radial-gradient(circle at 10% 18%, rgba(88, 231, 255, 0.12), transparent 22rem),
    linear-gradient(145deg, #05070b 0%, #071019 48%, #05070b 100%);
  color: var(--text);
  font-family: "Inter", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(88, 231, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 231, 255, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 82%);
}

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

#signal-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.82;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(88, 231, 255, 0.42);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(88, 231, 255, 0.18), rgba(255, 79, 216, 0.18));
  box-shadow: 0 0 28px rgba(88, 231, 255, 0.24);
}

.nav-links {
  gap: 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav-links a {
  transition: color 180ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.68fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 74px);
  padding: 54px 0 76px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 900px;
  margin-bottom: 24px;
  font-size: clamp(48px, 5.6vw, 74px);
  line-height: 1.08;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.hero-lead {
  max-width: 680px;
  margin-bottom: 34px;
  color: #bfd0df;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.76;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.button span {
  flex: 0 0 auto;
  line-height: 1;
}

.button:hover {
  transform: translateY(-2px);
}

.primary {
  color: #041016;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  box-shadow: 0 18px 54px rgba(88, 231, 255, 0.18);
}

.secondary {
  background: rgba(255, 255, 255, 0.05);
}

.secondary:hover {
  border-color: rgba(88, 231, 255, 0.52);
}

.profile-card {
  position: relative;
  min-height: 460px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.025)),
    rgba(6, 12, 19, 0.7);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card::before {
  position: absolute;
  inset: 14px;
  content: "";
  border: 1px solid rgba(88, 231, 255, 0.14);
  border-radius: 8px;
}

.profile-card::after {
  position: absolute;
  right: -80px;
  bottom: -120px;
  width: 260px;
  height: 260px;
  content: "";
  border: 1px solid rgba(255, 79, 216, 0.22);
  border-radius: 50%;
  box-shadow: inset 0 0 60px rgba(88, 231, 255, 0.12);
}

.panel-topline,
.terminal-strip {
  position: relative;
  z-index: 1;
}

.panel-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.heart-status {
  --heart-speed: 1.9s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c7d8e7;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0;
}

.pulse-dot {
  --heart-color: var(--lime);
  --heart-glow: rgba(183, 255, 95, 0.64);
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--heart-color);
  box-shadow: 0 0 0 0 var(--heart-glow);
  animation: pulse var(--heart-speed) infinite;
}

.heart-status[data-heart-zone="rest"] .pulse-dot {
  --heart-color: #58e7ff;
  --heart-glow: rgba(88, 231, 255, 0.58);
}

.heart-status[data-heart-zone="active"] .pulse-dot {
  --heart-color: var(--lime);
  --heart-glow: rgba(183, 255, 95, 0.64);
}

.heart-status[data-heart-zone="high"] .pulse-dot {
  --heart-color: #ffb347;
  --heart-glow: rgba(255, 179, 71, 0.62);
}

.heart-status[data-heart-zone="peak"] .pulse-dot {
  --heart-color: #ff4f6d;
  --heart-glow: rgba(255, 79, 109, 0.62);
}

.heart-status[data-heart-zone="offline"] {
  opacity: 0.7;
}

.avatar-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(230px, 70vw);
  height: min(230px, 70vw);
  margin: 34px auto 24px;
  place-items: center;
  border: 1px solid rgba(88, 231, 255, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49%, rgba(88, 231, 255, 0.24) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(183, 255, 95, 0.16) 50%, transparent 51%);
  box-shadow:
    inset 0 0 40px rgba(88, 231, 255, 0.1),
    0 0 70px rgba(88, 231, 255, 0.12);
}

.avatar-orbit::before,
.avatar-orbit::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
}

.avatar-orbit::before {
  inset: 32px;
}

.avatar-orbit::after {
  inset: -12px;
  border-top-color: var(--cyan);
  border-right-color: rgba(255, 79, 216, 0.42);
  animation: spin 14s linear infinite;
}

.avatar-core {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border: 1px solid rgba(88, 231, 255, 0.42);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(88, 231, 255, 0.22), rgba(255, 79, 216, 0.18)),
    rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 52px;
  font-weight: 900;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
}

.profile-summary {
  position: relative;
  z-index: 1;
}

.profile-summary h2 {
  max-width: none;
  margin-bottom: 14px;
  font-size: clamp(28px, 3.1vw, 42px);
  line-height: 1.02;
}

.profile-summary p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.68;
}

.terminal-strip {
  display: grid;
  gap: 9px;
  margin-top: 28px;
  padding: 16px;
  border: 1px solid rgba(88, 231, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  color: #9ff1ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.profile-tags span {
  padding: 9px 12px;
  border: 1px solid rgba(88, 231, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #c7d8e7;
  font-size: 13px;
  font-weight: 800;
}

.section-band {
  padding: 82px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 12px;
  align-items: start;
  margin-bottom: 32px;
}

h2 {
  max-width: 790px;
  margin-bottom: 0;
  font-size: clamp(22px, 3.5vw, 43px);
  line-height: 1.08;
  letter-spacing: 0;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

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

.about-grid article {
  min-height: 250px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.about-grid h3 {
  margin: 48px 0 16px;
  font-size: 24px;
}

.about-grid p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.76;
}

.portal-card {
  position: relative;
  display: flex;
  min-height: 310px;
  flex-direction: column;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(9, 15, 23, 0.68);
  overflow: hidden;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.portal-card::before {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(135deg, rgba(88, 231, 255, 0.16), transparent 45%, rgba(255, 79, 216, 0.12));
  opacity: 0;
  transition: opacity 180ms ease;
}

.portal-card:hover {
  transform: translateY(-5px);
  border-color: rgba(88, 231, 255, 0.46);
  background: rgba(12, 21, 32, 0.82);
}

.portal-card:hover::before,
.featured-card::before {
  opacity: 1;
}

.featured-card {
  background: linear-gradient(145deg, rgba(88, 231, 255, 0.15), rgba(9, 15, 23, 0.78));
}

.card-kicker,
.portal-card h3,
.portal-card p,
.card-link {
  position: relative;
  z-index: 1;
}

.card-kicker {
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-card h3 {
  margin: 56px 0 18px;
  font-size: 25px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.portal-card p {
  margin-bottom: 28px;
  color: var(--muted);
  line-height: 1.72;
}

.card-link {
  margin-top: auto;
  color: var(--cyan);
  font-weight: 800;
}

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

.project-grid .portal-card {
  min-height: 330px;
}

.contact-section {
  padding: 54px 0 80px;
  border-top: 1px solid var(--line);
}

.contact-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 26px;
  max-width: 520px;
}

.contact-actions a {
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #c7d8e7;
  font-size: 14px;
  font-weight: 800;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 14px rgba(183, 255, 95, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(183, 255, 95, 0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 74px;
  }

  .profile-card {
    min-height: 360px;
  }

  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

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

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    align-items: flex-start;
    padding-top: 14px;
  }

  .nav-links {
    gap: 13px;
    font-size: 13px;
  }

  h1 {
    font-size: clamp(40px, 12vw, 60px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .button {
    width: 100%;
  }

  .profile-card {
    padding: 18px;
  }

  .portal-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .avatar-orbit {
    width: min(230px, 74vw);
    height: min(230px, 74vw);
  }

  .portal-card {
    min-height: 250px;
  }

  .project-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .site-footer {
    flex-direction: column;
  }
}
