/* ==========================================================================
   SOCRATE AI LAB — Core CSS Design System & Rich Aesthetics
   ========================================================================== */

/* 1. Reset & Global Properties */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

/* Base Gradient Support for pre-2024 Browsers */
:root {
  --in-oklch: ;
  --bg-dark: #0a0b10;
  --color-primary: #8d4df7;
  --color-secondary: #00e5ff;
  --color-neutral-light: #f5f6fa;
  --color-neutral-muted: #9ba0be;
  --font-family-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-serif: 'Cinzel', Georgia, serif;
  --font-family-mono: 'Fira Code', monospace;
  
  /* Glassmorphism token base */
  --glass-bg: rgba(14, 16, 28, 0.65);
  --glass-border: rgba(255, 255, 255, 0.07);
  --glass-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.37);
  
  /* Timing function for ultra-premium feel */
  --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
}

@supports (linear-gradient(in oklch, white, black)) {
  :root {
    --in-oklch: in oklch;
    /* OKLCH tailormade premium shades */
    --bg-dark: oklch(10% 0.02 250);
    --color-primary: oklch(58% 0.25 295);
    --color-secondary: oklch(75% 0.18 200);
    --color-neutral-light: oklch(96% 0.01 250);
    --color-neutral-muted: oklch(73% 0.03 250);
  }
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-dark);
  color: var(--color-neutral-light);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  /* Dotted grid mathematical background overlay */
  background-image: 
    radial-gradient(rgba(141, 77, 247, 0.08) 1.5px, transparent 1.5px),
    radial-gradient(rgba(0, 229, 255, 0.05) 1.5px, transparent 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--glass-border);
  border-radius: 5px;
  border: 2px solid var(--bg-dark);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Custom Selection */
::selection {
  background-color: var(--color-primary);
  color: #fff;
}

/* 2. Interactive Background Canvas */
#neural-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: all;
  opacity: 0.85;
}

/* 3. Header & Navigation */
#main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: padding 0.3s var(--ease-premium);
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.4rem;
  transition: transform 0.2s var(--ease-premium);
}
.logo:hover {
  transform: scale(1.02);
}
.logo-symbol {
  font-family: var(--font-family-serif);
  font-size: 1.8rem;
  color: var(--color-secondary);
  text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
  line-height: 1;
}
.logo-text {
  font-family: var(--font-family-sans);
  letter-spacing: -0.5px;
}

#nav-menu ul {
  display: flex;
  list-style: none;
  gap: 1.75rem;
  align-items: center;
}

#nav-menu a {
  text-decoration: none;
  color: var(--color-neutral-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: color 0.25s ease, transform 0.2s ease;
  position: relative;
}
#nav-menu a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width 0.25s var(--ease-premium);
}
#nav-menu a:hover {
  color: #fff;
}
#nav-menu a:hover::after {
  width: 100%;
}

.nav-cta {
  background: linear-gradient(135deg var(--in-oklch), var(--color-primary), oklch(45% 0.2 300));
  color: #fff !important;
  padding: 0.55rem 1.15rem;
  border-radius: 50px;
  font-weight: 600 !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 15px rgba(141, 77, 247, 0.35);
  transition: all 0.3s var(--ease-premium) !important;
}
.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(141, 77, 247, 0.55), 0 0 0 4px rgba(141, 77, 247, 0.15);
}
.nav-cta::after {
  display: none !important;
}

/* Premium Language Selector */
.lang-selector {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  margin-left: 1rem;
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-family-sans);
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-neutral-muted);
  cursor: pointer;
  padding: 0.15rem 0.3rem;
  transition: all 0.25s var(--ease-premium);
  border-radius: 4px;
}
.lang-btn:hover {
  color: #fff;
}
.lang-btn.active {
  color: var(--color-secondary);
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
.lang-separator {
  color: rgba(255, 255, 255, 0.15);
  font-size: 0.75rem;
  font-weight: bold;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 6px;
  padding: 5px;
}
.menu-toggle .bar {
  width: 25px;
  height: 2px;
  background-color: var(--color-neutral-light);
  transition: all 0.3s var(--ease-premium);
}

/* 4. Hero Section */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 7rem 2rem 4rem 2rem;
  position: relative;
}

.french-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}
.french-badge span {
  width: 4px;
  height: 12px;
  display: inline-block;
  border-radius: 1px;
}
.french-badge .blue { background-color: #0055A5; }
.french-badge .white { background-color: #FFFFFF; }
.french-badge .red { background-color: #EF4135; }

.hero-title {
  font-family: var(--font-family-serif);
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right var(--in-oklch), #fff 40%, var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: title-glowing 5s infinite ease-in-out alternate;
}

.hero-subtitle {
  max-width: 800px;
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-neutral-muted);
  margin-bottom: 3rem;
  line-height: 1.8;
}
.hero-subtitle strong {
  color: #fff;
  font-weight: 600;
}

/* Math Synthesizer Formula Card */
.math-container {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  padding: 1.25rem 2.5rem;
  margin-bottom: 3.5rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(12px);
  box-shadow: var(--glass-shadow);
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium);
}
.math-container:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 45px rgba(0, 229, 255, 0.15);
  border-color: rgba(0, 229, 255, 0.25);
}
.math-code {
  font-family: var(--font-family-mono);
  font-size: 1.2rem;
  color: var(--color-neutral-light);
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.math-part {
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}
.math-part.logic {
  color: #ffa726;
  border-bottom: 2px solid rgba(255, 167, 38, 0.3);
}
.math-part.neural {
  color: var(--color-secondary);
  border-bottom: 2px solid rgba(0, 229, 255, 0.3);
}
.math-part.goal {
  color: #4caf50;
  font-weight: 600;
  border-bottom: 2px solid rgba(76, 175, 80, 0.3);
}
.math-operator, .math-arrow {
  font-weight: bold;
  color: var(--color-neutral-muted);
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Button UI Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
}
.btn-primary {
  background: linear-gradient(135deg var(--in-oklch), var(--color-primary), oklch(45% 0.22 300));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 6px 20px rgba(141, 77, 247, 0.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(141, 77, 247, 0.6);
  filter: brightness(1.1);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.btn-block {
  display: flex;
  width: 100%;
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0.6;
  transition: opacity 0.3s ease;
}
.hero-scroll-indicator:hover {
  opacity: 1;
}
.scroll-link {
  text-decoration: none;
  color: var(--color-neutral-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.mouse-icon {
  width: 24px;
  height: 40px;
  border: 2px solid var(--color-neutral-muted);
  border-radius: 12px;
  position: relative;
}
.mouse-icon .wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-neutral-light);
  border-radius: 2px;
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  animation: mouse-scroll 1.6s infinite ease-in-out;
}

/* 5. General Layout Structures */
.large-section {
  padding: 8rem 2rem;
  position: relative;
}
.dark-bg {
  background-color: rgba(7, 8, 14, 0.7);
  box-shadow: inset 0 20px 80px rgba(0,0,0,0.4), inset 0 -20px 80px rgba(0,0,0,0.4);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4.5rem;
  text-align: center;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--color-secondary);
  letter-spacing: 3px;
  margin-bottom: 0.75rem;
}
.section-header h2 {
  font-family: var(--font-family-serif);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  margin: 1.25rem auto 0 auto;
  border-radius: 20px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

/* 6. Philosophy & Manifesto Stylings */
.philosophy-text blockquote {
  font-family: var(--font-family-serif);
  font-size: 1.5rem;
  line-height: 1.7;
  font-style: italic;
  color: #fff;
  border-left: 4px solid var(--color-secondary);
  padding-left: 2rem;
  margin-bottom: 2rem;
}
.philosophy-text blockquote cite {
  display: block;
  font-family: var(--font-family-sans);
  font-size: 0.9rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-neutral-muted);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.philosophy-text p {
  color: var(--color-neutral-muted);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  line-height: 1.8;
}
.motto-badge {
  display: inline-block;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--color-secondary);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-family: var(--font-family-serif);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: var(--glass-shadow);
  transition: transform 0.4s var(--ease-premium), border-color 0.4s var(--ease-premium), box-shadow 0.4s var(--ease-premium);
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 20px rgba(141, 77, 247, 0.1);
}

.math-card h3 {
  font-family: var(--font-family-serif);
  font-size: 1.6rem;
  margin-bottom: 2rem;
  color: #fff;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 1rem;
}
.math-card ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.math-card li strong {
  display: block;
  font-size: 1.1rem;
  color: var(--color-secondary);
  margin-bottom: 0.35rem;
}
.math-card li p {
  font-size: 0.95rem;
  color: var(--color-neutral-muted);
  line-height: 1.5;
}

/* 7. Pillar Cards */
.pillar-card {
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.pillar-card:hover::before {
  opacity: 1;
}

.pillar-icon {
  font-family: var(--font-family-serif);
  font-size: 3rem;
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
  line-height: 1;
}

.pillar-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}
.pillar-card p {
  color: var(--color-neutral-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.pillar-formula {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  display: inline-block;
}
.pillar-formula code {
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
  color: var(--color-neutral-light);
}

/* Engineering card flag styles */
.engineering-card {
  position: relative;
  overflow: hidden;
}
.engineering-accent-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
}
.engineering-accent-line.blue { background-color: #0055A5; }
.engineering-accent-line.white { background-color: #FFFFFF; }
.engineering-accent-line.red { background-color: #EF4135; }

.engineering-card h3 {
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: 1.25rem;
  font-weight: 700;
}
.engineering-card p {
  color: var(--color-neutral-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.card-footer-formula {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: var(--color-secondary);
  background: rgba(0,0,0,0.25);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  display: inline-block;
}

/* 8. Socratic Terminal Interface */
.socratic-description h3 {
  font-family: var(--font-family-serif);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.socratic-description p {
  color: var(--color-neutral-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.theorem-selector-container {
  margin-bottom: 1.5rem;
}
.theorem-selector-container label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-neutral-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
}
.form-control:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.2);
}

.custom-theorem-input-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.terminal-panel {
  background: #06070c;
  border: 1px solid var(--glass-border);
  border-radius: 15px;
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 420px;
}
.terminal-header {
  background: rgba(14, 16, 28, 0.95);
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--glass-border);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.terminal-title {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: var(--color-neutral-muted);
}
.terminal-status {
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background-color: rgba(255,255,255,0.05);
  color: var(--color-neutral-muted);
}
.terminal-status.running {
  background-color: rgba(0, 229, 255, 0.15);
  color: var(--color-secondary);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.terminal-status.lean {
  background-color: rgba(141, 77, 247, 0.15);
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(141, 77, 247, 0.2);
}
.terminal-status.success {
  background-color: rgba(39, 201, 63, 0.15);
  color: #27c93f;
  box-shadow: 0 0 10px rgba(39, 201, 63, 0.2);
}

.terminal-body {
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-family: var(--font-family-mono);
  font-size: 0.85rem;
  line-height: 1.5;
  color: #c7cbd9;
  text-align: left;
}
.terminal-line {
  animation: fade-in-line 0.3s ease forwards;
}
.terminal-line.system {
  color: #546e7a;
}
.terminal-line.socrates {
  color: var(--color-secondary);
}
.terminal-line.learner {
  color: #ffa726;
}
.terminal-line.lean-verification {
  color: #b388ff;
  border-left: 2px solid #b388ff;
  padding-left: 0.75rem;
  background: rgba(179, 136, 255, 0.03);
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}
.terminal-line.success-done {
  color: #27c93f;
  font-weight: bold;
}
.terminal-line.cursor {
  color: #fff;
  animation: blink-cursor 1s infinite step-end;
}

/* Animations for Terminal */
@keyframes blink-cursor {
  from, to { color: transparent; }
  50% { color: #fff; }
}
@keyframes fade-in-line {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Premium Research Portfolio styling */
.repo-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.25rem 2rem;
  height: 100%;
}
.repo-card h3 {
  font-family: var(--font-family-sans);
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 0.85rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.repo-card p {
  color: var(--color-neutral-muted);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.repo-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  align-self: flex-start;
  letter-spacing: 0.5px;
}
.repo-badge.open {
  background: rgba(39, 201, 63, 0.08);
  border: 1px solid rgba(39, 201, 63, 0.2);
  color: #27c93f;
  text-shadow: 0 0 5px rgba(39, 201, 63, 0.3);
}
.repo-badge.private {
  background: rgba(255, 167, 38, 0.08);
  border: 1px solid rgba(255, 167, 38, 0.2);
  color: #ffa726;
  text-shadow: 0 0 5px rgba(255, 167, 38, 0.3);
}

.repo-footer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--glass-border);
  padding-top: 1.25rem;
}
.repo-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}
.repo-link:hover {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
  transform: translateX(2px);
}
.repo-sublink {
  color: var(--color-neutral-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s ease;
}
.repo-sublink:hover {
  color: var(--color-secondary);
}
.repo-status-lock {
  color: var(--color-neutral-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

/* 9. Testimonials Section (Interactive Carousel) */
.testimonials-container {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  min-height: 320px;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease-premium), transform 0.6s var(--ease-premium);
  display: flex;
  justify-content: center;
  text-align: center;
}
.testimonial-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.testimonial-content {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 4rem 3.5rem 3.5rem 3.5rem;
  box-shadow: var(--glass-shadow);
  position: relative;
}
.testimonial-content::before {
  content: "“";
  position: absolute;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-family-serif);
  font-size: 6rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
}

.testimonial-quote {
  font-family: var(--font-family-serif);
  font-size: 1.6rem;
  line-height: 1.7;
  color: #fff;
  margin-bottom: 2.5rem;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.author-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-secondary);
}
.author-role {
  font-size: 0.9rem;
  color: var(--color-neutral-muted);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 3rem;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  cursor: pointer;
  transition: all 0.3s var(--ease-premium);
}
.dot.active {
  background-color: var(--color-secondary);
  transform: scale(1.3);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.7);
}

/* 10. Form & Contact Section */
.join-info h3 {
  font-family: var(--font-family-serif);
  font-size: 2rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.join-info p {
  color: var(--color-neutral-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 3rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}
.contact-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.contact-icon {
  font-size: 1.75rem;
  color: var(--color-secondary);
  line-height: 1;
  background: rgba(0, 229, 255, 0.08);
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 229, 255, 0.15);
}
.contact-item h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.25rem;
}
.contact-item p {
  font-size: 0.95rem;
  color: var(--color-neutral-muted);
  margin-bottom: 0;
}
.link-highlight {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.25s ease;
}
.link-highlight:hover {
  border-color: var(--color-secondary);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.join-form-container .form-card {
  padding: 3rem;
}
.form-card h3 {
  font-family: var(--font-family-serif);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 2rem;
  text-align: center;
}

/* Premium Form Elements */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-neutral-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-family-sans);
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-premium);
}
.form-group input::placeholder, 
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.25);
}

/* Form Interactivity states */
.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(141, 77, 247, 0.25);
  background-color: rgba(0,0,0,0.5);
}

/* HTML5 Modern Input Validation */
.form-group input:focus:invalid, 
.form-group textarea:focus:invalid {
  border-color: #ff5f56;
  box-shadow: 0 0 0 3px rgba(255, 95, 86, 0.2);
}
.form-group input:user-valid:not(:placeholder-shown),
.form-group textarea:user-valid:not(:placeholder-shown) {
  border-color: #27c93f;
}

.error-message {
  font-size: 0.8rem;
  color: #ff5f56;
  min-height: 1lh;
}

.form-success-alert {
  background: rgba(39, 201, 63, 0.1);
  border: 1px solid rgba(39, 201, 63, 0.3);
  padding: 1.5rem;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e0f2f1;
  margin-top: 1rem;
}
.form-success-alert a {
  color: var(--color-secondary);
  font-weight: 600;
  text-decoration: none;
}

/* 11. Footer */
#main-footer {
  background-color: #07080e;
  border-top: 1px solid var(--glass-border);
  padding: 5rem 2rem 2.5rem 2rem;
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-about h4 {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 1rem;
  font-weight: 700;
}
.footer-about p {
  color: var(--color-neutral-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 320px;
}
.footer-motto {
  font-family: var(--font-family-serif);
  font-style: italic;
  margin-top: 1.5rem;
  color: var(--color-secondary) !important;
  font-size: 1rem !important;
}

.footer-links h4, .footer-legal h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.footer-links ul, .footer-legal ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.footer-links a, .footer-legal a {
  text-decoration: none;
  color: var(--color-neutral-muted);
  font-size: 0.9rem;
  transition: color 0.25s ease;
}
.footer-links a:hover, .footer-legal a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.35);
}

/* 12. Modal (Domain Configuration Interface) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  background-color: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-premium);
}
.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  max-width: 650px;
  width: 90%;
  padding: 3.5rem;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s var(--ease-premium);
}
.modal[aria-hidden="false"] .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 2rem;
  background: none;
  border: none;
  color: var(--color-neutral-muted);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.25s ease;
}
.modal-close:hover {
  color: #fff;
  background-color: rgba(255,255,255,0.05);
}

.modal-content h3 {
  font-family: var(--font-family-serif);
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 1.25rem;
  text-align: center;
}
.modal-content p {
  color: var(--color-neutral-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-align: center;
}
.modal-content p a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

.dns-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
  font-size: 0.85rem;
}
.dns-table th, .dns-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--glass-border);
}
.dns-table th {
  color: #fff;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.02);
}
.dns-table td code {
  font-family: var(--font-family-mono);
  background: rgba(0, 0, 0, 0.4);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--color-secondary);
}
.dns-table td small {
  color: var(--color-neutral-muted);
}

.modal-actions {
  display: flex;
  justify-content: center;
}

/* 13. CSS Animations & Keyframes */
@keyframes title-glowing {
  0% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.02);
  }
  100% {
    text-shadow: 0 0 35px rgba(0, 229, 255, 0.25);
  }
}

@keyframes mouse-scroll {
  0%, 100% {
    top: 6px;
    opacity: 1;
    transform: translateX(-50%) scaleY(1);
  }
  50% {
    top: 20px;
    opacity: 0;
    transform: translateX(-50%) scaleY(1.5);
  }
}

/* 14. Accessibility Preferences */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
  #neural-canvas {
    opacity: 0.3;
  }
  .mouse-icon .wheel {
    animation: none;
  }
}

/* 15. Responsive Breakpoints (Mobile & Tablet First) */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-title {
    font-size: 3.2rem;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem 1.5rem;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  #nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100vw;
    height: 0;
    background: rgba(10, 11, 16, 0.98);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: height 0.4s var(--ease-premium);
    border-bottom: 1px solid var(--glass-border);
  }
  #nav-menu.open {
    height: calc(100vh - 70px);
    overflow-y: auto;
  }
  
  #nav-menu ul {
    flex-direction: column;
    padding: 3rem 2rem;
    gap: 2.5rem;
  }
  
  #nav-menu a {
    font-size: 1.25rem;
  }
  
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .math-code {
    font-size: 0.95rem;
    gap: 0.6rem;
  }
  
  .testimonial-content {
    padding: 3rem 1.75rem 2rem 1.75rem;
  }
  .testimonial-quote {
    font-size: 1.25rem;
  }
  
  .join-form-container .form-card {
    padding: 1.75rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  
  .modal-content {
    padding: 2rem 1.5rem;
  }
  
  .custom-theorem-input-group {
    grid-template-columns: 1fr;
  }
  
  .lang-selector {
    margin-left: auto;
    margin-right: 1rem;
  }
}
