/* Core color and spacing tokens for a clean dark neutral theme */
:root {
  --bg: #050a14;
  --surface: #0d1624;
  --surface-2: #111d2f;
  --text: #edf4ff;
  --muted: #9eb0c8;
  --border: #22344f;
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --ambient-blue: rgba(59, 130, 246, 0.3);
  --ambient-electric: rgba(99, 102, 241, 0.24);
  --danger: #ff9f9f;
  --radius: 14px;
  --shadow: 0 16px 45px rgba(0, 0, 0, 0.28);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", Tahoma, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.js body {
  opacity: 1;
  animation: page-fade-in 0.78s ease-out both;
}

/* Smooth animated gradient base for a subtle futuristic feel. */
body::before {
  content: "";
  position: fixed;
  inset: -18%;
  z-index: -3;
  pointer-events: none;
  background: linear-gradient(
    132deg,
    rgba(2, 6, 16, 0.97) 0%,
    rgba(6, 13, 30, 0.96) 28%,
    rgba(13, 27, 58, 0.93) 54%,
    rgba(20, 31, 74, 0.9) 72%,
    var(--ambient-blue) 88%,
    rgba(2, 6, 16, 0.98) 100%
  );
  background-size: 220% 220%;
  animation: ambient-gradient-shift 16s ease-in-out infinite alternate;
}

/* Soft static glow layer above gradient for depth without distraction. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(59, 130, 246, 0.032) 0 1px,
      transparent 1px 74px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(99, 102, 241, 0.028) 0 1px,
      transparent 1px 74px
    ),
    radial-gradient(circle at 14% 10%, rgba(59, 130, 246, 0.24), transparent 40%),
    radial-gradient(circle at 82% 20%, var(--ambient-electric), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(29, 49, 122, 0.2), transparent 50%);
  opacity: 0.92;
}

.cursor-particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  filter:
    drop-shadow(0 0 8px rgba(59, 130, 246, 0.18))
    drop-shadow(0 0 18px rgba(99, 102, 241, 0.14));
}

.signature-frame {
  position: fixed;
  left: 50%;
  top: 30%;
  width: min(58vw, 820px);
  max-width: 820px;
  min-width: 320px;
  aspect-ratio: 488 / 256;
  transform: translate(-50%, -50%);
  border-radius: 26px;
  border: 2px solid rgba(118, 171, 255, 0.26);
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    145deg,
    rgba(18, 36, 71, 0.34) 0%,
    rgba(14, 30, 62, 0.24) 52%,
    rgba(11, 24, 51, 0.18) 100%
  );
  box-shadow:
    inset 0 0 0 1px rgba(138, 186, 255, 0.25),
    inset 0 0 34px rgba(80, 134, 255, 0.22),
    0 0 20px rgba(70, 140, 255, 0.34),
    0 0 44px rgba(70, 140, 255, 0.28),
    0 0 78px rgba(121, 104, 255, 0.2),
    0 18px 52px rgba(5, 11, 23, 0.44);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation:
    signature-frame-float 11s ease-in-out infinite,
    signature-frame-breathe 10s ease-in-out infinite;
}

.signature-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(
    112deg,
    rgba(100, 187, 255, 0.98) 0%,
    rgba(145, 126, 255, 0.9) 48%,
    rgba(82, 164, 255, 0.98) 100%
  );
  background-size: 220% 220%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.94;
  filter:
    drop-shadow(0 0 8px rgba(99, 180, 255, 0.42))
    drop-shadow(0 0 22px rgba(126, 110, 255, 0.3));
  animation: signature-frame-shimmer 12s linear infinite;
}

.signature-frame::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: calc(26px - 8px);
  background: radial-gradient(
    120% 120% at 50% 48%,
    rgba(124, 180, 255, 0.13) 0%,
    rgba(115, 104, 255, 0.08) 38%,
    rgba(38, 68, 122, 0.05) 100%
  );
  box-shadow:
    inset 0 0 22px rgba(113, 166, 255, 0.16),
    inset 0 0 40px rgba(112, 98, 255, 0.1);
  opacity: 0.9;
}

.signature-particle-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  opacity: 1;
  filter:
    blur(0.72px)
    brightness(1.28)
    saturate(1.2)
    drop-shadow(0 0 14px rgba(59, 130, 246, 0.42))
    drop-shadow(0 0 34px rgba(99, 102, 241, 0.3));
  animation: signature-stroke-breathe 10s ease-in-out infinite;
}

@keyframes ambient-gradient-shift {
  0% {
    transform: translate3d(-2%, -1.4%, 0);
    background-position: 0% 42%;
  }

  100% {
    transform: translate3d(2%, 1.4%, 0);
    background-position: 100% 58%;
  }
}

@keyframes page-fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes hero-electric-drift {
  0% {
    transform: translate3d(-1.4%, 0, 0);
    background-position: 0% 45%;
    opacity: 0.82;
  }

  100% {
    transform: translate3d(1.4%, 0.8%, 0);
    background-position: 100% 55%;
    opacity: 1;
  }
}

@keyframes signature-frame-breathe {
  0%,
  100% {
    box-shadow:
      inset 0 0 0 1px rgba(138, 186, 255, 0.2),
      inset 0 0 28px rgba(80, 134, 255, 0.16),
      0 0 20px rgba(70, 140, 255, 0.28),
      0 0 38px rgba(70, 140, 255, 0.22),
      0 0 66px rgba(121, 104, 255, 0.14),
      0 16px 46px rgba(5, 11, 23, 0.34);
  }

  50% {
    box-shadow:
      inset 0 0 0 1px rgba(138, 186, 255, 0.32),
      inset 0 0 36px rgba(80, 134, 255, 0.24),
      0 0 28px rgba(70, 140, 255, 0.4),
      0 0 56px rgba(70, 140, 255, 0.34),
      0 0 94px rgba(121, 104, 255, 0.24),
      0 20px 58px rgba(5, 11, 23, 0.44);
  }
}

@keyframes signature-frame-float {
  0%,
  100% {
    transform: translate(-50%, -50%) translate3d(0, 0, 0);
  }

  50% {
    transform: translate(-50%, -50%) translate3d(0, -6px, 0);
  }
}

@keyframes signature-frame-shimmer {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes signature-stroke-breathe {
  0%,
  100% {
    filter:
      blur(0.72px)
      brightness(1.2)
      saturate(1.16)
      drop-shadow(0 0 12px rgba(59, 130, 246, 0.36))
      drop-shadow(0 0 26px rgba(99, 102, 241, 0.22));
  }

  50% {
    filter:
      blur(0.72px)
      brightness(1.34)
      saturate(1.24)
      drop-shadow(0 0 16px rgba(59, 130, 246, 0.48))
      drop-shadow(0 0 38px rgba(99, 102, 241, 0.32));
  }
}

@keyframes hero-fade-up {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-actions-in {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes hero-title-aura {
  0%,
  100% {
    opacity: 0.62;
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    opacity: 0.9;
    transform: translate3d(0, -4px, 0) scale(1.04);
  }
}

@keyframes hero-primary-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(59, 130, 246, 0.26),
      0 0 14px rgba(59, 130, 246, 0.24),
      0 0 24px rgba(99, 102, 241, 0.16);
  }

  50% {
    box-shadow:
      0 0 0 1px rgba(59, 130, 246, 0.34),
      0 0 24px rgba(59, 130, 246, 0.34),
      0 0 40px rgba(99, 102, 241, 0.24);
  }
}

@keyframes btn-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.5;
  }

  100% {
    transform: translate(-50%, -50%) scale(14);
    opacity: 0;
  }
}

@keyframes card-border-sweep {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

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

h1 {
  font-size: clamp(2.1rem, 5.5vw, 4rem);
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

p {
  margin: 0;
}

a {
  color: var(--accent-2);
  text-decoration: none;
}

a:hover {
  color: #9cc6ff;
}

.container {
  width: min(1100px, 92%);
  margin-inline: auto;
}

.section {
  padding-block: clamp(3.4rem, 7vw, 6rem);
}

.section-text {
  max-width: 70ch;
  color: var(--muted);
}

/* Fade-in animations apply only when JavaScript is available. */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.72s ease-out, transform 0.72s ease-out;
}

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

.js .hero.reveal {
  opacity: 1;
  transform: none;
}

.js #about.reveal {
  transform: none;
  transition: opacity 0.7s ease-out;
}

.js #about.reveal.is-visible {
  opacity: 1;
}

#about .section-text.typewriter-active::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 1em;
  margin-left: 0.08em;
  border-right: 1px solid currentColor;
  opacity: 0.62;
  vertical-align: -0.08em;
  animation: about-type-caret 0.85s steps(1, end) infinite;
}

@keyframes about-type-caret {
  0%,
  45% {
    opacity: 0.62;
  }

  46%,
  100% {
    opacity: 0.12;
  }
}

.js #skills.reveal {
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.js #contact.reveal {
  transform: translateY(18px);
  transition: opacity 0.76s ease-out, transform 0.76s ease-out;
}

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

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  background: var(--accent);
  color: #ffffff;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  z-index: 2000;
}

.skip-link:focus {
  top: 0.75rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1200;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 15, 20, 0.84);
  backdrop-filter: blur(10px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--text);
}

.site-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 1.15rem;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.98rem;
}

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

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  width: 44px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
}

.hero {
  padding-top: clamp(4rem, 8vw, 7rem);
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -16% -12% -10%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 76% 24%, rgba(99, 102, 241, 0.26), transparent 44%),
    radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.22), transparent 48%);
  background-size: 160% 160%;
  animation: hero-electric-drift 14s ease-in-out infinite alternate;
}

.hero::after {
  content: "";
  position: absolute;
  left: clamp(4%, 8vw, 12%);
  top: clamp(18%, 22%, 28%);
  width: min(520px, 72vw);
  height: min(280px, 42vw);
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgba(59, 130, 246, 0.24) 0%,
    rgba(99, 102, 241, 0.14) 46%,
    transparent 76%
  );
  filter: blur(20px);
  animation: hero-title-aura 7.5s ease-in-out infinite;
}

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

.js .hero h1,
.js .hero .tagline,
.js .hero .hero-text,
.js .hero .hero-actions {
  opacity: 0;
  transform: translateY(16px);
}

.js.intro-ready .hero h1 {
  animation: hero-fade-up 0.72s ease-out forwards;
}

.js.intro-ready .hero .tagline {
  animation: hero-fade-up 0.7s ease-out 0.2s forwards;
}

.js.intro-ready .hero .hero-text {
  animation: hero-fade-up 0.7s ease-out 0.4s forwards;
}

.js.intro-ready .hero .hero-actions {
  animation: hero-actions-in 0.8s ease-out 0.6s forwards;
}

.eyebrow {
  margin-bottom: 0.7rem;
  font-family: "JetBrains Mono", Consolas, monospace;
  font-size: 0.86rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #7fcfff;
}

.hero h1 {
  color: #f5f9ff;
  text-shadow:
    0 0 12px rgba(59, 130, 246, 0.42),
    0 0 34px rgba(99, 102, 241, 0.28),
    0 0 66px rgba(59, 130, 246, 0.2);
}

.tagline {
  color: #d9e8ff;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
}

.hero-text {
  margin-top: 1rem;
  max-width: 58ch;
  color: #b2c5df;
}

.hero-actions {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition:
    transform 0.3s ease-out,
    box-shadow 0.3s ease-out,
    border-color 0.3s ease-out,
    color 0.3s ease-out;
  --ripple-x: 50%;
  --ripple-y: 50%;
  will-change: transform;
}

.btn::before {
  content: "";
  position: absolute;
  left: var(--ripple-x);
  top: var(--ripple-y);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    circle,
    rgba(198, 225, 255, 0.62) 0%,
    rgba(59, 130, 246, 0.34) 48%,
    rgba(99, 102, 241, 0) 72%
  );
}

.btn::after {
  content: "";
  position: absolute;
  top: -130%;
  left: -140%;
  width: 52%;
  height: 360%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    102deg,
    transparent 0%,
    rgba(59, 130, 246, 0.1) 38%,
    rgba(214, 232, 255, 0.42) 50%,
    rgba(99, 102, 241, 0.12) 62%,
    transparent 100%
  );
  transform: translateX(0) rotate(18deg);
  transition: transform 0.56s ease-out, opacity 0.3s ease-out;
}

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

.btn:focus-visible {
  transform: translateY(-2px) scale(1.02);
}

.btn:hover::after,
.btn:focus-visible::after {
  opacity: 1;
  transform: translateX(430%) rotate(18deg);
}

.btn.is-rippling::before {
  animation: btn-ripple 0.52s ease-out;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #04162e;
}

.hero .btn-primary {
  animation: hero-primary-pulse 3.6s ease-in-out infinite;
}

.hero .btn-primary:hover,
.hero .btn-primary:focus-visible {
  animation: none;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  box-shadow:
    0 12px 26px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(122, 191, 255, 0.3),
    0 0 18px rgba(78, 156, 255, 0.26);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: rgba(108, 173, 255, 0.42);
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(108, 173, 255, 0.2),
    0 0 14px rgba(72, 148, 255, 0.16);
}

.skills-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.skill-group {
  padding: 1.2rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.contact-form {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s ease-out, box-shadow 0.3s ease-out, border-color 0.3s ease-out;
}

.js .card-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.82s ease-out, transform 0.82s ease-out;
  transition-delay: var(--card-delay, 0ms);
}

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

.portfolio-card::after {
  content: "";
  position: absolute;
  inset: -55% auto -55% -160%;
  width: 48%;
  pointer-events: none;
  background: linear-gradient(
    106deg,
    transparent 0%,
    rgba(59, 130, 246, 0.05) 38%,
    rgba(210, 229, 255, 0.2) 50%,
    rgba(99, 102, 241, 0.07) 62%,
    transparent 100%
  );
  transform: translateX(0) skewX(-16deg);
  opacity: 0;
  transition: transform 0.52s ease-out, opacity 0.34s ease-out;
}

.portfolio-card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    116deg,
    rgba(59, 130, 246, 0.92) 0%,
    rgba(99, 102, 241, 0.88) 46%,
    rgba(59, 130, 246, 0.9) 100%
  );
  background-size: 230% 230%;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: opacity 0.34s ease-out;
}

.portfolio-card {
  background-size: 140% 140%;
  background-position: 0% 0%;
  transition:
    transform 0.3s ease-out,
    box-shadow 0.3s ease-out,
    border-color 0.3s ease-out,
    background-position 0.3s ease-out;
}

.portfolio-card:hover,
.portfolio-card:focus-within {
  transform: translateY(-8px);
  background-position: 100% 100%;
  border-color: rgba(83, 122, 255, 0.56);
  box-shadow:
    0 22px 42px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(90, 146, 255, 0.28),
    0 0 30px rgba(59, 130, 246, 0.28),
    0 0 52px rgba(99, 102, 241, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.portfolio-card:hover::after,
.portfolio-card:focus-within::after {
  opacity: 1;
  transform: translateX(390%) skewX(-16deg);
}

.portfolio-card:hover::before,
.portfolio-card:focus-within::before {
  opacity: 1;
  animation: card-border-sweep 3.8s linear infinite;
}

.skill-group h3 {
  margin-bottom: 0.85rem;
}

.skills-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.skills-list li {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.95rem;
  color: #dbe3f2;
  transition:
    opacity 0.52s ease-out,
    transform 0.52s ease-out,
    background-color 0.22s ease-out,
    border-color 0.22s ease-out;
}

.js .skills-list li.skill-pill-reveal {
  opacity: 0;
  transform: scale(0.95) translateY(4px);
  transition-delay: var(--pill-delay, 0ms);
}

.js .card-reveal.is-visible .skills-list li.skill-pill-reveal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.skills-list li:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #3a4b68;
}

.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.4rem;
  align-items: start;
}

.contact-info p {
  margin-top: 0.65rem;
}

.contact-form {
  display: grid;
  gap: 0.58rem;
  padding: 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.contact-form label {
  font-size: 0.95rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.72rem 0.85rem;
  background: #0f141d;
  color: var(--text);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(77, 141, 255, 0.5);
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.form-status {
  min-height: 1.35rem;
  color: var(--muted);
}

.form-status.is-error {
  color: var(--danger);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem 0 2rem;
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 860px) {
  .contact-wrap {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    right: 4%;
    top: calc(100% + 0.45rem);
    width: min(260px, 92vw);
    background: rgba(15, 20, 29, 0.98);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem;
    display: none;
  }

  .site-nav.open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.2rem;
  }

  .site-nav a {
    display: block;
    padding: 0.52rem 0.62rem;
    border-radius: 8px;
  }

  .site-nav a:hover {
    background: rgba(255, 255, 255, 0.05);
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 840px), (hover: none), (pointer: coarse) {
  .signature-frame,
  .signature-particle-canvas {
    display: none;
  }

  .hero::after {
    display: none;
  }

  .hero .btn-primary {
    animation: none;
  }

  .portfolio-card::before,
  .btn::after,
  .portfolio-card::after {
    display: none;
  }
}

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

  body::before {
    animation: none;
  }

  .js body {
    opacity: 1;
    animation: none;
  }

  .hero::before {
    animation: none;
  }

  .hero::after {
    display: none;
    animation: none;
  }

  .btn,
  .skill-group,
  .js .reveal {
    transition: none;
  }

  .hero .btn-primary {
    animation: none;
  }

  .btn::before {
    opacity: 0;
    animation: none;
    transition: none;
  }

  .btn::after {
    opacity: 0;
    transition: none;
  }

  .js .hero h1,
  .js .hero .tagline,
  .js .hero .hero-text,
  .js .hero .hero-actions,
  .js .card-reveal,
  .signature-frame,
  .signature-particle-canvas {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }

  .signature-frame,
  .signature-particle-canvas {
    display: none;
  }

  .portfolio-card::before {
    opacity: 0;
    animation: none;
    transition: none;
  }

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