/*
Theme Name: Author Theme v1.4
Theme URI: https://catheyrhamy.com
Author: Custom Theme
Author URI: https://catheyrhamy.com
Description: A clean, elegant WordPress theme designed for cozy mystery author Cathey Rhamy. Features smooth animations, a welcoming author bio section, and subtle mystery-themed design elements.
Version: 1.4
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cathey-rhamy
Tags: author, blog, portfolio, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready
*/

/* ============================================
   CSS Custom Properties (Color Palette)
   ============================================ */
:root {
  --color-primary: oklch(67.11% 0.133 54.95); /* Warm coral/orange */
  --color-secondary: oklch(61.87% 0.064 103.87); /* Muted teal/sage */
  --color-accent: oklch(83.95% 0.068 96.44); /* Light cream/yellow */

  /* Derived colors */
  --color-primary-light: oklch(77.11% 0.1 54.95);
  --color-primary-dark: oklch(57.11% 0.15 54.95);
  --color-secondary-light: oklch(71.87% 0.05 103.87);
  --color-secondary-dark: oklch(51.87% 0.08 103.87);

  /* Neutral colors - Light Mode */
  --color-text: oklch(25% 0.01 0);
  --color-text-light: oklch(45% 0.01 0);
  --color-bg: oklch(98% 0.01 0);
  --color-bg-alt: oklch(95% 0.01 0);
  --color-border: oklch(85% 0.01 0);

  /* Typography */
  --font-primary: "Georgia", "Garamond", serif;
  --font-secondary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  --space-xxl: 6rem;

  /* Layout */
  --container-width: 1200px;
  --content-width: 800px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   Typography
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  color: var(--color-primary-dark);
}

h1 {
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2.5rem;
  font-weight: 400;
}

h3 {
  font-size: 2rem;
  font-weight: 400;
}

h4 {
  font-size: 1.5rem;
  font-weight: 500;
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

/* ============================================
   Layout Utilities
   ============================================ */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.content-wrapper {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section {
  padding: var(--space-xxl) 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

/* ============================================
   Header & Navigation
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  transition: all var(--transition-medium), background-color 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.site-header.scrolled {
  padding: var(--space-xs) 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  transition: padding var(--transition-medium);
}

.site-header.scrolled .header-inner {
  padding: var(--space-sm) 0;
}

.site-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin: 0;
  color: var(--color-primary);
  transition: font-size var(--transition-medium);
}

.site-header.scrolled .site-title {
  font-size: 1.5rem;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

/* Header Controls Wrapper */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Header Social Links */
.header-social-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: transparent;
  color: var(--color-text);
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.header-social-link:hover {
  background-color: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.header-social-link svg {
  width: 20px;
  height: 20px;
}

/* Navigation Menu */
.main-navigation {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  margin: 0;
}

.main-navigation a {
  font-family: var(--font-secondary);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) 0;
  position: relative;
}

.main-navigation a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

.main-navigation a:hover::after,
.main-navigation .current-menu-item a::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  color: var(--color-primary);
  font-size: 1.5rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 100px;
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-bg) 100%
  );
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0L35 25L60 30L35 35L30 60L25 35L0 30L25 25Z" fill="%23000" opacity="0.02"/></svg>');
  background-size: 60px 60px;
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-text h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  color: var(--color-primary-dark);
}

.hero-text .tagline {
  font-family: var(--font-primary);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-md);
}

.hero-text .bio {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.hero-image {
  text-align: center;
  opacity: 0;
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border: 8px solid var(--color-bg);
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

/* ============================================
   Coming Soon Section
   ============================================ */
.coming-soon-section {
  background: linear-gradient(to bottom, var(--color-bg), var(--color-accent));
  padding: var(--space-xxl) 0;
  position: relative;
}

.coming-soon-section::before {
  content: "📚";
  position: absolute;
  top: 20px;
  right: 10%;
  font-size: 4rem;
  opacity: 0.1;
}

.coming-soon-section::after {
  content: "☕";
  position: absolute;
  bottom: 20px;
  left: 10%;
  font-size: 4rem;
  opacity: 0.1;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  opacity: 0;
}

.section-title.fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

.coming-soon-content {
  background: white;
  border-radius: 8px;
  padding: var(--space-xl);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-top: 4px solid var(--color-primary);
  opacity: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.coming-soon-content.fade-in {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.series-info {
  text-align: center;
}

.series-title {
  font-size: 2.5rem;
  color: var(--color-secondary-dark);
  margin-bottom: var(--space-sm);
}

.series-description {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--color-text-light);
  max-width: 700px;
  margin: 0 auto var(--space-md);
}

.series-meta {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-accent);
  border-radius: 50px;
  font-weight: 500;
}

.meta-item::before {
  content: "✦";
  color: var(--color-primary);
}

/* ============================================
   Books Section
   ============================================ */
.books-section {
  background-color: var(--color-bg);
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.book-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-medium), background-color 0.3s ease,
    box-shadow 0.3s ease;
  opacity: 0;
}

.book-card.fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

.book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.book-cover {
  width: 100%;
  height: 400px;
  object-fit: cover;
  background-color: var(--color-accent);
}

.book-info {
  padding: var(--space-md);
}

.book-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-xs);
}

.book-series {
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-sm);
}

.book-description {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.book-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  border-radius: 50px;
  font-weight: 600;
  text-align: center;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ============================================
   Blog Section
   ============================================ */
.blog-section {
  background-color: var(--color-bg-alt);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.blog-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: all var(--transition-medium), background-color 0.3s ease,
    box-shadow 0.3s ease;
  opacity: 0;
}

.blog-card.fade-in {
  animation: fadeInUp 0.8s ease forwards;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background-color: var(--color-accent);
}

.blog-content {
  padding: var(--space-md);
}

.blog-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-sm);
}

.blog-title {
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
}

.blog-title a {
  color: var(--color-primary-dark);
}

.blog-excerpt {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
}

.read-more {
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.read-more::after {
  content: "→";
  transition: transform var(--transition-fast);
}

.read-more:hover::after {
  transform: translateX(5px);
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter-section {
  background: linear-gradient(
    135deg,
    var(--color-primary) 0%,
    var(--color-primary-dark) 100%
  );
  color: white;
  text-align: center;
}

.newsletter-section .section-title {
  color: white;
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-form {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  opacity: 0;
}

.newsletter-form.fade-in {
  animation: fadeInUp 0.8s ease 0.2s forwards;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: var(--space-md);
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  outline: none;
}

.newsletter-form button {
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.newsletter-form button:hover {
  background-color: var(--color-secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background-color: var(--color-primary-dark);
  color: white;
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h3 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
  color: white;
}

.footer-menu {
  list-style: none;
}

.footer-menu li {
  margin-bottom: var(--space-xs);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   Responsive Design
   ============================================ */
@media screen and (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .social-links {
    justify-content: center;
  }
}

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

  h2 {
    font-size: 2rem;
  }

  .main-navigation {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .main-navigation.active {
    display: block;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation li {
    border-bottom: 1px solid var(--color-border);
  }

  .main-navigation a {
    display: block;
    padding: var(--space-md);
  }

  .menu-toggle {
    display: block;
  }

  .header-controls {
    gap: var(--space-sm);
  }

  .header-social-links {
    display: none; /* Hide in mobile, show in hero section instead */
  }

  .books-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }
}

/* Dark mode for mobile navigation */
[data-theme="dark"] .main-navigation {
  background-color: var(--color-bg-alt);
}

/* ============================================
   Utility Classes
   ============================================ */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.text-center {
  text-align: center;
}

.mb-0 {
  margin-bottom: 0;
}
.mb-1 {
  margin-bottom: var(--space-xs);
}
.mb-2 {
  margin-bottom: var(--space-sm);
}
.mb-3 {
  margin-bottom: var(--space-md);
}
.mb-4 {
  margin-bottom: var(--space-lg);
}

.mt-0 {
  margin-top: 0;
}
.mt-1 {
  margin-top: var(--space-xs);
}
.mt-2 {
  margin-top: var(--space-sm);
}
.mt-3 {
  margin-top: var(--space-md);
}
.mt-4 {
  margin-top: var(--space-lg);
}

/* ============================================
   Dark Mode Styles
   ============================================ */
[data-theme="dark"] {
  --color-text: oklch(90% 0.01 0);
  --color-text-light: oklch(70% 0.01 0);
  --color-bg: oklch(20% 0.01 0);
  --color-bg-alt: oklch(25% 0.01 0);
  --color-border: oklch(35% 0.01 0);

  /* Adjust primary colors for dark mode */
  --color-primary: oklch(72% 0.12 54.95);
  --color-primary-light: oklch(82% 0.09 54.95);
  --color-primary-dark: oklch(62% 0.14 54.95);

  --color-secondary: oklch(66% 0.06 103.87);
  --color-secondary-light: oklch(76% 0.045 103.87);
  --color-secondary-dark: oklch(56% 0.075 103.87);

  --color-accent: oklch(35% 0.03 96.44);
}

[data-theme="dark"] body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

[data-theme="dark"] .site-header {
  background-color: rgba(32, 32, 32, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(
    135deg,
    var(--color-accent) 0%,
    var(--color-bg) 100%
  );
}

[data-theme="dark"] .hero-image img {
  border-color: var(--color-bg-alt);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .coming-soon-content,
[data-theme="dark"] .book-card,
[data-theme="dark"] .blog-card {
  background-color: var(--color-bg-alt);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .book-cover,
[data-theme="dark"] .blog-image {
  background-color: var(--color-bg);
}

[data-theme="dark"] .newsletter-form input[type="email"] {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

[data-theme="dark"] .newsletter-form input[type="email"]::placeholder {
  color: var(--color-text-light);
}

[data-theme="dark"] .site-footer {
  background-color: oklch(15% 0.01 0);
}

[data-theme="dark"] .search-field {
  background-color: var(--color-bg-alt) !important;
  color: var(--color-text) !important;
  border-color: var(--color-border) !important;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  background: none;
  border: 2px solid var(--color-border);
  border-radius: 50px;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  font-size: 1.25rem;
  transition: all var(--transition-fast);
  color: var(--color-text);
}

.theme-toggle:hover {
  border-color: var(--color-primary);
  background-color: var(--color-accent);
  transform: translateY(-2px);
}

.theme-toggle-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  position: relative;
}

.theme-toggle-icon::before {
  content: "☀️";
  position: absolute;
  transition: all var(--transition-medium);
}

[data-theme="dark"] .theme-toggle-icon::before {
  content: "🌙";
}

.theme-toggle-text {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media screen and (max-width: 768px) {
  .theme-toggle-text {
    display: none;
  }

  .theme-toggle {
    padding: var(--space-xs);
  }
}

.card-stack {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 500px;
  margin: 0 auto;
  perspective: 1500px; /* 3D perspective */
}

.card-stack-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.series-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--color-surface, white);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 2rem;

  /* Start all cards stacked beneath */
  transform: translateX(0) rotateY(0deg) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Active card - fully visible and interactive */
.series-card.active {
  transform: translateX(0) rotateY(0deg) scale(1);
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Next cards in stack - slightly visible behind */
.series-card:not(.active):not(.exiting) {
  transform: translateX(20px) rotateY(-15deg) scale(0.95);
  opacity: 0.5;
  z-index: 5;
}

/* Card being flipped away */
.series-card.exiting {
  transform: translateX(-100%) rotateY(90deg) scale(0.8);
  opacity: 0;
  z-index: 1;
}

/* Card content */
.series-card-content {
  height: 100%;
  overflow-y: auto;
}

.series-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.series-thumbnail {
  margin-bottom: 1.5rem;
}

.series-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.series-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.meta-item {
  background: var(--color-primary-light, #f0f0f0);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Navigation buttons */
.card-stack {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 500px;
  margin: 0 auto;
  perspective: 1500px; /* 3D perspective */
}

.card-stack-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.series-card {
  position: absolute;
  width: 100%;
  height: 100%;
  background: var(--color-surface, white);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 2rem;

  /* Start all cards stacked beneath */
  transform: translateX(0) rotateY(0deg) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Active card - fully visible and interactive */
.series-card.active {
  transform: translateX(0) rotateY(0deg) scale(1);
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

/* Next cards in stack - slightly visible behind */
.series-card:not(.active):not(.exiting) {
  transform: translateX(20px) rotateY(-15deg) scale(0.95);
  opacity: 0.5;
  z-index: 5;
}

/* Card being flipped away */
.series-card.exiting {
  transform: translateX(-100%) rotateY(90deg) scale(0.8);
  opacity: 0;
  z-index: 1;
}

/* Card content */
.series-card-content {
  height: 100%;
  overflow-y: auto;
}

.series-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.75rem;
}

.series-thumbnail {
  margin-bottom: 1.5rem;
}

.series-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.series-description {
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.series-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.meta-item {
  background: var(--color-primary-light, #f0f0f0);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
}

/* Navigation buttons */
.card-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.card-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.card-nav-prev {
  left: -60px;
}

.card-nav-next {
  right: -60px;
}

/* Responsive */
@media (max-width: 768px) {
  .card-nav-prev {
    left: 10px;
  }

  .card-nav-next {
    right: 10px;
  }
}

.author-signature {
  font-family: "Licorice", cursive;
  font-size: 2.5rem;
  display: block;
  margin-top: var(--space-md);
  color: var(--color-primary-dark);
}