/* css/style.css */
:root {
  --bg:         #1e1410;
  --surface:    #160e08;
  --surface-deep: #120904;
  --accent:     #cc5500;
  --accent-bright: #e87030;
  --text-primary:  #fff5ee;
  --text-secondary: #c09070;
  --text-muted:  #b08060;
  --text-label:  #8a5035;
  --nav-inactive: #b07050;
  --grid-major: rgba(200,80,0,0.09);
  --grid-minor: rgba(200,80,0,0.04);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

#nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 2px solid var(--accent);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  color: var(--accent-bright);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  text-decoration: none;
}
.nav-logo span {
  color: var(--text-label);
  font-weight: 400;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--nav-inactive);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 1.5px;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent-bright); }
.nav-links a.nav-active {
  color: var(--accent-bright);
  border-bottom: 2px solid var(--accent-bright);
  padding-bottom: 2px;
  font-weight: 700;
}

/* === HERO === */
#hero {
  position: relative;
  overflow: hidden;
}

#particle-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 3fr 2fr;
  min-height: 320px;
  background-image:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px);
  background-size: 30px 30px, 30px 30px, 6px 6px, 6px 6px;
}

.hero-left {
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.section-label {
  font-size: 10px;
  color: var(--text-label);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 10px;
}

.hero-subtitle {
  font-size: 12px;
  color: var(--accent-bright);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.hero-body {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 22px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 9px 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-decoration: none;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--accent-bright); }

.btn-outline {
  border: 1.5px solid var(--accent);
  color: var(--accent-bright);
  padding: 9px 20px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}
.btn-outline:hover { border-color: var(--accent-bright); }

.hero-equation {
  font-size: 11px;
  font-family: 'Courier New', Courier, monospace;
  color: #d08050;
  background: #120904cc;
  border: 1px solid #cc550066;
  padding: 8px 16px;
  display: inline-block;
  align-self: flex-start;
}

/* === SPHERE === */
.hero-right {
  border-left: 1px solid rgba(204,85,0,0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 28px 20px;
}

.sphere-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.sphere-glow {
  position: absolute;
  inset: -18px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204,85,0,0.15), transparent 65%);
}

.sphere-ring {
  position: absolute;
  border-radius: 50%;
}
.ring-outer { inset: 0;    border: 2px solid rgba(204,85,0,0.6); }
.ring-mid   { inset: 12px; border: 1px solid rgba(204,85,0,0.4); transform: rotate(45deg); }
.ring-inner { inset: 24px; border: 1px solid rgba(204,85,0,0.3); }

.sphere-axis {
  position: absolute;
}
.axis-h {
  top: 50%; left: 10px; right: 10px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,85,0,0.4), transparent);
  margin-top: -0.5px;
}
.axis-v {
  left: 50%; top: 10px; bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(204,85,0,0.4), transparent);
  margin-left: -0.5px;
}

.sphere-core {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sphere-core::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 14px var(--accent), 0 0 28px rgba(204,85,0,0.4);
}

.sphere-label {
  position: absolute;
  bottom: -22px;
  left: 0; right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 3px;
  font-family: monospace;
  color: rgba(204,85,0,0.7);
}

.equation-box {
  background: var(--surface-deep);
  border: 1px solid rgba(204,85,0,0.35);
  border-left: 3px solid var(--accent);
  padding: 12px 18px;
  text-align: center;
}
.eq-label {
  font-size: 9px;
  color: #9a6040;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.eq-formula {
  font-size: 14px;
  font-family: monospace;
  color: var(--accent-bright);
  letter-spacing: 1px;
}

/* === CONCEPTS === */
#concepts {
  padding: 40px 32px;
}

.concepts-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.concepts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.concept-card {
  background: rgba(22,16,8,0.55);
  border: 1px solid rgba(204,85,0,0.28);
  border-top: 2px solid var(--accent);
  padding: 18px 16px;
}

.concept-symbol {
  font-size: 22px;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.concept-card h3 {
  font-size: 11px;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.concept-card p {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* === FOOTER === */
#footer {
  background: #100a05;
  border-top: 1px solid rgba(204,85,0,0.2);
  padding: 16px 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-copy {
  font-size: 10px;
  color: #806050;
  letter-spacing: 1px;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 10px;
  color: #806050;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-bright); }

/* === THEORY PAGE === */
.theory-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 32px 60px;
}

.theory-header {
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(204,85,0,0.25);
}

.theory-header h1 {
  margin-top: 10px;
  margin-bottom: 8px;
}

.theory-article {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.theory-section {
  border-left: 3px solid var(--accent);
  padding: 28px 0 28px 28px;
  border-bottom: 1px solid rgba(204,85,0,0.12);
}
.theory-section:last-child { border-bottom: none; }

.theory-section h2 {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.section-num {
  color: var(--accent);
  font-family: monospace;
  font-size: 0.95rem;
}

.theory-section p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 640px;
}

.inline-eq {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-family: monospace;
  color: var(--accent-bright);
  background: var(--surface-deep);
  border: 1px solid rgba(204,85,0,0.35);
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
}

/* === DIVIDER === */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(204,85,0,0.5), transparent);
}
