:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.12);
  --text: #f5f5f5;
  --muted: #9ca3af;
  --accent: #10b981;
  --accent-2: #34d399;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  overflow-wrap: break-word;
}

img {
  max-width: 100%;
  height: auto;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

::selection {
  background: rgba(16, 185, 129, 0.35);
  color: white;
}

.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}

.blob1 {
  width: 24rem;
  height: 24rem;
  background: rgba(16, 185, 129, 0.35);
  top: 10%;
  left: -5%;
}

.blob2 {
  width: 20rem;
  height: 20rem;
  background: rgba(52, 211, 153, 0.2);
  top: 35%;
  right: -2%;
  animation-duration: 20s;
}

.blob3 {
  width: 22rem;
  height: 22rem;
  background: rgba(5, 150, 105, 0.18);
  bottom: 8%;
  left: 35%;
  animation-duration: 16s;
}

.grid-pattern {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.4), transparent 85%);
}

.nav-shell {
  background: rgba(8, 8, 8, 0.52);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

header nav.scrolled,
.nav-shell.scrolled {
  background: rgba(7, 7, 7, 0.9);
}

.spotlight {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 22rem;
  height: 22rem;
  border-radius: 9999px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.28) 0%, rgba(16, 185, 129, 0) 70%);
  transform: translate(-50%, -50%);
  z-index: 0;
  opacity: 0.8;
  mix-blend-mode: screen;
}

.card-surface {
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}

.card-hover {
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .card-hover:hover {
    transform: translateY(-6px);
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 24px 50px rgba(16, 185, 129, 0.14);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: all 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #020202;
  display: grid;
  place-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-ring {
  width: 72px;
  height: 72px;
  border: 3px solid rgba(255,255,255,0.12);
  border-top-color: #10b981;
  border-radius: 9999px;
  animation: spin 0.9s linear infinite;
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(0, -15px, 0) scale(1.04); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
  .blob {
    filter: blur(70px);
    opacity: 0.25;
  }

  .blob1,
  .blob2,
  .blob3 {
    width: 15rem;
    height: 15rem;
  }

  .grid-pattern {
    background-size: 42px 42px;
  }

  .spotlight {
    display: none;
  }

  .back-to-top {
    right: 0.875rem;
    bottom: max(0.875rem, env(safe-area-inset-bottom));
  }
}

@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;
  }
}
