/* ================================================
   MIRIAM IMPERFECTLY - MAIN STYLESHEET
   Early 2000s Scrapbook Blog Aesthetic
   ================================================ */

/* ROOT VARIABLES - Easy customization */
:root {
  /* Colors */
  --bg-cream: #fdf6ee;
  --text-brown: #4a3f35;
  --accent-pink: #f8c8dc;
  --accent-lavender: #dcd6f7;
  --accent-mint: #c7f0db;
  --accent-blue: #cfe8ff;
  
  /* Spacing */
  --nav-height: 60px;
  
  /* Effects */
  --shadow-soft: 0 4px 12px rgba(74, 63, 53, 0.08);
  --shadow-medium: 0 8px 24px rgba(74, 63, 53, 0.12);
}

/* ================================================
   RESET & BASE STYLES
   ================================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Georgia', 'Garamond', serif;
  background-color: var(--bg-cream);
  color: var(--text-brown);
  line-height: 1.6;
  overflow-x: hidden;
  /* Custom cursor placeholder */
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><circle cx="16" cy="16" r="6" fill="%23f8c8dc"/><circle cx="16" cy="16" r="10" fill="none" stroke="%23f8c8dc" stroke-width="1.5"/></svg>') 16 16, auto;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: normal;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  color: var(--text-brown);
}

h2 {
  font-size: 1.8rem;
  font-weight: normal;
  letter-spacing: 1px;
  margin: 1.5rem 0 0.8rem 0;
  color: var(--text-brown);
}

h3 {
  font-size: 1.3rem;
  font-weight: normal;
  margin: 1.2rem 0 0.6rem 0;
  color: var(--text-brown);
}

p {
  margin-bottom: 1rem;
  text-align: justify;
  font-size: 0.95rem;
}

a {
  color: var(--text-brown);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

a:hover {
  color: var(--accent-pink);
  border-bottom-color: var(--accent-pink);
}

/* ================================================
   NAVIGATION BAR
   ================================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-lavender) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: var(--shadow-medium);
  /* Faux "PNG button" style */
  border-bottom: 3px solid rgba(248, 200, 220, 0.5);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1200px;
}

nav a {
  font-size: 0.9rem;
  letter-spacing: 1px;
  color: var(--text-brown);
  font-weight: 500;
  position: relative;
  display: inline-block;
}

/* Underline animation */
nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--text-brown);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

/* Active page indicator */
nav .active {
  color: var(--text-brown);
  font-weight: bold;
  text-decoration: underline;
  text-decoration-color: var(--text-brown);
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

/* ================================================
   MAIN LAYOUT
   ================================================ */

main {
  margin-top: calc(var(--nav-height) + 2rem);
  margin-bottom: 2rem;
  min-height: 80vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Content sections */
.section {
  margin: 3rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 10%;
  width: 80%;
  height: 8px;
  background: repeating-linear-gradient(
    90deg,
    var(--accent-pink) 0px,
    var(--accent-pink) 10px,
    transparent 10px,
    transparent 20px
  );
  opacity: 0.3;
}

/* ================================================
   DECORATIVE ELEMENTS
   ================================================ */

.sticker {
  display: inline-block;
  font-size: 2rem;
  margin: 0 0.3rem;
  animation: float 3s ease-in-out infinite;
}

.sticker:nth-child(2) {
  animation-delay: 0.1s;
}

.sticker:nth-child(3) {
  animation-delay: 0.2s;
}

.sticker:nth-child(4) {
  animation-delay: 0.3s;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.decorative {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
}

/* Scattered decorations */
.decoration-1 {
  top: -15px;
  left: 5%;
  font-size: 2.5rem;
  transform: rotate(-15deg);
}

.decoration-2 {
  top: 50px;
  right: 8%;
  font-size: 2rem;
  transform: rotate(25deg);
}

.decoration-3 {
  bottom: -20px;
  left: 15%;
  font-size: 1.8rem;
  transform: rotate(-30deg);
}

.decoration-4 {
  bottom: 20px;
  right: 10%;
  font-size: 2.2rem;
  transform: rotate(15deg);
}

/* Sparkle effect */
.sparkle {
  display: inline-block;
  color: #ffd700;
  font-weight: bold;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ================================================
   PROFILE BOX (about.html)
   ================================================ */

.profile-box {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2.5rem;
  background: linear-gradient(135deg, rgba(248, 200, 220, 0.1) 0%, rgba(220, 214, 247, 0.1) 100%);
  border-radius: 12px;
  border-left: 4px solid var(--accent-pink);
  margin: 2rem 0;
  position: relative;
}

.profile-box::before {
  content: '📌';
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 1.5rem;
  transform: rotate(-25deg);
}

.profile-image {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent-lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--shadow-medium);
  border: 3px solid var(--accent-pink);
}

.profile-content h3 {
  margin-top: 0;
  color: var(--text-brown);
}

.fun-facts {
  list-style: none;
  margin: 1rem 0;
}

.fun-facts li {
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
}

.fun-facts li::before {
  content: '✨';
  position: absolute;
  left: 0;
}

/* ================================================
   BLOG POST STYLES (posts.html)
   ================================================ */

.post {
  margin: 2.5rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border-left: 5px solid var(--accent-blue);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.post::before {
  content: '📝';
  position: absolute;
  top: -12px;
  left: 30px;
  font-size: 1.8rem;
  transform: rotate(-20deg);
}

.post-date {
  font-size: 0.85rem;
  color: var(--accent-pink);
  font-style: italic;
  margin-bottom: 0.8rem;
  letter-spacing: 1px;
}

.post-title {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text-brown);
}

.post p {
  margin-bottom: 1rem;
}

.post-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: var(--shadow-soft);
  border: 3px solid var(--accent-mint);
}

/* ================================================
   BOOK REVIEW STYLES (books.html)
   ================================================ */

.book-section {
  margin: 2rem 0;
}

.book-item {
  background: rgba(220, 214, 247, 0.15);
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
  border-left: 4px solid var(--accent-lavender);
  position: relative;
}

.book-item::before {
  content: '📚';
  position: absolute;
  top: -8px;
  left: 15px;
  font-size: 1.3rem;
}

.book-title {
  font-weight: bold;
  color: var(--text-brown);
  margin-bottom: 0.3rem;
}

.book-author {
  font-size: 0.85rem;
  color: var(--accent-pink);
  margin-bottom: 0.8rem;
  font-style: italic;
}

.star-rating {
  display: inline-block;
  color: #ffd700;
  font-size: 1.2rem;
  letter-spacing: 2px;
  margin-bottom: 0.8rem;
}

.book-review {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ================================================
   RECIPE STYLES (recipes.html)
   ================================================ */

.recipe-card {
  background: linear-gradient(135deg, rgba(199, 240, 219, 0.15) 0%, rgba(207, 232, 255, 0.15) 100%);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 8px;
  border-top: 4px dashed var(--accent-mint);
  position: relative;
}

.recipe-card::before {
  content: '🍳';
  position: absolute;
  top: -15px;
  right: 30px;
  font-size: 2rem;
  transform: rotate(15deg);
}

.recipe-title {
  margin-top: 0;
}

.ingredients-list {
  background: rgba(255, 255, 255, 0.6);
  padding: 1.5rem;
  border-radius: 6px;
  margin: 1.5rem 0;
}

.ingredients-list li {
  list-style: none;
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.ingredients-list li::before {
  content: '✔';
  position: absolute;
  left: 0;
  color: var(--accent-mint);
  font-weight: bold;
}

.instructions-list {
  margin: 1.5rem 0;
}

.instructions-list li {
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(248, 200, 220, 0.1);
  border-radius: 6px;
  list-style: none;
  counter-increment: step-counter;
  padding-left: 2.5rem;
  position: relative;
}

.instructions-list {
  counter-reset: step-counter;
}

.instructions-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--accent-pink);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}

/* ================================================
   GALLERY STYLES (gallery.html)
   ================================================ */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.polaroid {
  background: white;
  padding: 12px;
  box-shadow: var(--shadow-medium);
  border-radius: 2px;
  transform: rotate(-2deg);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.polaroid:nth-child(even) {
  transform: rotate(2deg);
}

.polaroid:hover {
  transform: rotate(0deg) scale(1.05);
  box-shadow: 0 12px 32px rgba(74, 63, 53, 0.18);
}

.polaroid-image {
  width: 100%;
  height: 200px;
  background: var(--accent-lavender);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 1rem;
  color: rgba(74, 63, 53, 0.2);
}

.polaroid-caption {
  font-size: 0.75rem;
  color: var(--text-brown);
  font-family: 'Comic Sans MS', cursive;
  text-align: center;
}

.polaroid-sticker {
  position: absolute;
  font-size: 1.2rem;
  opacity: 0.7;
}

.sticker-1 { top: -8px; right: 10%; transform: rotate(20deg); }
.sticker-2 { top: 10%; right: -8px; transform: rotate(-15deg); }
.sticker-3 { bottom: 15%; left: -8px; transform: rotate(25deg); }

/* ================================================
   GUESTBOOK STYLES (guestbook.html)
   ================================================ */

.guestbook-entry {
  background: linear-gradient(135deg, rgba(207, 232, 255, 0.3) 0%, rgba(199, 240, 219, 0.2) 100%);
  padding: 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
  border-left: 4px solid var(--accent-blue);
  position: relative;
}

.guestbook-entry::before {
  content: '✍️';
  position: absolute;
  top: -10px;
  left: 20px;
}

.entry-name {
  font-weight: bold;
  color: var(--text-brown);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.entry-date {
  font-size: 0.75rem;
  color: var(--accent-pink);
  margin-bottom: 0.8rem;
  font-style: italic;
}

.entry-message {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-brown);
}

/* ================================================
   BUTTON & INTERACTIVE STYLES
   ================================================ */

.button {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  margin: 0.5rem;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-lavender) 100%);
  color: var(--text-brown);
  border: 2px solid var(--text-brown);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  font-family: 'Georgia', serif;
  position: relative;
  overflow: hidden;
}

.button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(248, 200, 220, 0.4);
}

.button:hover::before {
  width: 300px;
  height: 300px;
}

.button.secondary {
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-blue) 100%);
}

/* Control buttons (fixed position) */
.control-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  z-index: 999;
}

.control-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-lavender) 100%);
  border: 2px solid var(--text-brown);
  color: var(--text-brown);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-medium);
  font-weight: bold;
}

.control-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(248, 200, 220, 0.5);
}

.control-btn.active {
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-blue) 100%);
}

/* ================================================
   EASTER EGG & EFFECTS
   ================================================ */

.secret-message {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-lavender) 100%);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(74, 63, 53, 0.3);
  z-index: 2000;
  text-align: center;
  animation: secretReveal 0.6s ease-out;
}

@keyframes secretReveal {
  0% {
    transform: translate(-50%, -50%) scale(0.3);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

.secret-message.show {
  display: block;
}

.secret-message h2 {
  margin-top: 0;
  font-size: 2rem;
}

/* ================================================
   MUSIC PLAYER POPUP
   ================================================ */

.music-popup {
  display: none;
  position: fixed;
  bottom: 7rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--accent-lavender) 0%, var(--accent-blue) 100%);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-medium);
  z-index: 998;
  min-width: 280px;
  animation: popupSlide 0.4s ease-out;
  border: 2px solid var(--text-brown);
}

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

.music-popup.show {
  display: block;
}

.music-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.music-header h3 {
  margin: 0;
  font-size: 1rem;
}

.music-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-brown);
}

.current-song {
  font-size: 0.85rem;
  color: var(--text-brown);
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  text-align: center;
  font-style: italic;
}

/* ================================================
   FALLING STARS/EFFECTS
   ================================================ */

.falling-star {
  position: fixed;
  font-size: 1.5rem;
  opacity: 0.6;
  pointer-events: none;
  z-index: 500;
  animation: fall linear infinite;
}

.falling-heart {
  position: fixed;
  font-size: 1.2rem;
  opacity: 0.5;
  pointer-events: none;
  z-index: 500;
  animation: fall-heart linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(360deg);
    opacity: 0;
  }
}

@keyframes fall-heart {
  to {
    transform: translateY(100vh) rotate(360deg) sway;
    opacity: 0;
  }
}

/* ================================================
   FOOTER
   ================================================ */

footer {
  background: linear-gradient(135deg, var(--accent-mint) 0%, var(--accent-blue) 100%);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
  border-top: 3px solid var(--accent-pink);
  position: relative;
}

footer::before {
  content: '💌';
  display: block;
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

footer p {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  text-align: center;
}

footer a {
  border-bottom: 2px solid var(--text-brown);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.4rem;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.8rem;
  }

  .container {
    padding: 0 1rem;
  }

  .section {
    padding: 1.5rem;
  }

  .profile-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-image {
    width: 120px;
    height: 120px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .control-buttons {
    bottom: 1rem;
    right: 1rem;
  }

  .control-btn {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }

  .music-popup {
    bottom: 6rem;
    right: 1rem;
    min-width: 250px;
  }

  .post {
    padding: 1.5rem;
  }

  .recipe-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  main {
    margin-top: calc(var(--nav-height) + 1rem);
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  nav ul {
    gap: 0.8rem;
    font-size: 0.7rem;
  }

  .section::before {
    display: none;
  }

  .decoration-1,
  .decoration-2,
  .decoration-3,
  .decoration-4 {
    display: none;
  }

  .control-buttons {
    flex-direction: row;
    gap: 0.5rem;
  }

  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 0.9rem;
  }
}