/* =============================================
   NATE KRATCHMAN — Personal Website
   Dark nebula hero → Light content theme
   ============================================= */

/* --- Variables --- */
:root {
  /* Hero (dark) */
  --bg-dark: #08080f;
  --purple: #9b59b6;
  --pink: #e91e8c;
  --cyan: #00d4ff;
  --green: #00ff41;

  /* Content (light) */
  --bg-light: #fafaf8;
  --text-dark: #2d2d2d;
  --text-muted: #6b7280;
  --link-color: #7c3aed;
  --link-hover: #5b21b6;
  --border-light: #e5e3df;

  /* Fonts */
  --font-pixel: 'Press Start 2P', monospace;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

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

html {
  overscroll-behavior-y: none;
}

body {
  background: var(--bg-dark);
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
}

/* =============================================
   HERO — The Cube (dark theme)
   ============================================= */

#hero {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background:
    radial-gradient(ellipse 800px 600px at 55% 48%, rgba(120, 50, 180, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 600px 500px at 42% 52%, rgba(60, 80, 200, 0.12) 0%, transparent 65%),
    var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  z-index: 3;
  will-change: opacity;
}

#scroll-spacer {
  height: 100vh;
  height: 100dvh;
  position: relative;
  z-index: 0;
}

/* --- Cube Glow (purple-blue bleed) --- */
#cube-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(155, 89, 182, 0.38) 0%,
    rgba(130, 60, 200, 0.25) 20%,
    rgba(100, 50, 180, 0.15) 40%,
    rgba(60, 40, 140, 0.06) 60%,
    transparent 80%
  );
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* --- Cube Image (fills hero, zooms on scroll) --- */
#cube-scene {
  position: absolute;
  inset: 0;
  will-change: transform, opacity, filter;
}

#cube-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- Scroll Cue --- */
#scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  will-change: opacity;
}

.cue-text {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  color: rgba(200, 180, 230, 0.55);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.cue-arrow {
  font-size: 0.85rem;
  color: rgba(200, 180, 230, 0.55);
  animation: bounce 2s ease-in-out infinite;
}

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

/* --- White Rabbit --- */
#white-rabbit {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 10;
  will-change: opacity;
}

#white-rabbit:hover {
  opacity: 0.8;
  transform: scale(1.15);
}

/* =============================================
   MATRIX EASTER EGG
   ============================================= */

#matrix-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: none;
}

#matrix-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  display: none;
  text-align: center;
}

#matrix-blurb {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--green);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 1rem;
  text-align: left;
  opacity: 0.85;
}

#matrix-video-link {
  position: relative;
  display: block;
  text-decoration: none;
}

#matrix-thumb {
  border: 2px solid var(--green);
  border-radius: 4px;
  box-shadow: 0 0 40px rgba(0, 255, 65, 0.25);
  display: block;
  max-width: calc(100vw - 40px);
  height: auto;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: var(--green);
  text-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.2s, transform 0.2s;
}

#matrix-video-link:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.15);
}

#matrix-close {
  position: absolute;
  top: -2rem;
  right: -0.5rem;
  background: none;
  border: none;
  color: var(--green);
  font-size: 1.8rem;
  cursor: pointer;
  font-family: var(--font-mono);
  line-height: 1;
  z-index: 1;
}

#matrix-close:hover {
  text-shadow: 0 0 10px var(--green);
}

/* (matrix-link removed — thumbnail is the link now) */

/* =============================================
   CONTENT (light theme)
   ============================================= */

#content {
  position: relative;
  z-index: 1;
  background: var(--bg-light);
  min-height: 100vh;
  padding: 4rem 2rem 6rem;
  will-change: transform;
}

/* No gradient needed — content is revealed behind the hero */

/* --- Home page nav (constrained to match about-text) --- */
#content .site-nav {
  max-width: 580px;
  margin: 0 auto 2.5rem;
}

/* --- About Text --- */
.about-text {
  max-width: 580px;
  margin: 0 auto;
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-dark);
}

.about-text p {
  margin-bottom: 1.25rem;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-text em {
  font-style: italic;
  color: inherit;
}

.about-text a {
  color: var(--link-color);
}

.about-text a:hover {
  color: var(--link-hover);
}

/* =============================================
   PRAISE TOASTS
   ============================================= */

#praise-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
  pointer-events: none;
}

.praise-toast {
  background: #ffffff;
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: toast-in 0.4s ease-out;
  pointer-events: auto;
  cursor: pointer;
  transition: box-shadow 0.2s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}

.praise-toast:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

.praise-toast.toast-exit {
  animation: toast-out 0.4s ease-in forwards;
}

@keyframes toast-in {
  from { transform: translateX(110%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(110%); opacity: 0; }
}

.toast-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.toast-icon {
  color: var(--link-color);
  font-size: 0.8rem;
}

.toast-label {
  font-family: var(--font-pixel);
  font-size: 0.4rem;
  color: var(--link-color);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex: 1;
  opacity: 0.7;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
  font-family: var(--font-mono);
}

.toast-close:hover {
  color: var(--text-dark);
}

.toast-quote {
  font-size: 0.85rem;
  color: var(--text-dark);
  line-height: 1.6;
  font-style: italic;
}

.toast-cta {
  font-size: 0.7rem;
  color: var(--link-color);
  margin-top: 0.5rem;
  display: block;
  text-decoration: none;
}

/* =============================================
   SHARED PAGE STYLES (work, gmg)
   ============================================= */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem;
  min-height: 100vh;
}

.site-nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border-light);
}

.site-nav-name {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--text-dark);
  letter-spacing: 0.12em;
}

.site-nav a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--link-color);
}

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

@media (max-width: 640px) {
  #content {
    padding: 3rem 1.25rem 4rem;
  }

  .about-text {
    font-size: 0.9rem;
  }

  #scroll-spacer {
    height: 0;
  }

  #cube-img {
    object-fit: contain;
    transform: scale(2.5);
  }

  #cube-glow {
    width: 420px;
    height: 420px;
  }

  #praise-container {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    max-width: none;
  }

  #matrix-thumb {
    width: 100%;
    height: auto;
  }
}
