:root {
  --bg: #020817;
  --bg-deep: #040d1f;
  --surface: rgba(8, 15, 31, 0.62);
  --surface-strong: rgba(10, 18, 36, 0.82);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(148, 184, 255, 0.16);
  --border-strong: rgba(96, 165, 250, 0.22);
  --text: #f8fbff;
  --text-soft: #d9e4fb;
  --text-muted: #95a5c6;
  --primary: #3b82f6;
  --primary-strong: #60a5fa;
  --success: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 18px 46px rgba(2, 8, 23, 0.28);
  --radius: 24px;
  --radius-sm: 18px;
  --container: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 6rem;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #020817 0%, #040d1f 45%, #020714 100%);
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1), transparent 85%);
}

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

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(32px);
  opacity: 0.6;
}

.orb-one {
  top: -10rem;
  left: -8rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.46), rgba(59, 130, 246, 0));
}

.orb-two {
  right: -6rem;
  top: 10rem;
  width: 22rem;
  height: 22rem;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.22), rgba(96, 165, 250, 0));
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 184, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 184, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 28%, transparent 78%);
  opacity: 0.28;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 5rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(2, 8, 23, 0.52);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand::before {
  content: "";
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #9fd0ff);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.45);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  width: 1.5rem;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-menu {
  position: absolute;
  inset: calc(100% + 0.85rem) 0 auto;
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  background: rgba(6, 14, 28, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-0.6rem);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.nav-menu a {
  color: var(--text-muted);
  padding: 0.75rem 0.95rem;
  border-radius: 0.9rem;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu a.active {
  color: var(--text);
  background: rgba(59, 130, 246, 0.12);
}

.nav-open .nav-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(0.42rem) rotate(45deg);
}

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

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-0.42rem) rotate(-45deg);
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 7rem;
}

.hero-content,
.about-grid,
.contact-grid {
  display: grid;
  gap: 1.6rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.95rem;
  margin-bottom: 1.2rem;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  font-size: 0.9rem;
}

.badge-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 6px rgba(52, 211, 153, 0.12);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--primary-strong);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.05;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: -0.04em;
}

.hero-subtitle {
  margin: 1rem 0 0.9rem;
  color: var(--text-soft);
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
}

.hero-description,
.section-heading p,
.about-card p,
.skill-card p,
.project-card p,
.contact-form,
.footer-content p {
  color: var(--text-muted);
}

.hero-description {
  max-width: 38rem;
  font-size: 1.03rem;
}

.hero-actions,
.project-actions,
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-actions {
  margin-top: 1.8rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.82rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: white;
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.28);
}

.button-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(148, 184, 255, 0.18);
}

.button-small {
  min-height: 2.8rem;
  padding-inline: 1rem;
}

.hero-metrics {
  display: grid;
  gap: 0.95rem;
  margin-top: 2rem;
}

.metric-card,
.about-card,
.skill-card,
.project-card,
.contact-form,
.hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    var(--surface);
  backdrop-filter: blur(18px) saturate(165%);
  box-shadow: var(--shadow-soft);
}

.metric-card {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
}

.metric-card strong,
.about-highlights strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.metric-card span,
.about-highlights span,
.panel-note {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hero-card {
  padding: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(96, 165, 250, 0.06) inset;
}

.hero-card::before,
.about-card::before,
.skill-card::before,
.project-card::before,
.contact-form::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 38%);
  pointer-events: none;
}

.dashboard-preview {
  min-height: 100%;
  padding: 0.7rem;
  border-radius: calc(var(--radius) - 6px);
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(3, 10, 21, 0.96), rgba(5, 12, 24, 0.94));
  border: 1px solid rgba(148, 184, 255, 0.08);
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.preview-chip {
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.window-dots {
  display: flex;
  gap: 0.45rem;
}

.window-dots span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
}

.window-dots span:nth-child(1) {
  background: #fb7185;
}

.window-dots span:nth-child(2) {
  background: #fbbf24;
}

.window-dots span:nth-child(3) {
  background: #34d399;
}

.preview-grid {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.preview-panel {
  padding: 1rem;
  border: 1px solid rgba(148, 184, 255, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.03);
}

.preview-panel strong {
  display: block;
  margin: 0.25rem 0;
  font-size: 1.25rem;
}

.panel-label {
  margin: 0 0 0.25rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.preview-panel-large {
  min-height: 8.5rem;
}

.mini-chart {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
  align-items: end;
  height: 5.5rem;
  margin-top: 1rem;
}

.mini-chart span {
  border-radius: 999px 999px 0 0;
  background: linear-gradient(180deg, rgba(96, 165, 250, 0.95), rgba(59, 130, 246, 0.28));
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.18);
}

.mini-chart span:nth-child(1) {
  height: 45%;
}

.mini-chart span:nth-child(2) {
  height: 80%;
}

.mini-chart span:nth-child(3) {
  height: 60%;
}

.mini-chart span:nth-child(4) {
  height: 95%;
}

.mini-chart span:nth-child(5) {
  height: 72%;
}

.code-lines {
  padding: 1rem;
  border: 1px solid rgba(148, 184, 255, 0.08);
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, 0.025);
  font-family: Consolas, Monaco, monospace;
  font-size: 0.95rem;
  color: #dbeafe;
}

.code-lines p {
  margin: 0.45rem 0;
}

.code-accent {
  color: #93c5fd;
}

.code-string {
  color: #86efac;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 2rem;
}

.section-heading.center {
  margin-inline: auto;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.03em;
}

.about-card,
.contact-form {
  padding: 1.6rem;
}

.about-highlights {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(148, 184, 255, 0.1);
}

.skills-grid,
.projects-grid {
  display: grid;
  gap: 1.2rem;
}

.skill-card,
.project-card {
  padding: 1.45rem;
}

.skill-icon {
  width: 3.15rem;
  height: 3.15rem;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(96, 165, 250, 0.06));
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: var(--primary-strong);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.progress-track {
  width: 100%;
  height: 0.58rem;
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-strong));
  box-shadow: 0 0 18px rgba(59, 130, 246, 0.35);
}

.project-card {
  display: flex;
  flex-direction: column;
}

.project-tag {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 0.9rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 600;
}

.project-stack {
  margin-top: auto;
  color: var(--text-soft);
  font-size: 0.95rem;
}

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

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

.contact-form label {
  color: var(--text-soft);
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(148, 184, 255, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(96, 165, 250, 0.6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.form-status {
  min-height: 1.5rem;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.form-status.success {
  color: #86efac;
}

.form-status.error {
  color: #fca5a5;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.social-links a {
  color: var(--text-muted);
  transition: color 0.25s ease, transform 0.25s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-delay {
  transition-delay: 0.14s;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(59, 130, 246, 0);
  }
}

.hero-card {
  animation: floatCard 6s ease-in-out infinite;
}

.badge-dot {
  animation: pulseGlow 2.8s ease-in-out infinite;
}

@media (min-width: 640px) {
  .hero-metrics,
  .about-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .preview-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

  .preview-panel-large {
    grid-column: span 3;
  }
}

@media (min-width: 880px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .hero-content,
  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 2rem;
  }

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

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

  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
