/* ═══════════════════════════════════════════════════════
   CRISTIAN CIN — Portfolio Landing Page
   Theme: Matching CINconvert Premium Violet-Blue Palette
   ═══════════════════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  --bg-deep: #1a1625;
  --bg-panel: #241f36;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-violet: #8b5cf6;
  --accent-blue: #3b82f6;
  --neon-violet: rgba(139, 92, 246, 0.9);
  --neon-blue: rgba(59, 130, 246, 0.7);
  --font-heading: 'Montserrat', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-heading);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Ambient Background ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 30% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 75% 60%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Grain Overlay ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
}

/* ── Main Content Container ── */
.landing {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  gap: 1.2rem;
}

/* ═══════════════════════════════════════════════════════
   NEON SIGN TITLE — "Cristian Cin"
   ═══════════════════════════════════════════════════════ */
.neon-title {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f0e8ff;
  text-shadow:
    /* Inner white-hot core */
    0 0 4px rgba(255, 255, 255, 0.9),
    0 0 8px rgba(255, 255, 255, 0.4),
    /* Violet neon glow layers */
    0 0 15px var(--neon-violet),
    0 0 30px var(--neon-violet),
    0 0 60px rgba(139, 92, 246, 0.5),
    0 0 100px rgba(139, 92, 246, 0.3),
    /* Blue halo bleed */
    0 0 140px var(--neon-blue),
    0 0 200px rgba(59, 130, 246, 0.15);
  animation: neonFlicker 8s ease-in-out infinite;
  user-select: none;
  line-height: 1.1;
}

/* ═══════════════════════════════════════════════════════
   REALISTIC NEON FLICKER ANIMATION
   Simulates organic voltage drops & tube stutter.
   The sign is mostly ON, with occasional micro-dips.
   ═══════════════════════════════════════════════════════ */
@keyframes neonFlicker {
  /* Steady ON */
  0% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.4),
      0 0 15px var(--neon-violet),
      0 0 30px var(--neon-violet),
      0 0 60px rgba(139, 92, 246, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      0 0 140px var(--neon-blue),
      0 0 200px rgba(59, 130, 246, 0.15);
  }

  /* First minor voltage dip */
  18% { opacity: 1; }
  18.5% {
    opacity: 0.82;
    text-shadow:
      0 0 2px rgba(255, 255, 255, 0.5),
      0 0 6px rgba(139, 92, 246, 0.4),
      0 0 20px rgba(139, 92, 246, 0.2),
      0 0 50px rgba(139, 92, 246, 0.1);
  }
  19.5% { opacity: 1; }
  20% {
    opacity: 0.88;
    text-shadow:
      0 0 3px rgba(255, 255, 255, 0.6),
      0 0 10px rgba(139, 92, 246, 0.5),
      0 0 30px rgba(139, 92, 246, 0.3),
      0 0 60px rgba(59, 130, 246, 0.1);
  }
  21% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.4),
      0 0 15px var(--neon-violet),
      0 0 30px var(--neon-violet),
      0 0 60px rgba(139, 92, 246, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      0 0 140px var(--neon-blue),
      0 0 200px rgba(59, 130, 246, 0.15);
  }

  /* Steady hold */
  44% { opacity: 1; }

  /* Soft stutter — a quick double-blink */
  44.5% { opacity: 0.75; }
  45% { opacity: 0.95; }
  45.5% {
    opacity: 0.7;
    text-shadow:
      0 0 2px rgba(255, 255, 255, 0.3),
      0 0 4px rgba(139, 92, 246, 0.3),
      0 0 15px rgba(139, 92, 246, 0.15);
  }
  46.5% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.4),
      0 0 15px var(--neon-violet),
      0 0 30px var(--neon-violet),
      0 0 60px rgba(139, 92, 246, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      0 0 140px var(--neon-blue),
      0 0 200px rgba(59, 130, 246, 0.15);
  }

  /* Long steady segment */
  72% { opacity: 1; }

  /* Final gentle dim — slow voltage sag */
  73% { opacity: 0.92; }
  74% {
    opacity: 0.85;
    text-shadow:
      0 0 3px rgba(255, 255, 255, 0.6),
      0 0 8px rgba(139, 92, 246, 0.4),
      0 0 25px rgba(139, 92, 246, 0.25),
      0 0 70px rgba(59, 130, 246, 0.08);
  }
  76% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.4),
      0 0 15px var(--neon-violet),
      0 0 30px var(--neon-violet),
      0 0 60px rgba(139, 92, 246, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      0 0 140px var(--neon-blue),
      0 0 200px rgba(59, 130, 246, 0.15);
  }

  /* Steady to end */
  100% {
    opacity: 1;
    text-shadow:
      0 0 4px rgba(255, 255, 255, 0.9),
      0 0 8px rgba(255, 255, 255, 0.4),
      0 0 15px var(--neon-violet),
      0 0 30px var(--neon-violet),
      0 0 60px rgba(139, 92, 246, 0.5),
      0 0 100px rgba(139, 92, 246, 0.3),
      0 0 140px var(--neon-blue),
      0 0 200px rgba(59, 130, 246, 0.15);
  }
}

/* ── Subtitle ── */
.subtitle {
  font-size: clamp(0.85rem, 2.2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: subtitleFadeIn 2s ease 0.6s forwards;
}

@keyframes subtitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
    letter-spacing: 0.5em;
  }
  to {
    opacity: 0.7;
    transform: translateY(0);
    letter-spacing: 0.35em;
  }
}

/* ── Decorative Line ── */
.divider {
  width: clamp(40px, 10vw, 80px);
  height: 2px;
  border: none;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-violet),
    var(--accent-blue),
    transparent
  );
  opacity: 0;
  animation: dividerFadeIn 1.8s ease 0.3s forwards;
}

@keyframes dividerFadeIn {
  from { opacity: 0; width: 0; }
  to { opacity: 0.6; width: clamp(40px, 10vw, 80px); }
}

/* ── CTA Button ── */
.cta-btn {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.75rem 2.2rem;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 2px;
  cursor: pointer;
  opacity: 0;
  animation: ctaFadeIn 1.4s ease 1.1s forwards;
  transition:
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    letter-spacing 0.35s ease;
}

.cta-btn:hover {
  color: #f0e8ff;
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow:
    0 0 12px rgba(139, 92, 246, 0.2),
    0 0 30px rgba(139, 92, 246, 0.08),
    inset 0 0 12px rgba(139, 92, 246, 0.04);
  letter-spacing: 0.26em;
}

@keyframes ctaFadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Sound Toggle Button ── */
.sound-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-muted);
  font-size: 1.1rem;
  opacity: 0;
  animation: subtitleFadeIn 1s ease 1.5s forwards;
}

.sound-toggle:hover {
  border-color: var(--accent-violet);
  color: var(--accent-violet);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
  transform: scale(1.08);
}

.sound-toggle.active {
  color: var(--accent-violet);
  border-color: rgba(139, 92, 246, 0.3);
}

/* ── Interaction Hint ── */
.click-hint {
  position: fixed;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 0;
  animation: hintPulse 3s ease-in-out 2s infinite;
  pointer-events: none;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0; }
  20%, 80% { opacity: 0.35; }
}

.click-hint.hidden {
  display: none;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .landing {
    padding: 1.5rem 1rem;
  }
}
