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

:root {
  --bg-color: #050505;
  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --accent-blue: #00d2ff;
  --accent-purple: #3a7bd5;
  --card-bg: rgba(20, 20, 25, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  /* Removed static radial gradient since we now have a 3D canvas */
}

/* 3D Canvas Background */
#bg-canvas-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background: radial-gradient(circle at center, #101015 0%, #050505 100%);
}

/* Typography */
h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.03em;
}

h1 {
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #fff;
  border-bottom: 1px solid var(--glass-border);
  padding-bottom: 0.5rem;
}

p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

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

.hero p {
  font-size: 1.5rem;
  max-width: 800px;
}

.btn-primary {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-purple) 100%);
  border-radius: 50px;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 210, 255, 0.5);
}

/* Cards (Glassmorphism) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.4s ease, border-color 0.4s ease;
}

.card:hover {
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.2);
}

.card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  transition: transform 0.5s ease;
}

.card:hover img {
  transform: scale(1.02);
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #fff;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Math blocks */
.math-block {
  background: rgba(0,0,0,0.5);
  border-left: 4px solid var(--accent-blue);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
  font-family: 'Space Grotesk', monospace;
  font-size: 1.2rem;
  color: #fff;
  margin: 2rem 0;
  overflow-x: auto;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--glass-border);
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.2rem; }
}


/* Immersive Overlay UI */
#immersive-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Move to the top */
    align-items: center;
    padding-top: 60px; /* Spacing from the top edge */
    opacity: 0;
    transition: opacity 0.5s ease;
}

#immersive-overlay.active {
    pointer-events: auto;
    opacity: 1;
}

#immersive-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#immersive-close-btn:hover {
    background: rgba(255, 65, 108, 0.8);
    transform: scale(1.1);
}

.immersive-equation {
    font-size: 3rem;
    color: #00d2ff;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.8);
    background: rgba(0, 0, 0, 0.4);
    padding: 20px 40px;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 210, 255, 0.3);
}

/* Hide main content when immersive */
body.immersive-active section,
body.immersive-active header,
body.immersive-active footer {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

section, header, footer {
    transition: opacity 0.5s ease;
}
