:root {
  --bg: #05070d;
  --panel: rgba(11, 17, 29, 0.74);
  --panel-strong: rgba(12, 20, 36, 0.92);
  --text: #ffffff;
  --muted: #a7b0c8;
  --line: rgba(126, 157, 255, 0.18);
  --blue: #23d7ff;
  --purple: #8a5cff;
  --crimson: #ff315d;
  --green: #63ffbf;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(35, 215, 255, 0.12), transparent 28rem),
    radial-gradient(circle at 86% 16%, rgba(255, 49, 93, 0.12), transparent 26rem),
    linear-gradient(180deg, #03040a 0%, #07101f 48%, #05070d 100%);
  overflow-x: hidden;
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 999;
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--crimson));
  box-shadow: 0 0 14px rgba(35, 215, 255, 0.45);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

.section.visible::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, rgba(35,215,255,0.06), transparent 60%);
  animation: sectionPulse 1.2s ease;
}

@keyframes sectionPulse {
  0% { opacity: 0; }
  50% { opacity: 1; }
  100% { opacity: 0; }
}

h2.visible {
  animation: titleGlitch 600ms ease;
}

@keyframes titleGlitch {
  0% { transform: translateX(-8px); opacity: 0; }
  30% { transform: translateX(4px); }
  60% { transform: translateX(-2px); }
  100% { transform: translateX(0); opacity: 1; }
}

.project-card,
.article-card,
.interest-strip div,
.glass-card {
  transition:
    opacity 700ms ease,
    transform 700ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
    border-radius: 18px
}

body::selection {
  background: rgba(35, 215, 255, 0.32);
}

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

#signal-canvas,
.noise,
.cursor-light {
  inset: 0;
  pointer-events: none;
  position: fixed;
}

#signal-canvas {
  z-index: 0;
  opacity: 0.58;
}

.noise {
  z-index: 3;
  opacity: 0.055;
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: screen;
}

.cursor-light {
  width: 32rem;
  height: 32rem;
  z-index: 1;
  opacity: 0.4;
  transform: translate3d(var(--x, -50rem), var(--y, -50rem), 0);
  background: radial-gradient(circle, rgba(35, 215, 255, 0.18), rgba(138, 92, 255, 0.08) 38%, transparent 68%);
  filter: blur(8px);
}

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

.site-header.navbar--scrolled {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 7, 13, 0.86);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
  padding-bottom: 0.78rem;
  padding-top: 0.78rem;
}

.brand-mark {
  align-items: center;
  border: 1px solid rgba(35, 215, 255, 0.35);
  box-shadow: 0 0 28px rgba(35, 215, 255, 0.12);
  display: grid;
  font-size: 0.72rem;
  font-weight: 900;
  height: 2.5rem;
  justify-items: center;
  letter-spacing: 0.14em;
  position: relative;
  width: 2.5rem;
  border-radius: 12px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.site-nav a {
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  padding: 0.72rem 0.78rem;
  text-transform: uppercase;
  transition: 180ms ease;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a.nav-link--active {
  border-color: rgba(35, 215, 255, 0.26);
  color: var(--text);
  opacity: 1;
  text-shadow: 0 0 18px rgba(35, 215, 255, 0.5);
}

.site-nav a:not(.nav-link--active) {
  opacity: 0.58;
}

main {
  position: relative;
}

main {
  z-index: 2;
}

.section-full {
  min-height: 100vh;
}

.hero {
  align-items: center;
  display: grid;
  isolation: isolate;
  justify-items: center;
  overflow: hidden;
  padding: 7rem clamp(1.2rem, 5vw, 5rem) 4rem;
  position: relative;
}

.hero-media {
  inset: 0;
  opacity: 0.54;
  position: absolute;
  z-index: -3;
}

.hero-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hero::after {
  background:
    linear-gradient(180deg, rgba(5, 7, 13, 0.24), #05070d 94%),
    radial-gradient(circle at 50% 45%, transparent 0 16rem, rgba(5, 7, 13, 0.7) 48rem);
  content: "";
  inset: 0;
  position: absolute;
  z-index: -2;
}

.hero-grid {
  background-image:
    linear-gradient(rgba(35, 215, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 92, 255, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  inset: 0;
  mask-image: linear-gradient(transparent, black 20%, black 72%, transparent);
  position: absolute;
  transform: perspective(800px) rotateX(58deg) translateY(20%);
  transform-origin: center bottom;
  z-index: -1;
}

.hero-content {
  max-width: 78rem;
  text-align: center;
}

.eyebrow,
.card-kicker {
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.glitch-name {
  color: var(--text);
  font-size: clamp(3rem, 9vw, 8.9rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.9;
  margin: 0;
  position: relative;
  text-shadow:
    0 0 18px rgba(35, 215, 255, 0.24),
    0 0 54px rgba(138, 92, 255, 0.14);
  text-transform: uppercase;
}

.name-main,
.glitch-layer {
  display: block;
}

.glitch-layer {
  inset: 0;
  opacity: 0;
  position: absolute;
}

.layer-blue {
  color: var(--blue);
  transform: translate(-2px, 0);
}

.layer-red {
  color: var(--crimson);
  transform: translate(2px, 0);
}

.glitch-name.glitching .layer-blue {
  animation: glitch-left 650ms steps(2, end);
}

.glitch-name.glitching .layer-red {
  animation: glitch-right 650ms steps(2, end);
}

@keyframes glitch-left {
  0%, 100% { clip-path: inset(0 0 100% 0); opacity: 0; }
  12% { clip-path: inset(12% 0 62% 0); opacity: 0.7; }
  28% { clip-path: inset(66% 0 14% 0); opacity: 0.55; }
  48% { clip-path: inset(34% 0 42% 0); opacity: 0.72; }
  72% { clip-path: inset(78% 0 7% 0); opacity: 0.42; }
}

@keyframes glitch-right {
  0%, 100% { clip-path: inset(100% 0 0 0); opacity: 0; }
  18% { clip-path: inset(56% 0 21% 0); opacity: 0.58; }
  38% { clip-path: inset(9% 0 72% 0); opacity: 0.65; }
  58% { clip-path: inset(42% 0 36% 0); opacity: 0.5; }
  82% { clip-path: inset(23% 0 52% 0); opacity: 0.36; }
}

.hero-subtitle {
  color: #d9e3ff;
  font-size: clamp(1rem, 2vw, 1.36rem);
  font-weight: 800;
  margin: 1.45rem auto 0;
}

.microtagline {
  color: var(--muted);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  margin: 1rem auto 0;
  min-height: 1.8rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2rem;
}

.button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  justify-content: center;
  letter-spacing: 0.12em;
  min-width: 11.5rem;
  overflow: hidden;
  padding: 0.95rem 1.1rem;
  position: relative;
  text-transform: uppercase;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  border-radius: 14px;
}

.button::before {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  content: "";
  height: 100%;
  left: -120%;
  position: absolute;
  top: 0;
  transform: skewX(-18deg);
  transition: 420ms ease;
  width: 60%;
}

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

.button:hover::before {
  left: 130%;
}

.button.primary {
  background: linear-gradient(135deg,rgba(172, 108, 229, 0.96), rgba(51, 22, 125, 0.9));
  box-shadow: 0 0 34px rgba(35, 215, 255, 0.22);
  color: #02040a;
}

.button.ghost {
  background: rgba(6, 12, 22, 0.62);
  color: var(--text);
}

.hero-dashboard {
  background: rgba(5, 9, 18, 0.62);
  border: 1px solid rgba(35, 215, 255, 0.26);
  bottom: clamp(1rem, 4vw, 3rem);
  box-shadow: var(--shadow);
  max-width: 22rem;
  padding: 1rem;
  position: absolute;
  right: clamp(1rem, 4vw, 4rem);
}

.status-dot {
  animation: pulse 1.8s infinite;
  background: var(--green);
  border-radius: 999px;
  box-shadow: 0 0 18px var(--green);
  display: inline-block;
  height: 0.62rem;
  width: 0.62rem;
}

@keyframes pulse {
  50% { opacity: 0.45; transform: scale(0.74); }
}

.hero-dashboard p {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  margin: 0.75rem 0 0.35rem;
  text-transform: uppercase;
}

.hero-dashboard strong {
  display: block;
  line-height: 1.3;
}

.signal-bars {
  display: grid;
  gap: 0.42rem;
  margin-top: 1rem;
}

.signal-bars span {
  animation: scan 2.8s infinite;
  background: linear-gradient(90deg, var(--blue), var(--purple), transparent);
  display: block;
  height: 3px;
}

.signal-bars span:nth-child(2) { animation-delay: 180ms; width: 82%; }
.signal-bars span:nth-child(3) { animation-delay: 360ms; width: 64%; }
.signal-bars span:nth-child(4) { animation-delay: 540ms; width: 92%; }

@keyframes scan {
  0%, 100% { opacity: 0.2; transform: scaleX(0.7); transform-origin: left; }
  50% { opacity: 1; transform: scaleX(1); }
}

.section {
  padding: clamp(5rem, 10vw, 8rem) clamp(1.2rem, 5vw, 5rem);
  position: relative;
  overflow: hidden;
}

.section::before {
  background: linear-gradient(90deg, transparent, rgba(35, 215, 255, 0.36), rgba(255, 49, 93, 0.32), transparent);
  content: "";
  height: 1px;
  left: 8%;
  position: absolute;
  right: 8%;
  top: 0;
}

.section-split {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.86fr);
}

.section-copy,
.section-heading {
  max-width: 50rem;
}

.section-heading {
  margin-bottom: 2rem;
}

h2 {
  font-size: clamp(2.2rem, 5vw, 5rem);
  letter-spacing: 0;
  line-height: 0.98;
  margin: 0 0 1.2rem;
}

h3 {
  letter-spacing: 0;
  margin: 0;
}

p {
  color: var(--muted);
  line-height: 1.75;
}

.journey-panel,
.glass-card,
.experience-card,
.contact-panel {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 18px
}

.journey-panel {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.timeline-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 1rem;
  grid-template-columns: auto 1fr;
  padding: 1.2rem;
  transition: 200ms ease;
  border-radius: 18px
}

.timeline-item:hover,
.timeline-item.active {
  border-color: rgba(35, 215, 255, 0.42);
  box-shadow: inset 0 0 34px rgba(35, 215, 255, 0.08);
  transform: translateX(6px);
}

.timeline-item span,
.project-card span {
  color: var(--crimson);
  font-weight: 950;
}

.timeline-item p,
.education-card p,
.experience-card p {
  margin-bottom: 0;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.glass-card,
.project-card {
  min-height: 18rem;
  padding: 1.35rem;
}

.education-card ul {
  color: var(--muted);
  line-height: 1.7;
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
}

.section-dark-band {
  background: linear-gradient(90deg, rgba(7, 11, 21, 0.84), rgba(8, 17, 33, 0.9), rgba(7, 11, 21, 0.72));
}

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

.metrics-row div {
  border: 1px solid var(--line);
  padding: 1.2rem;
  border-radius: 18px
}

.metrics-row strong {
  color: var(--purple);
  display: block;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1;
}

.metrics-row span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.experience-stack {
  display: grid;
  gap: 1rem;
}

.experience-card {
  align-items: start;
  display: grid;
  gap: 2rem;
  grid-template-columns: 0.7fr 1fr;
  padding: 1.5rem;
  border-radius: 18px
}

.project-card {
  background:
    linear-gradient(145deg, rgba(7, 12, 22, 0.86), rgba(16, 22, 42, 0.7)),
    linear-gradient(90deg, rgba(35, 215, 255, 0.22), rgba(255, 49, 93, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
  transition: 220ms ease;
  border-radius: 18px
}

.project-card::after {
  background: linear-gradient(90deg, transparent, rgba(35, 215, 255, 0.48), transparent);
  content: "";
  height: 1px;
  left: -100%;
  position: absolute;
  top: 0;
  transition: 400ms ease;
  width: 100%;
}

.project-card:hover {
  border-color: rgba(35, 215, 255, 0.38);
  transform: translateY(-8px);
}

.project-card:hover::after {
  left: 100%;
}

.project-card h3 {
  font-size: 1.35rem;
  margin-top: 2.4rem;
}

.project-card p {
  min-height: 6.8rem;
}

.project-tags,
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.project-tags {
  margin-top: 1.25rem;
}

.project-tags b {
  border: 1px solid rgba(35, 215, 255, 0.22);
  color: #dfe7ff;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.44rem 0.58rem;
  text-transform: uppercase;
}

.project-actions {
  margin-top: 1.2rem;
}

.project-actions a,
.project-actions span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  padding: 0.62rem 0.72rem;
  text-transform: uppercase;
}

.project-actions a {
  background: rgba(35, 215, 255, 0.1);
  border-color: rgba(35, 215, 255, 0.32);
  transition: 180ms ease;
}

.project-actions a:hover {
  background: rgba(35, 215, 255, 0.18);
  transform: translateY(-2px);
}

.project-actions span {
  color: var(--muted);
  opacity: 0.82;
}

.article-board {
  display: grid;
  gap: 1rem;
}

.article-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--line);
  display: block;
  padding: 1.3rem;
  transition: 180ms ease;
  border-radius: 18px
}

.article-card:hover {
  background: rgba(35, 215, 255, 0.08);
  border-color: rgba(35, 215, 255, 0.42);
  transform: translateX(8px);
}

.article-card span {
  color: var(--crimson);
  display: block;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.skill-matrix {
  display: grid;
  gap: 1rem;
}

.skill {
  align-items: center;
  border: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: 16rem 1fr;
  padding: 1rem;
  border-radius: 18px
}

.skill span {
  font-weight: 850;
}

.skill i {
  background: rgba(255, 255, 255, 0.08);
  display: block;
  height: 0.64rem;
  overflow: hidden;
  position: relative;
}

.skill i::after {
  background: linear-gradient(90deg, var(--blue), var(--purple), var(--crimson));
  box-shadow: 0 0 22px rgba(35, 215, 255, 0.44);
  content: "";
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  width: var(--level);
  transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 999px;
}

.badge-cloud,
.interest-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.badge-cloud span {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #dfe7ff;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 0.72rem 0.9rem;
  border-radius: 18px
}

.interest-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.interest-strip div {
  background: linear-gradient(145deg, rgba(15, 22, 36, 0.92), rgba(9, 11, 18, 0.8));
  border: 1px solid var(--line);
  min-height: 11rem;
  padding: 1.2rem;
  transition: 180ms ease;
  border-radius: 18px
}

.interest-strip div:hover {
  border-color: rgba(255, 49, 93, 0.44);
  transform: translateY(-5px);
}

.interest-strip span {
  color: var(--purple);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 3.5rem;
  text-transform: uppercase;
}

.interest-strip strong {
  font-size: 1.2rem;
  line-height: 1.25;
}

.contact-section {
  min-height: 86vh;
  display: grid;
  place-items: center;
}

.contact-panel {
  max-width: 58rem;
  padding: clamp(1.5rem, 5vw, 4rem);
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
  }

  .site-nav {
    max-width: 34rem;
  }

  .section-split,
  .experience-card {
    grid-template-columns: 1fr;
  }

  .card-grid,
  .card-grid.two,
  .metrics-row,
  .interest-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-dashboard {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 2rem;
    border-radius: 18px
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 0.8rem;
  }

  .brand-mark {
    height: 2.2rem;
    width: 2.2rem;
  }

  .site-nav {
    gap: 0.1rem;
  }

  .site-nav a {
    font-size: 0.64rem;
    padding: 0.48rem;
  }

  .hero {
    align-items: end;
    min-height: 100svh;
    padding-top: 8rem;
  }

  .hero-content {
    text-align: left;
  }

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

  .button {
    min-width: 100%;
  }

  .card-grid,
  .card-grid.two,
  .metrics-row,
  .interest-strip {
    grid-template-columns: 1fr;
  }

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

  .glass-card,
  .project-card {
    min-height: 14rem;
  }
}

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