/*
Theme Name: AI Experiment Labs
Theme URI: https://aiexperimentlabs.com
Author: AI Experiment Labs
Description: A personal playground single-page theme - built for curiosity, not perfection. Dark navy with electric cyan and purple accents, Space Grotesk + DM Sans typography, and a bento-style experiments grid.
Version: 1.0.2
License: GPL-2.0-or-later
Text Domain: aiexperimentlabs
*/

:root {
  --background: #0f1729;
  --foreground: #f8fafc;
  --card: #161f36;
  --card-2: #1a2440;
  --muted-foreground: #8a93a8;
  --border: #243049;
  --primary: #3dc7ee;
  --primary-soft: rgba(61,199,238,0.12);
  --primary-ring: rgba(61,199,238,0.30);
  --accent: #b362ed;
  --accent-soft: rgba(179,98,237,0.12);
  --accent-ring: rgba(179,98,237,0.30);
  --chart-2: #6aa5ff;
  --chart-4: #a878ec;
  --chart-4-soft: rgba(168,120,236,0.12);
  --chart-4-ring: rgba(168,120,236,0.30);
  --amber: #fbbf24;
  --amber-soft: rgba(251,191,36,0.15);
  --amber-ring: rgba(251,191,36,0.30);
  --radius: 1rem;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: "DM Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.container { max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; }

.muted { color: var(--muted-foreground); }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid rgba(36,48,73,0.5);
  background: rgba(15,23,41,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav-inner {
  max-width: 80rem; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
}
.nav-brand { display: flex; align-items: center; gap: 0.5rem; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 0.875rem; }
.nav-brand svg { color: var(--primary); width: 20px; height: 20px; }
.nav-links { display: none; gap: 0.25rem; }
@media (min-width: 640px) { .nav-links { display: flex; } }
.nav-link {
  padding: 0.375rem 0.75rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500; color: var(--muted-foreground);
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover { background: var(--primary-soft); color: var(--primary); }

/* PILL */
.pill {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 1rem; border-radius: 999px;
  font-size: 0.875rem; font-weight: 500;
  border: 1px solid var(--primary-ring); background: var(--primary-soft); color: var(--primary);
}
.pill svg { width: 16px; height: 16px; }
.pill.accent { border-color: var(--accent-ring); background: var(--accent-soft); color: var(--accent); }
.pill.chart4 { border-color: var(--chart-4-ring); background: var(--chart-4-soft); color: var(--chart-4); }

/* HERO */
.hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8rem 1.5rem 6rem; text-align: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(15,23,41,0.8), rgba(15,23,41,0.5), var(--background));
}
.hero-content { position: relative; z-index: 10; max-width: 64rem; }
.hero h1 {
  margin-top: 1.5rem;
  font-size: 2.75rem;
}
.gradient-text {
  background: linear-gradient(to right, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.hero p.lead { margin: 1.5rem auto 0; max-width: 36rem; font-size: 1.125rem; color: var(--muted-foreground); }
.hero .cta-row { margin-top: 2.5rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  height: 3rem; padding: 0 2rem; border-radius: 999px;
  background: var(--primary); color: #0a1322;
  font-weight: 600; font-size: 1rem;
  box-shadow: 0 10px 30px -10px rgba(61,199,238,0.4);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn-primary:hover { background: #5ed3f1; box-shadow: 0 15px 35px -10px rgba(61,199,238,0.55); }
.btn-primary svg { width: 16px; height: 16px; transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(4px); }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; z-index: 10;
}
.scroll-hint span { font-size: 0.75rem; color: var(--muted-foreground); }
.scroll-tube { width: 1.5rem; height: 2.5rem; border-radius: 999px; border: 2px solid rgba(138,147,168,0.3); padding: 4px; }
.scroll-dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--primary); animation: scroll 1.5s ease-in-out infinite; }
@keyframes scroll { 0%,100% { transform: translateY(0); } 50% { transform: translateY(12px); } }

/* SECTION */
section { position: relative; padding: 6rem 1.5rem; }
.section-head { text-align: center; max-width: 48rem; margin: 0 auto 4rem; }
.section-head h2 { font-size: 2rem; margin-top: 1rem; }
.section-head p { margin-top: 1rem; color: var(--muted-foreground); font-size: 1.0625rem; }

/* WHAT THIS IS */
.about-card {
  max-width: 48rem; margin: 0 auto;
  border: 1px solid var(--border); background: rgba(22,31,54,0.6);
  border-radius: 1.5rem; padding: 3rem; backdrop-filter: blur(8px);
}
.about-card h2 { font-size: 1.75rem; margin-top: 1.5rem; }
.about-card p { margin-top: 1rem; color: var(--muted-foreground); font-size: 1.0625rem; }
.chip-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

@media (min-width: 640px) {
  .hero h1 { font-size: 4rem; }
  .section-head h2 { font-size: 2.5rem; }
  .about-card h2 { font-size: 2rem; }
}

@media (min-width: 1024px) {
  .hero h1 { font-size: 6rem; }
  .section-head h2 { font-size: 3rem; }
  .about-card h2 { font-size: 2.25rem; }
}

.chip {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 500;
  background: var(--primary-soft); color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary-ring);
}
.chip svg { width: 12px; height: 12px; }
.chip.accent { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.chip.c2 { background: rgba(106,165,255,0.12); color: var(--chart-2); box-shadow: inset 0 0 0 1px rgba(106,165,255,0.30); }
.chip.c4 { background: var(--chart-4-soft); color: var(--chart-4); box-shadow: inset 0 0 0 1px var(--chart-4-ring); }

/* BENTO GRID */
.bento {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(180px, auto); gap: 1.5rem; } }
.exp-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); background: var(--card);
  border-radius: 1rem; min-height: 220px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.exp-card:hover { transform: translateY(-4px); box-shadow: 0 25px 50px -20px rgba(61,199,238,0.15); }
.exp-card .exp-bg { position: absolute; inset: 0; z-index: 0; }
.exp-card .exp-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.2; transition: opacity 0.5s; }
.exp-card:hover .exp-bg img { opacity: 0.3; }
.exp-card .exp-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--card) 30%, rgba(22,31,54,0.8), transparent);
}
.exp-content { position: relative; z-index: 1; padding: 1.75rem; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.exp-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  background: var(--primary-soft); color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary-ring);
}
.icon-tile svg { width: 20px; height: 20px; }
.status {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.125rem 0.625rem; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}
.status svg { width: 12px; height: 12px; }
.status.working { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary-ring); }
.status.messy { background: var(--amber-soft); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-ring); }
.status.fun { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.exp-card h3 { font-size: 1.375rem; }
.exp-card p { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.9375rem; }
@media (min-width: 768px) {
  .span-2x2 { grid-column: span 2; grid-row: span 2; min-height: 460px; }
  .span-2x1 { grid-column: span 2; }
}

/* TOOLS GRID */
.tools {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .tools { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools { grid-template-columns: repeat(3, 1fr); } }
.tool-card {
  border: 1px solid var(--border); background: rgba(22,31,54,0.5);
  border-radius: 1rem; padding: 1.5rem;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.tool-card:hover { transform: translateY(-4px); border-color: var(--primary-ring); background: var(--card); }
.tool-card .icon-tile { margin-bottom: 1rem; }
.tool-card h3 { font-size: 1.125rem; }
.tool-card p { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.875rem; }

/* LAB RULES */
.rules {
  display: grid; gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .rules { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .rules { grid-template-columns: repeat(3, 1fr); } }
.rule-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); background: rgba(22,31,54,0.5);
  border-radius: 1rem; padding: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}
.rule-card:hover { border-color: var(--chart-4-ring); background: var(--card); }
.rule-num {
  position: absolute; top: -1rem; right: -1rem;
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 6rem; color: rgba(248,250,252,0.03);
  transition: color 0.2s;
}
.rule-card:hover .rule-num { color: rgba(248,250,252,0.05); }
.rule-card > .icon-tile { margin-bottom: 1rem; background: var(--chart-4-soft); color: var(--chart-4); box-shadow: inset 0 0 0 1px var(--chart-4-ring); }
.rule-card h3 { font-size: 1.125rem; position: relative; }
.rule-card p { margin-top: 0.5rem; color: var(--muted-foreground); font-size: 0.875rem; position: relative; }

/* FOOTER */
footer { border-top: 1px solid var(--border); padding: 3rem 1.5rem; }
.footer-inner {
  max-width: 80rem; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1rem; align-items: center;
  font-size: 0.875rem; color: var(--muted-foreground);
  text-align: center;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; } }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; color: var(--foreground); font-family: "Space Grotesk", sans-serif; font-weight: 600; }
.footer-brand svg { color: var(--primary); width: 20px; height: 20px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .scroll-dot { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
