:root {
  color-scheme: dark;
  --accent: #00f0ff;
  --secondary: #c300ff;
  --success: #00ff9d;
  --warning: #ffaa00;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #050608;
  color: #e5e7eb;
  font-family: "Inter", system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(39, 39, 42, 0.7);
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 640px) {
  .nav-shell { padding: 1rem 1.5rem; }
}
@media (min-width: 1024px) {
  .nav-shell { padding: 1rem 2rem; }
}

.nav-links-desktop { display: none; }
@media (min-width: 768px) {
  .nav-links-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
  }
}

.nav-link {
  color: #d4d4d8;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-link:hover { color: var(--accent); }

.nav-toggle {
  display: flex;
  height: 2.25rem;
  width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid #3f3f46;
  color: #d4d4d8;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}
.nav-toggle:hover {
  border-color: rgba(0, 240, 255, 0.7);
  color: var(--accent);
}
@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.nav-mobile-panel {
  border-top: 1px solid rgba(39, 39, 42, 0.7);
  background-color: rgba(0, 0, 0, 0.95);
}
@media (min-width: 768px) {
  .nav-mobile-panel { display: none; }
}

.nav-mobile-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1rem;
}
@media (min-width: 640px) {
  .nav-mobile-inner { padding: 1.25rem 1.5rem; }
}

.site-footer {
  border-top: 1px solid #18181b;
  background-color: rgba(0, 0, 0, 0.95);
  margin-top: auto;
}

.footer-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 0.875rem;
  color: #71717a;
}
@media (min-width: 640px) { .footer-shell { padding: 1.5rem 1.5rem; } }
@media (min-width: 768px) {
  .footer-shell {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }
}
@media (min-width: 1024px) { .footer-shell { padding: 1.5rem 2rem; } }

.footer-link {
  color: #71717a;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--accent); }

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.875rem;
  transform: translateY(-200%);
  z-index: 60;
  border: 1px solid rgba(148, 163, 184, 0.8);
  text-decoration: none;
}
.skip-link:focus-visible { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.3' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  opacity: 0.18;
}

.glitch-ring {
  position: absolute;
  inset: -5px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  mix-blend-mode: screen;
  animation: glitch 2.8s infinite;
  pointer-events: none;
}

@keyframes glitch {
  0%, 100% { transform: translate(0); opacity: 0.45; }
  20% { transform: translate(1.5px, -1px); opacity: 0.85; }
  40% { transform: translate(-1px, 1.2px); opacity: 0.6; }
  60% { transform: translate(0.8px, -0.8px); opacity: 0.9; }
  80% { transform: translate(-0.6px, 0.7px); opacity: 0.55; }
}

.typewriter-container {
  display: flex;
  align-items: center;
  min-height: 3rem;
  font-family: "JetBrains Mono", monospace;
  color: var(--accent);
  font-size: 1.125rem;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px) { .typewriter-container { font-size: 1.25rem; } }

#typewriter-text { color: var(--accent); }

.typewriter-cursor {
  display: inline-block;
  width: 10px;
  height: 1.4em;
  margin-left: 2px;
  background: var(--accent);
  animation: blink 1s steps(2, jump-none) infinite;
}
@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:first-child {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.35);
}

ul li { margin-bottom: 0.5rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.75rem !important; }
  .text-lg { font-size: 1rem !important; }
}

.donation-widget-container {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.15);
  transition: all 0.3s ease;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.8) 0%, rgba(10, 10, 20, 0.9) 100%);
  padding: 0.75rem;
  display: flex;
  justify-content: center;
  width: 100%;
}
.donation-widget-container:hover {
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.25);
  transform: translateY(-2px);
}

.donation-widget-container iframe {
  border-radius: 0.75rem;
  max-width: 100%;
  width: 346px;
  height: 580px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  margin: 0 auto;
}
@media (max-width: 400px) {
  .donation-widget-container iframe {
    height: 620px;
    width: 100%;
  }
}

.funds-message {
  background: linear-gradient(145deg, rgba(0, 255, 157, 0.05) 0%, rgba(0, 240, 255, 0.05) 100%);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-top: 1rem;
}

.challenge-img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 300px;
}
@media (min-width: 640px) {
  .challenge-img { max-height: 400px; }
}
@media (min-width: 1024px) {
  .challenge-img { max-height: 450px; }
}

.full-max-width { max-width: 100% !important; }

.content-grid {
  width: 100%;
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .content-grid {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .content-grid {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

.no-form { display: none; }

.text-warning { color: var(--warning); }
.border-warning { border-color: var(--warning); }
.border-warning\/30 { border-color: rgba(255, 170, 0, 0.3); }
.bg-warning\/10 { background-color: rgba(255, 170, 0, 0.1); }

a[download]:hover {
  transform: translateY(-1px);
}
a[download]:active {
  transform: translateY(0);
}