/* === Joy's Library — BookTok Portfolio === */

:root {
  --pink: #FF6B8A;
  --purple: #7C5CFC;
  --teal: #00C9A7;
  --orange: #FFB84D;
  --lavender: #E8D5F5;
  --light-pink: #FFF0F3;
  --dark: #2D2040;
  --text: #4A3F5C;
  --light: #FAF7FF;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--light);
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: var(--dark);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === Floating Books === */
.floating-books {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-book {
  position: absolute;
  top: -50px;
  font-size: 28px;
  opacity: 0.12;
  animation: floatDown 18s linear infinite;
}

@keyframes floatDown {
  0% { transform: translateY(-50px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.12; }
  90% { opacity: 0.12; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

/* === Navbar === */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(250, 247, 255, 0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid rgba(124, 92, 252, 0.1);
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--purple);
}

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--purple);
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(135deg, var(--light-pink) 0%, var(--lavender) 50%, #D5E8FF 100%);
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--light));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 8px 24px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--purple);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 5.5rem);
  background: linear-gradient(135deg, var(--pink), var(--purple), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-icon {
  font-size: 2rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  opacity: 0.7;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.3);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 92, 252, 0.4);
}

/* === About === */
.about {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.about h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 60px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.about-card {
  background: white;
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 4px 24px rgba(45, 32, 64, 0.06);
  transition: transform 0.3s;
}

.about-card:hover {
  transform: translateY(-4px);
}

.about-emoji {
  font-size: 3rem;
  margin-bottom: 20px;
}

.about-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.about-card p {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.8;
}

/* === Favorites === */
.favorites {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--light) 0%, var(--light-pink) 100%);
  position: relative;
  z-index: 1;
}

.favorites h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.05rem;
  opacity: 0.7;
  margin-bottom: 50px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin-bottom: 40px;
}

.book-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(45, 32, 64, 0.06);
  transition: transform 0.3s;
  position: relative;
}

.book-card:hover {
  transform: translateY(-4px);
}

.book-spine {
  height: 6px;
  background: var(--accent);
}

.book-content {
  padding: 28px 24px;
}

.book-genre {
  display: inline-block;
  padding: 4px 14px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.book-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.book-card p {
  font-size: 0.9rem;
  opacity: 0.7;
  line-height: 1.5;
}

.books-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--purple);
  font-weight: 500;
}

/* === TikTok Section === */
.tiktok-section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.tiktok-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 40px;
}

.tiktok-card {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: 24px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 8px 40px rgba(45, 32, 64, 0.08);
}

.tiktok-icon {
  color: var(--dark);
  margin-bottom: 20px;
}

.tiktok-card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--dark);
}

.tiktok-card p {
  font-size: 1rem;
  opacity: 0.7;
  margin-bottom: 28px;
}

.tiktok-button {
  display: inline-block;
  padding: 14px 36px;
  background: var(--dark);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s, background 0.3s;
}

.tiktok-button:hover {
  transform: translateY(-2px);
  background: var(--purple);
}

/* === Footer === */
footer {
  padding: 50px 0;
  text-align: center;
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  z-index: 1;
}

.footer-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: white;
}

.footer-sub {
  font-size: 0.85rem;
  opacity: 0.6;
}

.footer-sub a {
  color: var(--lavender);
  text-decoration: none;
}

.footer-sub a:hover {
  text-decoration: underline;
}

/* === Responsive === */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 20px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-stats {
    gap: 24px;
  }

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

  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .tiktok-card {
    padding: 36px 28px;
  }
}

@media (max-width: 480px) {
  .books-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
