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

:root {
  --accent: #ef4444;
  --accent-bright: #f87171;
  --accent-dim: #dc2626;
  --accent-glow: rgba(239, 68, 68, 0.4);
  --accent-glow-strong: rgba(239, 68, 68, 0.6);
  --amber: #fbbf24;
  --green: #22c55e;

  --bg-deep: #08080c;
  --bg-primary: #0b0b10;
  --bg-card: #0e0e14;
  --bg-card-hover: #131320;
  --bg-screen: #050508;

  --border: #1e1e2d;
  --border-accent: rgba(239, 68, 68, 0.2);

  --text-primary: #f1f1f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--bg-deep);
}

body {
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--accent);
}

button {
  font-family: inherit;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-dim); border-radius: 3px; }

/* buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 25px var(--accent-glow-strong);
  transform: translateY(-2px);
  color: #fff;
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  color: var(--text-primary);
}

/* sections */
.section {
  padding: 5rem 2rem;
  scroll-margin-top: 80px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.section-container {
  max-width: 1000px;
  margin: 0 auto;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
  line-height: 1.1;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  transition: all 0.3s;
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.08);
  background: var(--bg-card-hover);
}

/* animations */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

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

@keyframes fade {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes stripes {
  to { background-position: 22px 0; }
}

/* reveal */
.js .section:not(.visible) {
  opacity: 0;
  transform: translateY(16px);
}

/* focus */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 3000;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-radius: 6px;
}

.skip-link:focus {
  top: 1rem;
  color: #fff;
}
