/* ========================================
   JUSTICE VIKRAM NATH — OFFICIAL WEBSITE
   Design System: Transparent Court of the Future
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── CSS Variables ── */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --bg-card: rgba(20, 20, 35, 0.6);
  --bg-glass: rgba(15, 15, 30, 0.4);

  --blue-primary: #00a2ff;
  --blue-secondary: #0077cc;
  --blue-glow: #00c8ff;
  --blue-dim: #004466;
  --blue-accent: #3db8ff;

  --white: #ffffff;
  --white-soft: #e0e6ed;
  --white-muted: #a0aab4;
  --grey-metallic: #6b7a8d;
  --grey-dark: #2a2a3a;
  --grey-border: rgba(100, 140, 180, 0.15);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-glow: 0 0 30px rgba(0, 162, 255, 0.15);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 12px 48px rgba(0, 162, 255, 0.2);

  --transition-fast: 0.2s ease;
  --transition-base: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

  --container-max: 1280px;
  --container-wide: 1440px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--white-soft);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: var(--blue-primary);
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--blue-glow);
}

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

ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { font-size: 1rem; color: var(--white-muted); }

.mono { font-family: var(--font-mono); }
.text-blue { color: var(--blue-primary); }
.text-glow { color: var(--blue-glow); text-shadow: 0 0 20px rgba(0, 200, 255, 0.4); }

/* ── Layout ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: var(--container-wide);
}

.section {
  padding: 6rem 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header .section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--blue-primary);
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.2);
  padding: 0.4rem 1.2rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* ── Grid System ── */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ── Glass Card ── */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 162, 255, 0.3), transparent);
}

.glass-card:hover {
  border-color: rgba(0, 162, 255, 0.3);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

/* ── Navigation ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--grey-border);
  padding: 0.6rem 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-glow));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1rem;
  color: var(--white);
}

.nav-brand-text {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--white);
}

.nav-brand-text span {
  color: var(--blue-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(0, 162, 255, 0.08);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--blue-primary);
  border-radius: 2px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ── Hero Section ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 5rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, 
    rgba(10, 10, 15, 0.3) 0%, 
    rgba(10, 10, 15, 0.6) 50%, 
    var(--bg-primary) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--blue-primary);
  margin-bottom: 2rem;
}

.hero-tag .dot {
  width: 8px;
  height: 8px;
  background: var(--blue-glow);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 200, 255, 0.6); }
  50% { opacity: 0.6; box-shadow: 0 0 0 8px rgba(0, 200, 255, 0); }
}

.hero h1 {
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-glow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-secondary));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(0, 162, 255, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 162, 255, 0.5);
  transform: translateY(-2px);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--white-soft);
  border: 1px solid var(--grey-border);
}

.btn-outline:hover {
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  background: rgba(0, 162, 255, 0.05);
}

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--grey-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 4rem 0;
}

.stat-item {
  background: var(--bg-secondary);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-base);
}

.stat-item:hover {
  background: var(--bg-tertiary);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--blue-primary);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white-muted);
}

/* ── Dashboard Panels ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-base);
}

.panel:hover {
  border-color: rgba(0, 162, 255, 0.25);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--grey-border);
}

.panel-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-primary);
}

.panel-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--white-muted);
}

.panel-status .live-dot {
  width: 6px;
  height: 6px;
  background: #00ff88;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

.panel-body {
  padding: 1.5rem;
}

.panel-body img {
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--blue-primary), var(--blue-dim), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -3rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--bg-primary);
  border: 2px solid var(--blue-primary);
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:hover::before {
  background: var(--blue-primary);
  box-shadow: 0 0 15px rgba(0, 162, 255, 0.5);
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-primary);
  margin-bottom: 0.5rem;
}

.timeline-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.timeline-item p {
  font-size: 0.95rem;
}

/* ── Interactive Cards ── */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.case-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue-primary), var(--blue-glow));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.case-card:hover {
  border-color: rgba(0, 162, 255, 0.3);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.case-card:hover::after {
  transform: scaleX(1);
}

.case-card .case-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-glow);
  background: rgba(0, 200, 255, 0.1);
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.case-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.case-card p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.case-expand {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--grey-border);
}

.case-card.expanded .case-expand {
  display: block;
  animation: fadeSlideIn 0.4s ease;
}

/* ── Module Cards (Practice Areas) ── */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.module-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 162, 255, 0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.module-card:hover::before {
  opacity: 1;
}

.module-card:hover {
  border-color: rgba(0, 162, 255, 0.3);
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.module-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: rgba(0, 162, 255, 0.1);
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.module-card h3 {
  margin-bottom: 1rem;
}

.module-card p {
  font-size: 0.9rem;
}

/* ── News Feed ── */
.feed-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border-bottom: 1px solid var(--grey-border);
  transition: all var(--transition-base);
}

.feed-item:hover {
  background: rgba(0, 162, 255, 0.03);
}

.feed-date {
  min-width: 80px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--blue-primary);
  padding-top: 0.25rem;
}

.feed-content h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.feed-content p {
  font-size: 0.9rem;
}

.feed-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue-accent);
  margin-top: 0.75rem;
}

/* ── Knowledge/Resource Cards ── */
.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-base);
}

.resource-card:hover {
  border-color: rgba(0, 162, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.resource-type {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-primary);
  margin-bottom: 1rem;
}

.resource-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
  transition: border-color var(--transition-fast);
}

.search-bar:focus-within {
  border-color: var(--blue-primary);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 1rem 1.5rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--grey-metallic);
}

.search-bar button {
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-secondary));
  border: none;
  padding: 1rem 1.5rem;
  color: var(--white);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition-fast);
}

.search-bar button:hover {
  background: linear-gradient(135deg, var(--blue-glow), var(--blue-primary));
}

/* ── Filter Chips ── */
.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--grey-border);
  background: transparent;
  color: var(--white-muted);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.chip:hover,
.chip.active {
  background: rgba(0, 162, 255, 0.1);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
}

/* ── Contact Form ── */
.contact-form {
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue-primary);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(0, 162, 255, 0.1);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* ── Contact Info ── */
.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
  margin-bottom: 0;
}

.contact-info-icon {
  width: 40px;
  height: 40px;
  background: rgba(0, 162, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.contact-info-item p {
  font-size: 0.9rem;
}

/* ── Social Links ── */
.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-link {
  width: 42px;
  height: 42px;
  background: var(--bg-card);
  border: 1px solid var(--grey-border);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-muted);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: rgba(0, 162, 255, 0.1);
  border-color: var(--blue-primary);
  color: var(--blue-primary);
  transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--grey-border);
  padding: 3rem 0;
  background: var(--bg-secondary);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand p {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  max-width: 300px;
}

.footer-links {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-links-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-mono);
  color: var(--blue-primary);
  margin-bottom: 1rem;
}

.footer-links-col a {
  display: block;
  color: var(--white-muted);
  font-size: 0.85rem;
  padding: 0.25rem 0;
  transition: color var(--transition-fast);
}

.footer-links-col a:hover {
  color: var(--white);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--grey-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
}

.footer-credit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-muted);
}

.footer-credit a {
  color: var(--blue-primary);
}

/* ── Page Header (inner pages) ── */
.page-header {
  min-height: 50vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 6rem;
  padding-bottom: 4rem;
  overflow: hidden;
}

.page-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.page-header-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.15;
}

.page-header-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(10, 10, 15, 0.4) 0%,
    rgba(10, 10, 15, 0.7) 60%,
    var(--bg-primary) 100%);
}

.page-header .container {
  position: relative;
  z-index: 1;
}

/* ── Hierarchy Map ── */
.hierarchy-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 2rem 0;
}

.hierarchy-level {
  text-align: center;
  position: relative;
}

.hierarchy-node {
  background: var(--bg-card);
  border: 2px solid var(--grey-border);
  border-radius: var(--radius-lg);
  padding: 2rem 3rem;
  min-width: 280px;
  transition: all var(--transition-base);
}

.hierarchy-node:hover {
  border-color: var(--blue-primary);
  box-shadow: var(--shadow-glow);
}

.hierarchy-node.active {
  border-color: var(--blue-primary);
  background: rgba(0, 162, 255, 0.08);
}

.hierarchy-connector {
  width: 2px;
  height: 40px;
  background: linear-gradient(180deg, var(--blue-primary), var(--blue-dim));
  margin: 0 auto;
}

/* ── Gateway Page ── */
.gateway {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

.gateway-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.gateway-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
}

.gateway-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(10, 10, 15, 0.5) 0%, var(--bg-primary) 70%);
}

.gateway-panel {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 500px;
  width: 100%;
  padding: 0 2rem;
}

.gateway-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  border: 2px solid var(--blue-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulse-ring 3s ease-in-out infinite;
  position: relative;
}

.gateway-icon::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(0, 162, 255, 0.2);
  border-radius: 50%;
  animation: pulse-ring 3s ease-in-out infinite 0.5s;
}

@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 162, 255, 0.3); }
  50% { box-shadow: 0 0 0 20px rgba(0, 162, 255, 0); }
}

.gateway h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.gateway p {
  margin-bottom: 2rem;
}

.gateway-input-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.gateway-input {
  width: 100%;
  background: var(--bg-card);
  border: 2px solid var(--grey-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.5rem;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 8px;
  text-transform: uppercase;
  outline: none;
  transition: all var(--transition-fast);
}

.gateway-input:focus {
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 4px rgba(0, 162, 255, 0.1);
}

.gateway-input.error {
  border-color: #ff4444;
  animation: shake 0.5s ease;
}

.gateway-input.success {
  border-color: #00ff88;
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

.gateway-btn {
  width: 100%;
  padding: 1.1rem;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-secondary));
  border: none;
  border-radius: var(--radius-md);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  cursor: pointer;
  transition: all var(--transition-base);
}

.gateway-btn:hover {
  box-shadow: 0 8px 30px rgba(0, 162, 255, 0.4);
  transform: translateY(-2px);
}

.gateway-error {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #ff4444;
  margin-top: 1rem;
  display: none;
}

.gateway-error.visible {
  display: block;
  animation: fadeSlideIn 0.3s ease;
}

/* ── Animations ── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(3px, -3px); }
  60% { transform: translate(-2px, -2px); }
  80% { transform: translate(2px, 2px); }
  100% { transform: translate(0); }
}

.glitch-effect {
  animation: glitch 0.3s ease infinite;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Ambient Grid Background ── */
.ambient-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(rgba(0, 162, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 162, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Gradient Backgrounds (fallback for missing images) ── */
.gradient-hero {
  background: linear-gradient(135deg, #0a0a1a 0%, #0d1b2a 40%, #1b2838 70%, #0a0a1a 100%);
}

.gradient-abstract {
  background: linear-gradient(180deg, #0a0a1a 0%, #0f1923 50%, #0a0a1a 100%);
}

/* ── Livestream Tribute ── */
.livestream-section {
  position: relative;
  overflow: hidden;
}

.livestream-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 100px;
  padding: 0.4rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #ff4444;
  margin-bottom: 1.5rem;
}

.livestream-badge .live-indicator {
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 1rem 0;
    gap: 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .hero {
    min-height: 90vh;
    padding-top: 6rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 4rem 0;
  }

  .page-header {
    min-height: 40vh;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .hierarchy-node {
    padding: 1.5rem 2rem;
    min-width: auto;
  }

  .feed-item {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .stats-bar {
    grid-template-columns: 1fr;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    justify-content: center;
  }
}
