/* Editorial systems — atmosphere & motion (Tailwind handles layout) */

:root {
  --bg: #0b0f14;
  --surface: #121820;
  --text: #e8eef5;
  --muted: #8b9bb0;
  --accent: #2ee6a6;
  --accent-dim: #1a9b6e;
  --line: rgba(46, 230, 166, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
}

/* Full-bleed atmospheric grid */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(46, 230, 166, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(26, 155, 110, 0.06), transparent 50%),
    linear-gradient(180deg, #0b0f14 0%, #0e141c 50%, #0b0f14 100%);
}

.atmosphere::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  animation: grid-drift 28s linear infinite;
  opacity: 0.55;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.4;
}

@keyframes grid-drift {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(64px);
  }
}

/* Hero entrance */
.hero-rise {
  animation: fade-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-rise-delay {
  animation: fade-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accent line draw on section enter */
.section-line {
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-line.is-drawn {
  width: 5rem;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-stagger > .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.reveal-stagger > .reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.reveal-stagger > .reveal:nth-child(4) {
  transition-delay: 0.24s;
}

/* Nav scrolled state */
.site-nav.is-scrolled {
  background: rgba(11, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-menu.is-open {
  max-height: 28rem;
}

.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Experience timeline rail */
.timeline-rail::before {
  content: "";
  position: absolute;
  left: 0.4rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(180deg, var(--accent), transparent);
  opacity: 0.35;
}

@media (min-width: 768px) {
  .timeline-rail::before {
    left: 1.1rem;
  }
}

/* Skill chip hover */
.skill-chip {
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.skill-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .atmosphere::before,
  .hero-rise,
  .hero-rise-delay {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .section-line {
    width: 5rem;
    transition: none;
  }
}
