/* ============================================
   dasLeon — Liquid Glass Design System
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #000;
  color: #f5f5f7;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- WebGL Canvas --- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* --- Sections --- */
.section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
}

.hero {
  flex-direction: column;
  padding-bottom: 40px;
}

/* --- Hero --- */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.logo-wrap {
  position: relative;
}

.logo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  filter: drop-shadow(0 0 40px rgba(120, 80, 255, 0.25));
  transition: filter 0.6s ease, transform 0.6s ease;
}

.logo-wrap:hover .logo {
  filter: drop-shadow(0 0 60px rgba(120, 80, 255, 0.4));
  transform: scale(1.05);
}

/* Animated ring around profile photo */
.logo-ring {
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(
    from 0deg,
    #ff006e, #ff477e, #f72585, #b5179e,
    #7209b7, #560bad, #480ca8, #3a0ca3,
    #3f37c9, #4361ee, #4895ef, #4cc9f0,
    #00f5d4, #00bbf9, #9b5de5, #f15bb5,
    #ff006e
  ) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
  to { transform: rotate(360deg); }
}

.hero-name {
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}

.letter-reveal {
  display: inline-block;
}

.letter-reveal .char {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  transition: opacity 0.4s ease, filter 0.5s ease, transform 0.4s ease, color 0.6s ease;
}

.letter-reveal .char.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
  animation: charColorCycle 6s ease-in-out infinite;
  animation-delay: calc(var(--char-index, 0) * 0.15s);
}

@keyframes charColorCycle {
  0%, 100% { color: #fff; }
  20% { color: #4cc9f0; }
  40% { color: #f72585; }
  60% { color: #7209b7; }
  80% { color: #00f5d4; }
}

/* whitespace chars need to preserve width */
.letter-reveal .char.space {
  width: 0.3em;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
  animation: taglinePulse 4s ease-in-out infinite;
}

@keyframes taglinePulse {
  0%, 100% { color: rgba(255, 255, 255, 0.55); }
  50% { color: rgba(76, 201, 240, 0.7); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid rgba(255, 255, 255, 0.3);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.3; border-color: rgba(247, 37, 133, 0.5); }
  50% { transform: rotate(45deg) translateY(6px); opacity: 0.6; border-color: rgba(76, 201, 240, 0.7); }
}

/* --- Glass Card --- */
.glass-card {
  width: 100%;
  max-width: 680px;
  padding: 48px 40px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(40px) saturate(120%);
  -webkit-backdrop-filter: blur(40px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.05) inset,
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 80px rgba(255, 255, 255, 0.02) inset;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
  will-change: transform;
}

.glass-card:hover {
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.08) inset,
    0 30px 80px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(114, 9, 183, 0.05) inset;
  border-color: rgba(114, 9, 183, 0.2);
}

/* --- Section Titles --- */
.section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 28px;
  background: linear-gradient(90deg, #4cc9f0, #f72585, #7209b7, #4cc9f0);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGradient 5s ease-in-out infinite;
}

@keyframes titleGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- About --- */
.about-text p {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
  line-height: 1.7;
}

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

.about-text strong {
  color: #fff;
  font-weight: 600;
  background: linear-gradient(90deg, #4cc9f0, #f72585);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: strongGradient 3s ease-in-out infinite;
}

@keyframes strongGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* --- Link Buttons / Pill Buttons --- */
.link-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pill-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.3s ease,
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  min-height: 52px;
  font-family: inherit;
}

.pill-button:hover {
  transform: scale(1.03);
  background: rgba(114, 9, 183, 0.15);
  border-color: rgba(247, 37, 133, 0.4);
  box-shadow: 0 0 30px rgba(247, 37, 133, 0.15), 0 0 60px rgba(114, 9, 183, 0.1);
}

.pill-button:active {
  transform: scale(0.98);
}

/* Glass highlight sweep — now colorful */
.pill-highlight {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(76, 201, 240, 0.12),
    rgba(247, 37, 133, 0.08),
    transparent
  );
  transition: left 0.6s ease;
  pointer-events: none;
}

.pill-button:hover .pill-highlight {
  left: 140%;
}

.pill-label {
  position: relative;
  z-index: 1;
}

/* --- Reveal Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(6px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 24px;
  font-size: 0.85rem;
  background: linear-gradient(90deg, rgba(247,37,133,0.3), rgba(114,9,183,0.3), rgba(76,201,240,0.3));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleGradient 5s ease-in-out infinite;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .section {
    padding: 60px 16px;
  }

  .glass-card {
    padding: 32px 24px;
    border-radius: 22px;
  }

  .logo {
    width: 120px;
    height: 120px;
  }

  .pill-button {
    padding: 14px 24px;
    font-size: 1rem;
    min-height: 48px;
  }

  .scroll-hint {
    bottom: 24px;
  }
}

@media (min-width: 601px) {
  .link-buttons {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
  }

  .letter-reveal .char {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .scroll-arrow {
    animation: none;
  }

  .logo-ring {
    animation: none;
  }
}
