:root {
  --ink: #141010;
  --parchment: #f0e6d0;
  --parchment-dim: #c8bba0;
  --rust: #8b2e1a;
  --rust-light: #b03d26;
  --gold: #a8823a;
  --gold-light: #c9a050;
  --forest: #233228;
  --mist: #6a7c7e;
  --bone: #cfc2a8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--ink);
  color: var(--parchment);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  line-height: 1.75;
  overflow-x: hidden;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── NAV ───────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 3rem;
  transition: background 0.5s, border-color 0.5s;
}
nav.solid {
  background: rgba(14, 10, 8, 0.96);
  border-bottom: 1px solid rgba(168, 130, 58, 0.25);
  backdrop-filter: blur(6px);
}
.nav-name {
  font-family: 'IM Fell English', serif;
  font-size: 1.05rem;
  color: var(--gold-light);
  text-decoration: none;
  letter-spacing: 0.03em;
}
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bone);
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s, color 0.2s;
}
.nav-links a:hover { opacity: 1; color: var(--gold-light); }

/* ── HERO ──────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 65%, rgba(35, 50, 40, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 50% 35% at 30% 30%, rgba(139, 46, 26, 0.12) 0%, transparent 60%);
}
.hero-rule {
  width: 1px; height: 80px;
  background: linear-gradient(to bottom, transparent, var(--gold), transparent);
  margin: 0 auto 2.5rem;
  opacity: 0.6;
}
.hero h1 {
  font-family: 'IM Fell English', serif;
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--parchment);
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  position: relative;
}
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-sub {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 3rem;
}
.hero-scroll {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bone);
  opacity: 0.45;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: opacity 0.3s;
}
.hero-scroll:hover { opacity: 0.8; }
.hero-scroll::after {
  content: '';
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--gold-light), transparent);
}

/* ── SECTIONS ──────────────────────────────────────── */
section { padding: 6rem 0; position: relative; }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 3rem; }
.section-header { margin-bottom: 4rem; }
.section-num {
  font-family: 'IM Fell English', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.7;
  margin-bottom: 0.6rem;
  display: block;
}
.section-header h2 {
  font-family: 'IM Fell English', serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  color: var(--parchment);
  line-height: 1.1;
  margin-bottom: 1.2rem;
}
.section-header h2 em { font-style: italic; color: var(--gold-light); }
.section-divider {
  width: 60px; height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin-bottom: 1.5rem;
}
.section-intro {
  font-size: 1.1rem;
  color: var(--parchment-dim);
  max-width: 640px;
  line-height: 1.8;
  font-style: italic;
}
.sep {
  width: 100%; height: 1px;
  background: linear-gradient(to right, transparent, rgba(168, 130, 58, 0.3), transparent);
}

/* ── PORTFOLIO GRID ────────────────────────────────── */
#portfolio { background: linear-gradient(180deg, rgba(20,15,12,0) 0%, rgba(25,20,16,1) 100%); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #1a1410;
}
.gallery-item::before { content: ''; display: block; padding-top: 120%; }
.gallery-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s;
  filter: brightness(0.88) saturate(0.9);
}
.gallery-item:hover img { transform: scale(1.04); filter: brightness(1) saturate(1.05); }
.gallery-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,10,8,0.85) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex; align-items: flex-end; padding: 1.2rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-title {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--parchment);
}

/* ── WAR GRID ──────────────────────────────────────── */
#war { background: #0f0b09; }

.war-statement {
  background: rgba(139, 46, 26, 0.07);
  border-left: 2px solid var(--rust);
  padding: 1.8rem 2rem;
  margin-bottom: 3.5rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment-dim);
  line-height: 1.9;
  max-width: 700px;
}
.war-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
}
.war-item {
  position: relative;
  cursor: pointer;
  background: #1a1410;
  overflow: hidden;
}
.war-item::before { content: ''; display: block; padding-top: 110%; }
.war-item img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s;
  filter: brightness(0.85) saturate(0.85);
}
.war-item:hover img { transform: scale(1.04); filter: brightness(0.95) saturate(0.95); }
.war-item-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(14,10,8,0.92) 0%, transparent 100%);
  padding: 1.5rem 1rem 0.9rem;
  transform: translateY(4px);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
}
.war-item:hover .war-item-caption { opacity: 1; transform: translateY(0); }
.war-item-caption p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--parchment);
}

/* ── PRISONERS ─────────────────────────────────────── */
#prisoners { background: linear-gradient(180deg, #0f0b09 0%, #111210 100%); }

.prisoner-statement {
  background: rgba(35, 50, 40, 0.15);
  border-left: 2px solid rgba(100, 140, 100, 0.5);
  padding: 1.8rem 2rem;
  margin-bottom: 3.5rem;
  font-size: 1.05rem;
  font-style: italic;
  color: var(--parchment-dim);
  line-height: 1.9;
  max-width: 720px;
}
.prisoner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2.5rem 2rem;
}
.prisoner-card { display: flex; flex-direction: column; }
.prisoner-portrait {
  position: relative;
  overflow: hidden;
  background: #1a1410;
  aspect-ratio: 1 / 1;
  cursor: pointer;
}
.prisoner-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.4s;
  filter: brightness(0.9) saturate(0.88);
  display: block;
}
.prisoner-card:hover .prisoner-portrait img { transform: scale(1.04); filter: brightness(1) saturate(1); }
.prisoner-portrait-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(14,10,8,0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}
.prisoner-card:hover .prisoner-portrait-overlay { opacity: 1; }
.prisoner-info {
  padding: 1rem 0 0;
  border-top: 1px solid rgba(168, 130, 58, 0.15);
}
.prisoner-name {
  font-family: 'IM Fell English', serif;
  font-size: 1.1rem;
  color: var(--parchment);
  margin-bottom: 0.2rem;
}
.prisoner-status {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}
.prisoner-status.freed    { color: #7aaa88; }
.prisoner-status.imprisoned { color: var(--rust-light); }
.prisoner-status.deceased { color: var(--mist); }
.prisoner-status.unknown  { color: var(--mist); }
.prisoner-teaser {
  font-size: 0.88rem;
  color: var(--parchment-dim);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prisoner-read-more {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  transition: opacity 0.2s;
  cursor: pointer;
  background: none; border: none;
  font-family: 'Cormorant Garamond', serif;
  padding: 0;
}
.prisoner-read-more:hover { opacity: 1; }

/* ── ABOUT ─────────────────────────────────────────── */
#about { background: #0d0a08; }

.bio-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
  min-width: 0;
}
.bio-layout > * {
  min-width: 0;
}
.bio-text p {
  font-size: 1.1rem;
  color: var(--parchment-dim);
  line-height: 1.85;
  margin-bottom: 1.4rem;
}
.bio-text p:first-child { font-size: 1.2rem; color: var(--parchment); }
.bio-photo {
  position: sticky;
  top: 8rem;
}
.bio-photo img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  filter: saturate(0.88);
  transition: filter 0.4s;
}
.bio-photo img:hover {
  filter: saturate(1);
}
.contact-block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(168, 130, 58, 0.15);
}
.contact-block a {
  color: var(--gold-light);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}
.contact-block a:hover { color: var(--parchment); }

/* ── LIGHTBOX ──────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 4, 0.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 2rem;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img { max-width: 85vw; max-height: 85vh; object-fit: contain; display: block; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  background: none; border: none;
  color: var(--bone); font-size: 2rem;
  cursor: pointer; opacity: 0.6;
  transition: opacity 0.2s;
  font-family: serif; line-height: 1;
}
.lightbox-close:hover { opacity: 1; }

/* ── MODAL ─────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0;
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 5, 4, 0.93);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 2rem;
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-inner {
  background: #18140f;
  border: 1px solid rgba(168, 130, 58, 0.2);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  position: relative;
}
.modal-portrait { position: sticky; top: 0; height: 100%; min-height: 320px; }
.modal-portrait img {
  width: 100%; height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
  filter: saturate(0.9);
}
.modal-body { padding: 2.5rem 2.5rem 2.5rem 2rem; }
.modal-name {
  font-family: 'IM Fell English', serif;
  font-size: 1.7rem;
  color: var(--parchment);
  margin-bottom: 0.3rem;
  line-height: 1.15;
}
.modal-status {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.4rem;
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border: 1px solid currentColor;
}
.modal-status.freed     { color: #7aaa88; }
.modal-status.imprisoned { color: var(--rust-light); }
.modal-status.deceased  { color: var(--mist); }
.modal-status.unknown   { color: var(--mist); }
.modal-bio { font-size: 0.97rem; color: var(--parchment-dim); line-height: 1.85; }
.modal-bio p { margin-bottom: 1rem; }
.modal-bio blockquote {
  border-left: 2px solid var(--gold);
  padding: 0.8rem 1.2rem;
  margin: 1.2rem 0;
  font-style: italic;
  color: var(--parchment);
  background: rgba(168, 130, 58, 0.04);
}
.modal-close {
  position: absolute; top: 1rem; right: 1rem;
  background: none; border: none;
  color: var(--bone); font-size: 1.5rem;
  cursor: pointer; opacity: 0.5;
  transition: opacity 0.2s; line-height: 1;
}
.modal-close:hover { opacity: 1; }

/* ── FOOTER ────────────────────────────────────────── */
footer {
  padding: 3rem;
  text-align: center;
  border-top: 1px solid rgba(168, 130, 58, 0.1);
}
footer p { font-size: 0.8rem; letter-spacing: 0.12em; color: var(--mist); opacity: 0.5; }

/* ── ANIMATIONS ────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(20px); transition: opacity 0.7s ease, transform 0.7s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── RESPONSIVE ────────────────────────────────────── */
/* ── HAMBURGER BUTTON (hidden on desktop) ──────────────── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  z-index: 600;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--bone);
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(14, 10, 8, 0.98);
    justify-content: center;
    align-items: center;
    z-index: 550;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a {
    display: block;
    font-size: 1.3rem;
    letter-spacing: 0.2em;
    padding: 1.1rem 0;
    border-bottom: 1px solid rgba(168, 130, 58, 0.1);
    opacity: 0.85;
  }
  .nav-links li:last-child a { border-bottom: none; }
  .section-inner { padding: 0 1.5rem; }
  .bio-layout { grid-template-columns: 1fr; gap: 2rem; }
  .modal-inner { grid-template-columns: 1fr; }
  .modal-portrait { min-height: 220px; max-height: 260px; position: relative; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
  .war-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
  .prisoner-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
}
