/* ============================================================
   Milla's Site — style.css
   Purple cosmic theme with centered flexbox layout
   ============================================================ */

/* --- Custom Properties (Purple Palette) --- */
:root {
  --color-primary: hsl(275, 70%, 63%);
  --color-secondary: hsl(285, 50%, 75%);
  --color-background: hsl(270, 40%, 8%);
  --color-text: hsl(280, 10%, 95%);
}

/* --- Font Face --- */
@font-face {
  font-family: 'Quicksand';
  src: url('fonts/Quicksand-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

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

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text);
  background-color: var(--color-background);
  background-image:
    radial-gradient(ellipse at center, hsl(275, 50%, 12%) 0%, var(--color-background) 60%, hsl(270, 30%, 4%) 100%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Centered Flexbox Layout --- */
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.5rem;
  text-align: center;
  gap: 1.5rem;
}

/* --- Typography --- */
h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.05em;
  animation: float 4s ease-in-out infinite;
}

.content {
  max-width: 38rem;
  animation: float 4s ease-in-out infinite;
  animation-delay: 0.5s;
}

.age {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-secondary);
  margin-bottom: 0.75rem;
}

.description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
}

/* --- Art Element (SVG Constellation) --- */
.art-element {
  width: min(80vw, 400px);
  height: min(80vw, 400px);
  display: block;
}

/* Fallback when JS fails */
.art-element.fallback {
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  border-radius: 50%;
}

/* --- Floating Animation --- */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-play-state: paused !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Responsive: Single-column at ≤768px --- */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }

  h1 {
    font-size: clamp(2.5rem, 10vw, 4rem);
  }

  .age,
  .description {
    font-size: 1rem;
  }

  /* Ensure 44x44px minimum touch targets */
  a,
  button,
  [role="button"],
  input,
  select,
  textarea {
    min-width: 44px;
    min-height: 44px;
    padding: 0.5rem;
  }

  .art-element {
    width: min(90vw, 300px);
    height: min(90vw, 300px);
  }
}
