/* ═══════════════════════════════════════════════════════════════
   HOME PAGE STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-green);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.2s forwards;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 211, 167, 0.4); }
  50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(34, 211, 167, 0); }
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: var(--space-lg);
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.35s forwards;
}

.hero-heading .line {
  display: block;
}

.hero-heading .accent {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.85;
  max-width: 480px;
  margin-bottom: var(--space-xl);
  font-style: italic;
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.5s forwards;
}

.hero-cta {
  display: flex;
  gap: var(--space-md);
  opacity: 0;
  animation: fadeSlideUp 0.8s var(--ease-out-expo) 0.65s forwards;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Visual ───────────────────────────────────────────── */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeSlideUp 1s var(--ease-out-expo) 0.5s forwards;
}

.hero-canvas-wrap {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1;
  position: relative;
}

#hero-canvas {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.hero-visual .overlay-stats {
  position: absolute;
  bottom: 15%;
  right: -5%;
  background: rgba(15, 20, 32, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  z-index: 3;
}

.overlay-stats .stat-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.3rem 0;
}

.overlay-stats .stat-label {
  color: var(--text-muted);
}

.overlay-stats .stat-value {
  color: var(--accent-green);
  font-weight: 600;
}

.overlay-stats .stat-value.negative {
  color: var(--accent-red);
}

/* ── Ticker Strip ──────────────────────────────────────────── */
.ticker-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.ticker-track {
  display: flex;
  gap: var(--space-xl);
  animation: ticker 40s linear infinite;
  width: max-content;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ticker-item .up { color: var(--accent-green); }
.ticker-item .down { color: var(--accent-red); }

@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Skills Grid ───────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.skill-card {
  position: relative;
  padding: var(--space-lg) var(--space-lg) var(--space-lg);
}

.skill-card .skill-icon {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  font-size: 1.2rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-weight: 700;
}

.skill-card .skill-icon.green {
  background: rgba(34, 211, 167, 0.06);
  border-color: rgba(34, 211, 167, 0.1);
  color: var(--accent-green);
}

.skill-card .skill-icon.amber {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.1);
  color: var(--accent-amber);
}

.skill-card .skill-icon.violet {
  background: rgba(167, 139, 250, 0.06);
  border-color: rgba(167, 139, 250, 0.1);
  color: var(--accent-violet);
}

.skill-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.skill-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Carousel Section ──────────────────────────────────────── */
.carousel-section {
  overflow: hidden;
}

.carousel-wrapper {
  position: relative;
  margin-top: var(--space-xl);
}

.carousel-track {
  display: flex;
  gap: var(--space-lg);
  transition: transform 0.6s var(--ease-out-expo);
}

.carousel-slide {
  min-width: calc(33.333% - 1.35rem);
  flex-shrink: 0;
}

.carousel-slide .card {
  height: 100%;
}

.carousel-slide .card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.carousel-slide .card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.carousel-slide .card .card-tags {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.carousel-btn:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.carousel-dot.active {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

/* ── WASM Section ──────────────────────────────────────────── */
.wasm-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wasm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.wasm-terminal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.wasm-terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.wasm-terminal-header .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.wasm-terminal-header .dot.red { background: #ef4444; }
.wasm-terminal-header .dot.yellow { background: #f59e0b; }
.wasm-terminal-header .dot.green { background: #22c55e; }

.wasm-terminal-header span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.wasm-terminal-body {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.9;
  min-height: 260px;
}

.wasm-terminal-body .prompt {
  color: var(--accent-green);
}

.wasm-terminal-body .comment {
  color: var(--text-muted);
}

.wasm-terminal-body .output {
  color: var(--accent-cyan);
}

.wasm-terminal-body .value {
  color: var(--accent-amber);
}

#wasm-output-value {
  transition: color 0.3s ease;
}

.wasm-actions {
  margin-top: var(--space-md);
  display: flex;
  gap: var(--space-sm);
}

/* ── AI Models Section ─────────────────────────────────────── */
.ai-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.ai-card {
  padding: var(--space-lg);
}

.ai-card .card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.ai-card .card-header .model-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 2px;
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.ai-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.ai-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.7;
}

.ai-card .metric-bar {
  margin-top: var(--space-md);
  height: 3px;
  background: var(--surface);
  border-radius: 2px;
  overflow: hidden;
}

.ai-card .metric-bar .fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-green));
  transition: width 1.2s var(--ease-out-expo);
  width: 0;
}

.ai-card .metric-bar .fill.animated {
  width: var(--target-width);
}

.ai-card .metric-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  display: flex;
  justify-content: space-between;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel-slide {
    min-width: calc(50% - 1rem);
  }

  .wasm-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

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

  .hero-visual {
    order: -1;
    margin-bottom: var(--space-lg);
  }

  .hero-canvas-wrap {
    max-width: 300px;
  }

  .hero-visual .overlay-stats {
    right: 5%;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .carousel-slide {
    min-width: 85%;
  }

  .ai-grid {
    grid-template-columns: 1fr;
  }
}
