/* ==========================================================================
   Molly's Site — style.css
   Pink retro pixel-art aesthetic with Press Start 2P typography
   ========================================================================== */

/* --- Custom Properties (Pink Palette) --- */
:root {
  --color-primary: hsl(340, 80%, 60%);
  --color-secondary: hsl(350, 70%, 75%);
  --color-background: hsl(330, 30%, 10%);
  --color-text: hsl(340, 10%, 95%);
}

/* --- Font Face --- */
@font-face {
  font-family: 'Press Start 2P';
  src: url('fonts/PressStart2P-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

html {
  font-size: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Layout: Asymmetric CSS Grid --- */
main {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* --- Art Element (left column) --- */
.art-element {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  overflow: hidden;
}

/* --- Animated Pink Gradient Backdrop --- */
@keyframes pink-backdrop {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.art-element::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: linear-gradient(
    45deg,
    hsl(340, 60%, 15%),
    hsl(320, 50%, 20%),
    hsl(350, 60%, 18%),
    hsl(330, 50%, 12%)
  );
  background-size: 300% 300%;
  animation: pink-backdrop 10s ease infinite;
  z-index: 0;
}

/* --- Pixel Art Dog (Skye-inspired) --- */
.art-element::after {
  content: '';
  display: block;
  width: 1px;
  height: 1px;
  position: relative;
  z-index: 1;
  transform: scale(6);
  /* 
   * Skye-inspired pixel dog:
   * ~20x22 pixel grid
   * Colors:
   *   #ff69b4 - hot pink (body/primary)
   *   #ffb6c1 - light pink (highlights/inner ears)
   *   #e91e8c - deep pink/magenta (accents/goggles frame)
   *   #ff1493 - vivid pink (details)
   *   #2d1b2e - dark outline
   *   #fff    - white (goggle lenses, highlights)
   *   #ffd700 - gold (goggle accent)
   *
   * Layout: Each box-shadow is offset x y, with 0 blur and 1px spread
   * Grid: 1px per "pixel", scaled up with transform
   */
  box-shadow:
    /* === Ears (top) === */
    /* Left ear */
    6px 0 0 0 #2d1b2e,
    7px 0 0 0 #2d1b2e,
    5px 1px 0 0 #2d1b2e,
    6px 1px 0 0 #ff69b4,
    7px 1px 0 0 #ff69b4,
    8px 1px 0 0 #2d1b2e,
    5px 2px 0 0 #2d1b2e,
    6px 2px 0 0 #ffb6c1,
    7px 2px 0 0 #ff69b4,
    8px 2px 0 0 #2d1b2e,
    6px 3px 0 0 #2d1b2e,
    7px 3px 0 0 #2d1b2e,

    /* Right ear */
    13px 0 0 0 #2d1b2e,
    14px 0 0 0 #2d1b2e,
    12px 1px 0 0 #2d1b2e,
    13px 1px 0 0 #ff69b4,
    14px 1px 0 0 #ff69b4,
    15px 1px 0 0 #2d1b2e,
    12px 2px 0 0 #2d1b2e,
    13px 2px 0 0 #ff69b4,
    14px 2px 0 0 #ffb6c1,
    15px 2px 0 0 #2d1b2e,
    13px 3px 0 0 #2d1b2e,
    14px 3px 0 0 #2d1b2e,

    /* === Head === */
    /* Row 4 - top of head */
    8px 4px 0 0 #2d1b2e,
    9px 4px 0 0 #2d1b2e,
    10px 4px 0 0 #2d1b2e,
    11px 4px 0 0 #2d1b2e,
    12px 4px 0 0 #2d1b2e,
    /* Row 5 */
    7px 5px 0 0 #2d1b2e,
    8px 5px 0 0 #ff69b4,
    9px 5px 0 0 #ff69b4,
    10px 5px 0 0 #ff69b4,
    11px 5px 0 0 #ff69b4,
    12px 5px 0 0 #ff69b4,
    13px 5px 0 0 #2d1b2e,
    /* Row 6 */
    6px 6px 0 0 #2d1b2e,
    7px 6px 0 0 #ff69b4,
    8px 6px 0 0 #ffb6c1,
    9px 6px 0 0 #ff69b4,
    10px 6px 0 0 #ff69b4,
    11px 6px 0 0 #ff69b4,
    12px 6px 0 0 #ffb6c1,
    13px 6px 0 0 #ff69b4,
    14px 6px 0 0 #2d1b2e,
    /* Row 7 - goggle frame top */
    6px 7px 0 0 #2d1b2e,
    7px 7px 0 0 #ff69b4,
    8px 7px 0 0 #e91e8c,
    9px 7px 0 0 #e91e8c,
    10px 7px 0 0 #ff69b4,
    11px 7px 0 0 #e91e8c,
    12px 7px 0 0 #e91e8c,
    13px 7px 0 0 #ff69b4,
    14px 7px 0 0 #2d1b2e,
    /* Row 8 - goggle lenses */
    6px 8px 0 0 #2d1b2e,
    7px 8px 0 0 #ff69b4,
    8px 8px 0 0 #e91e8c,
    9px 8px 0 0 #ffffff,
    10px 8px 0 0 #ffd700,
    11px 8px 0 0 #e91e8c,
    12px 8px 0 0 #ffffff,
    13px 8px 0 0 #ff69b4,
    14px 8px 0 0 #2d1b2e,
    /* Row 9 - goggle frame bottom */
    6px 9px 0 0 #2d1b2e,
    7px 9px 0 0 #ff69b4,
    8px 9px 0 0 #e91e8c,
    9px 9px 0 0 #e91e8c,
    10px 9px 0 0 #ff69b4,
    11px 9px 0 0 #e91e8c,
    12px 9px 0 0 #e91e8c,
    13px 9px 0 0 #ff69b4,
    14px 9px 0 0 #2d1b2e,
    /* Row 10 - snout */
    7px 10px 0 0 #2d1b2e,
    8px 10px 0 0 #ff69b4,
    9px 10px 0 0 #ff69b4,
    10px 10px 0 0 #ffb6c1,
    11px 10px 0 0 #ff69b4,
    12px 10px 0 0 #ff69b4,
    13px 10px 0 0 #2d1b2e,
    /* Row 11 - nose & mouth */
    7px 11px 0 0 #2d1b2e,
    8px 11px 0 0 #ff69b4,
    9px 11px 0 0 #ff1493,
    10px 11px 0 0 #2d1b2e,
    11px 11px 0 0 #ff1493,
    12px 11px 0 0 #ff69b4,
    13px 11px 0 0 #2d1b2e,
    /* Row 12 - chin */
    8px 12px 0 0 #2d1b2e,
    9px 12px 0 0 #2d1b2e,
    10px 12px 0 0 #2d1b2e,
    11px 12px 0 0 #2d1b2e,
    12px 12px 0 0 #2d1b2e,

    /* === Body === */
    /* Row 13 - neck */
    9px 13px 0 0 #2d1b2e,
    10px 13px 0 0 #ff69b4,
    11px 13px 0 0 #2d1b2e,
    /* Row 14 - upper body */
    7px 14px 0 0 #2d1b2e,
    8px 14px 0 0 #2d1b2e,
    9px 14px 0 0 #ff69b4,
    10px 14px 0 0 #ff69b4,
    11px 14px 0 0 #ff69b4,
    12px 14px 0 0 #2d1b2e,
    13px 14px 0 0 #2d1b2e,
    /* Row 15 - body */
    6px 15px 0 0 #2d1b2e,
    7px 15px 0 0 #ff69b4,
    8px 15px 0 0 #ff69b4,
    9px 15px 0 0 #ffb6c1,
    10px 15px 0 0 #ff69b4,
    11px 15px 0 0 #ffb6c1,
    12px 15px 0 0 #ff69b4,
    13px 15px 0 0 #ff69b4,
    14px 15px 0 0 #2d1b2e,
    /* Row 16 - body */
    6px 16px 0 0 #2d1b2e,
    7px 16px 0 0 #ff69b4,
    8px 16px 0 0 #ff69b4,
    9px 16px 0 0 #ff69b4,
    10px 16px 0 0 #ff1493,
    11px 16px 0 0 #ff69b4,
    12px 16px 0 0 #ff69b4,
    13px 16px 0 0 #ff69b4,
    14px 16px 0 0 #2d1b2e,
    /* Row 17 - lower body */
    6px 17px 0 0 #2d1b2e,
    7px 17px 0 0 #ff69b4,
    8px 17px 0 0 #ffb6c1,
    9px 17px 0 0 #ff69b4,
    10px 17px 0 0 #ff69b4,
    11px 17px 0 0 #ff69b4,
    12px 17px 0 0 #ffb6c1,
    13px 17px 0 0 #ff69b4,
    14px 17px 0 0 #2d1b2e,
    /* Row 18 - bottom body */
    7px 18px 0 0 #2d1b2e,
    8px 18px 0 0 #ff69b4,
    9px 18px 0 0 #ff69b4,
    10px 18px 0 0 #ff69b4,
    11px 18px 0 0 #ff69b4,
    12px 18px 0 0 #ff69b4,
    13px 18px 0 0 #2d1b2e,

    /* === Legs === */
    /* Row 19 */
    7px 19px 0 0 #2d1b2e,
    8px 19px 0 0 #ff69b4,
    9px 19px 0 0 #2d1b2e,
    11px 19px 0 0 #2d1b2e,
    12px 19px 0 0 #ff69b4,
    13px 19px 0 0 #2d1b2e,
    /* Row 20 - feet */
    7px 20px 0 0 #2d1b2e,
    8px 20px 0 0 #ffb6c1,
    9px 20px 0 0 #2d1b2e,
    11px 20px 0 0 #2d1b2e,
    12px 20px 0 0 #ffb6c1,
    13px 20px 0 0 #2d1b2e,
    /* Row 21 - paws */
    7px 21px 0 0 #2d1b2e,
    8px 21px 0 0 #2d1b2e,
    9px 21px 0 0 #2d1b2e,
    11px 21px 0 0 #2d1b2e,
    12px 21px 0 0 #2d1b2e,
    13px 21px 0 0 #2d1b2e,

    /* === Tail === */
    14px 14px 0 0 #2d1b2e,
    15px 13px 0 0 #2d1b2e,
    15px 14px 0 0 #ff69b4,
    16px 12px 0 0 #2d1b2e,
    16px 13px 0 0 #ff1493,
    17px 11px 0 0 #2d1b2e,
    17px 12px 0 0 #2d1b2e;
}

/* --- Responsive: Scale pixel art below 600px --- */
@media (max-width: 600px) {
  .art-element::after {
    transform: scale(4);
  }
}

/* --- Content Section (right column) --- */
.content {
  padding: 2rem;
}

/* --- Typography --- */
h1 {
  font-family: 'Press Start 2P', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--color-primary);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.age {
  font-family: 'Press Start 2P', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: clamp(0.875rem, 2vw, 1.25rem);
  color: var(--color-secondary);
  margin-bottom: 1.5rem;
}

.description {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-text);
  max-width: 50ch;
}

/* --- Animated Background Gradient --- */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    135deg,
    hsl(330, 30%, 10%) 0%,
    hsl(340, 40%, 15%) 50%,
    hsl(330, 30%, 10%) 100%
  );
  background-size: 200% 200%;
  animation: gradient-shift 15s ease infinite;
  z-index: -1;
}

/* --- Links & Interactive Elements --- */
a {
  color: var(--color-primary);
  text-decoration: underline;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

a:hover,
a:focus {
  color: var(--color-secondary);
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* --- Responsive: Single-column reflow at 768px --- */
@media (max-width: 768px) {
  main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .art-element {
    order: -1;
    min-height: 150px;
  }

  .content {
    padding: 1rem;
  }

  h1 {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }

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

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