html {
  scroll-behavior: smooth;
  background-color: #020309;
}

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #f7f7f7;
  background-color: #020309;
}

.page-shell {
  position: relative;
}

.page-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 2px,
    transparent 4px
  );
  mix-blend-mode: soft-light;
  opacity: 0.18;
  z-index: -5;
  animation: scanlines 8s linear infinite;
}

.hero-glow {
  background: radial-gradient(circle at top, rgba(69, 241, 178, 0.35), transparent 55%),
              radial-gradient(circle at 20% 20%, rgba(28, 255, 138, 0.35), transparent 45%),
              radial-gradient(circle at 80% 10%, rgba(13, 148, 136, 0.35), transparent 40%);
  filter: blur(80px);
  animation: hero-glow-pulse 12s ease-in-out infinite alternate;
}

.grid-backdrop {
  background-image: linear-gradient(rgba(28, 255, 138, 0.08) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(28, 255, 138, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
  opacity: 0.3;
  background-position: 0 0, 0 0;
  animation: grid-scroll 40s linear infinite;
}

.matrix-canvas {
  position: fixed;
  inset: 0;
  z-index: -6;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
}

.fade-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

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

.typed-caret::after {
  content: '_';
  animation: blink 1s steps(1) infinite;
  color: #1cff8a;
  margin-left: 3px;
}

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

.navbar {
  position: relative;
  background:
    radial-gradient(circle at top, rgba(28, 255, 138, 0.12), transparent 55%),
    linear-gradient(to bottom, rgba(2, 3, 9, 0.98), rgba(2, 3, 9, 0.94));
  border-bottom: 1px solid rgba(15, 23, 42, 0.95);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
}

.navbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(28, 255, 138, 0.55), transparent);
  opacity: 0.8;
  pointer-events: none;
}

.navbar-mobile {
  background-color: #020309;
}

.panel {
  position: relative;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.9);
  background:
    radial-gradient(circle at top, rgba(28, 255, 138, 0.14), transparent 60%),
    rgba(3, 7, 18, 0.96);
  padding: 2rem;
  overflow: hidden;
  backdrop-filter: blur(18px);
  transform: translateY(0);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 22px;
  border: 1px solid rgba(28, 255, 138, 0.15);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.panel:hover::before {
  opacity: 1;
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
  border-color: rgba(28, 255, 138, 0.35);
}

.section-card {
  position: relative;
}

.section-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(28, 255, 138, 0.5), transparent 60%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

.eyebrow {
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.glitch-title {
  position: relative;
  text-shadow:
    0 0 12px rgba(28, 255, 138, 0.8),
    0 0 24px rgba(28, 255, 138, 0.4);
}

.glitch-title::before,
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.6;
}

.glitch-title::before {
  color: #1cff8a;
  transform: translate3d(-2px, 0, 0);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 50%);
}

.glitch-title::after {
  color: #45f1b2;
  transform: translate3d(2px, 0, 0);
  clip-path: polygon(0 55%, 100% 50%, 100% 100%, 0 100%);
}

.glitch-title:hover::before,
.glitch-title:hover::after {
  animation: glitch-shift 550ms steps(2, jump-none) infinite;
}

.nav-link {
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  transform-origin: left;
  transform: scaleX(0);
  background: linear-gradient(90deg, rgba(28, 255, 138, 0.1), rgba(28, 255, 138, 0.9));
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: #1cff8a;
  color: #05070d;
  box-shadow: 0 10px 40px rgba(28, 255, 138, 0.25);
}

.btn-primary:hover {
  transform: translateY(1px) scale(1.02);
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
  background-color: rgba(3, 7, 18, 0.9);
}

.btn-secondary:hover {
  border-color: #1cff8a;
  color: #1cff8a;
}

.live-log {
  display: grid;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.live-log__badge {
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular;
  font-size: 0.75rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(28, 255, 138, 0.12);
  color: #1cff8a;
  width: fit-content;
}

.live-log__line {
  position: relative;
  letter-spacing: 0.02em;
  font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular;
  color: rgba(190, 242, 100, 0.9);
  text-shadow:
    0 0 8px rgba(132, 204, 22, 0.9),
    0 0 18px rgba(190, 242, 100, 0.8);
}

.live-log__line::before {
  content: '$';
  margin-right: 0.5rem;
  color: #bbf7d0;
}

.detail-grid {
  display: grid;
  gap: 0.75rem;
}

.detail-grid div {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.8);
}

.detail-grid span:first-child {
  color: rgba(255, 255, 255, 0.55);
}

.list-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0.35rem 0.75rem;
  background: rgba(17, 145, 108, 0.3);
  color: #d1fae5;
  font-size: 0.85rem;
}

.timeline-line {
  position: relative;
  padding-left: 2rem;
}

.timeline-line::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0.75rem;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(28, 255, 138, 0.2), rgba(28, 255, 138, 0));
}

.timeline-node {
  position: absolute;
  left: 0.5rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: #1cff8a;
  box-shadow: 0 0 15px rgba(28, 255, 138, 0.5);
}

.timeline-entry {
  position: relative;
}

.timeline-entry .timeline-node {
  top: 1.5rem;
}

.tech-carousel {
  overflow: hidden;
}

.tech-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: tech-scroll 28s linear infinite;
  will-change: transform;
}

.tech-track:hover {
  animation-play-state: paused;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  min-width: 140px;
  text-align: center;
  color: rgba(255, 255, 255, 0.85);
}

.tech-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

.tech-card span {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.tech-card:hover img {
  opacity: 1;
}

@keyframes tech-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes scanlines {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(4px);
  }
}

@keyframes hero-glow-pulse {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }
  100% {
    opacity: 0.9;
    transform: scale(1.06);
  }
}

@keyframes grid-scroll {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 80px 40px, -80px 40px;
  }
}

@keyframes glitch-shift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  20% {
    transform: translate3d(-3px, -1px, 0);
  }
  40% {
    transform: translate3d(2px, 1px, 0);
  }
  60% {
    transform: translate3d(-2px, 1px, 0);
  }
  80% {
    transform: translate3d(3px, -1px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-shell::before,
  .hero-glow,
  .grid-backdrop,
  .tech-track {
    animation: none !important;
  }

  .panel,
  .btn,
  .glitch-title {
    transition: none !important;
  }
}

@media (max-width: 640px) {
  .detail-grid div {
    flex-direction: column;
    gap: 0.15rem;
  }
}
