/*
 * Stylesheet for the CJ dedication page.
 *
 * This design aims to capture a gentle, pastel‑infused 90s/early 2000s vibe
 * reminiscent of personal blogs like LiveJournal and early Tumblr. Soft
 * colours, subtle textures and playful shapes are used throughout to evoke
 * nostalgia while keeping the layout modern and tidy.
 */

/* CSS custom properties to centralise colours and fonts */
:root {
  --background-colour: #fdf1f7;
  --primary-colour:   #d7d5ec;
  --secondary-colour: #f7ccd4;
  --accent-colour:    #bfaee0;
  --nav-bg:           #e5e4f1;
  --nav-border:       #b0a4ca;
  --text-colour:      #3a3546;
  --font-heading:     'Playfair Display', serif;
  --font-body:        'Courier Prime', monospace;
  --font-pixel:       'Press Start 2P', cursive;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-body), monospace;
  color: var(--text-colour);
  background-color: var(--background-colour);
  background-image: url('images/page-bg.png');
  background-repeat: repeat;
  background-size: 400px;
}

header {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-image: url('images/header-pattern.png');
  background-repeat: repeat;
  background-size: 300px;
  border-bottom: 4px solid var(--primary-colour);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-overlay {
  background: rgba(255, 255, 255, 0.8);
  padding: 20px 40px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  text-align: center;
}

header h1 {
  margin: 0;
  font-size: 1.4rem;
  font-family: var(--font-pixel), cursive;
  color: var(--text-colour);
  text-shadow: none;
}

header p {
  margin: 4px 0 0;
  font-size: 0.7rem;
  color: var(--text-colour);
  font-family: var(--font-pixel), cursive;
}

.page-container {
  display: flex;
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px;
  box-sizing: border-box;
}

.sidebar {
  width: 180px;
  background: var(--nav-bg);
  border: 3px solid var(--nav-border);
  border-radius: 8px;
  padding: 20px 10px;
  box-sizing: border-box;
  margin-right: 30px;
  display: flex;
  flex-direction: column;
  font-family: var(--font-pixel), cursive;
  color: var(--text-colour);
  box-shadow: 0 4px 0 var(--nav-border);
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.sidebar li {
  margin-bottom: 16px;
}

.sidebar a {
  color: var(--text-colour);
  text-decoration: none;
  font-size: 0.7rem;
}

.sidebar a:hover {
  text-decoration: underline;
}

.star-wrapper {
  margin-top: auto;
  text-align: center;
}

.star-wrapper img {
  width: 80px;
}

.content {
  flex: 1;
}

section {
  margin-bottom: 60px;
}

h2 {
  font-family: var(--font-pixel), cursive;
  color: var(--text-colour);
  font-size: 1rem;
  margin-bottom: 16px;
  background: var(--nav-bg);
  border: 2px solid var(--nav-border);
  border-radius: 6px;
  padding: 8px 12px;
  display: inline-block;
}

.intro {
  margin-top: 0;
  margin-bottom: 20px;
  font-style: italic;
  color: #555;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.gallery figure {
  margin: 0;
  background: var(--nav-bg);
  border: 3px solid var(--nav-border);
  border-radius: 6px;
  box-shadow: 0 4px 0 var(--nav-border);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.gallery figure:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 0 var(--nav-border);
}

.gallery img {
  display: block;
  width: 100%;
  height: auto;
}

.gallery figcaption {
  padding: 8px;
  font-size: 0.7rem;
  text-align: center;
  background-color: var(--primary-colour);
  color: #fff;
  font-family: var(--font-pixel), cursive;
}

.spotify-wrapper {
  background: var(--nav-bg);
  border: 3px solid var(--nav-border);
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 4px 0 var(--nav-border);
}

.spotify-wrapper iframe {
  width: 100%;
  border: none;
  border-radius: 8px;
}

footer {
  text-align: center;
  padding: 20px;
  background-color: var(--primary-colour);
  color: #fff;
  font-size: 0.7rem;
  font-family: var(--font-pixel), cursive;
  border-top: 4px solid var(--nav-border);
}

@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.6rem;
  }
}

.carousel {
  overflow: hidden;
  width: 90%;
  max-width: 800px;
  margin: 40px auto;
  border: 3px solid var(--nav-border);
  background: var(--nav-bg);
  border-radius: 8px;
  padding: 10px;
}

.carousel-track {
  display: flex;
  width: max-content;
  animation: scroll 120s linear infinite;
}

.carousel-track img {
  height: 180px;
  margin-right: 10px;
  border-radius: 6px;
  border: 2px solid var(--secondary-colour);
}

@keyframes scroll {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

@media (max-width: 768px) {
  .page-container {
    flex-direction: column;
    padding: 20px 10px;
  }

  .sidebar {
    width: 100%;
    margin-right: 0;
    margin-bottom: 20px;
    text-align: center;
  }

  .sidebar ul {
    flex-direction: row;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sidebar li {
    margin: 0;
  }

  .sidebar a {
    font-size: 0.65rem;
  }

  .star-wrapper {
    margin-top: 10px;
  }

  .content {
    width: 100%;
  }

  .carousel {
    max-width: 100%;
    padding: 8px;
  }

  .carousel-track img {
    height: 120px;
  }

  h2 {
    font-size: 1.2rem;
  }

  header h1 {
    font-size: 1rem;
  }

  header p {
    font-size: 0.6rem;
  }

  .gallery {
    grid-template-columns: 1fr; /* Stack gallery items */
  }

  .gallery figure {
    margin-bottom: 20px;
  }

  footer {
    font-size: 0.65rem;
    padding: 16px;
  }
}
