/* ============================================
   Francisco Olivares — Portfolio
   Clean, Professional Design System
   ============================================ */

/* --- Custom Properties --- */
:root {
  /* Dark theme (default — AMOLED black) */
  --bg: #000000;
  --bg-alt: #080808;
  --bg-card: #0a0a0a;
  --bg-card-hover: #131313;
  --text: #f5f5f5;
  --text-secondary: #888888;
  --text-tertiary: #555555;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --accent: #FE9A37;
  --accent-hover: #e88a2d;
  --accent-subtle: rgba(254, 154, 55, 0.1);
  --accent-glow: rgba(254, 154, 55, 0.06);
  --accent-border: rgba(254, 154, 55, 0.2);
  --accent-border-hover: rgba(254, 154, 55, 0.4);
  --header-bg: rgba(0, 0, 0, 0.85);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.5);

  /* Spacing */
  --section-padding: clamp(4rem, 10vh, 7rem);
  --container-max: 1100px;
  --container-padding: clamp(1.5rem, 4vw, 2.5rem);
  --gap: 1.25rem;
  --gap-lg: 2rem;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: clamp(1.75rem, 3vw, 2.25rem);
  --text-intro: clamp(2.5rem, 6vw, 4rem);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.2s;
  --duration-slow: 0.5s;

  /* Radius */
  --radius: 8px;
  --radius-lg: 12px;

  /* Line heights */
  --leading-tight: 1.1;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;
}

/* --- Light Theme --- */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --bg-card: #f7f7f7;
  --bg-card-hover: #efefef;
  --text: #0a0a0a;
  --text-secondary: #555555;
  --text-tertiary: #999999;
  --border: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(0, 0, 0, 0.12);
  --accent: #D4780A;
  --accent-hover: #b86a09;
  --accent-subtle: rgba(212, 120, 10, 0.07);
  --accent-glow: rgba(212, 120, 10, 0.04);
  --accent-border: rgba(212, 120, 10, 0.18);
  --accent-border-hover: rgba(212, 120, 10, 0.35);
  --header-bg: rgba(255, 255, 255, 0.88);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--duration-slow) var(--ease),
              color var(--duration-slow) var(--ease);
}

::selection {
  background: var(--accent);
  color: #000;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

ul {
  list-style: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--text-tertiary);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* --- Layout --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
}

.section-alt {
  background-color: var(--bg-alt);
}

.section-header {
  margin-bottom: 2.5rem;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 480px;
}

/* --- Top Accent Line --- */
.top-accent {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 1001;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 2px;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background-color var(--duration) var(--ease),
              backdrop-filter var(--duration) var(--ease);
}

.header.scrolled {
  background-color: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

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

.nav-logo {
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity var(--duration) var(--ease);
}

.nav-logo:hover {
  opacity: 0.7;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--text);
  transition: width var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease),
              background-color var(--duration) var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  background-color: var(--border);
}

[data-theme="dark"] .icon-moon,
[data-theme="light"] .icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun,
[data-theme="light"] .icon-moon {
  display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 6px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background-color: var(--text);
  transition: transform var(--duration) var(--ease),
              opacity var(--duration) var(--ease);
}

.menu-toggle.active span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.menu-toggle.active span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}

.mobile-overlay.active {
  opacity: 1;
}

/* ========================================
   INTRO (Compact — Content-first)
   ======================================== */
.intro {
  padding-top: calc(64px + clamp(3rem, 7vh, 5rem));
  padding-bottom: clamp(1.5rem, 4vh, 3rem);
}

.intro-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.intro-title {
  font-size: var(--text-intro);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: var(--leading-tight);
  margin-bottom: 1rem;
}

.intro-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: var(--leading-relaxed);
  margin-bottom: 2rem;
}

.intro-desc a {
  color: var(--accent);
  font-weight: 600;
  transition: opacity var(--duration) var(--ease);
}

.intro-desc a:hover {
  opacity: 0.8;
}

.intro-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius);
  transition: all var(--duration) var(--ease);
}

.btn-primary {
  background-color: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-outline {
  border: 1px solid var(--border-hover);
  color: var(--text-secondary);
}

.btn-outline:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.btn-accent {
  background-color: var(--accent);
  color: #000;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
}

/* ========================================
   ALMA SPOTLIGHT
   ======================================== */
.alma-spotlight {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--gap-lg);
  overflow: hidden;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration-slow) var(--ease);
}

.alma-spotlight:hover {
  border-color: var(--accent-border-hover);
  box-shadow: 0 0 80px var(--accent-glow),
              0 0 30px var(--accent-glow);
}

/* Subtle radial glow */
.alma-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--accent-glow), transparent 60%);
  pointer-events: none;
}

.alma-content {
  position: relative;
  z-index: 1;
}

.alma-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: var(--leading-tight);
}

.alma-title .text-muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.alma-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
  max-width: 700px;
}

/* Stats Row */
.alma-stats {
  display: flex;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.alma-stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.alma-stat-number {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1;
}

.alma-stat-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--gap-lg);
  transition: border-color var(--duration) var(--ease),
              background-color var(--duration) var(--ease);
}

.card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
}

/* Featured cards */
.card-featured {
  padding: clamp(2rem, 4vw, 3rem);
}

.card-featured-solo {
  margin-bottom: var(--gap-lg);
}

.card-header {
  margin-bottom: 1rem;
}

.card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.card-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  padding: 0.25rem 0.75rem;
  background: var(--border);
  border-radius: 100px;
}

.card-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.card-title .text-muted {
  color: var(--text-secondary);
  font-weight: 400;
}

.card-title-sm {
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.card-desc {
  font-size: var(--text-base);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.card-desc-sm {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.25rem;
}

/* Card Tags */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.card-tags span {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--accent-subtle);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  transition: color var(--duration) var(--ease);
}

/* Card Links */
.card-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.card-links a:not(.btn) {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration) var(--ease);
}

.card-links a:not(.btn):hover {
  color: var(--accent);
}

/* Upcoming cards */
.card-upcoming {
  border-style: dashed;
}

/* --- Project Grid --- */
.project-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* --- About --- */
.about-grid {
  display: grid;
  gap: 4rem;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: clamp(3rem, 6vw, 6rem);
  }
}

.about-text p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

.about-text a {
  color: var(--accent);
  font-weight: 500;
  transition: opacity var(--duration) var(--ease);
}

.about-text a:hover {
  opacity: 0.8;
}

.about-aside {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.aside-title {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}

/* Stack */
.stack-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stack-row {
  display: flex;
  gap: 1rem;
  font-size: var(--text-sm);
  line-height: 1.5;
}

.stack-label {
  color: var(--text-tertiary);
  min-width: 110px;
  flex-shrink: 0;
  font-weight: 500;
}

.stack-value {
  color: var(--text-secondary);
}

/* Details */
.details-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
}

.detail-label {
  color: var(--text-tertiary);
  font-weight: 500;
}

.detail-value {
  color: var(--text-secondary);
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.5rem var(--gap-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration) var(--ease),
              background-color var(--duration) var(--ease),
              transform var(--duration) var(--ease);
}

.contact-card:hover {
  border-color: var(--border-hover);
  background-color: var(--bg-card-hover);
  transform: translateY(-2px);
}

.contact-card svg {
  color: var(--text-tertiary);
  margin-bottom: 1rem;
  transition: color var(--duration) var(--ease);
}

.contact-card:hover svg {
  color: var(--accent);
}

.contact-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.5rem;
}

.contact-value {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  word-break: break-all;
}

/* --- Footer --- */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer p {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  text-align: center;
  letter-spacing: 0.02em;
}

/* --- Fade-up Animation --- */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease),
              transform 0.6s var(--ease);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.project-grid .fade-up:nth-child(1) { transition-delay: 0s; }
.project-grid .fade-up:nth-child(2) { transition-delay: 0.08s; }
.project-grid .fade-up:nth-child(3) { transition-delay: 0.16s; }
.project-grid .fade-up:nth-child(4) { transition-delay: 0.24s; }
.project-grid .fade-up:nth-child(5) { transition-delay: 0.32s; }
.project-grid .fade-up:nth-child(6) { transition-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s var(--ease);
    z-index: 999;
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links li {
    border-bottom: 1px solid var(--border);
  }

  .nav-links a {
    display: block;
    padding: 1rem 0;
    font-size: var(--text-base);
    color: var(--text);
  }

  .nav-links a::after {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-overlay.active {
    display: block;
  }

  .intro {
    padding-top: calc(64px + clamp(2rem, 5vh, 3rem));
  }

  .intro-title {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .alma-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .alma-stat {
    min-width: calc(50% - 0.5rem);
  }

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

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

@media (max-width: 480px) {
  .intro-cta {
    flex-direction: column;
  }

  .intro-cta .btn {
    justify-content: center;
  }

  .stack-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .stack-label {
    min-width: auto;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ========================================
   NEW SECTIONS — v4 (Alma-focused)
   ======================================== */

/* Nav logo dot */
.nav-logo .dot { color: var(--accent); }

/* ========================================
   HERO (replaces .intro)
   ======================================== */
.hero {
  padding-top: calc(64px + clamp(3rem, 7vh, 5rem));
  padding-bottom: clamp(2rem, 5vh, 4rem);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  padding: 0.3rem 0.85rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
}

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.4s ease infinite;
}

@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50% { opacity:0.35; transform:scale(0.75); }
}

.hero-title {
  font-size: var(--text-intro);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: var(--leading-tight);
  margin-bottom: 1.25rem;
}

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 520px;
  line-height: var(--leading-relaxed);
  margin-bottom: 2rem;
}

.hero-desc a,
.hero-desc strong {
  color: var(--text);
  font-weight: 600;
}

.hero-desc a { transition: opacity var(--duration) var(--ease); }
.hero-desc a:hover { opacity: 0.8; }

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ========================================
   TERMINAL
   ======================================== */
.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 1px var(--border);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.tdot { width: 10px; height: 10px; border-radius: 50%; }
.tdot-r { background: #ff5f56; }
.tdot-y { background: #ffbd2e; }
.tdot-g { background: #27c93f; }

.terminal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin-left: 0.5rem;
}

.terminal-body {
  padding: 1.1rem 1.2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  line-height: 1.85;
}

.tl { display: block; }
.tp { color: var(--accent); }
.tc { color: var(--text); }
.to { color: var(--text-secondary); }
.tg { color: #4ade80; }
.tb { color: #60a5fa; }
.td { color: var(--text-tertiary); }

.cursor {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1.1s step-end infinite;
}

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

/* ========================================
   ALMA FEATURES GRID (inside spotlight)
   ======================================== */
.alma-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: 2rem;
}

.alma-feature {
  padding: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--duration) var(--ease);
}

.alma-feature:hover { border-color: var(--accent-border); }

.alma-feature-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.alma-feature-name {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.alma-feature-desc {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   ALMA INTEGRATIONS
   ======================================== */
.alma-integrations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.alma-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--accent-subtle);
  border: 1px solid var(--border);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  transition: border-color var(--duration) var(--ease), color var(--duration) var(--ease);
}

.alma-pill:hover { border-color: var(--accent-border); color: var(--accent); }
.alma-pill svg { color: var(--accent); flex-shrink: 0; }

/* ========================================
   STACK SECTION
   ======================================== */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.stack-cat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color var(--duration) var(--ease);
}

.stack-cat:hover { border-color: var(--border-hover); }

.stack-cat-title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.stack-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--accent-subtle);
  padding: 0.25rem 0.6rem;
  border-radius: 100px;
  transition: color var(--duration) var(--ease);
}

.stack-tag:hover { color: var(--text); }

/* ========================================
   ALMA PROMO (contact section)
   ======================================== */
.alma-promo {
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-top: var(--gap-lg);
  position: relative;
  overflow: hidden;
  transition: border-color var(--duration) var(--ease),
              box-shadow var(--duration-slow) var(--ease);
}

.alma-promo:hover {
  border-color: var(--accent-border-hover);
  box-shadow: 0 0 40px var(--accent-glow);
}

.alma-promo-content { position: relative; z-index: 1; }

.alma-promo h3 {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.alma-promo p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
  max-width: 600px;
}

/* ========================================
   FOOTER (extended)
   ======================================== */
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  transition: color var(--duration) var(--ease);
}

.footer-links a:hover { color: var(--accent); }

/* ========================================
   ANIMATION STAGGER (new grids)
   ======================================== */
.alma-features .fade-up:nth-child(1) { transition-delay: 0s; }
.alma-features .fade-up:nth-child(2) { transition-delay: 0.06s; }
.alma-features .fade-up:nth-child(3) { transition-delay: 0.12s; }
.alma-features .fade-up:nth-child(4) { transition-delay: 0.18s; }
.alma-features .fade-up:nth-child(5) { transition-delay: 0.24s; }
.alma-features .fade-up:nth-child(6) { transition-delay: 0.3s; }

.stack-grid .fade-up:nth-child(1) { transition-delay: 0s; }
.stack-grid .fade-up:nth-child(2) { transition-delay: 0.06s; }
.stack-grid .fade-up:nth-child(3) { transition-delay: 0.12s; }
.stack-grid .fade-up:nth-child(4) { transition-delay: 0.18s; }
.stack-grid .fade-up:nth-child(5) { transition-delay: 0.24s; }
.stack-grid .fade-up:nth-child(6) { transition-delay: 0.3s; }

/* ========================================
   RESPONSIVE (new sections)
   ======================================== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .terminal { display: none; }

  .hero-title {
    font-size: clamp(2.25rem, 10vw, 3.5rem);
  }

  .alma-features {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

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

  .alma-features {
    grid-template-columns: 1fr;
  }

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