/* ===== XANADU.WIKI STYLES ===== */
/* Neubrutalism + Neon design language */

/* ===== ROOT & TYPOGRAPHY ===== */
:root {
  --color-bg-light: #f5f5f5;
  --color-bg-dark: #0a0a0a;
  --color-text-dark: #0a0a0a;
  --color-text-light: #f5f5f5;
  --color-accent: #b5ff00;    /* Electric Lime */
  --color-hover: #00ffd5;     /* Neon Cyan */
  --color-emphasis: #ff00aa;  /* Hot Magenta */
  --color-border: #000000;
  --color-muted: #6b6b6b;     /* Graphite */
  --color-grid: #d4d4d4;      /* Fog */
  --color-code-bg: #1a1a1a;   /* Midnight */
  
  font-family: 'Recursive', system-ui, -apple-system, sans-serif;
  --font-weight-display: 800;
  --font-weight-body: 400;
  --font-weight-code: 450;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.72;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: var(--font-weight-body);
  overflow-x: hidden;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.02em;
  margin: 0.5rem 0 1rem 0;
  line-height: 1.1;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: var(--font-weight-display);
  letter-spacing: -0.02em;
  margin: 0.5rem 0 0.8rem 0;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

/* ===== TERMINAL HERO ===== */
.terminal-hero {
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  background-color: var(--color-bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.terminal-hero::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(181, 255, 0, 0.03) 0,
      rgba(181, 255, 0, 0.03) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(181, 255, 0, 0.03) 0,
      rgba(181, 255, 0, 0.03) 1px,
      transparent 1px,
      transparent 48px
    );
  pointer-events: none;
}

.terminal-container {
  position: relative;
  z-index: 10;
  text-align: center;
}

.terminal-prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-family: 'Recursive', monospace;
  font-variation-settings: 'MONO' 1;
}

.prompt-char {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--color-accent);
  animation: blink 1.06s infinite;
}

.domain-name {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: var(--font-weight-display);
  color: var(--color-text-light);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: typeout 6s ease-out forwards;
  text-shadow: 0 0 6px var(--color-accent),
               0 0 14px rgba(181, 255, 0, 0.5),
               0 0 28px rgba(181, 255, 0, 0.2);
  animation: typeout 6s ease-out forwards, neon-pulse 4s ease-in-out 5s infinite;
}

.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: var(--color-accent);
  margin-left: 0.2em;
  opacity: 0;
  animation: cursor-blink 1.06s steps(2) 4.5s forwards;
}

.subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: var(--color-muted);
  opacity: 0;
  animation: fade-in 1s ease-out 7.5s forwards;
}

.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-accent);
  animation: pulse-down 2s ease-in-out infinite;
  opacity: 0;
  animation: fade-in 1s ease-out 9s forwards, pulse-down 2s ease-in-out 10s infinite;
}

/* ===== NAVIGATION ===== */
.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--color-bg-dark);
  border-bottom: 3px solid var(--color-accent);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 200ms ease-out;
  font-family: 'Recursive', monospace;
  font-variation-settings: 'MONO' 1;
}

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

.nav-link {
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  border-bottom: 3px solid transparent;
  padding-bottom: 0.25rem;
  transition: all 150ms cubic-bezier(0.2, 0, 0, 1);
}

.nav-link:hover {
  border-bottom-color: var(--color-accent);
  color: var(--color-accent);
  text-shadow: 0 0 6px var(--color-accent);
}

.nav-separator {
  color: var(--color-muted);
}

/* ===== TIMELINE CONTAINER ===== */
.timeline-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px;
  display: grid;
  gap: 80px;
}

.timeline-spine {
  position: fixed;
  left: 50%;
  top: 0;
  width: 3px;
  height: 0;
  background-color: var(--color-accent);
  transform: translateX(-50%);
  z-index: 5;
  box-shadow: 0 0 8px var(--color-accent),
              0 0 20px rgba(181, 255, 0, 0.4),
              0 0 40px rgba(181, 255, 0, 0.15);
  animation: neon-pulse 4s ease-in-out infinite;
}

/* ===== TIMELINE NODES ===== */
.timeline-node {
  position: relative;
  display: grid;
  align-items: center;
  gap: 40px;
}

.timeline-node[data-position="left"] {
  grid-template-columns: 1fr 0px 480px;
  justify-items: end;
}

.timeline-node[data-position="right"] {
  grid-template-columns: 480px 0px 1fr;
  justify-items: start;
}

.connector-bar {
  height: 2px;
  background-color: var(--color-accent);
  position: relative;
  animation: draw-connector 200ms ease-out forwards;
  opacity: 0;
}

.timeline-node[data-position="left"] .connector-bar {
  animation-delay: var(--node-delay);
  width: 0;
  animation: draw-connector-left 200ms ease-out forwards var(--node-delay);
}

.timeline-node[data-position="right"] .connector-bar {
  animation-delay: var(--node-delay);
  width: 0;
  animation: draw-connector-right 200ms ease-out forwards var(--node-delay);
}

.commit-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent);
  animation: dot-appear 300ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  animation-delay: var(--node-delay);
  cursor: pointer;
  transition: all 150ms ease-out;
}

.commit-dot:hover {
  width: 16px;
  height: 16px;
  animation: dot-pulse 600ms ease-out infinite;
}

/* ===== NODE CARDS ===== */
.node-card {
  background-color: var(--color-bg-light);
  border: 3px solid var(--color-border);
  padding: 30px;
  box-shadow: 6px 6px 0px var(--color-border);
  animation: card-appear 300ms ease-out forwards;
  opacity: 0;
  animation-delay: var(--node-delay);
  transition: all 150ms cubic-bezier(0.2, 0, 0, 1);
  position: relative;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgba(212, 212, 212, 0.12) 0,
      rgba(212, 212, 212, 0.12) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(212, 212, 212, 0.12) 0,
      rgba(212, 212, 212, 0.12) 1px,
      transparent 1px,
      transparent 48px
    );
  background-attachment: fixed;
}

.node-card:hover {
  border-color: var(--color-accent);
  box-shadow: 3px 3px 0px var(--color-border);
  transform: translate(3px, 3px);
}

.node-card:active {
  box-shadow: 0px 0px 0px var(--color-border);
  transform: translate(6px, 6px);
  border-color: var(--color-emphasis);
}

.node-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-light);
  background-color: var(--color-text-dark);
  padding: 0.4rem 0.8rem;
  margin-bottom: 1rem;
  font-family: 'Recursive', monospace;
  font-variation-settings: 'MONO' 1;
}

.node-card h2 {
  margin-top: 0;
}

/* ===== CODE BLOCKS ===== */
.code-block {
  background-color: var(--color-code-bg);
  color: var(--color-text-light);
  border: 1px solid var(--color-muted);
  padding: 20px;
  margin: 1.5rem 0;
  font-family: 'Recursive', monospace;
  font-variation-settings: 'MONO' 1;
  font-size: 0.88rem;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  position: relative;
}

.code-block::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 30px;
  background: linear-gradient(to right, transparent, var(--color-code-bg));
  pointer-events: none;
}

.code-block code {
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  font-size: inherit;
}

/* ===== DIVIDERS ===== */
.divider {
  width: 100%;
  text-align: center;
  color: var(--color-muted);
  font-family: 'Recursive', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  margin: 2rem 0;
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: 60px 40px;
  border-top: 3px solid var(--color-accent);
  margin-top: 100px;
}

.commit-log {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

.commit-entry {
  display: grid;
  grid-template-columns: 100px 1fr 150px 150px;
  gap: 20px;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(181, 255, 0, 0.2);
  font-family: 'Recursive', monospace;
  font-variation-settings: 'MONO' 1;
  font-size: 0.85rem;
}

.commit-hash {
  color: var(--color-accent);
  font-weight: 700;
}

.commit-message {
  color: var(--color-text-light);
}

.commit-author {
  color: var(--color-muted);
  text-align: center;
}

.commit-date {
  color: var(--color-muted);
  text-align: right;
}

/* ===== ANIMATIONS ===== */
@keyframes typeout {
  from {
    opacity: 0;
    width: 0;
  }
  to {
    opacity: 1;
    width: auto;
  }
}

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

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

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse-down {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
  50% {
    transform: translateX(-50%) translateY(8px);
    opacity: 0.7;
  }
}

@keyframes neon-pulse {
  0%, 100% {
    opacity: 0.6;
    filter: drop-shadow(0 0 8px var(--color-accent)) drop-shadow(0 0 20px rgba(181, 255, 0, 0.4));
  }
  50% {
    opacity: 1;
    filter: drop-shadow(0 0 16px var(--color-accent)) drop-shadow(0 0 40px rgba(181, 255, 0, 0.6));
  }
}

@keyframes draw-connector-left {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes draw-connector-right {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dot-appear {
  from {
    width: 0;
    height: 0;
    opacity: 0;
  }
  to {
    width: 12px;
    height: 12px;
    opacity: 1;
  }
}

@keyframes dot-pulse {
  0%, 100% {
    box-shadow: 0 0 6px var(--color-accent),
                0 0 12px rgba(181, 255, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 6px var(--color-accent),
                0 0 30px rgba(181, 255, 0, 0.6),
                0 0 60px rgba(181, 255, 0, 0.3);
  }
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1024px) {
  .timeline-node[data-position="left"],
  .timeline-node[data-position="right"] {
    grid-template-columns: 1fr;
  }

  .connector-bar {
    display: none;
  }

  .commit-dot {
    position: absolute;
    left: 20px;
  }

  .timeline-spine {
    left: 24px;
  }

  .node-card {
    margin-left: 50px;
  }
}

@media (max-width: 768px) {
  .terminal-prompt {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-bar {
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .commit-entry {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .commit-hash,
  .commit-author,
  .commit-date {
    text-align: left;
  }
}

/* ===== UTILITIES ===== */
.no-scroll {
  overflow: hidden;
}
