:root {
  --c-void: #050d1a;
  --c-deep: #0a1628;
  --c-ocean: #0f2035;
  --c-surf: #153050;
  --c-foam: #1e4060;
  --c-glow: #00d4ff;
  --c-glow2: #06b6d4;
  --c-mint: #34d399;
  --c-text: #c8dce8;
  --c-text2: #8ba4b8;
  --c-white: #f0f6fa;
  --c-glass: rgba(15,32,53,.55);
  --c-glass2: rgba(15,32,53,.8);
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.4,0,.2,1);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--c-void);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Ambient background */
.ambient {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% 20%, rgba(6,182,212,.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(52,211,153,.05) 0%, transparent 70%),
    radial-gradient(ellipse 90% 60% at 50% 50%, rgba(0,212,255,.03) 0%, transparent 60%),
    var(--c-void);
}
.ambient::after {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.03'/%3E%3C/svg%3E");
  background-size: 256px;
  opacity: .5;
}

a { color: var(--c-glow); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-mint); }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Glass cards */
.glass {
  background: var(--c-glass);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(0,212,255,.1);
  border-radius: var(--radius);
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.glass:hover {
  border-color: rgba(0,212,255,.25);
  box-shadow: 0 8px 40px rgba(0,212,255,.08);
}

/* Grade badge */
.grade-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 18px;
  font-family: var(--font-display); font-size: 2.4rem;
  font-weight: 400; letter-spacing: -1px;
  box-shadow: 0 0 30px rgba(var(--grade-glow),.3), inset 0 1px 0 rgba(255,255,255,.15);
  animation: grade-pulse 3s ease-in-out infinite;
}
.grade-badge.sm { width: 44px; height: 44px; font-size: 1.4rem; border-radius: 12px; }
@keyframes grade-pulse {
  0%,100% { box-shadow: 0 0 20px rgba(var(--grade-glow),.2); }
  50% { box-shadow: 0 0 35px rgba(var(--grade-glow),.35); }
}
.grade-A { background: #059669; color: #ecfdf5; --grade-glow: 5,150,105; }
.grade-B { background: #0891b2; color: #ecfeff; --grade-glow: 8,145,178; }
.grade-C { background: #d97706; color: #fffbeb; --grade-glow: 217,119,6; }
.grade-D { background: #ea580c; color: #fff7ed; --grade-glow: 234,88,12; }
.grade-F { background: #dc2626; color: #fef2f2; --grade-glow: 220,38,38; }

/* Status badges */
.st-badge {
  display: inline-block; padding: 4px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
}
.st-pass { background: rgba(5,150,105,.15); color: #34d399; border: 1px solid rgba(5,150,105,.3); }
.st-warn { background: rgba(217,119,6,.15); color: #fbbf24; border: 1px solid rgba(217,119,6,.3); }
.st-fail { background: rgba(220,38,38,.15); color: #f87171; border: 1px solid rgba(220,38,38,.3); }

/* Top nav */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5,13,26,.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,212,255,.08);
  padding: 0 24px; height: 60px;
  display: flex; align-items: center; justify-content: center;
}
nav .nav-inner {
  max-width: 1120px; width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
nav .logo {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--c-white);
  display: flex; align-items: center; gap: 8px;
}
nav .logo .drop {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--c-glow), var(--c-mint));
  display: flex; align-items: center; justify-content: center;
}
nav .nav-links { display: flex; gap: 24px; align-items: center; }
nav .nav-links a { color: var(--c-text2); font-size: .88rem; font-weight: 500; }
nav .nav-links a:hover { color: var(--c-glow); }

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 8px;
  color: var(--c-text); width: 48px; height: 48px;
  align-items: center; justify-content: center;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--c-glow);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Sections */
section { padding: 80px 0; }
section.compact { padding: 48px 0; }
h1, h2, h3 { font-family: var(--font-display); color: var(--c-white); font-weight: 400; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -1px; line-height: 1.15; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.5px; margin-bottom: 24px; }
h3 { font-size: 1.2rem; margin-bottom: 12px; }
.label {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--c-glow); margin-bottom: 8px;
}

/* Footer */
footer {
  border-top: 1px solid rgba(0,212,255,.08); padding: 48px 24px;
  text-align: center; color: var(--c-text2); font-size: .82rem; line-height: 1.8;
}
footer a { color: var(--c-text); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px; color: var(--c-text2);
  padding: 12px 16px; border-bottom: 1px solid rgba(0,212,255,.1);
}
.data-table td {
  padding: 14px 16px; border-bottom: 1px solid rgba(0,212,255,.05);
  font-size: .9rem;
}
.data-table tr { transition: background .2s; }
.data-table tbody tr:hover { background: rgba(0,212,255,.04); }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .7s var(--ease) both; }
.fade-up.d1 { animation-delay: .1s; }
.fade-up.d2 { animation-delay: .2s; }
.fade-up.d3 { animation-delay: .3s; }
.fade-up.d4 { animation-delay: .4s; }
.fade-up.d5 { animation-delay: .5s; }

/* Responsive */
@media (max-width: 768px) {
  section { padding: 48px 0; }
  section.compact { padding: 32px 0; }
  nav .nav-links { gap: 16px; }
  nav .nav-links a { font-size: .8rem; }
  .grade-badge { width: 56px; height: 56px; font-size: 1.8rem; border-radius: 14px; }
  .grade-badge.sm { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 10px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.4rem; }
  /* Responsive tables: horizontal scroll wrapper */
  .data-table { font-size: .78rem; min-width: 500px; }
  .data-table th, .data-table td { padding: 10px 8px; }
}
@media (max-width: 480px) {
  .nav-toggle { display: flex; }
  nav .nav-links {
    display: none; position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(5,13,26,.97); backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,212,255,.1);
    padding: 8px 0;
  }
  nav .nav-links.open { display: flex; }
  nav .nav-links a { padding: 14px 24px; font-size: .95rem; width: 100%; }
  nav .nav-links a:hover { background: rgba(0,212,255,.06); }
  .container { padding: 0 14px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .label { font-size: .75rem; letter-spacing: 1px; }
  .grade-badge { width: 50px; height: 50px; font-size: 1.6rem; border-radius: 12px; }
  .grade-badge.sm { width: 48px; height: 48px; font-size: 1.1rem; border-radius: 8px; }
  .st-badge { font-size: .75rem; padding: 4px 10px; }
}
