/* ============================================
   Harold Carver — Premium Author Website
   ============================================ */

/* --- Custom Properties --- */
:root {
  --bg-deep:       #0a0908;
  --bg-dark:       #12110f;
  --bg-card:       #1a1816;
  --bg-elevated:   #1f1d1a;

  --amber:         #c8a44e;
  --amber-light:   #dfc06a;
  --amber-dim:     #8c7235;
  --amber-glow:    rgba(200, 164, 78, 0.12);
  --wine:          #6b2a35;
  --wine-glow:     rgba(107, 42, 53, 0.15);

  --text-primary:  #ede4d3;
  --text-secondary:#a09586;
  --text-muted:    #5e564c;

  --font-display:  'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, sans-serif;

  --max-width:     1280px;
  --transition:    0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--amber); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--amber-light); }
img { max-width: 100%; display: block; }

::selection { background: var(--wine); color: var(--text-primary); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 48px; }

/* --- Grain Texture Overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Loader --- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 300;
  color: var(--text-primary);
  letter-spacing: 0.1em;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-text span { color: var(--amber); }

@keyframes loaderPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all 0.5s ease;
}

.nav.scrolled {
  background: rgba(10, 9, 8, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px 0;
  border-bottom: 1px solid rgba(200, 164, 78, 0.06);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--text-primary);
  letter-spacing: 0.08em;
}
.nav-logo:hover { color: var(--text-primary); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 48px;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--amber);
  transition: width var(--transition);
}

.nav-links a:hover, .nav-links a.active { color: var(--amber); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 7px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--text-primary);
  transition: all var(--transition);
  transform-origin: center;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  filter: saturate(0.6) brightness(0.4);
  transform: scale(1.05);
  transition: transform 8s ease-out;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,9,8,0.4) 0%, rgba(10,9,8,0.2) 40%, rgba(10,9,8,0.7) 80%, rgba(10,9,8,1) 100%),
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(10,9,8,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 24px;
}

.hero-badge {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 0.9;
  margin-bottom: 0;
}

.hero-title-line {
  display: block;
  font-size: clamp(4rem, 12vw, 9rem);
  color: var(--text-primary);
  opacity: 0;
  animation: fadeUp 1s ease 0.7s forwards;
}

.hero-title-line--italic {
  font-style: italic;
  font-weight: 400;
  color: var(--amber);
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px 0 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.1s forwards;
}

.hero-divider-line {
  width: 60px;
  height: 1px;
  background: var(--amber-dim);
}

.hero-divider-diamond {
  width: 6px;
  height: 6px;
  border: 1px solid var(--amber);
  transform: rotate(45deg);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  opacity: 0;
  animation: fadeUp 0.8s ease 1.3s forwards;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 56px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  animation: fadeUp 0.8s ease 1.5s forwards;
  transition: color var(--transition);
}

.hero-cta:hover { color: var(--amber); }
.hero-cta svg { transition: transform var(--transition); }
.hero-cta:hover svg { transform: translateY(4px); }

.hero-scroll {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.hero-scroll-track {
  width: 1px;
  height: 80px;
  background: rgba(200, 164, 78, 0.15);
  position: relative;
  overflow: hidden;
}

.hero-scroll-thumb {
  width: 1px;
  height: 30px;
  background: var(--amber);
  position: absolute;
  top: -30px;
  animation: scrollThumb 2.5s ease-in-out infinite;
}

@keyframes scrollThumb {
  0% { top: -30px; }
  100% { top: 80px; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Section Headers --- */
.section { padding: 140px 0; }

.section-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
}

.section-header--center {
  justify-content: center;
}

.section-number {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--amber);
  letter-spacing: 0.05em;
}

.section-line {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, var(--amber-dim), transparent);
}

.section-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Fade In --- */
.fade-in {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- About Section --- */
.about { background: var(--bg-dark); }

.about-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 100px;
  align-items: start;
}

.portrait-wrapper {
  position: relative;
  aspect-ratio: 3/4;
  max-width: 400px;
  overflow: hidden;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  filter: saturate(0.85) contrast(1.05);
}

.portrait-border {
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(200, 164, 78, 0.2);
  pointer-events: none;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 36px;
}

.about-body p {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.85;
  letter-spacing: 0.01em;
}

.about-quote {
  margin: 40px 0;
  padding: 28px 0 28px 28px;
  border-left: 2px solid var(--amber-dim);
}

.about-quote p {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

.about-stats {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(200, 164, 78, 0.08);
}

.stat { flex: 1; text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--amber);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(200, 164, 78, 0.12);
}

/* --- Gallery Strip --- */
.gallery-strip {
  padding: 0;
  overflow: hidden;
  background: var(--bg-deep);
}

.gallery-strip-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.5) brightness(0.7);
  transition: all 0.6s ease;
}

.gallery-item:hover img {
  filter: saturate(0.8) brightness(0.85);
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 20px 16px;
  background: linear-gradient(transparent, rgba(10,9,8,0.9));
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.4s ease;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* --- Books Section --- */
.books { background: var(--bg-deep); }

.books-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.books-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 72px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px 40px;
}

.book-card { text-align: center; }

/* 3D Book */
.book-3d {
  position: relative;
  width: 200px;
  height: 290px;
  margin: 0 auto 24px;
  perspective: 1200px;
  cursor: pointer;
}

.book-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: left center;
  transform: rotateY(-12deg);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease;
  box-shadow:
    6px 6px 18px rgba(0,0,0,0.5),
    1px 1px 3px rgba(0,0,0,0.3);
  z-index: 2;
}

.book-3d:hover .book-cover {
  transform: rotateY(-25deg);
  box-shadow:
    12px 8px 28px rgba(0,0,0,0.6),
    2px 2px 6px rgba(0,0,0,0.4);
}

.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 30px;
  transform-origin: left center;
  transform: rotateY(60deg) translateX(-15px);
  z-index: 1;
}

.book-pages {
  position: absolute;
  right: -4px;
  top: 4px;
  bottom: 4px;
  width: 28px;
  background: linear-gradient(90deg, #d4c5a0, #e8dcc4, #d4c5a0);
  transform: rotateY(-12deg) translateZ(-2px);
  z-index: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.2);
}

.book-3d:hover .book-pages {
  transform: rotateY(-25deg) translateZ(-2px);
}

.book-cover-content {
  position: relative;
  z-index: 1;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  align-items: center;
}

.book-year {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 20px;
}

.book-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 8px;
}

.book-subtitle {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
}

.book-author {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: auto;
  padding-top: 20px;
}

/* Book cover colors */
.cover-1 {
  background: linear-gradient(170deg, #3a2d18 0%, #1f1608 50%, #2d2210 100%);
  border: 1px solid rgba(200, 164, 78, 0.2);
}
.cover-1::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(232, 197, 71, 0.1) 0%, transparent 60%);
}
.spine-1 { background: linear-gradient(90deg, #2a1f0f, #3a2d18); }

.cover-2 {
  background: linear-gradient(150deg, #381c10 0%, #1c0c06 50%, #2d1610 100%);
  border: 1px solid rgba(180, 80, 40, 0.2);
}
.cover-2::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 100, 30, 0.06) 0%, transparent 60%);
}
.spine-2 { background: linear-gradient(90deg, #1c0c06, #381c10); }

.cover-3 {
  background: linear-gradient(160deg, #1a2826 0%, #0c1614 50%, #14201e 100%);
  border: 1px solid rgba(100, 170, 150, 0.15);
}
.cover-3::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 5px, rgba(100,170,150,0.03) 5px, rgba(100,170,150,0.03) 6px);
}
.spine-3 { background: linear-gradient(90deg, #0c1614, #1a2826); }

.cover-4 {
  background: linear-gradient(145deg, #351828 0%, #1c0c16 50%, #2a1220 100%);
  border: 1px solid rgba(156, 61, 78, 0.2);
}
.cover-4::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 60%, rgba(156, 61, 78, 0.1) 0%, transparent 50%);
}
.spine-4 { background: linear-gradient(90deg, #1c0c16, #351828); }

.cover-5 {
  background: linear-gradient(155deg, #282020 0%, #141010 50%, #1e1616 100%);
  border: 1px solid rgba(200, 120, 80, 0.15);
}
.cover-5::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(255, 120, 50, 0.06) 0%, transparent 50%);
}
.spine-5 { background: linear-gradient(90deg, #141010, #282020); }

.cover-6 {
  background: linear-gradient(160deg, #0c1828 0%, #060c16 50%, #0a1220 100%);
  border: 1px solid rgba(80, 130, 190, 0.15);
}
.cover-6::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(80, 130, 190, 0.06) 0%, transparent 60%);
}
.spine-6 { background: linear-gradient(90deg, #060c16, #0c1828); }

.book-meta h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.book-meta p {
  font-size: 0.8rem;
  font-weight: 300;
  color: var(--text-muted);
}

/* --- Essays Section --- */
.essays { background: var(--bg-dark); }

.essays-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.essays-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 64px;
}

.essays-list { display: flex; flex-direction: column; }

.essay-row {
  display: grid;
  grid-template-columns: 60px 1fr 160px;
  gap: 40px;
  align-items: start;
  padding: 48px 0;
  border-top: 1px solid rgba(200, 164, 78, 0.06);
  transition: background 0.4s ease;
}

.essay-row:last-child {
  border-bottom: 1px solid rgba(200, 164, 78, 0.06);
}

.essay-row:hover {
  background: rgba(200, 164, 78, 0.02);
}

.essay-number {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--amber-dim);
  padding-top: 4px;
}

.essay-category {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 12px;
}

.essay-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 12px;
  transition: color var(--transition);
}

.essay-row:hover .essay-title { color: var(--amber); }

.essay-excerpt {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.7;
}

.essay-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  text-align: right;
}

.essay-date {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.essay-read {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-muted);
}

.essay-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-top: 12px;
  transition: letter-spacing 0.3s ease;
}

.essay-link:hover { letter-spacing: 0.18em; }

/* --- Contact Section --- */
.contact {
  padding: 160px 0;
  background: var(--bg-deep);
  text-align: center;
}

.contact-inner { max-width: 600px; margin: 0 auto; }

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 24px;
  line-height: 1.2;
}

.contact-text {
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin-bottom: 40px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--amber);
  padding: 8px 0;
  border-bottom: 1px solid rgba(200, 164, 78, 0.25);
  margin-bottom: 56px;
  transition: border-color var(--transition);
}

.contact-email:hover { border-color: var(--amber); }

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid rgba(200, 164, 78, 0.12);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.social-link:hover {
  color: var(--amber);
  border-color: rgba(200, 164, 78, 0.3);
  background: rgba(200, 164, 78, 0.04);
}

/* --- Footer --- */
.footer {
  padding: 32px 0;
  border-top: 1px solid rgba(200, 164, 78, 0.06);
  background: var(--bg-deep);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy { font-size: 0.7rem; font-weight: 300; color: var(--text-muted); }
.footer-tagline { font-family: var(--font-display); font-size: 0.85rem; font-style: italic; color: var(--text-muted); }
.footer-top { font-size: 0.65rem; font-weight: 500; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); }
.footer-top:hover { color: var(--amber); }

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
  .about-grid { gap: 64px; }
}

@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .nav-inner { padding: 0 24px; }
  .section { padding: 100px 0; }

  .nav-toggle { display: flex; z-index: 1001; }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(10, 9, 8, 0.98);
    backdrop-filter: blur(24px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 36px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  .nav-links.open { opacity: 1; visibility: visible; }

  .nav-links a {
    font-size: 1.1rem;
    letter-spacing: 0.15em;
  }

  .nav-toggle.open span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .about-portrait {
    display: flex;
    justify-content: center;
  }

  .portrait-wrapper { max-width: 320px; }

  .about-stats { gap: 0; }

  .essay-row {
    grid-template-columns: 40px 1fr;
    gap: 20px;
  }

  .essay-side {
    grid-column: 2;
    text-align: left;
    flex-direction: row;
    gap: 16px;
    margin-top: 12px;
  }

  .gallery-strip-inner { grid-template-columns: 1fr; }
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(3) { display: none; }

  .hero-scroll { display: none; }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .section { padding: 80px 0; }

  .hero-title-line { font-size: 3.5rem; }

  .books-grid {
    grid-template-columns: 1fr;
    max-width: 240px;
    margin: 0 auto;
  }

  .book-3d { width: 180px; height: 260px; }

  .about-stats { flex-direction: column; gap: 24px; }
  .stat-divider { width: 40px; height: 1px; }

  .social-links { flex-direction: column; align-items: center; }

  .contact-email { font-size: 1.1rem; }
}
