/* ============================================
   DOMINATION DEV HISTORY - Cinematic Dark Theme
   ============================================ */

:root {
  --bg-deep: #0a0a0f;
  --bg-primary: #0d0d14;
  --bg-card: #12121c;
  --bg-card-hover: #161625;
  --bg-elevated: #1a1a2e;

  --accent-primary: #00e5ff;
  --accent-secondary: #7c4dff;
  --accent-warm: #ff6d00;
  --accent-green: #00e676;
  --accent-red: #ff1744;

  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #555570;
  --text-accent: var(--accent-primary);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(0, 229, 255, 0.2);

  --glow-primary: 0 0 20px rgba(0, 229, 255, 0.15);
  --glow-strong: 0 0 40px rgba(0, 229, 255, 0.25);

  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary) var(--bg-deep);
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar {
  width: 6px;
}

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

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

/* Scanline overlay */
.scanline-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0, 229, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(124, 77, 255, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(255, 109, 0, 0.04) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-primary) 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 2rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-primary) 50%, var(--text-primary) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 8s linear infinite;
}

.title-accent {
  display: block;
  font-size: 0.3em;
  letter-spacing: 0.4em;
  color: var(--accent-primary);
  -webkit-text-fill-color: var(--accent-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
}

.meta-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.meta-value {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  animation: float 3s ease-in-out infinite;
}

.scroll-indicator span {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
  transform: rotate(45deg);
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

/* ============================================
   STICKY NAV
   ============================================ */

.timeline-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  transform: translateY(-100%);
  transition: transform 0.4s var(--ease-out-expo);
}

.timeline-nav.visible {
  transform: translateY(0);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent-primary);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  white-space: nowrap;
  transition: all 0.2s;
  cursor: pointer;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
  background: rgba(0, 229, 255, 0.08);
}

/* ============================================
   TIMELINE
   ============================================ */

.timeline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--accent-primary) 5%,
    var(--accent-primary) 95%,
    transparent 100%
  );
  opacity: 0.15;
}

/* Date separator */
.date-separator {
  text-align: center;
  margin: 4rem 0 3rem;
  position: relative;
}

.date-separator-inner {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 2rem;
  background: var(--bg-deep);
  position: relative;
  z-index: 1;
}

.date-separator-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-primary));
}

.date-separator-line:last-child {
  background: linear-gradient(90deg, var(--accent-primary), transparent);
}

.date-separator-text {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent-primary);
  text-transform: uppercase;
}

/* Entry card */
.entry {
  position: relative;
  margin-bottom: 4rem;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

.entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
}

.entry-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.entry-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.entry-number {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-deep);
  background: var(--accent-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.entry-commit {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-secondary);
  letter-spacing: 0.05em;
}

.entry-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

.entry-message {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-secondary);
  padding: 0 1.5rem;
  margin-top: -0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  word-break: break-word;
}

.entry-screenshot {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.entry-screenshot img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.entry-screenshot:hover img {
  transform: scale(1.02);
}

.entry-screenshot::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, rgba(18, 18, 28, 0.6));
  pointer-events: none;
}

.entry-description {
  padding: 1.5rem;
}

.entry-description p {
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.entry-description p:first-child::first-letter {
  font-size: 1.8em;
  font-weight: 600;
  color: var(--accent-primary);
  float: left;
  margin-right: 0.1em;
  line-height: 1;
}

/* Secondary screenshot gallery */
.entry-secondary {
  border-top: 1px solid var(--border-subtle);
}

.entry-secondary-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.8rem 1.5rem 0;
}

.entry-secondary .entry-screenshots-grid {
  padding: 0.5rem;
  gap: 4px;
  background: none;
}

.entry-secondary .entry-screenshots-grid .entry-screenshot {
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
}

.entry-secondary .entry-screenshots-grid .entry-screenshot img {
  border-radius: 5px;
  opacity: 0.8;
  transition: opacity 0.3s, transform 0.6s var(--ease-out-expo);
}

.entry-secondary .entry-screenshots-grid .entry-screenshot:hover img {
  opacity: 1;
}

/* Multi-screenshot grid */
.entry-screenshots-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--border-subtle);
}

.entry-screenshots-grid.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.entry-screenshots-grid .entry-screenshot {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.entry-screenshots-grid .entry-screenshot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.entry-screenshots-grid .entry-screenshot:hover img {
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .entry-screenshots-grid,
  .entry-screenshots-grid.grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Fullscreen image overlay */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.1);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 2rem;
  text-align: center;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--accent-primary);
  margin-bottom: 0.8rem;
}

.footer-stats {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.footer-tech {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-meta {
    gap: 1.2rem;
  }

  .timeline {
    padding: 2rem 1rem 4rem;
  }

  .timeline::before {
    display: none;
  }

  .entry-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .entry-date {
    margin-left: 0;
    width: 100%;
  }
}
