/* 
  Lulu's Cute World
  A calm, intimate digital notebook
  Soft violet palette, book-like typography
*/

:root {
  /* Colors */
  --primary-violet: #8b7ba8;
  --light-violet: #d4c5e2;
  --pale-violet: #f0ebf8;
  --deep-violet: #6b5b7f;
  --warm-gray: #8a8a8a;
  --off-white: #fafafa;
  
  /* Typography */
  --serif: "Georgia", "Garamond", serif;
  --sans: "Inter", "Segoe UI", sans-serif;
  --mono: "Monaco", "Courier New", monospace;
  
  /* Layout */
  --max-width: 1050px;
  --reading-width: 820px;
  --line-height: 1.8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--serif);
  font-size: 16px;
  line-height: var(--line-height);
  color: #333;
  background-color: var(--pale-violet);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: "Caveat", cursive;
  color: var(--deep-violet);
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 700;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-top: 0;
}

h2 {
  font-size: 2.5rem;
  border-bottom: 2px solid var(--light-violet);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.75rem;
}

p {
  margin-bottom: 1.2em;
}

a {
  color: var(--primary-violet);
  text-decoration: none;
  border-bottom: 1px solid var(--light-violet);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--deep-violet);
  border-bottom-color: var(--deep-violet);
}

strong {
  color: var(--deep-violet);
  font-weight: 600;
}

em {
  font-style: italic;
  color: var(--warm-gray);
}

/* Header & Navigation */
header {
  background-color: var(--deep-violet);
  border-bottom: 2px solid var(--primary-violet);
  padding: 0 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(107, 91, 127, 0.2);
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

 .logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--light-violet);
  border-bottom: none;
 }
 .logo img {
   height: 28px;
   width: auto;
   display: block;
   margin-right: 0.5rem;
 }
 @media (max-width: 768px) {
   .logo img {
     height: 22px;
   }
 }

.logo:hover {
  color: white;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  margin: 0.5rem 0;
  padding: 0;
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  font-family: "Caveat", cursive;
  font-size: 1.1rem;
  border-bottom: none;
  color: var(--light-violet);
  font-weight: 700;
}

.nav-links a:hover {
  color: white;
}

.nav-links a.active {
  color: white;
  border-bottom: 2px solid var(--light-violet);
  padding-bottom: 0.2rem;
}

/* Hamburger Menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  flex-direction: column;
  gap: 0.3rem;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background-color: var(--light-violet);
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Main Content */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, rgba(139, 123, 168, 0.1), rgba(212, 197, 226, 0.1));
  border-radius: 30px;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.tagline {
  font-style: italic;
  color: var(--primary-violet);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.hero > p {
  color: var(--warm-gray);
  font-size: 1rem;
  max-width: var(--reading-width);
  margin-left: auto;
  margin-right: auto;
}

.hero.hero-with-media > figure {
  margin: 0.5rem auto 0;
  width: 100%;
}

.hero.hero-with-media .hero-copy {
  width: 100%;
}

.hero.hero-with-media > figure img {
  display: block;
  width: 100%;
  max-width: 680px;
  max-height: 56vh;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 14px;
}

@media (min-width: 900px) {
  .hero.hero-with-media {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.5rem 2rem;
    align-items: stretch;
    text-align: left;
    padding: 2rem;
  }

  .hero.hero-with-media .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
  }

  .hero.hero-with-media h1 {
    font-size: 2.5rem;
  }

  .hero.hero-with-media p,
  .hero.hero-with-media .tagline,
  .hero.hero-with-media figcaption {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .hero.hero-with-media .hero-copy {
    grid-column: 1;
    margin-left: 0;
    margin-right: 0;
  }

  .hero.hero-with-media > figure {
    grid-column: 2;
    grid-row: 1 / span 6;
    align-self: center;
    margin: 0;
  }

  .hero.hero-with-media > figure img {
    max-width: 500px;
    max-height: 52vh;
    object-fit: contain;
  }
}

/* GIF Jumbotron */
.gif-jumbotron {
  text-align: center;
  margin: 2rem auto 3rem;
  padding: 2rem 1.25rem;
  background: linear-gradient(180deg, rgba(139,123,168,0.06), rgba(212,197,226,0.04));
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.gif-jumbotron .feature-gif {
  width: 320px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(107,91,127,0.08);
}

.gif-caption {
  font-family: var(--sans);
  color: var(--warm-gray);
  font-size: 0.95rem;
}

/* Gallery & Images */
.gallery {
  margin-top: 3rem;
}

.gallery h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.gallery img {
  width: 100%;
  max-width: 820px;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 0 auto 0.75rem;
  box-shadow: 0 4px 12px rgba(107, 91, 127, 0.1);
}

.gallery figure {
  margin: 0 0 2rem 0;
}

.gallery figcaption {
  font-style: italic;
  color: var(--warm-gray);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  text-align: center;
}

.gallery p {
  max-width: 100%;
  margin-bottom: 1.5rem;
  color: var(--warm-gray);
}

/* Gallery Grid */
.gallery-grid {
  margin-top: 4rem;
}

.gallery-grid h2 {
  margin-bottom: 1.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(107, 91, 127, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item img:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(107, 91, 127, 0.15);
}

/* Project Showcase */
.project-list {
  display: grid;
  gap: 2rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(139, 123, 168, 0.18);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 10px 28px rgba(107, 91, 127, 0.08);
}

.project-card h2 {
  margin-top: 0;
}

.project-card p {
  color: var(--warm-gray);
  max-width: var(--reading-width);
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.project-gallery figure {
  margin: 0;
}

.project-gallery img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 8px 20px rgba(107, 91, 127, 0.12);
}

.project-gallery figcaption {
  margin-top: 0.5rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--warm-gray);
}

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  border: none;
  background-color: var(--deep-violet);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.download-link:hover {
  color: #fff;
  background-color: var(--primary-violet);
  border-bottom: none;
  transform: translateY(-1px);
}

/* News + Game */
.news-body {
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.news-body main.news-page {
  flex: 1;
  min-height: 0;
}

.news-body footer {
  display: none;
}

.news-page {
  max-width: none;
  width: 100%;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.game-panel {
  margin: 0;
  width: 100%;
  min-height: calc(100dvh - 60px);
  padding: 0.75rem;
  background: linear-gradient(180deg, rgba(139, 123, 168, 0.08), rgba(212, 197, 226, 0.08));
  border-radius: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.game-panel h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

#brickBreakerCanvas {
  display: block;
  width: 100%;
  max-width: none;
  height: calc(100dvh - 125px);
  flex: none;
  min-height: 0;
  margin: 0 auto;
  background-color: #fff;
  border: 2px solid var(--light-violet);
  border-radius: 8px;
  touch-action: none;
}

.game-controls {
  margin-top: 0.5rem;
}

.game-button {
  border: none;
  border-radius: 999px;
  background-color: var(--deep-violet);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

.game-button:hover {
  background-color: var(--primary-violet);
}

.game-status {
  margin-top: 0.75rem;
  margin-bottom: 0;
  color: var(--warm-gray);
  font-family: var(--sans);
  font-size: 0.95rem;
}

/* Lists */
ul, ol {
  margin: 1.5em 0 1.5em 2em;
}

li {
  margin-bottom: 0.75em;
}

/* Footer */
footer {
  border-top: 1px solid var(--light-violet);
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  background-color: white;
  text-align: center;
}

.footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-text {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--warm-gray);
}

.news-page + footer {
  margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --max-width: 100%;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .logo {
    font-size: 0.9rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: center;
    background-color: var(--primary-violet);
    border-bottom: 2px solid var(--deep-violet);
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(107, 91, 127, 0.2);
    z-index: 99;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    font-size: 0.9rem;
    padding: 0.5rem 0;
  }

  nav {
    padding: 0 1rem;
  }

  main {
    padding: 2rem 1rem;
  }

  .news-body main.news-page {
    padding: 0;
  }

  .project-card {
    padding: 1.5rem;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-gallery img {
    height: auto;
    max-height: 420px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.8);
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .logo {
    font-size: 0.85rem;
  }

  .menu-toggle span {
    width: 18px;
    height: 1.5px;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .hero {
    padding: 1rem 0;
    margin-bottom: 2rem;
  }
}

