/* ============================================
   HOME PAGE - Retro Xenial Landing
   Flying Toasters + CRT + Terminal Vibes
   ============================================ */

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(46, 134, 222, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(255, 149, 0, 0.06) 0%, transparent 50%),
    var(--bg-primary);
}

.hero-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 0, 0.01) 2px,
    rgba(0, 255, 0, 0.01) 4px
  );
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 40px 0;
}

/* --- CRT Monitor --- */
.crt-monitor {
  flex-shrink: 0;
  width: 380px;
}

.crt-bezel {
  background: #d4c5a9;
  background: linear-gradient(135deg, #e8dcc8, #c4b596);
  border-radius: 20px;
  padding: 25px 25px 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.crt-screen {
  background: #0a0a0a;
  border-radius: 12px;
  padding: 25px;
  position: relative;
  overflow: hidden;
  min-height: 260px;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
  border: 3px solid #222;
}

.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 1px,
    rgba(0, 0, 0, 0.15) 1px,
    rgba(0, 0, 0, 0.15) 2px
  );
  pointer-events: none;
  z-index: 2;
}

.crt-flicker {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 255, 0, 0.02);
  animation: crt-flicker 0.1s infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes crt-flicker {
  0% { opacity: 0.97; }
  50% { opacity: 1; }
  100% { opacity: 0.98; }
}

.crt-content {
  position: relative;
  z-index: 3;
}

.crt-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 5px 0;
  font-family: var(--font-main);
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
  letter-spacing: 1px;
}

.crt-power-light {
  width: 8px;
  height: 8px;
  background: #33ff33;
  border-radius: 50%;
  box-shadow: 0 0 6px #33ff33;
  animation: power-pulse 2s ease-in-out infinite;
}

@keyframes power-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.crt-stand {
  width: 120px;
  height: 30px;
  margin: 0 auto;
  background: linear-gradient(135deg, #d4c5a9, #b8a88c);
  border-radius: 0 0 20px 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Boot sequence */
.boot-sequence p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--terminal-amber);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.3s ease;
}

.boot-sequence p.visible {
  opacity: 1;
  transform: translateY(0);
}

.boot-sequence .text-green {
  color: var(--terminal-green);
}

/* --- Hero Text --- */
.hero-text {
  flex: 1;
}

.hero-subtitle {
  font-size: 0.9rem;
  margin-bottom: 15px;
  letter-spacing: 3px;
}

.hero-text h1 {
  font-size: 4rem;
  margin-bottom: 20px;
  line-height: 1.1;
}

.hero-desc {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 30px;
  max-width: 520px;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

/* --- Flying Toasters --- */
.toaster-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.flying-toaster {
  position: absolute;
  font-size: 2rem;
  opacity: 0.12;
  animation: fly-toaster linear infinite;
  filter: grayscale(0.5);
}

@keyframes fly-toaster {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    transform: translate(-120vw, 120vh) rotate(-20deg);
  }
}

.toaster-wing {
  display: inline-block;
  animation: flap 0.3s ease-in-out infinite alternate;
}

@keyframes flap {
  0% { transform: rotate(-15deg); }
  100% { transform: rotate(15deg); }
}

/* --- Xenial Timeline --- */
.xenial-section {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(46, 134, 222, 0.05) 0%, transparent 60%),
    var(--bg-secondary);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--blue-accent), var(--orange-accent));
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

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

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: right;
}

.timeline-year {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-primary);
  color: var(--orange-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 5px 15px;
  border: 1px solid var(--orange-accent);
  border-radius: 20px;
  z-index: 2;
  white-space: nowrap;
}

.timeline-card {
  width: calc(50% - 50px);
  margin: 0 auto;
}

.timeline-item:nth-child(odd) .timeline-card {
  margin-right: calc(50% + 30px);
  margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-card {
  margin-left: calc(50% + 30px);
  margin-right: 0;
}

.timeline-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.timeline-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Error Cards --- */
.errors-section {
  background: var(--bg-primary);
}

.error-card {
  padding: 0;
  overflow: hidden;
}

.error-window {
  background: #c0c0c0;
  color: #000;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  font-size: 0.85rem;
}

.error-titlebar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(to right, #000080, #1084d0);
  color: #fff;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.error-close {
  cursor: pointer;
  padding: 0 4px;
  background: #c0c0c0;
  color: #000;
  font-size: 0.7rem;
}

.error-body {
  padding: 20px;
  text-align: center;
}

.error-icon-big {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.error-body p {
  color: #000;
  margin-bottom: 8px;
}

.error-body .text-muted {
  color: #444;
  font-size: 0.8rem;
}

.error-btn {
  padding: 4px 30px;
  background: #c0c0c0;
  border: 2px outset #fff;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 10px;
}

.error-btn:active {
  border-style: inset;
}

/* BSOD */
.bsod {
  background: #0000aa;
  padding: 30px;
  min-height: 250px;
}

.bsod-text {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.8;
}

/* Mac Bomb */
.mac-bomb {
  background: #e8e8e8;
  padding: 25px;
  text-align: center;
  border: 3px solid #000;
}

.bomb-icon pre {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1.2;
  color: #000;
  display: inline-block;
  text-align: left;
}

.mac-bomb p {
  color: #000;
  margin-bottom: 5px;
}

/* --- Kermit Terminal Section --- */
.terminal-section {
  background: var(--bg-secondary);
  padding: 80px 0;
}

.terminal-large {
  max-width: 700px;
  margin: 0 auto;
}

.terminal-large .terminal-body {
  min-height: 400px;
}

.kermit-screen p {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--terminal-amber);
  margin-bottom: 2px;
  line-height: 1.6;
}

.kermit-prompt {
  color: var(--terminal-green);
}

.kermit-screen .text-green { color: #33ff33; }
.kermit-screen .text-orange { color: #ffaa00; }
.kermit-screen .text-blue { color: #54a0ff; }
.kermit-screen .text-muted { color: #666; }

.typed-text {
  color: var(--terminal-amber);
}

/* --- Link Cards --- */
.links-section {
  background: var(--bg-primary);
  padding-bottom: 100px;
}

.link-card {
  display: block;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--blue-accent), var(--orange-accent));
  transform: scaleX(0);
  transition: transform var(--transition-mid);
}

.link-card:hover::before {
  transform: scaleX(1);
}

.link-icon {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.link-card h3 {
  color: var(--text-primary);
  margin-bottom: 10px;
}

.link-card p {
  font-size: 0.9rem;
}

.link-arrow {
  display: inline-block;
  color: var(--orange-accent);
  font-size: 1.3rem;
  margin-top: 10px;
  transition: transform var(--transition-mid);
}

.link-card:hover .link-arrow {
  transform: translateX(5px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .crt-monitor {
    width: 320px;
  }

  .hero-text h1 {
    font-size: 2.8rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 30px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-year {
    left: 20px;
    transform: translateX(0);
  }

  .timeline-item,
  .timeline-item:nth-child(odd) {
    flex-direction: column;
    text-align: left;
    padding-left: 50px;
  }

  .timeline-card,
  .timeline-item:nth-child(odd) .timeline-card,
  .timeline-item:nth-child(even) .timeline-card {
    width: 100%;
    margin: 25px 0 0 0;
  }
}

@media (max-width: 480px) {
  .crt-monitor {
    width: 280px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .boot-sequence p {
    font-size: 0.7rem;
  }
}
