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

:root {
  --red: #d41a2b;
  --red-dark: #a81522;
  --black: #0a0a0a;
  --black-light: #2a2a2a;
  --white: #f5f5f5;
  --gray: #888;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: #222222;
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  color: var(--red);
  text-decoration: none;
  transition: color 0.3s;
}

a:hover {
  color: var(--white);
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 26, 43, 0.2);
  transition: background 0.3s;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.5px;
  text-decoration: none;
}

nav .logo:hover {
  color: var(--white);
}

nav .nav-links a[aria-current="page"] {
  color: var(--red);
}

nav .nav-links a[aria-current="page"]::after {
  width: 100%;
}

nav .logo span {
  color: var(--red);
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav .nav-links a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: width 0.3s;
}

nav .nav-links a:hover::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 2px;
  background: var(--white);
  transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.hero video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 10, 0.5) 0%,
    rgba(10, 10, 10, 0.3) 50%,
    rgba(10, 10, 10, 0.9) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  line-height: 1.1;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.7);
}

.hero-content h1 span {
  color: var(--red);
}

.hero-content p {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 400;
  letter-spacing: 1px;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.7);
}

.hero-cta {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  background: var(--red);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(212, 26, 43, 0.3);
}

.hero-cta:hover {
  background: var(--red-dark);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(212, 26, 43, 0.4);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: bounce 2s infinite;
}

.scroll-indicator svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
  opacity: 0.5;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ===== SECTIONS ===== */
section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.section-title span {
  color: var(--red);
}

.section-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
}

.red-line {
  width: 60px;
  height: 3px;
  background: var(--red);
  margin-bottom: 2rem;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  border: 2px solid var(--red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(212, 26, 43, 0.15);
}

.about-text p {
  color: #ccc;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

/* ===== SLIDESHOW ===== */
.slideshow-section {
  max-width: 100%;
  padding: 6rem 0;
  overflow: hidden;
  background: #1a1a1a;
}

.slideshow-section .section-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.slideshow-track {
  display: flex;
  gap: 1.5rem;
  will-change: transform;
}

.slideshow-track img {
  height: 350px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(212, 26, 43, 0.15);
}

/* ===== BOOK ===== */
.book-section {
  max-width: 1200px;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 3.5rem;
  align-items: start;
}

.book-cover {
  position: relative;
}

.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 2px solid var(--red);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.55),
    0 4px 12px rgba(212, 26, 43, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.book-cover:hover img {
  transform: translateY(-4px);
  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.6),
    0 6px 16px rgba(212, 26, 43, 0.3);
}

.book-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

.book-subtitle {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.book-meta {
  color: var(--gray);
  font-size: 0.95rem;
  margin-bottom: 1.75rem;
  letter-spacing: 0.3px;
}

.book-blurb {
  color: #ccc;
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
}

.book-tagline {
  color: var(--white);
  font-weight: 600;
  font-size: 1.05rem;
  margin: 1.5rem 0 2rem;
  padding-left: 1rem;
  border-left: 3px solid var(--red);
}

.book-buy-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gray);
  margin-bottom: 1rem;
}

.book-retailers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.book-retailer {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 6px;
  color: var(--white);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(212, 26, 43, 0.35);
  transition: border-color 0.3s, transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}

a.book-retailer:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
}

.book-retailer-soon {
  background: var(--black-light);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  opacity: 0.45;
  cursor: default;
  font-weight: 500;
  position: relative;
}

.book-retailer-soon::after {
  content: 'soon';
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.5rem;
  color: var(--gray);
  font-weight: 600;
}

.book-buy-note {
  margin-top: 1rem;
  color: var(--gray);
  font-size: 0.9rem;
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--black-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--red);
  box-shadow: 0 12px 40px rgba(212, 26, 43, 0.15);
}

.project-card .project-icon {
  width: 48px;
  height: 48px;
  background: rgba(212, 26, 43, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card .project-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
}

.project-card .project-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.project-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.project-card p {
  color: var(--gray);
  font-size: 0.95rem;
  flex: 1;
}

.project-card .project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--red);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-card .project-link:hover {
  color: var(--white);
}

/* ===== CONNECT / SOCIAL ===== */
.social-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: var(--black-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  transition: border-color 0.3s, transform 0.3s;
  color: var(--white);
  font-weight: 500;
}

.social-link:hover {
  border-color: var(--red);
  transform: translateY(-3px);
  color: var(--white);
}

.social-link svg {
  width: 24px;
  height: 24px;
  fill: var(--red);
  flex-shrink: 0;
}

/* ===== CONNECT IMAGE ===== */
.connect-image {
  margin-top: 1.5rem;
  border-radius: 8px;
  overflow: hidden;
}

.connect-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  object-fit: cover;
  max-height: 400px;
  border: 2px solid var(--red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(212, 26, 43, 0.15);
}

/* ===== PAGE HERO (subpages) ===== */
.page-hero {
  height: 70vh;
  min-height: 420px;
}

.page-hero-essay {
  height: 75vh;
  min-height: 480px;
}

.page-hero .hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-kicker {
  font-size: 0.9rem !important;
  text-transform: uppercase;
  letter-spacing: 2px !important;
  margin-bottom: 1rem !important;
}

.hero-kicker a {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
}

.hero-kicker a:hover {
  color: var(--red);
}

.page-hero .hero-meta {
  font-size: 1rem !important;
  letter-spacing: 0.5px !important;
  margin-bottom: 1.75rem !important;
}

/* ===== ESSAYS LIST ===== */
.essays-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.essays-empty {
  text-align: center;
  padding: 4rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: var(--black-light);
}

.essays-empty p {
  color: var(--gray);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.essay-card {
  background: var(--black-light);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 2.25rem 2rem;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  overflow: hidden;
}

.essay-card-with-image {
  padding: 0;
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) 1.4fr;
  gap: 0;
  align-items: stretch;
}

.essay-card-image {
  display: block;
  min-height: 100%;
  background: #111;
  overflow: hidden;
}

.essay-card-image img {
  width: 100%;
  height: 100%;
  min-height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.essay-card:hover .essay-card-image img {
  transform: scale(1.04);
}

.essay-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 2.25rem 2rem;
}

.essay-card:hover {
  transform: translateY(-4px);
  border-color: var(--red);
  box-shadow: 0 12px 40px rgba(212, 26, 43, 0.15);
}

.essay-card-latest {
  border-color: rgba(212, 26, 43, 0.35);
  box-shadow: 0 8px 28px rgba(212, 26, 43, 0.12);
}

.essay-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.essay-card time {
  color: var(--gray);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.essay-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: rgba(212, 26, 43, 0.15);
  border: 1px solid rgba(212, 26, 43, 0.4);
  border-radius: 4px;
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.essay-card-title {
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.3px;
}

.essay-card-title a {
  color: var(--white);
  transition: color 0.3s;
}

.essay-card-title a:hover {
  color: var(--red);
}

.essay-excerpt {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.7;
  max-width: 820px;
}

.essay-card .project-link {
  margin-top: 0.25rem;
}

/* ===== ESSAY ARTICLE ===== */
.essay-section {
  max-width: 1200px;
}

.essay-article {
  max-width: 740px;
  margin: 0 auto;
}

.essay-header {
  margin-bottom: 2rem;
}

.essay-figure {
  margin: 0 0 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--red);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(212, 26, 43, 0.15);
}

.essay-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.essay-figure figcaption {
  padding: 0.85rem 1.1rem;
  background: rgba(10, 10, 10, 0.85);
  color: var(--gray);
  font-size: 0.9rem;
  line-height: 1.45;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.essay-back {
  display: inline-block;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  letter-spacing: 0.5px;
}

.essay-back:hover {
  color: var(--red);
}

.essay-header .section-title {
  margin-bottom: 0.75rem;
}

.essay-meta {
  color: var(--gray);
  font-size: 0.95rem;
}

.essay-author {
  color: #ccc;
  font-weight: 500;
}

.essay-meta-sep {
  margin: 0 0.5rem;
}

.essay-body p {
  color: #d0d0d0;
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.essay-body p:first-child {
  font-size: 1.2rem;
  color: #e0e0e0;
  border-left: 3px solid var(--red);
  padding-left: 1.25rem;
  margin-bottom: 2rem;
}

.essay-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}

footer .logo {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-decoration: none;
}

footer .logo:hover {
  color: var(--white);
}

footer .logo span {
  color: var(--red);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* --- Mobile Nav --- */
  nav {
    padding: 0.75rem 1.25rem;
  }

  nav .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: env(safe-area-inset-top, 80px);
    background: rgba(10, 10, 10, 0.5);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 100px;
    gap: 0;
    z-index: 999;
  }

  nav .nav-links.active {
    display: flex;
  }

  nav .nav-links li {
    width: 80%;
    text-align: center;
  }

  nav .nav-links a {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--white);
  }

  nav .nav-links a::after {
    display: none;
  }

  nav .nav-links a:active {
    color: var(--red);
  }

  .hamburger {
    display: flex;
    padding: 10px;
    gap: 6px;
  }

  .hamburger span {
    width: 32px;
    height: 3px;
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }

  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* --- Mobile About --- */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* --- Mobile Book --- */
  .book-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .book-cover {
    max-width: 240px;
    margin: 0 auto;
  }

  .book-retailers {
    gap: 0.65rem;
  }

  .book-retailer {
    flex: 1 1 auto;
    justify-content: center;
    min-width: calc(50% - 0.4rem);
  }

  /* --- Mobile Gallery --- */
  .slideshow-section {
    padding: 3rem 0;
  }

  .slideshow-track {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 1rem;
    padding: 0 1.25rem;
    will-change: auto;
  }

  .slideshow-track.no-js-scroll {
    transform: none !important;
  }

  .slideshow-track img {
    height: 250px;
    width: 85vw;
    min-width: 85vw;
    flex-shrink: 0;
    border-radius: 8px;
    scroll-snap-align: center;
    object-fit: cover;
  }

  .slideshow-track img:hover {
    transform: none;
    box-shadow: none;
  }

  /* --- Mobile Sections --- */
  section {
    padding: 4rem 1.25rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  /* --- Mobile Projects --- */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .project-card {
    padding: 1.75rem 1.5rem;
  }

  /* --- Mobile Essays --- */
  .page-hero,
  .page-hero-essay {
    height: 60vh;
    min-height: 360px;
  }

  .essay-card {
    padding: 1.75rem 1.5rem;
  }

  .essay-card-with-image {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .essay-card-image img {
    min-height: 180px;
    max-height: 220px;
  }

  .essay-card-body {
    padding: 1.75rem 1.5rem;
  }

  .essay-body p {
    font-size: 1.05rem;
  }

  .essay-body p:first-child {
    font-size: 1.1rem;
  }

  .essay-figure {
    margin-bottom: 2rem;
  }

  /* --- Mobile Social --- */
  .social-links {
    flex-direction: column;
    gap: 1rem;
  }

  .connect-image {
    margin-top: 1rem;
  }

  .social-link {
    padding: 1.1rem 1.25rem;
    font-size: 1.05rem;
  }

  /* --- Mobile Footer --- */
  footer {
    padding: 2rem 1.25rem;
  }
}
