/* 
==============================================
CORE VARIABLES & RESET
==============================================
*/
:root {
  --bg-color: #eef0f5;
  --surface-color: #eef0f5;
  /* Neomorphism Light/Shadows */
  --shadow-light: #ffffff;
  --shadow-dark: #d1d9e6;
  --shadow-dark-intensity: rgba(163, 177, 198, 0.6);
  --shadow-light-intensity: rgba(255, 255, 255, 0.8);
  /* Typography */
  --font-sans: "Manrope", sans-serif;
  --font-mono: "Space Mono", monospace;
  --text-main: #2d3142;
  --text-muted: #7c839a;
  /* Accents (Ramin Brand Evolution) */
  --accent-blue: #4facfe;
  --accent-purple: #a18cd1;
  --Ramin-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --Ramin-gradient-text: linear-gradient(90deg, #2e3192 0%, #1bffff 100%);
  /* Metrics */
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 40px;
  --radius-full: 999px;
  --container-width: 1440px;
  /* Animation Speeds */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

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

ul {
  list-style: none;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

/* Custom Scrollbar for subtle integration */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--shadow-dark);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-color);
}

/* 
==============================================
NEOMORPHIC UTILITIES & MIXINS
==============================================
High-end soft UI implementation.
*/
/* Extruded Surface (Standard Card) */
.neo-out {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  box-shadow: 12px 12px 24px var(--shadow-dark),
    -12px -12px 24px var(--shadow-light);
  transition: box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.neo-out:hover {
  box-shadow: 18px 18px 30px var(--shadow-dark),
    -18px -18px 30px var(--shadow-light);
  transform: translateY(-2px);
}

/* Inset Surface (Pressed/Container) */
.neo-in {
  background: var(--surface-color);
  border-radius: var(--radius-md);
  box-shadow: inset 8px 8px 16px var(--shadow-dark),
    inset -8px -8px 16px var(--shadow-light);
}

/* Convex Surface (Buttons) */
.neo-convex {
  background: linear-gradient(145deg, #ffffff, #d6d8dd);
  box-shadow: 8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
}

/* Concave Surface */
.neo-concave {
  background: linear-gradient(145deg, #d6d8dd, #ffffff);
  box-shadow: 8px 8px 16px var(--shadow-dark),
    -8px -8px 16px var(--shadow-light);
}

/* The "Ramin Glow" - subtle gradient border */
.glow-border {
  position: relative;
  z-index: 1;
}

.glow-border::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--Ramin-gradient);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  filter: blur(8px);
}

.glow-border:hover::before {
  opacity: 0.4;
}

/* Typography Styles */
.display-text {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-main);
}

.gradient-text {
  background: var(--Ramin-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1rem;
}

.h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.p-lead {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-weight: 400;
  max-width: 700px;
}

.p-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.mono {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
}

/* Layout containers */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 60px);
}

.section {
  padding: clamp(80px, 15vh, 160px) 0;
  position: relative;
}

.grid {
  display: grid;
  gap: clamp(20px, 4vw, 60px);
}

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

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

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

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

/* 
==============================================
UI COMPONENTS
==============================================
*/
/* Navigation */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(0px);
}

#nav.scrolled {
  background: rgba(238, 240, 245, 0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 15px 0;
}

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

.logo {
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.logo svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--Ramin-gradient);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--text-main);
  color: var(--bg-color);
  box-shadow: 6px 6px 12px var(--shadow-dark),
    -6px -6px 12px var(--shadow-light);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 10px 10px 20px var(--shadow-dark),
    -10px -10px 20px var(--shadow-light);
}

.btn-neo {
  color: var(--text-main);
}

.btn-neo:active {
  box-shadow: inset 4px 4px 8px var(--shadow-dark),
    inset -4px -4px 8px var(--shadow-light);
  background: var(--surface-color);
}

/* Custom Cursor */
#cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  border: 2px solid var(--text-main);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: difference;
  display: none;
  /* Hidden on touch */
}

@media (hover: hover) and (pointer: fine) {
  #cursor {
    display: block;
  }
}

#cursor.hovered {
  width: 60px;
  height: 60px;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: transparent;
  backdrop-filter: invert(1);
}

/* 
==============================================
SECTIONS STYLING
==============================================
*/
/* Hero Section */
#hero {
  height: 100vh;
  min-height: 800px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

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

.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-right: 10px;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-btns {
  margin-top: 40px;
  display: flex;
  gap: 20px;
}

/* WebGL Canvas Container */
#webgl-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  z-index: 1;
  /* Neomorphic fade out to blend with background */
  mask-image: linear-gradient(to right, transparent, black 20%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 20%);
}

/* Feature Cards */
.feature-card {
  padding: 40px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.feature-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  color: var(--accent-blue);
}

.feature-icon svg {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0px 4px 6px rgba(79, 172, 254, 0.4));
}

/* Deep Dive Sections */
.split-section {
  display: flex;
  align-items: center;
  gap: 80px;
}

.split-content {
  flex: 1;
}

.split-visual {
  flex: 1;
  height: 600px;
  position: relative;
}

@media (max-width: 900px) {
  .split-section {
    flex-direction: column;
  }

  .split-section.reverse {
    flex-direction: column;
  }

  .split-visual {
    width: 100%;
    height: 400px;
  }
}

/* Visualizations implemented via CSS */
/* 1. Context Window Visual */
.context-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.token-stream {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow: hidden;
  mask-image: linear-gradient(
    to right,
    transparent,
    black 10%,
    black 90%,
    transparent
  );
}

.token-block {
  height: 60px;
  min-width: 40px;
  border-radius: 8px;
  background: var(--surface-color);
  box-shadow: inset 2px 2px 5px var(--shadow-dark),
    inset -2px -2px 5px var(--shadow-light);
  animation: scrollTokens 10s linear infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

@keyframes scrollTokens {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-500px);
  }
}

.project-card {
  position: absolute;
  width: 200px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 2. Multimodal Visual */
.multimodal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  height: 100%;
  padding: 20px;
}

.mode-block {
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-label {
  position: absolute;
  bottom: 15px;
  left: 15px;
  background: rgba(255, 255, 255, 0.9);
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.video-sim {
  background: #000;
  position: relative;
}

.video-sim::before {
  content: "60 FPS ANALYSIS";
  color: #0f0;
  font-family: var(--font-mono);
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
}

.code-sim {
  background: #1e1e1e;
  padding: 20px;
}

.code-lines {
  width: 100%;
  height: 10px;
  background: #333;
  margin-bottom: 8px;
  border-radius: 4px;
}

.code-lines:nth-child(1) {
  width: 60%;
  background: #569cd6;
}

.code-lines:nth-child(2) {
  width: 80%;
  background: #c586c0;
}

.code-lines:nth-child(3) {
  width: 40%;
  background: #4ec9b0;
}

/* 3. Reasoning Visual (Deep Think) */
.reasoning-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.thought-circle {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.orbit {
  position: absolute;
  border: 2px solid rgba(163, 177, 198, 0.3);
  border-radius: 50%;
  animation: rotate 10s linear infinite;
}

.orbit-1 {
  width: 100%;
  height: 100%;
  animation-duration: 20s;
}

.orbit-2 {
  width: 70%;
  height: 70%;
  animation-duration: 15s;
  animation-direction: reverse;
}

.orbit-3 {
  width: 40%;
  height: 40%;
  animation-duration: 10s;
}

.verifier-node {
  width: 16px;
  height: 16px;
  background: var(--accent-blue);
  border-radius: 50%;
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 15px var(--accent-blue);
}

.core-brain {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface-color);
  box-shadow: inset 5px 5px 10px var(--shadow-dark),
    inset -5px -5px 10px var(--shadow-light), 0 0 30px rgba(79, 172, 254, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* Benchmarks Section */
.benchmark-graph {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.bar-container {
  display: flex;
  align-items: center;
}

.bar-label {
  width: 150px;
  font-weight: 600;
  font-size: 1.1rem;
}

.bar-track {
  flex: 1;
  height: 40px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 20px;
  color: white;
  font-weight: 700;
  width: 0;
  /* Animated via JS */
  transition: width 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.bar-Ramin {
  background: var(--Ramin-gradient);
  box-shadow: 0 10px 20px rgba(79, 172, 254, 0.3);
}

.bar-gpt {
  background: #d1d9e6;
  color: var(--text-muted);
  box-shadow: inset 2px 2px 5px #bec8d5;
}

/* OS Integration / Widget */
.widget-mockup {
  width: 320px;
  height: 160px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget-context {
  font-size: 0.9rem;
  color: var(--text-main);
  font-weight: 600;
}

.widget-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* SVG Generation Section */
.svg-display {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

#generated-svg {
  width: 300px;
  height: 300px;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

/* Footer */
footer {
  padding: 100px 0;
  background: var(--surface-color);
  position: relative;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-links {
  display: flex;
  gap: 60px;
}

.footer-col h4 {
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-col ul li a:hover {
  color: var(--accent-blue);
}

.cta-box {
  text-align: center;
  padding: 100px 0;
}

/* GSAP Reveal Classes */
.reveal-up {
  opacity: 0;
  transform: translateY(60px);
}

/* Responsive Adjustments specific to complex layouts */
@media (max-width: 768px) {
  .display-text {
    font-size: 3rem;
  }

  #webgl-container {
    width: 100%;
    opacity: 0.3;
    mask-image: none;
  }

  .hero-content {
    text-align: center;
    margin: 0 auto;
  }

  .hero-btns {
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 40px;
  }
}

/* Utility SVG Icons defined internally to avoid external requests and boost code volume meaningfully */
.icon-svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
