/* Underwater / Subnautica aesthetic - deep ocean, bioluminescence */
:root {
  --bg-deep: #0a0a0f;
  --bg-ocean: #0d1b2a;
  --bg-mid: #1d395e;
  --accent-cyan: #0eacc7;
  --accent-aqua: #6dd4e3;
  --accent-green: #00ff88;
  --accent-light: #9ce4f2;
  --accent-soft: #5ec8d5;
  --text-primary: #e8fff8;
  --text-muted: #97e8eb;
  --glass-bg: rgba(13, 27, 42, 0.7);
  --glass-border: rgba(110, 212, 227, 0.25);
  --glow-cyan: 0 0 20px rgba(14, 172, 199, 0.4);
  --glow-green: 0 0 15px rgba(0, 255, 136, 0.3);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  cursor: none;
}

body.is-touch {
  cursor: auto;
}

/* Amber light ball cursor */
.amber-cursor {
  position: fixed;
  width: 48px;
  height: 48px;
  pointer-events: none;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.08s ease;
}

.amber-cursor::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 210, 100, 0.95) 25%,
    rgba(255, 190, 60, 0.9) 50%,
    rgba(255, 215, 120, 0.55) 75%,
    transparent 100%);
  box-shadow:
    0 0 15px rgba(255, 215, 100, 0.9),
    0 0 30px rgba(255, 195, 70, 0.65),
    0 0 45px rgba(255, 210, 110, 0.45),
    inset 0 0 10px rgba(255, 255, 255, 0.5);
}

.amber-cursor::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
    rgba(255, 215, 100, 0.45) 0%,
    rgba(255, 195, 70, 0.25) 40%,
    transparent 70%);
  filter: blur(8px);
  animation: amberGlow 2s ease-in-out infinite;
}

.amber-cursor.active {
  transform: translate(-50%, -50%) scale(0.9);
}

.amber-cursor.active::before {
  box-shadow:
    0 0 20px rgba(255, 215, 100, 0.95),
    0 0 40px rgba(255, 195, 70, 0.75),
    0 0 60px rgba(255, 210, 110, 0.55),
    inset 0 0 12px rgba(255, 255, 255, 0.6);
}

.is-touch .amber-cursor {
  display: none;
}

@keyframes amberGlow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

#scene-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: block;
}

/* Marine snow: drifting organic particles */
/* Light caustics at top - Three.js procedural water caustics (behind content) */
.caustics-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 45vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 55%, transparent 100%);
}

.caustics-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.marine-snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.marine-snow-particle {
  position: absolute;
  top: -10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.3),
    0 0 8px rgba(110, 212, 227, 0.2);
  animation: marine-snow-fall linear infinite;
}

@keyframes marine-snow-fall {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  5% {
    opacity: 0.5;
  }
  95% {
    opacity: 0.35;
  }
  100% {
    transform: translateY(100vh) translateX(var(--drift, 0px));
    opacity: 0;
  }
}

.overlay {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
  background: linear-gradient(
    to bottom,
    #2a5080 0%,
    #1d395e 20%,
    #0d1b2a 50%,
    #0a0a0f 100%
  );
}

.hero {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero-title {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: var(--glow-cyan);
  letter-spacing: 0.1em;
  overflow: hidden;
  white-space: nowrap;
  animation: hero-reveal-h 0.8s ease-out both;
}

.hero-tagline {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  overflow: hidden;
  white-space: nowrap;
  animation: hero-reveal-h 0.8s ease-out 0.3s both;
}

.hero-email {
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text-primary);
  background: none;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.hero-email:hover {
  color: var(--accent-cyan);
}

.overlay-footer {
  margin-top: auto;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
}

@keyframes hero-reveal-h {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

.content {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  padding-bottom: 2rem;
}

.repo-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Scroll-triggered horizontal reveal for repo cards */
.scroll-reveal {
  overflow: hidden;
  animation: hero-reveal-h 0.8s ease-out 0.5s both;
}

/* Scroll-driven: all cards reveal when they enter viewport (Chrome 115+, Safari 26+) */
@supports (animation-timeline: view()) {
  .scroll-reveal {
    animation: hero-reveal-h 0.8s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% entry 60%;
  }
}

.repo-card {
  display: block;
  position: relative;
  padding: 1.75rem;
  background: var(--glass-bg);
  border: 3px solid #c0c0c0;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  overflow: visible;
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.2);
}

.repo-screenshot {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.repo-screenshot-wrap {
  overflow: visible;
  width: 100%;
}

.repo-screenshot-full {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
  vertical-align: top;
}


.repo-card .repo-screenshot-wrap,
.repo-card .repo-screenshot-full {
  border-radius: 6px;
}


.repo-card:hover {
  border-color: var(--accent-cyan);
  box-shadow:
    inset 0 2px 6px rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.2),
    var(--glow-cyan);
}

.repo-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.repo-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
  font-weight: 600;
}

.repo-lang {
  font-size: 0.75rem;
  color: var(--lang-color, var(--text-muted));
  flex-shrink: 0;
}

.repo-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.repo-meta {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--accent-soft);
}

.loading, .error {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.loading-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  margin: 0 4px;
  animation: pulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.error .muted {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

