:root {
  --ink: #080a12;
  --ink2: #0e1120;
  --ink3: #141828;
  --ink4: #1c2235;
  --paper: #edeef5;
  --paper2: #c8cad8;
  --paper3: #2a2f44;
  --rule: #252a3e;
  --accent: #e05a20;
  --accent2: #4a9edd;
  --accent3: #3dba62;
  --gold: #e0a832;
  --purple: #9b6fe0;
  --teal: #2ec4c4;
  --text: #edeef5;
  --text2: #a8abbe;
  --text3: #60688a;
  --card: #111525;
  --card-border: #222840;
  --highlight: rgba(224,90,32,0.10);
}
 
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
html { scroll-behavior: smooth; }
 
body {
  background: var(--ink);
  color: var(--text);
  font-family: 'Lora', Georgia, serif;
  overflow-x: hidden;
  cursor: default;
}
 
/* ── NOISE TEXTURE ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
 
/* ── HERO ── */
.hero {
  position: relative; z-index: 1;
  background: var(--ink);
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 4rem 2rem;
  overflow: hidden;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(200,65,10,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,65,10,0.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-glow {
  position: absolute; pointer-events: none;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,65,10,0.12) 0%, transparent 70%);
  top: 50%; left: 50%; transform: translate(-50%,-50%);
}
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 900px; }
.hero-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem; letter-spacing: 0.25em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s ease both;
}
.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800; line-height: 0.92;
  color: var(--paper);
  margin-bottom: 1rem;
  animation: fadeUp 0.8s 0.15s ease both;
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub {
  font-size: 1.05rem; color: rgba(242,240,235,0.55);
  line-height: 1.7; max-width: 560px; margin: 0 auto 3rem;
  animation: fadeUp 0.8s 0.3s ease both;
}
.hero-canvas {
  width: 100%; max-width: 700px; height: 180px;
  margin: 0 auto 2.5rem;
  animation: fadeUp 0.8s 0.45s ease both;
}
.scroll-hint {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  color: rgba(242,240,235,0.3); letter-spacing: 0.15em;
  animation: fadeUp 0.8s 0.6s ease both, pulse 2s 1.5s infinite;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%,100% { opacity: 0.3; } 50% { opacity: 0.7; }
}
 
/* ── NAV SIDEBAR ── */
#nav-sidebar {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 100; padding: 0 0.5rem;
  display: flex; flex-direction: column; gap: 6px;
}
.nav-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(242,240,235,0.2);
  cursor: pointer; transition: all 0.25s;
  position: relative;
}
.nav-dot::after {
  content: attr(data-label);
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  white-space: nowrap; color: var(--paper);
  background: rgba(13,15,24,0.9); padding: 3px 8px; border-radius: 4px;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
  border: 1px solid rgba(200,65,10,0.3);
}
.nav-dot:hover::after { opacity: 1; }
.nav-dot:hover, .nav-dot.active { background: var(--accent); transform: scale(1.4); }
 
/* ── MAIN CONTENT ── */
main { position: relative; z-index: 1; }
 
/* ── SECTION WRAPPER ── */
.fn-section {
  background: var(--ink2);
  position: relative;
}
.fn-section:nth-child(even) { background: var(--ink3); }
 
.section-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 5rem 2rem 4rem;
}
 
/* ── SECTION HEADER ── */
.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--text3); margin-bottom: 0.6rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.section-tag::after {
  content: ''; flex: 1; height: 1px; background: var(--rule);
  max-width: 120px;
}
.fn-number {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(4rem, 10vw, 7rem); line-height: 1;
  color: rgba(255,255,255,0.2); position: absolute; right: 2rem; top: 3rem;
  pointer-events: none; user-select: none;
}
.fn-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--text); line-height: 1.1; margin-bottom: 0.5rem;
}
.fn-formula {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; color: var(--accent);
  background: rgba(200,65,10,0.07);
  display: inline-block; padding: 0.3rem 0.9rem; border-radius: 6px;
  border-left: 3px solid var(--accent); margin-bottom: 1.5rem;
}
.fn-intro {
  font-size: 0.97rem; color: var(--text2); line-height: 1.75;
  max-width: 620px; margin-bottom: 2rem;
}
 
/* ── TWO-COLUMN LAYOUT ── */
.fn-layout {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2.5rem; align-items: start;
}
@media (max-width: 800px) { .fn-layout { grid-template-columns: 1fr; } }
 
/* ── CANVAS PANEL ── */
.canvas-panel {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 1.2rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.35);
}
.canvas-panel canvas {
  display: block; width: 100%; border-radius: 6px;
}
.canvas-controls {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem;
  align-items: center;
}
.ctrl-label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  color: var(--text3); white-space: nowrap;
}
input[type=range] {
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 2px;
  background: var(--rule); outline: none;
  flex: 1; min-width: 80px; cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(224,90,32,0.25);
}
.val-badge {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem;
  color: var(--accent); background: rgba(224,90,32,0.12);
  padding: 2px 7px; border-radius: 4px; min-width: 44px; text-align: center;
}

 
/* ── PHYSICS CARDS ── */
.phys-cards { display: flex; flex-direction: column; gap: 1rem; }
 
.phys-card {
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 1.1rem 1.3rem;
  cursor: pointer; transition: all 0.22s;
  position: relative; overflow: hidden;
}
.phys-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 2px 0 0 2px;
  background: var(--card-accent, var(--accent));
  transition: width 0.22s;
}
.phys-card:hover::before { width: 6px; }
.phys-card:hover { transform: translateX(4px); box-shadow: 0 6px 32px rgba(0,0,0,0.4); }
.phys-card.open { background: rgba(224,90,32,0.06); border-color: var(--card-accent, var(--accent)); }
 
.phys-card-header {
  display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0;
}
.phys-icon {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: rgba(200,65,10,0.1);
}
.phys-card-title {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: 0.95rem; color: var(--text); flex: 1;
}
.phys-domain {
  font-family: 'JetBrains Mono', monospace; font-size: 0.6rem;
  color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em;
}
.phys-arrow {
  font-size: 0.8rem; color: var(--text3); transition: transform 0.22s;
}
.phys-card.open .phys-arrow { transform: rotate(90deg); }
 
.phys-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.38s cubic-bezier(0.4,0,0.2,1), padding 0.22s;
}
.phys-card.open .phys-body { max-height: 400px; padding-top: 1rem; }
 
.phys-body-inner {
  border-top: 1px solid var(--card-border); padding-top: 0.9rem;
}
.phys-eq {
  font-family: 'JetBrains Mono', monospace; font-size: 0.82rem;
  color: #7ec8f5; background: rgba(74,158,221,0.10);
  padding: 0.35rem 0.8rem; border-radius: 5px; margin-bottom: 0.65rem;
  display: inline-block; border-left: 2px solid #4a9edd;
}
.phys-explain {
  font-size: 0.85rem; color: var(--text2); line-height: 1.65;
}
.phys-explain strong { color: var(--text); }
 
/* ── PROPERTIES TABLE ── */
.props-section { margin-top: 2rem; }
.props-title {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: 0.85rem; color: var(--text2); margin-bottom: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.props-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.prop-chip {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  color: var(--text2); background: var(--ink4);
  padding: 3px 10px; border-radius: 20px;
  border: 1px solid var(--rule);
}
 
/* ── DERIVATIVE BANNER ── */
.deriv-banner {
  display: flex; align-items: center; gap: 1rem;
  background: var(--ink4); border: 1px solid var(--rule); color: var(--paper);
  border-radius: 10px; padding: 0.9rem 1.2rem; margin-top: 1.5rem;
  font-family: 'JetBrains Mono', monospace; font-size: 0.8rem;
}
.deriv-banner .d-label { color: var(--text3); font-size: 0.65rem; display: block; }
.deriv-banner .d-val { color: var(--accent); font-size: 0.95rem; }
.deriv-sep { color: var(--rule); font-size: 1.5rem; }
 
/* ── SEPARATOR ── */
.section-divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.25;
}
 
/* ── INDEX BAR ── */
.index-bar {
  background: var(--ink); color: var(--paper);
  padding: 2rem;
  position: relative; z-index: 1;
}
.index-bar-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem;
}
.index-item {
  cursor: pointer; padding: 1rem;
  border: 1px solid rgba(242,240,235,0.08);
  border-radius: 8px; transition: all 0.2s;
  text-decoration: none; color: inherit;
}
.index-item:hover {
  background: rgba(200,65,10,0.12);
  border-color: rgba(200,65,10,0.4);
}
.index-item-num {
  font-family: 'JetBrains Mono', monospace; font-size: 0.62rem;
  color: var(--accent); margin-bottom: 0.3rem;
}
.index-item-name {
  font-family: 'Syne', sans-serif; font-weight: 600;
  font-size: 0.9rem; color: rgba(242,240,235,0.85);
}
.index-item-formula {
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: rgba(242,240,235,0.4); margin-top: 0.2rem;
}
 
/* ── FOOTER ── */
footer {
  background: var(--ink); border-top: 1px solid rgba(242,240,235,0.05);
  padding: 2rem; text-align: center;
  font-family: 'JetBrains Mono', monospace; font-size: 0.65rem;
  color: rgba(242,240,235,0.2); position: relative; z-index: 1;
  letter-spacing: 0.1em;
}
 
/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s, transform 0.6s; }
.reveal.visible { 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; }
 
/* ── QUIZ STRIP ── */
.quiz-strip {
  background: var(--ink); padding: 3rem 2rem;
  position: relative; z-index: 1;
}
.quiz-inner { max-width: 720px; margin: 0 auto; }
.quiz-title {
  font-family: 'Syne', sans-serif; font-weight: 700;
  font-size: 1.8rem; color: var(--paper); margin-bottom: 0.5rem;
}
.quiz-sub { font-size: 0.88rem; color: rgba(242,240,235,0.4); margin-bottom: 2rem; }
.quiz-q {
  font-size: 1rem; color: var(--paper); margin-bottom: 1.2rem; line-height: 1.6;
}
.quiz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-bottom: 1rem; }
.quiz-opt {
  background: rgba(242,240,235,0.05); border: 1px solid rgba(242,240,235,0.1);
  color: rgba(242,240,235,0.7); border-radius: 8px; padding: 0.7rem 1rem;
  cursor: pointer; font-size: 0.88rem; text-align: center;
  transition: all 0.18s; font-family: 'Lora', serif;
}
.quiz-opt:hover { background: rgba(200,65,10,0.12); border-color: rgba(200,65,10,0.4); color: var(--paper); }
.quiz-opt.correct { background: rgba(42,122,59,0.2); border-color: #2a7a3b; color: #69f0ae; }
.quiz-opt.wrong   { background: rgba(200,65,10,0.15); border-color: var(--accent); color: #ff8a70; }
.quiz-feedback { font-size: 0.85rem; color: rgba(242,240,235,0.5); min-height: 2.5rem; line-height: 1.6; }
.quiz-progress {
  display: flex; gap: 4px; margin-bottom: 1.5rem;
}
.quiz-pip {
  height: 3px; flex: 1; border-radius: 2px;
  background: rgba(242,240,235,0.1);
}
.quiz-pip.done { background: var(--accent); }
.quiz-pip.current { background: rgba(200,65,10,0.5); }
.quiz-nav {
  display: flex; justify-content: space-between; align-items: center; margin-top: 1rem;
}
.quiz-btn {
  font-family: 'JetBrains Mono', monospace; font-size: 0.75rem;
  background: var(--accent); color: white; border: none;
  border-radius: 6px; padding: 0.55rem 1.2rem; cursor: pointer;
  transition: opacity 0.2s; letter-spacing: 0.05em;
}
.quiz-btn:hover { opacity: 0.85; }
.quiz-btn:disabled { opacity: 0.3; cursor: default; }
.quiz-score { font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; color: rgba(242,240,235,0.4); }

/* ── LOGO ZONE (Epic Background Variant) ── */
.hero-logo-zone {
  position: absolute;
  /* Centering it perfectly in the middle of the hero view */
  top: 20%; 
  left: 50%; 
  transform: translate(-50%, -50%);
  
  /* Pushes it behind the text (which usually has z-index: 1 or 2) */
  z-index: 0; 
  
  /* Crucial: prevents the logo from blocking clicks on text or buttons in front of it */
  pointer-events: none; 
  
  animation: fadeUp 1.2s ease both;
}

/* ── Styled to look like a giant faded background watermark ── */
.logo-placeholder {
  display: flex; 
  align-items: center; 
  gap: 1.5rem;
  padding: 2rem 4rem;
  
  /* Very subtle, highly transparent border and background */
  border: 1px solid rgba(224, 90, 32, 0.1);
  border-radius: 16px;
  background: rgba(224, 90, 32, 0.02);
  
  /* Slight blur to make it feel deeply integrated into the background space */
  backdrop-filter: blur(2px);
  
  /* Fading out the entire element so it doesn't distract from readability */
  opacity: 0.25; 
  
  /* Scaled up significantly to fill the space behind the text */
  transform: scale(1.5); 
  cursor: default;
}

/* ── NEW: Targets your actual logo image if you put it inside this div ── */
.logo-placeholder img {
  filter: invert(1); /* Flips your black logo to pure white */
  opacity: 0.25; /* Softens the pure white into a sleek light grey */
}


/* Turning off hover states since it's just a background watermark now */
.logo-placeholder:hover {
  border-color: rgba(224, 90, 32, 0.1);
  background: rgba(224, 90, 32, 0.02);
}

.logo-placeholder-icon {
  font-size: 2.5rem; /* Bigger icon */
  color: rgba(255, 255, 255, 0.6); /* Soft grey */
}

.logo-placeholder-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem; /* Bigger text */
  letter-spacing: 0.4em; /* Sweeping space for an elegant look */
  color: rgba(255, 255, 255, 0.3); /* Deeply faded grey */ 
  text-transform: uppercase;
}
