:root {
  --bg: #f7f4ed;
  --surface: #ffffff;
  --text: #1f1a17;
  --muted: #4f4a46;
  --accent: #c7a264;
  --accent-2: #0e8a83;
  --border: #e2dacf;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg: #0f1216;
  --surface: #171b21;
  --text: #f5f0e6;
  --muted: #c6c1b8;
  --accent: #d6b26a;
  --accent-2: #40c9c2;
  --border: #242a31;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--muted);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 12px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 16px;
  background: var(--text);
  color: var(--bg);
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  background: rgba(247, 244, 237, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 9;
}

body.dark .site-header {
  background: rgba(15, 18, 22, 0.9);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
  overflow: hidden;
}

.brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.brand-tagline {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--border);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 18px;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-size: 15px;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--shadow);
}

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

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
}

.btn:hover {
  transform: translateY(-2px);
}

.link {
  font-weight: 600;
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.toggle-icon {
  font-size: 18px;
}

.hero {
  padding: 48px 0 64px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, rgba(199, 162, 100, 0.12), transparent 30%), radial-gradient(circle at 80% 0%, rgba(14, 138, 131, 0.12), transparent 25%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 36px;
}

.hero-copy h1 {
  font-size: 48px;
}

.hero-copy .lede {
  font-size: 18px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin: 18px 0;
  flex-wrap: wrap;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 8px;
}

.lede {
  font-size: 18px;
  max-width: 640px;
}

.thin {
  color: var(--muted);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.meta-title {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.meta-value {
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.hero-image {
  position: relative;
}

.hero-photo-frame {
  background: var(--surface);
  padding: 16px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.floating-card {
  position: absolute;
  bottom: 12px;
  left: -16px;
  background: var(--surface);
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 200px;
  font-weight: 600;
}

.small-label {
  font-size: 12px;
  color: var(--muted);
}

.scroll-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator span {
  display: block;
  width: 2px;
  height: 32px;
  background: linear-gradient(180deg, var(--accent-2), transparent);
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

.section {
  padding: 72px 0;
}

.section.accent {
  background: rgba(255, 255, 255, 0.6);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

body.dark .section.accent {
  background: rgba(23, 27, 33, 0.7);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
  align-items: center;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.section-media img {
  width: 100%;
  object-fit: cover;
  height: 100%;
}

.portrait-frame {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.cta-inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.book-card {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: center;
  box-shadow: var(--shadow);
}

.book-card.slim {
  grid-template-columns: 1fr;
  box-shadow: none;
}

.book-cover img {
  width: 100%;
  height: auto;
}

.book-meta li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
}

.book-meta strong {
  color: var(--text);
}

.book-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--border);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

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

.media-card img {
  height: 210px;
  width: 100%;
  object-fit: cover;
}

.media-info {
  padding: 12px;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.timeline-date {
  font-weight: 700;
  color: var(--accent-2);
  letter-spacing: 0.1em;
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  box-shadow: var(--shadow);
}

.video-embed .responsive-iframe {
  position: relative;
  padding-top: 56.25%;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  background: var(--surface);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

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

.video-card {
  display: grid;
  gap: 10px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-card {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.gallery-card img {
  width: 100%;
  display: block;
  height: 220px;
  object-fit: cover;
  cursor: zoom-in;
}

.gallery-card figcaption {
  padding: 12px;
  font-weight: 600;
  color: var(--text);
}

.gallery-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(199, 162, 100, 0.12), rgba(14, 138, 131, 0.12));
}

.gallery-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(199, 162, 100, 0.18), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(14, 138, 131, 0.15), transparent 35%);
  pointer-events: none;
}

.gallery-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.gallery-hero-note {
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.gallery-section {
  padding-top: 32px;
}

.gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 140px;
  gap: 14px;
}

.gallery-item {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 14px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.6) 80%);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.25));
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.gallery-item:hover::after,
.gallery-item:focus-within::after {
  opacity: 1;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.tall { grid-row: span 2; }

@media (max-width: 1100px) {
  .gallery-mosaic {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 160px;
  }
}

@media (max-width: 780px) {
  .gallery-hero-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 160px;
  }

  .span-3 { grid-column: span 2; }
}

@media (max-width: 520px) {
  .gallery-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
  }

  .span-2,
  .span-3,
  .tall {
    grid-column: span 1;
    grid-row: span 1;
  }
}

.video-thumb {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.video-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.play-pill {
  position: absolute;
  bottom: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.image-modal .modal-content {
  max-width: min(1400px, 95vw);
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.image-modal img {
  width: 100%;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.testimonial-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: center;
}

.testimonial-slider {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 18px;
  min-height: 160px;
  box-shadow: var(--shadow);
}

.testimonial {
  opacity: 0;
  transition: opacity 0.5s ease;
  position: absolute;
  inset: 0;
  padding: 18px;
}

.testimonial.active {
  opacity: 1;
  position: relative;
}

.newsletter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  align-items: center;
}

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.form input,
.form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 12px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  margin-bottom: 12px;
}

.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent-2);
  border-color: transparent;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.form-message {
  margin: 6px 0 0;
  font-weight: 600;
}

.small-note {
  color: var(--muted);
  font-size: 14px;
}

.social-links {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.social-links a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent-2);
}

.icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  align-items: start;
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-nav a {
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.footer-nav a:hover {
  border-color: var(--border);
}

.footer-meta {
  text-align: right;
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 20;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--surface);
  color: var(--text);
  padding: 20px;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  position: relative;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

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

  .book-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
  }
  body.nav-open .nav-links {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--surface);
    position: absolute;
    top: 62px;
    left: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  body.nav-open .nav-links a {
    width: 100%;
  }
  .site-header {
    position: sticky;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 32px 0 42px;
  }

  .section {
    padding: 56px 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .nav-actions .ghost {
    display: none;
  }
}
