:root {
  --bg: #05070d;
  --bg-soft: #0c1220;
  --panel: rgba(8, 14, 28, 0.86);
  --panel-border: rgba(0, 255, 255, 0.24);
  --text: #e6f7ff;
  --muted: #8da4b8;
  --cyan: #00ffff;
  --magenta: #ff00ff;
  --green: #39ff14;
  --warning: #ffcc00;
  --shadow-cyan: 0 0 10px rgba(0, 255, 255, 0.4), 0 0 28px rgba(0, 255, 255, 0.2);
  --shadow-magenta: 0 0 10px rgba(255, 0, 255, 0.35), 0 0 24px rgba(255, 0, 255, 0.18);
  --radius: 22px;
  --mono: "Roboto Mono", "Courier New", monospace;
  --display: "Orbitron", "Roboto Mono", monospace;
  --max-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--mono);
  background:
    radial-gradient(circle at top left, rgba(0, 255, 255, 0.1), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 0, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #03050a 0%, #060912 38%, #04060d 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at center, black, transparent 92%);
  opacity: 0.25;
}

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

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

.page-shell {
  position: relative;
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 20px 0 56px;
}

.noise,
.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.noise {
  opacity: 0.08;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0.5px, transparent 0.5px);
  background-size: 8px 8px;
  mix-blend-mode: soft-light;
}

.grid-overlay {
  background:
    linear-gradient(transparent 96%, rgba(0, 255, 255, 0.18) 100%),
    linear-gradient(90deg, transparent 96%, rgba(255, 0, 255, 0.14) 100%);
  background-size: 120px 120px;
  opacity: 0.12;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(4, 8, 18, 0.75);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-cyan);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 255, 255, 0.4);
  border-radius: 10px;
  background: rgba(0, 255, 255, 0.06);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.nav a {
  position: relative;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.12em;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}

.nav a:hover::after,
.nav a:focus-visible::after {
  transform: scaleX(1);
}

main {
  display: grid;
  gap: 24px;
}

.panel {
  position: relative;
  padding: 28px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(6, 10, 20, 0.92), rgba(6, 10, 20, 0.78));
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(0, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

.panel:hover::before {
  transform: translateX(100%);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: stretch;
  min-height: 72vh;
}

.hero-copy,
.hero-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.glitch-title,
.section-title,
.hero-role {
  font-family: var(--display);
}

.glitch-title {
  position: relative;
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f5fbff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.25), 0 0 22px rgba(0, 255, 255, 0.26);
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.glitch-title::before {
  color: var(--cyan);
  transform: translate(2px, -1px);
}

.glitch-title::after {
  color: var(--magenta);
  transform: translate(-2px, 1px);
}

.glitch-title:hover::before,
.glitch-title:hover::after {
  opacity: 0.75;
  animation: glitchShift 220ms steps(2, end) infinite;
}

.hero-role {
  min-height: 40px;
  margin: 16px 0;
  color: var(--cyan);
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.08em;
}

.hero-summary {
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  padding: 14px 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.button-primary {
  background: linear-gradient(90deg, rgba(0, 255, 255, 0.12), rgba(0, 255, 255, 0.24));
  border-color: rgba(0, 255, 255, 0.5);
  box-shadow: var(--shadow-cyan);
  color: var(--cyan);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.6), 0 0 34px rgba(0, 255, 255, 0.28);
}

.button-secondary {
  background: linear-gradient(90deg, rgba(255, 0, 255, 0.1), rgba(255, 0, 255, 0.18));
  border-color: rgba(255, 0, 255, 0.4);
  box-shadow: var(--shadow-magenta);
  color: #ffd8ff;
}

.button-secondary:hover,
.button-secondary:focus-visible {
  box-shadow: 0 0 14px rgba(255, 0, 255, 0.58), 0 0 34px rgba(255, 0, 255, 0.26);
}

.terminal-card,
.neon-frame,
.stats-card {
  position: relative;
  padding: 20px;
  border: 1px solid rgba(0, 255, 255, 0.25);
  border-radius: 18px;
  background: rgba(8, 14, 28, 0.76);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.terminal-header {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.terminal-header span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.terminal-header span:nth-child(1) { background: #ff5f57; }
.terminal-header span:nth-child(2) { background: #febc2e; }
.terminal-header span:nth-child(3) { background: #28c840; }

.terminal-body {
  color: var(--muted);
  line-height: 1.8;
}

.label,
.contact-label,
.project-tag,
.timeline-period,
.timeline-location,
.education-period {
  color: var(--green);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section {
  display: grid;
  gap: 24px;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.section-title {
  margin: 0;
  font-size: clamp(1.65rem, 3.8vw, 2.6rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 22px;
}

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

.stat-box {
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.07), rgba(255, 0, 255, 0.05));
  border: 1px solid rgba(0, 255, 255, 0.16);
}

.stat-value {
  display: block;
  margin-bottom: 8px;
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--cyan);
}

.stat-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.education-card {
  display: grid;
  gap: 8px;
}

.education-card h3,
.timeline-card h3,
.project-card h3 {
  margin: 4px 0 0;
  font-size: 1.2rem;
  color: #ffffff;
}

.education-gpa {
  color: var(--text);
}

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.skill-row + .skill-row {
  margin-top: 18px;
}

.skill-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.skill-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(0, 255, 255, 0.18);
}

.skill-track span {
  display: block;
  width: var(--level);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--green));
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.45);
}

.hex-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 18px;
  align-content: start;
}

.hex {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 14px;
  clip-path: polygon(25% 6%, 75% 6%, 100% 50%, 75% 94%, 25% 94%, 0% 50%);
  background: linear-gradient(180deg, rgba(0, 255, 255, 0.12), rgba(255, 0, 255, 0.12));
  border: 1px solid rgba(0, 255, 255, 0.3);
  color: var(--text);
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hex:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-cyan);
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 16px;
  width: 2px;
  background: linear-gradient(var(--cyan), rgba(255, 0, 255, 0.4), transparent);
}

.timeline-card {
  position: relative;
  margin-left: 34px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 28px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  display: grid;
  gap: 10px;
  min-height: 220px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 0, 255, 0.38);
  box-shadow: var(--shadow-magenta);
}

.contact-section {
  margin-bottom: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contact-grid a:hover {
  color: var(--cyan);
}

.neon-frame {
  overflow: hidden;
}

.neon-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.45), rgba(255, 0, 255, 0.4), rgba(57, 255, 20, 0.28)) border-box;
  mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
}

@keyframes glitchShift {
  0% { clip-path: inset(10% 0 82% 0); }
  25% { clip-path: inset(40% 0 38% 0); }
  50% { clip-path: inset(80% 0 4% 0); }
  75% { clip-path: inset(30% 0 50% 0); }
  100% { clip-path: inset(12% 0 70% 0); }
}

@media (max-width: 980px) {
  .hero,
  .about-grid,
  .skills-layout,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 12px;
  }

  .panel {
    padding: 22px 18px;
  }

  .stats-card,
  .contact-grid,
  .hex-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .timeline-card {
    margin-left: 24px;
  }

  .timeline-card::before {
    left: -18px;
  }
}

@media (max-width: 540px) {
  .nav {
    gap: 10px 14px;
  }

  .button {
    width: 100%;
  }

  .stats-card,
  .contact-grid,
  .hex-grid {
    grid-template-columns: 1fr;
  }

  .glitch-title {
    word-break: break-word;
  }
}
