:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface2: #1a1a24;
  --accent: #00f0ff;
  --accent2: #8b5cf6;
  --text: #e0f2fe;
  --text2: #a5b4fc;
  --muted: #64748b;
  --tensor-glow: rgba(0, 240, 255, 0.12);
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* Tensor Field Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 25% 30%, var(--tensor-glow) 0%, transparent 40%),
    radial-gradient(circle at 75% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 45%),
    linear-gradient(45deg, transparent 48%, rgba(0, 240, 255, 0.025) 50%, transparent 52%);
  background-size: 180px 180px;
  pointer-events: none;
  z-index: -1;
  animation: tensor-drift 180s linear infinite;
}

@keyframes tensor-drift {
  0% { background-position: 0 0; }
  100% { background-position: 360px 360px; }
}

.nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 240, 255, 0.12);
  z-index: 1000;
}

.nav-content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.1rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.8px;
  background: linear-gradient(90deg, #67e8f9, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links a {
  color: #a0b0cc;
  text-decoration: none;
  margin-left: 2rem;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: #67e8f9;
}

/* Refactored container for max-width and horizontal padding only */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* Adjusted hero padding to clear fixed nav */
.hero {
  text-align: center;
  padding: 140px 0 6rem; /* Added top padding */
}

.hero h1 {
  font-size: 4.6rem;
  font-weight: 700;
  line-height: 1.02;
  margin-bottom: 1.2rem;
  background: linear-gradient(90deg, #e0f2fe, #67e8f9, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(103, 232, 249, 0.4);
}

.hero p {
  font-size: 1.4rem;
  color: var(--text2);
  max-width: 720px;
  margin: 0 auto 2.8rem;
  font-weight: 400;
}

.badge {
  display: inline-block;
  background: rgba(103, 232, 249, 0.09);
  color: #67e8f9;
  font-size: 0.82rem;
  padding: 6px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(103, 232, 249, 0.25);
  margin-bottom: 2rem;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: 20px;
  padding: 2.25rem;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
  --card-rotation: 0deg; /* Initialize custom property */
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, rgba(139,92,246,0.12) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.6s ease;
}

.card::after { /* New pseudo-element for circular/spiral effect */
  content: '';
  position: absolute;
  inset: 0; /* Cover the entire card */
  border-radius: 22px; /* Slightly larger than card for subtle overflow */
  background: conic-gradient(from var(--card-rotation, 0deg) at 50% 50%,
                            transparent 0%,
                            rgba(0, 240, 255, 0.05) 5%,
                            transparent 30%,
                            rgba(139, 92, 246, 0.05) 35%,
                            transparent 70%);
  mask: linear-gradient(to right, transparent 0%, black 50%, transparent 100%); /* Fade out edges */
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: -1; /* Behind card content */
}

.card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 30px 60px -20px rgba(0, 240, 255, 0.25);
}

.card:hover::before {
  opacity: 1;
  top: -20%;
  left: -20%;
}

.card:hover::after {
  opacity: 1;
  animation: rotate-card-conic 15s linear infinite; /* Subtle rotation on hover */
}

@keyframes rotate-card-conic {
  from { --card-rotation: 0deg; }
  to { --card-rotation: 360deg; }
}

.card h3 {
  color: var(--accent);
  margin-bottom: 1.1rem;
  font-size: 1.45rem;
  font-weight: 600;
}

.card a {
  color: #a5b4fc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.card a:hover {
  color: #67e8f9;
}

.live-node {
  background: linear-gradient(90deg, #22c55e, #86efac);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  animation: pulse 4s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

footer {
  text-align: center;
  padding: 5rem 2rem 3rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.glow {
  text-shadow: 0 0 30px rgba(103, 232, 249, 0.6);
}

@media (max-width: 640px) {
  .hero h1 { font-size: 3.4rem; }
  .container { padding: 0 1.5rem; } /* Adjusted for mobile to only have horizontal padding */
  .hero { padding-top: 120px; } /* Adjusted for mobile nav height to clear fixed nav */
  .cards { grid-template-columns: 1fr; }
  /* a0p-card specific adjustments if needed for mobile */
  .a0p-card {
    padding: 2rem;
  }
  .back-link {
    margin-top: 120px; /* Adjusted for mobile nav height */
  }
}

.hero-subtext {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 620px;
  margin: 2.2rem auto 0;
}

.hero-actions {
  margin: 3rem 0 2rem;
}

.live-node-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(16, 185, 129, 0.1);
  color: #4ade80;
  border: 1px solid #4ade80;
  padding: 14px 32px;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

/* NEW CLASSES FOR UNIFORMITY (FROM a0p.html AND index.html INLINE STYLES) */

.back-link {
  display: inline-block;
  margin-top: 140px; /* Clear fixed nav */
  margin-bottom: 2rem;
  color: var(--muted);
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.a0p-card {
  max-width: 960px; /* Specific max-width for this card */
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.4);
}

.a0p-card h1 { /* Override h1 in a0p-card */
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.a0p-card h2 {
  color: var(--accent);
  margin: 2.5rem 0 1rem;
  font-size: 1.55rem;
  border-bottom: 1px solid rgba(139,92,246,0.2);
  padding-bottom: 0.5rem;
}

.a0p-intro-text {
  color: var(--text2);
  font-size: 1.25rem;
}

.a0p-list {
  margin-left: 1.4rem;
  margin:1.6rem 0 1.8rem; /* Addresses the inline ul from index.html */
  line-height:2.1; /* Addresses the inline ul from index.html */
}

.a0p-list li {
  margin-bottom: 0.85rem;
}

.a0p-footer-note {
  margin-top:3rem;
  text-align:center;
  color:var(--muted);
}

.living-tensor-node-wrapper {
  padding-top: 140px; /* To clear the fixed nav bar */
}

.ltn-h2-title {
  font-size: 1.7rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent2);
}

/* pictures.html specific styles */
.pictures-container-wrapper {
  padding-top: 140px; /* To clear the fixed nav bar */
}

.pictures-h1-title {
  font-size: 3.2rem;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.prime-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.prime-card {
  background: var(--surface);
  border: 1px solid rgba(0, 255, 157, 0.2);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  transition: transform 0.3s ease;
}

.prime-card:hover {
  transform: translateY(-8px);
}

.prime-card-img {
  width: 260px;
  height: 260px;
  filter: drop-shadow(0 0 30px rgba(0, 255, 157, 0.35));
  margin: 1rem 0;
}

.hmmm {
  color: #00ccff;
  font-family: monospace;
  background: rgba(0, 204, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.pictures-summary-note {
  margin-top:3rem;
  font-size:0.95rem;
  opacity:0.8;
}

@media (max-width: 640px) {
  .living-tensor-node-wrapper,
  .pictures-container-wrapper {
    padding-top: 120px;
  }
  .pictures-h1-title {
    font-size: 2.5rem;
  }
}
