:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #1a1a1a;
  --muted: #7a7a7a;
  --border: #e6e6e6;
  --secondary: #f5f5f5;
  --accent: #f7f4ef;
  --shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Lato", "Segoe UI", sans-serif;
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.logo {
  font-family: "Playfair Display", serif;
  font-weight: 400;
  margin-top: 0;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.main-content {
  padding-top: 80px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.logo {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
}

.site-nav {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.site-nav a {
  color: rgba(26, 26, 26, 0.75);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a.active {
  color: var(--foreground);
  border-color: var(--foreground);
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--foreground);
}

.page {
  min-height: 100vh;
  padding: 96px 0;
}

.hero-section {
  padding: 48px 0 96px;
}

.hero-grid,
.about-grid,
.contact-grid,
.novel-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}

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

.hero-subtitle,
.text-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  display: block;
  margin-bottom: 16px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
}

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

.actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: 1px solid var(--foreground);
  font-size: 0.95rem;
  font-weight: 500;
  background: var(--foreground);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.outline {
  background: transparent;
  color: var(--foreground);
}

.media-frame {
  position: relative;
  background: var(--secondary);
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.media-frame:hover img {
  transform: scale(1.05);
}

.hero-media {
  aspect-ratio: 4 / 5;
}

.about-section {
  background: rgba(245, 245, 245, 0.6);
  padding: 96px 0;
}

.about-text p {
  color: var(--muted);
  margin-top: 0;
}

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.link-inline:hover {
  gap: 16px;
}

.portfolio-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 32px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  flex-wrap: wrap;
}

.filter-button {
  background: none;
  border: none;
  padding: 0 0 4px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.filter-button.active {
  color: var(--foreground);
  border-color: var(--foreground);
}

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

.portfolio-item {
  cursor: pointer;
}

.portfolio-media {
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--secondary);
  overflow: hidden;
  margin-bottom: 16px;
}

.portfolio-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
}

.portfolio-item:hover .portfolio-media::after {
  background: rgba(0, 0, 0, 0.1);
}

.portfolio-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.portfolio-item:hover .portfolio-media img {
  transform: scale(1.05);
}

.portfolio-item h3 {
  margin-bottom: 4px;
}

.portfolio-item:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.portfolio-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-top: 4px;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 64px 0;
}

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

.sticky {
  position: sticky;
  top: 120px;
}

.book-cover {
  aspect-ratio: 2 / 3;
  background: var(--secondary);
  box-shadow: var(--shadow);
}

.quote {
  border-left: 2px solid rgba(26, 26, 26, 0.2);
  padding-left: 24px;
  color: var(--muted);
  font-style: italic;
  margin: 32px 0;
}

.contact-card {
  background: rgba(245, 245, 245, 0.6);
  padding: 32px;
}

.contact-meta {
  display: grid;
  gap: 16px;
  font-size: 0.95rem;
}

.contact-meta span {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--muted);
  margin-bottom: 6px;
}

.form {
  display: grid;
  gap: 20px;
}

.form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.form input,
.form textarea {
  width: 100%;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-size: 0.95rem;
  border-radius: 0;
  background: #fff;
}

.site-footer {
  background: var(--secondary);
  padding: 48px 0;
  margin-top: 80px;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--foreground);
}

.footer-note {
  font-size: 0.75rem;
  color: var(--muted);
}

@media (min-width: 900px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .novel-grid {
    grid-template-columns: minmax(280px, 360px) 1fr;
  }

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .site-nav {
    gap: 16px;
    letter-spacing: 0.18em;
  }

  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 16px 0;
  }

  .main-content {
    padding-top: 120px;
  }
}
