:root {
  --bg: #070b16;
  --bg-soft: #0f172b;
  --text: #e6ebff;
  --muted: #93a0c4;
  --card: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
  --glow-1: #5a7dff;
  --glow-2: #3cefff;
  --glow-3: #b86dff;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, #111a33 0%, var(--bg) 52%);
  line-height: 1.6;
  overflow-x: hidden;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 0.4px, transparent 0.4px);
  background-size: 3px 3px;
  opacity: 0.12;
  z-index: -2;
}

.glass {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 14px;
  z-index: 40;
  margin: 14px auto 0;
  width: min(1100px, 92vw);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.2rem;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand span {
  color: var(--glow-2);
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease;
  font-size: 0.93rem;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle:focus-visible {
  outline: 2px solid rgba(60, 239, 255, 0.65);
  outline-offset: 2px;
}

.topbar.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.topbar.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

main {
  position: relative;
  z-index: 0;
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.section {
  padding: 4.8rem 0 2.3rem;
}

.hero {
  min-height: 86vh;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

.eyebrow {
  color: var(--glow-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-role {
  color: #c6d3ff;
  font-size: 0.96rem;
  font-weight: 600;
  margin: 0.2rem 0 0.8rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  max-width: 18ch;
}

h2 {
  font-size: clamp(1.4rem, 2.3vw, 2.2rem);
}

.subtext {
  color: var(--muted);
  max-width: 60ch;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.hero-tags span,
.badges span {
  font-size: 0.78rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.cta-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.72rem 1.05rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

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

.btn-primary {
  color: #00111f;
  background: linear-gradient(135deg, var(--glow-2), var(--glow-1));
  box-shadow: 0 10px 30px rgba(60, 239, 255, 0.25);
}

.btn-secondary {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

.hero-panel {
  padding: 1.3rem;
}

.hero-panel ul {
  padding-left: 1rem;
  margin: 0;
  color: var(--muted);
}

.section-header {
  margin-bottom: 1.4rem;
}

.about-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.about-grid > article {
  padding: 1.3rem;
}

.metrics {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: 1fr 1fr;
  background: transparent;
}

.metric {
  padding: 1rem;
}

.metric h3 {
  margin-bottom: 0.3rem;
  color: var(--glow-2);
}

.metric p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.skills-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.skill-card {
  padding: 1.2rem;
  transition: transform 0.25s ease;
}

.skill-card:hover,
.skill-card:focus-within,
.project-card:hover,
.project-card:focus-within,
.timeline-item:hover,
.timeline-item:focus-within,
.achievement-grid article:hover,
.achievement-grid article:focus-within {
  transform: translateY(-5px);
}

.skill-card ul,
.project-card ul,
.contact-info ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(2, 1fr);
}

.project-card {
  padding: 1rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.project-card:hover,
.project-card:focus-within {
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25);
}

.thumb {
  width: 100%;
  aspect-ratio: 16 / 8;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  margin-bottom: 1rem;
}

.gradient-a {
  background: linear-gradient(120deg, #3455ff, #5de1ff, #9f6eff);
}

.gradient-b {
  background: linear-gradient(120deg, #00d4ff, #3a7dff, #6b39ff);
}

.gradient-c {
  background: linear-gradient(120deg, #5a7dff, #00c7a5, #8f6bff);
}

.gradient-d {
  background: linear-gradient(120deg, #7e48ff, #5de1ff, #4a65ff);
}

.project-desc {
  color: var(--muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.8rem;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.project-links a {
  color: var(--glow-2);
  text-decoration: none;
  font-size: 0.93rem;
}

.link-soon {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.timeline {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 1rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(var(--glow-2), transparent);
}

.timeline-item {
  position: relative;
  padding: 1rem 1rem 1rem 1.2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -1.39rem;
  top: 1.2rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glow-2);
  box-shadow: 0 0 16px rgba(60, 239, 255, 0.8);
}

.timeline-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.achievement-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.cert-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

.cert-card {
  padding: 1.2rem;
}

.achievement-grid article {
  padding: 1rem;
  transition: transform 0.25s ease;
}

.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.2fr 0.8fr;
}

.contact-form,
.contact-info {
  padding: 1.2rem;
}

.contact-form {
  display: grid;
  gap: 0.5rem;
}

.contact-form .form-status {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-form .form-status[data-state="success"] {
  color: #7ee787;
}

.contact-form .form-status[data-state="error"] {
  color: #ff9b9b;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn:disabled:hover {
  transform: none;
}

label {
  font-size: 0.9rem;
  color: #cad5ff;
}

input,
textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
  border-radius: 10px;
  padding: 0.72rem;
  font: inherit;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(60, 239, 255, 0.35);
  border-color: rgba(60, 239, 255, 0.65);
}

.footer {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem 2.6rem;
  font-size: 0.88rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  pointer-events: none;
}

.reveal.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

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

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

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

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

@media (max-width: 700px) {
  .topbar {
    top: 8px;
    margin-top: 8px;
    padding: 0.7rem 0.85rem;
    flex-wrap: wrap;
    align-items: center;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .topbar.nav-open .nav {
    display: flex;
  }

  .nav a {
    padding: 0.35rem 0;
  }

  .section {
    padding-top: 4rem;
  }

  .metrics,
  .skills-grid,
  .achievement-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }

  .skill-card:hover,
  .skill-card:focus-within,
  .project-card:hover,
  .project-card:focus-within,
  .timeline-item:hover,
  .timeline-item:focus-within,
  .achievement-grid article:hover,
  .achievement-grid article:focus-within,
  .btn:hover {
    transform: none;
  }
}
