/* ============================================
   PAIGE TURNER - Author Website Styles
   Library Jewel Tones Design System
   ~ with whimsy and wonder ~
   ============================================ */

/* --------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------- */
:root {
  /* Primary Colors - deeper, richer tones */
  --color-teal: #1D4B44;
  --color-teal-light: #2A5F56;
  --color-teal-dark: #153832;
  --color-teal-muted: rgba(29, 75, 68, 0.1);

  /* Accent Colors - deeper auburn/copper like the hair */
  --color-auburn: #9B3D2B;
  --color-auburn-light: #B84A35;
  --color-auburn-dark: #7A3022;
  --color-auburn-muted: rgba(155, 61, 43, 0.1);

  /* Femme accent - soft rose */
  --color-rose: #C47D7D;
  --color-rose-light: #D4A5A5;
  --color-rose-muted: rgba(196, 125, 125, 0.15);

  /* Gold accent for sparkle and embossed text */
  --color-gold: #C4A962;
  --color-gold-light: #D4C088;
  --color-gold-dark: #8B7355;

  /* Neutrals - warmer cream tones */
  --color-cream: #FBF8F1;
  --color-cream-dark: #F3EDE3;
  --color-cream-pink: #fff4f8;
  --color-white: #FFFFFF;
  --color-charcoal: #2D2A26;
  --color-gray: #6B6561;
  --color-gray-light: #9B9590;

  /* Typography */
  --font-serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-script: 'Playfair Display', Georgia, serif;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;

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

  /* Layout */
  --max-width-wide: 1200px;
  --max-width-content: 900px;
  --max-width-reading: 720px;

  /* Effects - softer, more rounded */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* Warmer, softer shadows */
  --shadow-sm: 0 2px 4px rgba(45, 42, 38, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 42, 38, 0.08);
  --shadow-lg: 0 8px 32px rgba(45, 42, 38, 0.1);
  --shadow-card: 0 2px 12px rgba(45, 42, 38, 0.05);
  --shadow-card-hover: 0 16px 40px rgba(45, 42, 38, 0.15);
  --shadow-glow: 0 0 20px rgba(196, 125, 125, 0.3);
  --shadow-gold-glow: 0 0 10px rgba(196, 169, 98, 0.4);

  --transition-fast: 150ms ease;
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------
   CSS Reset & Base Styles
   -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  background-color: var(--color-cream);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility class to prevent body scroll when modals are open */
body.no-scroll {
  overflow: hidden;
}

/* Scroll animation utility classes */
.scroll-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-animate.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Page transition effect */
.page-transition {
  animation: pageEnter 0.4s ease-out;
}

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

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  color: var(--color-teal);
  line-height: 1.3;
  overflow-wrap: break-word;
}

p {
  overflow-wrap: break-word;
}

/* Base link with flourish underline */
a {
  color: var(--color-auburn);
  text-decoration: none;
  transition: color var(--transition-base);
  position: relative;
}

a:hover {
  color: var(--color-auburn-light);
}

ul, ol {
  list-style: none;
}

::selection {
  background-color: var(--color-rose-muted);
  color: var(--color-teal-dark);
}

/* --------------------------------------------
   Typography
   -------------------------------------------- */
h1 {
  font-size: var(--text-4xl);
  font-weight: 400;
}

h2 {
  font-size: var(--text-3xl);
  font-weight: 400;
}

h3 {
  font-size: var(--text-2xl);
  font-weight: 400;
}

h4 {
  font-size: var(--text-xl);
  font-weight: 400;
}

.script-text {
  font-family: var(--font-script);
  font-style: italic;
}

.subheading {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  color: var(--color-gray);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.text-secondary {
  color: var(--color-gray);
}

.text-small {
  font-size: var(--text-sm);
}

/* Drop cap for chapter openings - extra fancy */
.drop-cap::first-letter {
  font-family: var(--font-script);
  float: left;
  font-size: 4rem;
  line-height: 0.85;
  padding-right: 0.6rem;
  padding-top: 0.1rem;
  color: var(--color-teal);
  font-weight: 400;
  font-style: italic;
}

/* --------------------------------------------
   Flourish Link Underlines
   -------------------------------------------- */
.flourish-link {
  position: relative;
  display: inline;
}

.flourish-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-auburn) 10%,
    var(--color-auburn) 90%,
    transparent 100%
  );
  transition: width var(--transition-base);
  border-radius: 2px;
}

.flourish-link::before {
  content: '~';
  position: absolute;
  bottom: -6px;
  left: -8px;
  font-size: 0.8em;
  color: var(--color-rose);
  opacity: 0;
  transform: scaleX(-1);
  transition: opacity var(--transition-base);
}

.flourish-link:hover::after {
  width: 100%;
}

.flourish-link:hover::before {
  opacity: 1;
}

/* --------------------------------------------
   Decorative Elements
   -------------------------------------------- */
.flourish {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  color: var(--color-rose);
}

.flourish::before,
.flourish::after {
  content: '';
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--color-rose-light), transparent);
}

.flourish__icon {
  font-size: var(--text-sm);
  opacity: 0.8;
}

/* Sparkle animation */
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(180deg); }
}

/* Pulse glow animation */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 5px rgba(196, 169, 98, 0.3); }
  50% { box-shadow: 0 0 15px rgba(196, 169, 98, 0.6), 0 0 30px rgba(196, 169, 98, 0.3); }
}

/* Gentle floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Shimmer animation for photo */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Hero photo entrance rotation */
@keyframes heroRotate {
  0% { transform: rotate(0deg); }
  20% { transform: rotate(0deg); }
  40% { transform: rotate(2deg); }
  60% { transform: rotate(2deg); }
  80% { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

/* Envelope open animation */
@keyframes envelopeOpen {
  0% { transform: rotateX(0deg); }
  50% { transform: rotateX(-30deg); }
  100% { transform: rotateX(0deg); }
}

/* --------------------------------------------
   Layout Components
   -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--content {
  max-width: var(--max-width-content);
}

.container--reading {
  max-width: var(--max-width-reading);
}

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

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

/* --------------------------------------------
   Navigation - Book Spine Style
   -------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  /* Book spine texture effect */
  background:
    linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%);
  box-shadow:
    var(--shadow-md),
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  /* Subtle leather texture */
  background-image:
    linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
}

.nav__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-lg);
  max-width: var(--max-width-wide);
  margin: 0 auto;
}

.nav__brand {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  pointer-events: none;
}

/* Show brand when scrolled (controlled by JS) */
.nav--scrolled .nav__brand {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Gold embossed text effect */
.nav__logo {
  font-family: var(--font-script);
  font-size: var(--text-xl);
  font-style: italic;
  text-decoration: none;
  letter-spacing: 0.02em;
  /* Gold embossed effect */
  color: var(--color-gold);
  text-shadow:
    0 1px 0 var(--color-gold-dark),
    0 2px 2px rgba(0, 0, 0, 0.2),
    0 0 10px rgba(196, 169, 98, 0.3);
  transition: all var(--transition-base);
}

.nav__logo:hover {
  color: var(--color-gold-light);
  text-shadow:
    0 1px 0 var(--color-gold),
    0 2px 2px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(196, 169, 98, 0.5);
}

/* Hide tagline in nav - just show Paige Turner */
.nav__tagline {
  display: none;
}

.nav__menu {
  display: flex;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-script);
  font-size: var(--text-lg);
  font-style: italic;
  /* Gold embossed text */
  color: var(--color-gold);
  text-shadow:
    0 1px 0 var(--color-gold-dark),
    0 1px 2px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  position: relative;
  transition: all var(--transition-base);
}

/* Underline on hover */
.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-gold);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  border-radius: 2px;
}

.nav__link:hover {
  color: var(--color-gold-light);
  text-shadow:
    0 1px 0 var(--color-gold),
    0 0 15px rgba(196, 169, 98, 0.4);
}

.nav__link:hover::after {
  width: calc(100% + 16px);
}

.nav__link--active {
  color: var(--color-gold-light);
}

.nav__link--active::after {
  width: calc(100% + 16px);
  opacity: 0.6;
}

/* Mobile Navigation Toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

.nav__toggle-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-gold);
  position: relative;
  transition: background-color var(--transition-fast);
  border-radius: 2px;
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--color-gold);
  left: 0;
  transition: transform var(--transition-base);
  border-radius: 2px;
}

.nav__toggle-icon::before {
  top: -7px;
}

.nav__toggle-icon::after {
  top: 7px;
}

.nav__toggle.is-active .nav__toggle-icon {
  background-color: transparent;
}

.nav__toggle.is-active .nav__toggle-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.is-active .nav__toggle-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --------------------------------------------
   Hero Section - More Whimsical
   -------------------------------------------- */
.hero {
  padding: var(--space-xl) 0 var(--space-2xl);
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-pink) 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle decorative background */
.hero::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--color-rose-muted) 0%, transparent 80%);
  pointer-events: none;
}

.hero__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  align-items: center;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
}

.hero__image-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
}

/* Decorative frame around image */
.hero__image-wrapper::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 2px solid var(--color-rose-light);
  border-radius: var(--radius-xl);
  opacity: 0.5;
  transform: rotate(-2deg);
  transition: all var(--transition-slow);
}

.hero__image-wrapper::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--color-gold-light);
  border-radius: var(--radius-xl);
  opacity: 0.4;
  transform: rotate(1deg);
  transition: all var(--transition-slow);
}

.hero__image {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(196, 125, 125, 0.15);
  position: relative;
  z-index: 1;
  transition: all var(--transition-slow);
  animation: heroRotate 2.5s ease-in-out 0.6s 1;
}

/* Slight rotation on hover */
.hero__image-wrapper:hover .hero__image {
  transform: rotate(2deg);
  box-shadow:
    var(--shadow-lg),
    0 0 60px rgba(196, 125, 125, 0.375),
    0 0 100px rgba(196, 169, 98, 0.225);
}

.hero__image-wrapper:hover::before {
  opacity: 0.8;
  transform: rotate(1deg);
}

.hero__image-wrapper:hover::after {
  opacity: 0.7;
  transform: rotate(2.5deg);
}

.hero__content {
  text-align: center;
}

.hero__title {
  font-family: var(--font-script);
  font-size: var(--text-5xl);
  font-style: italic;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--color-auburn);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 600;
}

.hero__description {
  font-size: var(--text-lg);
  max-width: 540px;
  margin: 0 auto var(--space-xl);
  color: var(--color-charcoal);
  line-height: 1.8;
}

/* --------------------------------------------
   Cards - With Page Curl Effect
   -------------------------------------------- */
.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  border: 1px solid transparent;
  position: relative;
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
  border-color: var(--color-rose-light);
}

.card--no-hover:hover {
  box-shadow: var(--shadow-card);
  transform: none;
  border-color: transparent;
}

.card__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.card__meta {
  font-size: var(--text-sm);
  color: var(--color-gray);
  margin-bottom: var(--space-sm);
}

.card__excerpt {
  color: var(--color-charcoal);
  margin-bottom: var(--space-md);
}

.card__link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  position: relative;
}

.card__link::after {
  content: '→';
  transition: all var(--transition-bounce);
  display: inline-block;
}

.card__link:hover::after {
  content: '⟶';
  transform: translateX(4px);
}

/* --------------------------------------------
   Grid Layouts
   -------------------------------------------- */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

.grid--3 {
  grid-template-columns: repeat(1, 1fr);
}

/* --------------------------------------------
   Buttons - More Feminine & Playful
   -------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.btn:hover::before {
  opacity: 1;
}

.btn--primary {
  background-color: transparent;
  color: var(--color-teal);
  border: 2px solid var(--color-teal);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-light) 100%);
  color: var(--color-white);
  border-color: var(--color-teal);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 75, 68, 0.4);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-auburn);
  border: 2px solid var(--color-auburn);
}

.btn--secondary:hover {
  background: linear-gradient(135deg, var(--color-auburn) 0%, var(--color-auburn-light) 100%);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(155, 61, 43, 0.3);
}

.btn--rose {
  background: linear-gradient(135deg, var(--color-rose) 0%, var(--color-auburn-light) 100%);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(196, 125, 125, 0.3);
}

.btn--rose:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 125, 125, 0.4);
}

.btn--small {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* Email button with envelope animation */
.btn--email {
  position: relative;
}

.btn--email .btn__icon {
  transition: transform var(--transition-base);
}

.btn--email:hover .btn__icon {
  animation: envelopeOpen 0.5s ease;
}

/* Discord button with sparkle */
.btn--discord {
  position: relative;
}

.btn--discord::after {
  content: '✦';
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 10px;
  color: var(--color-gold);
  opacity: 0;
  animation: none;
}

.btn--discord:hover::after {
  animation: sparkle 0.6s ease infinite;
}

/* --------------------------------------------
   Bio Section - More Personality
   -------------------------------------------- */
.bio {
  background: linear-gradient(180deg, var(--color-cream-pink) 0%, var(--color-white) 50%, var(--color-cream-pink) 100%);
  padding: var(--space-xl) 0 var(--space-xl);
  position: relative;
  box-shadow: 0 2px 20px rgba(45, 42, 38, 0.04);
}

.bio__content {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.bio__title {
  text-align: center;
  margin-bottom: var(--space-md);
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-3xl);
}

.bio__text {
  font-size: var(--text-lg);
  line-height: 1.9;
  text-align: center;
}

.bio__text p {
  margin-bottom: var(--space-lg);
}

.bio__text p:last-child {
  margin-bottom: 0;
}

/* Highlight key phrases */
.bio__text em {
  color: var(--color-auburn);
  font-style: normal;
  font-weight: 500;
}

.bio__cta {
  text-align: center;
  margin-top: var(--space-xl);
}

/* --------------------------------------------
   Journal Section
   -------------------------------------------- */
.journal {
  background-color: var(--color-white);
  padding: var(--space-xl) 0 var(--space-xl);
  box-shadow: 0 2px 20px rgba(45, 42, 38, 0.04);
  position: relative;
}

.journal__container {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.journal__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.journal__title {
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-3xl);
  margin: 0;
}

.journal__view-all {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-auburn);
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.journal__view-all:hover {
  color: var(--color-auburn-light);
  transform: translateX(4px);
}

/* Journal Card - Simpler design without images */
.journal-card {
  display: block;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-xl);
  transition: all var(--transition-base);
  border: 1px solid var(--color-cream-dark);
  text-decoration: none;
  color: inherit;
}

.journal-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
  border-color: var(--color-rose-light);
  color: inherit;
}

.journal-card__date {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-rose);
  margin-bottom: var(--space-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.journal-card__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  font-family: var(--font-script);
  font-style: italic;
  line-height: 1.3;
  color: var(--color-teal);
  transition: color var(--transition-fast);
}

.journal-card:hover .journal-card__title {
  color: var(--color-auburn);
}

.journal-card__excerpt {
  color: var(--color-charcoal);
  font-size: var(--text-lg);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}

.journal-card__link {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-auburn);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: all var(--transition-base);
}

.journal-card__link::after {
  content: '→';
  transition: all var(--transition-bounce);
  display: inline-block;
}

.journal-card__link:hover {
  color: var(--color-auburn-light);
}

.journal-card__link:hover::after {
  content: '⟶';
  transform: translateX(4px);
}

/* --------------------------------------------
   Featured Works Section
   -------------------------------------------- */
.featured {
  padding: var(--space-md) 0 var(--space-xl);
  background-color: var(--color-cream);
  box-shadow: 0 -2px 20px rgba(45, 42, 38, 0.04), 0 2px 20px rgba(45, 42, 38, 0.04);
  position: relative;
}

.featured__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.featured__title {
  margin-bottom: var(--space-sm);
  font-family: var(--font-script);
  font-style: italic;
}

.featured__subtitle {
  color: var(--color-gray);
  font-size: var(--text-lg);
}

.featured__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-xl);
  max-width: var(--max-width-wide);
  margin: 0 auto var(--space-2xl);
  padding: 0 var(--space-lg);
}

.featured__cta {
  text-align: center;
}

/* Work Card */
.work-card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid var(--color-cream-dark);
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.work-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-8px);
  border-color: var(--color-rose-light);
}

.work-card__image {
  width: 100%;
  aspect-ratio: 2 / 3;
  background-color: var(--color-teal-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Image wrapper for proper scaling */
.work-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* For square images that need letterboxing */
.work-card__image--letterbox img {
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.work-card:hover .work-card__image img {
  transform: scale(1.03);
}

.work-card__content {
  padding: var(--space-lg);
}

.work-card__tag {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-rose);
  background-color: var(--color-rose-muted);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-sm);
}

.work-card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
  font-family: var(--font-script);
  font-style: italic;
}

.work-card__excerpt {
  color: var(--color-gray);
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.work-card__links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* --------------------------------------------
   Connect Section - Warm & Inviting
   -------------------------------------------- */
.connect {
  background:
    linear-gradient(135deg, var(--color-teal) 0%, var(--color-teal-dark) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Decorative elements */
.connect::before {
  content: '✦';
  position: absolute;
  top: 20%;
  left: 10%;
  font-size: 2rem;
  color: var(--color-gold-light);
  opacity: 0.2;
  animation: float 4s ease-in-out infinite;
}

.connect::after {
  content: '✦';
  position: absolute;
  bottom: 25%;
  right: 15%;
  font-size: 1.5rem;
  color: var(--color-rose-light);
  opacity: 0.2;
  animation: float 5s ease-in-out infinite 1s;
}

.connect__content {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
}

.connect__title {
  color: var(--color-cream);
  margin-bottom: var(--space-md);
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-3xl);
}

.connect__text {
  color: rgba(251, 248, 241, 0.9);
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Centered button group for connect section */
.connect .btn-group {
  justify-content: center;
}

.connect .btn--primary,
.connect .btn--secondary {
  background-color: transparent;
  color: var(--color-cream);
  border: 2px solid var(--color-cream);
}

.connect .btn--primary:hover,
.connect .btn--secondary:hover {
  background: var(--color-cream);
  color: var(--color-teal);
  box-shadow: 0 6px 20px rgba(251, 248, 241, 0.3);
}

/* Newsletter Signup Form */
.connect__newsletter {
  max-width: 500px;
  margin: var(--space-2xl) auto 0;
  text-align: center;
}

.newsletter-form__group {
  display: flex;
  gap: var(--space-sm);
  max-width: 450px;
  margin: 0 auto;
}

.newsletter-form__input {
  flex: 1;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  border: 2px solid var(--color-cream);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  outline: none;
}

.newsletter-form__input::placeholder {
  color: var(--color-gray-light);
}

.newsletter-form__input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 4px rgba(196, 169, 98, 0.2);
}

.newsletter-form__button {
  padding: var(--space-md) var(--space-2xl);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-teal);
  background-color: var(--color-cream);
  border: 2px solid var(--color-cream);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.newsletter-form__button:hover {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(196, 169, 98, 0.4);
}

.newsletter-form__button:active {
  transform: translateY(0);
}

/* --------------------------------------------
   Back to Top Button - Bookmark Style
   -------------------------------------------- */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top__btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 40px;
  height: 70px;
  background: linear-gradient(180deg, var(--color-auburn) 0%, var(--color-auburn-dark) 100%);
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  padding-top: var(--space-sm);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  position: relative;
}

/* Ribbon tail */
.back-to-top__btn::before,
.back-to-top__btn::after {
  content: '';
  position: absolute;
  bottom: -10px;
  width: 20px;
  height: 20px;
  background: linear-gradient(180deg, var(--color-auburn-dark) 0%, var(--color-auburn) 100%);
}

.back-to-top__btn::before {
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.back-to-top__btn::after {
  right: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.back-to-top__btn:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.back-to-top__icon {
  color: var(--color-cream);
  font-size: var(--text-lg);
  transition: transform var(--transition-bounce);
}

.back-to-top__btn:hover .back-to-top__icon {
  transform: translateY(-3px);
}

/* --------------------------------------------
   Footer - Delicate & Charming
   -------------------------------------------- */
.footer {
  background:
    linear-gradient(135deg, var(--color-teal-dark) 0%, #122D28 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  padding: var(--space-xl) 0;
  text-align: center;
}

.footer__content {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.footer__text {
  color: rgba(251, 248, 241, 0.6);
  font-size: var(--text-sm);
}

.footer__heart {
  color: var(--color-rose);
  display: inline-block;
  animation: float 2s ease-in-out infinite;
}

.footer__link {
  color: rgba(251, 248, 241, 0.8);
  transition: color var(--transition-fast);
}

.footer__link:hover {
  color: var(--color-rose-light);
}

/* --------------------------------------------
   Blog Styles
   -------------------------------------------- */
.blog-list {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.blog-entry {
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-cream-dark);
  transition: all var(--transition-base);
}

.blog-entry:hover {
  padding-left: var(--space-md);
  border-left: 3px solid var(--color-rose);
  background: linear-gradient(90deg, var(--color-rose-muted), transparent);
}

.blog-entry:last-child {
  border-bottom: none;
}

.blog-entry__date {
  font-size: var(--text-sm);
  color: var(--color-rose);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.blog-entry__title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
  font-family: var(--font-script);
  font-style: italic;
}

.blog-entry__title a {
  color: var(--color-teal);
  transition: color var(--transition-fast);
}

.blog-entry__title a:hover {
  color: var(--color-auburn);
}

.blog-entry__excerpt {
  color: var(--color-charcoal);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.blog-entry__link {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.blog-entry__link::after {
  content: '→';
  transition: all var(--transition-bounce);
  display: inline-block;
}

.blog-entry__link:hover::after {
  content: '⟶';
  transform: translateX(4px);
}

/* Single Blog Post */
.blog-post {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
}

.blog-post__header {
  margin-bottom: var(--space-2xl);
  text-align: center;
}

.blog-post__date {
  font-size: var(--text-sm);
  color: var(--color-rose);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.blog-post__title {
  font-size: var(--text-3xl);
  font-family: var(--font-script);
  font-style: italic;
}

.blog-post__content {
  font-size: var(--text-lg);
  line-height: 1.9;
}

.blog-post__content p {
  margin-bottom: var(--space-lg);
}

.blog-post__content h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  font-family: var(--font-script);
  font-style: italic;
}

.blog-post__content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.blog-post__content ul,
.blog-post__content ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.blog-post__content ul {
  list-style-type: none;
}

.blog-post__content ul li::before {
  content: '✦';
  color: var(--color-rose);
  font-size: 0.6em;
  margin-right: var(--space-sm);
}

.blog-post__content ol {
  list-style-type: decimal;
}

.blog-post__content li {
  margin-bottom: var(--space-sm);
}

.blog-post__content strong {
  color: var(--color-teal);
}

.blog-post__nav {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-cream-dark);
}

/* Blog Post Images */
.blog-post__figure {
  margin: var(--space-xl) 0;
  text-align: center;
}

.blog-post__image {
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.blog-post__caption {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-gray);
  font-style: italic;
}

/* --------------------------------------------
   Library Page
   -------------------------------------------- */
.library {
  padding: var(--space-xl) 0;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-pink) 100%);
}

.library__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding: 0 var(--space-lg);
}

.library__title {
  margin-bottom: var(--space-sm);
  font-family: var(--font-script);
  font-style: italic;
}

.library__subtitle {
  color: var(--color-gray);
  font-size: var(--text-lg);
}

.library__section {
  max-width: var(--max-width-wide);
  margin: 0 auto var(--space-3xl);
  padding: 0 var(--space-lg);
  scroll-margin-top: 5rem;
}

.library__section-heading {
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-2xl);
  color: var(--color-teal);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-teal-light);
}

.library__grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--space-xl);
}

/* --------------------------------------------
   About Page
   -------------------------------------------- */
.about {
  padding: var(--space-3xl) 0;
}

.about__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.about__image-wrapper {
  display: flex;
  justify-content: center;
}

.about__image {
  max-width: 350px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.about__content {
  max-width: var(--max-width-reading);
}

.about__title {
  font-family: var(--font-script);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.about__text {
  font-size: var(--text-lg);
  line-height: 1.9;
}

.about__text p {
  margin-bottom: var(--space-lg);
}

.about__text em {
  color: var(--color-auburn);
  font-style: normal;
  font-weight: 500;
}

/* --------------------------------------------
   Work Page (Cover + TOC)
   -------------------------------------------- */
.work-header {
  padding: var(--space-3xl) 0;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-pink) 100%);
}

.work-header__container {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.work-header__cover {
  display: flex;
  justify-content: center;
}

.work-header__image {
  max-width: 300px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(196, 125, 125, 0.1);
}

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

.work-header__title {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-sm);
  font-family: var(--font-script);
  font-style: italic;
}

.work-header__meta {
  color: var(--color-rose);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  font-weight: 500;
}

.work-header__description {
  font-size: var(--text-lg);
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* Table of Contents - More Elegant */
.toc {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.toc__container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.toc__title {
  text-align: center;
  margin-bottom: var(--space-xl);
  font-family: var(--font-script);
  font-style: italic;
}

.toc__list {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--color-cream-dark);
}

.toc__item {
  border-bottom: 1px solid var(--color-cream-dark);
}

.toc__item:last-child {
  border-bottom: none;
}

.toc__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  color: var(--color-charcoal);
  transition: all var(--transition-base);
}

.toc__link:hover {
  background: linear-gradient(90deg, var(--color-rose-muted), transparent);
  color: var(--color-teal);
  padding-left: calc(var(--space-xl) + var(--space-sm));
}

.toc__chapter-num {
  font-weight: 600;
  color: var(--color-rose);
  margin-right: var(--space-md);
  font-size: var(--text-sm);
}

.toc__chapter-title {
  flex: 1;
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-lg);
}

.toc__arrow {
  color: var(--color-gray-light);
  transition: all var(--transition-bounce);
}

.toc__link:hover .toc__arrow {
  transform: translateX(6px);
  color: var(--color-auburn);
}

/* --------------------------------------------
   Chapter Page
   -------------------------------------------- */
.chapter {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.chapter__container {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.chapter__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-cream-dark);
  position: relative;
}

/* Decorative flourish under chapter header */
.chapter__header::after {
  content: '✦ ✦ ✦';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-cream);
  padding: 0 var(--space-md);
  color: var(--color-rose-light);
  font-size: var(--text-sm);
  letter-spacing: 0.5em;
}

.chapter__story-title {
  font-family: var(--font-script);
  font-size: var(--text-4xl);
  font-style: italic;
  color: var(--color-teal);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.03em;
}

.chapter__story-title::before,
.chapter__story-title::after {
  content: '✦';
  color: var(--color-rose-light);
  font-size: 0.6em;
  margin: 0 0.5em;
  opacity: 0.7;
}

.chapter__number {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-rose);
  margin-bottom: var(--space-sm);
}

.chapter__title {
  font-size: var(--text-2xl);
  font-family: var(--font-script);
  font-style: italic;
}

.chapter__content {
  font-size: var(--text-lg);
  line-height: 1.9;
}

.chapter__content p {
  margin-bottom: var(--space-lg);
  text-indent: 1.5em;
}

.chapter__content p:first-of-type {
  text-indent: 0;
}

.chapter__content p:first-of-type.drop-cap::first-letter {
  font-family: var(--font-script);
  float: left;
  font-size: 4.5rem;
  line-height: 0.75;
  padding-right: 0.6rem;
  padding-top: 0.15rem;
  color: var(--color-teal);
  font-style: italic;
}

/* Scene break */
.scene-break {
  text-align: center;
  margin: var(--space-2xl) 0;
  color: var(--color-rose);
  font-size: var(--text-sm);
  letter-spacing: 0.5em;
}

/* Chapter Dropdown (Top of Page) */
.chapter-nav-top {
  background-color: var(--color-cream-dark);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.chapter-nav-top__container {
  max-width: var(--max-width-reading);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* Chapter Navigation (Bottom of Page) */
.chapter-nav {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-cream-dark);
}

.chapter-nav__select {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  border: 2px solid var(--color-cream-dark);
  border-radius: var(--radius-full);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23C47D7D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-lg) center;
  transition: all var(--transition-base);
}

.chapter-nav__select:focus {
  outline: none;
  border-color: var(--color-rose);
  box-shadow: 0 0 0 4px var(--color-rose-muted);
}

.chapter-nav__links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.chapter-nav__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 600;
}

.chapter-nav__link--prev::before {
  content: '←';
  transition: all var(--transition-bounce);
  display: inline-block;
}

.chapter-nav__link--prev:hover::before {
  content: '⟵';
  transform: translateX(-4px);
}

.chapter-nav__link--next::after {
  content: '→';
  transition: all var(--transition-bounce);
  display: inline-block;
}

.chapter-nav__link--next:hover::after {
  content: '⟶';
  transform: translateX(4px);
}

.chapter-nav__link--toc {
  color: var(--color-gray);
}

.chapter-nav__link--toc:hover {
  color: var(--color-teal);
}

/* --------------------------------------------
   Page Header (for inner pages)
   -------------------------------------------- */
.page-header {
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-pink) 10%);
  padding: var(--space-2xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--color-cream-dark);
  position: relative;
  overflow: hidden;
}

/* Decorative radial gradient accent */
.page-header::before {
  content: '';
  position: absolute;
  top: -10%;
  right: 10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-rose-muted) 0%, transparent 70%);
  pointer-events: none;
}

.page-header__title {
  margin-bottom: var(--space-sm);
  font-family: var(--font-script);
  font-style: italic;
  text-align: center;
}

.page-header__subtitle {
  color: var(--color-gray);
  font-size: var(--text-lg);
  text-align: center;
}

.library-jump-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  max-width: var(--max-width-wide);
  margin: 0 auto var(--space-2xl);
  padding: var(--space-sm) var(--space-lg) var(--space-lg);
}

.library-jump-nav__label {
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-xl);
  color: var(--color-gray);
}

.library-jump-nav__btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-lg);
  color: var(--color-teal);
  text-decoration: none;
  padding: var(--space-xs) var(--space-lg);
  border: 1.5px solid var(--color-teal-light);
  border-radius: var(--radius-full);
  background: transparent;
  transition: all var(--transition-base);
  cursor: pointer;
}

.library-jump-nav__btn:hover {
  background-color: var(--color-teal);
  color: var(--color-white);
  border-color: var(--color-teal);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(29, 75, 68, 0.25);
}

/* --------------------------------------------
   404 Error Page
   -------------------------------------------- */
.error-404 {
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) 0;
  background: linear-gradient(180deg, var(--color-cream) 0%, var(--color-cream-pink) 50%, var(--color-cream) 100%);
  position: relative;
}

/* Subtle decorative background */
.error-404::before {
  content: '';
  position: absolute;
  top: 20%;
  right: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--color-rose-muted) 0%, transparent 70%);
  pointer-events: none;
}

.error-404::after {
  content: '';
  position: absolute;
  bottom: 15%;
  left: -5%;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, var(--color-teal-muted) 0%, transparent 70%);
  pointer-events: none;
}

.error-404__container {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  position: relative;
  z-index: 1;
}

.error-404__content {
  text-align: center;
  background-color: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-lg) var(--space-xl) var(--space-2xl);
  border: 1px solid var(--color-cream-dark);
}

.error-404__number {
  font-family: var(--font-script);
  font-size: 5rem;
  font-style: italic;
  color: var(--color-auburn);
  line-height: 1;
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.error-404__number::before,
.error-404__number::after {
  content: '✦';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: var(--color-rose-light);
  opacity: 0.6;
}

.error-404__number::before {
  left: -2.5rem;
}

.error-404__number::after {
  right: -2.5rem;
}

.error-404__title {
  font-family: var(--font-script);
  font-size: var(--text-3xl);
  font-style: italic;
  color: var(--color-teal);
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.error-404__message {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-charcoal);
  margin-bottom: var(--space-md);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.error-404__message:last-of-type {
  margin-bottom: var(--space-lg);
}

.error-404__message em {
  color: var(--color-auburn);
  font-style: italic;
}

.error-404__links {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* --------------------------------------------
   Utility Classes
   -------------------------------------------- */
.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.mb-0 { margin-bottom: 0; }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------
   Responsive Styles
   -------------------------------------------- */

/* Small tablets (640px) */
@media (min-width: 640px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .library__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets (768px) */
@media (min-width: 768px) {
  h1 {
    font-size: var(--text-5xl);
  }

  .hero__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .hero__content {
    text-align: left;
  }

  .hero__title {
    font-size: var(--text-6xl);
  }

  .hero__description {
    margin: 0 0 var(--space-xl);
  }

  .btn-group {
    justify-content: flex-start;
  }

  .error-404__number {
    font-size: 6rem;
  }

  .error-404__number::before {
    left: -3rem;
  }

  .error-404__number::after {
    right: -3rem;
  }

  .error-404__title {
    font-size: var(--text-4xl);
  }

  .error-404__message {
    font-size: var(--text-lg);
  }

  .error-404__content {
    padding: var(--space-xl) var(--space-3xl) var(--space-3xl);
  }

  .connect .btn-group {
    justify-content: center;
  }

  .work-header__container {
    grid-template-columns: auto 1fr;
    text-align: left;
  }

  .work-header__info {
    text-align: left;
  }

  .work-header__description {
    margin: 0;
  }

  .about__container {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .about__image-wrapper {
    position: sticky;
    top: var(--space-2xl);
    align-self: start;
  }
}

/* Laptops (1024px) */
@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .library__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nav__toggle {
    display: none;
  }
}

/* Mobile Navigation */
@media (max-width: 1023px) {
  .nav__toggle {
    display: block;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background:
      linear-gradient(180deg, var(--color-teal) 0%, var(--color-teal-dark) 100%),
      url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-xl);
    transition: right var(--transition-base);
    box-shadow: var(--shadow-lg);
  }

  .nav__menu.is-open {
    right: 0;
  }

  .nav__link {
    font-size: var(--text-lg);
  }

  .nav__overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }

  .nav__overlay.is-visible {
    display: block;
  }

  /* Always show brand on mobile */
  .nav__brand {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  /* Stack newsletter form vertically on mobile */
  .newsletter-form__group {
    flex-direction: column;
  }

  .newsletter-form__button {
    width: 100%;
  }
}

/* Placeholder image styles */
.placeholder-image {
  background: linear-gradient(135deg, var(--color-cream-dark) 0%, var(--color-cream-pink) 50%, var(--color-cream) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-rose);
  font-size: var(--text-sm);
  font-style: italic;
  text-align: center;
  padding: var(--space-md);
}

/* Lightbox overlay for images */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(29, 75, 68, 0.97);
  animation: lightboxFadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
}

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: lightboxZoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.lightbox__caption {
  position: absolute;
  bottom: -2.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-cream);
  font-family: var(--font-script);
  font-style: italic;
  font-size: var(--text-base);
  text-align: center;
  width: 100%;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  background: none;
  border: none;
  color: var(--color-cream);
  font-size: var(--text-4xl);
  cursor: pointer;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  line-height: 1;
  padding: 0;
  background-color: rgba(255, 255, 255, 0.1);
}

.lightbox__close:hover {
  background-color: var(--color-rose);
  transform: rotate(90deg);
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lightboxZoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
