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

:root {
  --primary: #003566;
  --primary-dark: #002147;
  --accent: #D62828;
  --accent-hover: #b31f1f;
  --bg-primary: #F8F9FA;
  --bg-secondary: #ADB5BD;
  --bg-card: #fff;
  --text-primary: #343A40;
  --text-secondary: #6C757D;
  --border-color: #ADB5BD;
  --font-heading: 'Roboto', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  
  /* Chromatic Aberration Variables */
  --glitch-red: #FF0000;
  --glitch-cyan: #00FFFF;
  --glitch-blue: #0000FF;
  --scanline-opacity: 0.03;
  --noise-opacity: 0.08;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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

/* Chromatic Aberration Base Effects */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255, 0, 0, var(--scanline-opacity)) 2px,
    rgba(255, 0, 0, var(--scanline-opacity)) 4px
  );
  pointer-events: none;
  z-index: 1000;
  animation: scanlines 0.1s infinite linear;
}

@keyframes scanlines {
  0% { transform: translateY(0); }
  100% { transform: translateY(4px); }
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mb-5 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 40px; }

.p-0 { padding: 0; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }
.p-5 { padding: 40px; }

/* Responsive Grid */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
  }
  
  .col {
    flex: none;
    width: 100%;
  }
  
  .container {
    padding: 0 15px;
  }
}

/* Focus States */
*:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Glitch Animation Base */
.glitch-text {
  position: relative;
  color: var(--text-primary);
  animation: glitch-main 2s infinite linear alternate-reverse;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}

.glitch-text::before {
  color: var(--glitch-red);
  animation: glitch-before 3s infinite linear alternate-reverse;
  z-index: -1;
}

.glitch-text::after {
  color: var(--glitch-cyan);
  animation: glitch-after 2s infinite linear alternate-reverse;
  z-index: -2;
}

@keyframes glitch-main {
  0%, 92%, 100% { transform: translate(0); }
  94% { transform: translate(-2px, 0); }
  96% { transform: translate(2px, 0); }
  98% { transform: translate(0, -2px); }
}

@keyframes glitch-before {
  0%, 90%, 100% { transform: translate(0); }
  92% { transform: translate(-2px, 0); }
  94% { transform: translate(2px, 2px); }
  96% { transform: translate(-1px, -1px); }
  98% { transform: translate(1px, 1px); }
}

@keyframes glitch-after {
  0%, 88%, 100% { transform: translate(0); }
  90% { transform: translate(2px, 0); }
  92% { transform: translate(-2px, -2px); }
  94% { transform: translate(1px, 1px); }
  96% { transform: translate(-1px, 2px); }
  98% { transform: translate(2px, -1px); }
}