:root{
    --paper:#e7e4dd;
    --paper-2:#dcd8cf;
    --ink:#15181a;
    --ink-soft:#3c4245;
    --slate:#5c6a72;
    --ice:#7fa0ac;
    --rust:#9c6b3e;
    --rule: rgba(21,24,26,0.16);
    --maxw: 1180px;
  }
  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--paper);
    color:var(--ink-soft);
    font-family:'Archivo',sans-serif;
    -webkit-font-smoothing:antialiased;
  }
  a{color:inherit;text-decoration:none;}
  img{max-width:100%;display:block;}

  .eyebrow{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.72rem;
    letter-spacing:0.14em;
    text-transform:uppercase;
    color:var(--rust);
    font-weight:500;
  }

  /* contour rule — signature device */
  .contour{
    width:100%;
    height:14px;
    display:block;
    margin:0 auto;
  }
  .contour svg{width:100%;height:100%;display:block;}
  .contour path{stroke:var(--rule);stroke-width:1;fill:none;}

  /* header / nav */
  header{
    position:relative;
    z-index:20;
  }
  .nav-wrap{
    max-width:var(--maxw);
    margin:0 auto;
    padding:1.6rem 1.6rem 0;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:1rem;
  }
  .brand{
    font-family:'Fraunces',serif;
    font-weight:600;
    font-size:1.05rem;
    letter-spacing:0.01em;
    color:var(--ink);
  }
  .brand span{color:var(--ink-soft);font-weight:300;font-style:italic;}
  nav.primary{
    display:flex;
    flex-wrap:wrap;
    gap:0.3rem 1.35rem;
    font-family:'IBM Plex Mono',monospace;
    font-size:0.72rem;
    letter-spacing:0.06em;
    text-transform:uppercase;
    padding-top:0.2rem;
  }
  nav.primary a{
    color:var(--slate);
    padding-bottom:3px;
    border-bottom:1px solid transparent;
    transition:color .15s ease, border-color .15s ease;
  }
  nav.primary a:hover, nav.primary a:focus-visible{
    color:var(--ink);
    border-color:var(--ice);
    outline:none;
  }

  /* hero */
  .hero{
    position:relative;
    margin-top:1.4rem;
    height:min(86vh,760px);
    min-height:420px;
    overflow:hidden;
  }
  .hero img{
    width:100%;height:100%;object-fit:cover;object-position:center 38%;
    filter:grayscale(15%) contrast(1.05);
  }
  .hero::after{
    content:"";
    position:absolute;inset:0;
    background:linear-gradient(180deg, rgba(21,24,26,0.05) 0%, rgba(21,24,26,0.15) 55%, rgba(21,24,26,0.72) 100%);
  }
  .hero-content{
    position:absolute;left:0;right:0;bottom:0;
    padding:0 1.6rem 3rem;
    max-width:var(--maxw);
    margin:0 auto;
    color:#efece6;
  }
  .hero-content .eyebrow{color:#cdd9dc;}
  .hero h1{
    font-family:'Fraunces',serif;
    font-weight:600;
    font-size:clamp(2.6rem, 7vw, 5.2rem);
    line-height:0.98;
    margin:0.4rem 0 0.6rem;
    letter-spacing:-0.01em;
  }
  .hero p.tagline{
    font-family:'Fraunces',serif;
    font-style:italic;
    font-weight:300;
    font-size:clamp(1.05rem, 2vw, 1.35rem);
    margin:0;
    color:#dfdbd2;
  }

  /* intro */
  .intro{
    max-width:720px;
    margin:4.2rem auto 0;
    padding:0 1.6rem;
  }
  .intro p{
    font-size:1.15rem;
    line-height:1.65;
    color:var(--ink-soft);
    margin:0;
  }
  .intro .credentials{
    margin-top:1.1rem;
    font-family:'IBM Plex Mono',monospace;
    font-size:0.72rem;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--slate);
  }

  section.index{max-width:var(--maxw);margin:3.6rem auto 0;padding:0 1.6rem;}

  .row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:3rem;
    align-items:center;
    padding:3.2rem 0;
  }
  .row.reverse .row-media{order:2;}
  .row.reverse .row-text{order:1;}
  .row-media{position:relative;overflow:hidden;aspect-ratio:4/3;}
  .row-media img{width:100%;height:100%;object-fit:cover;transition:transform .6s ease;}
  .row-media:hover img{transform:scale(1.035);}
  .row-text h2{
    font-family:'Fraunces',serif;
    font-weight:600;
    font-size:clamp(1.9rem,3vw,2.6rem);
    margin:0.35rem 0 0.7rem;
    color:var(--ink);
  }
  .row-text p{
    margin:0 0 1.1rem;
    line-height:1.6;
    max-width:42ch;
  }
  .row-link{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.75rem;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--ink);
    border-bottom:1px solid var(--ink);
    padding-bottom:2px;
    display:inline-flex;
    align-items:center;
    gap:0.5em;
    transition:color .15s ease,border-color .15s ease;
  }
  .row-link:hover, .row-link:focus-visible{color:var(--ice);border-color:var(--ice);outline:none;}

  footer{
    background:var(--paper-2);
    margin-top:4rem;
  }
  .footer-inner{
    max-width:var(--maxw);
    margin:0 auto;
    padding:3.2rem 1.6rem 2.4rem;
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:2rem;
  }
  .footer-col h3{
    font-family:'IBM Plex Mono',monospace;
    font-size:0.7rem;
    letter-spacing:0.1em;
    text-transform:uppercase;
    color:var(--rust);
    margin:0 0 0.9rem;
  }
  .footer-col ul{list-style:none;margin:0;padding:0;}
  .footer-col li{margin-bottom:0.5rem;}
  .footer-col a{color:var(--ink-soft);font-size:0.92rem;}
  .footer-col a:hover{color:var(--ink);}
  .footer-bottom{
    max-width:var(--maxw);margin:0 auto;
    padding:1.4rem 1.6rem 2rem;
    border-top:1px solid var(--rule);
    font-family:'IBM Plex Mono',monospace;
    font-size:0.7rem;
    letter-spacing:0.06em;
    color:var(--slate);
    display:flex;justify-content:space-between;flex-wrap:wrap;gap:0.6rem;
  }

  @media (max-width:820px){
    .row, .row.reverse{grid-template-columns:1fr;gap:1.4rem;padding:2.2rem 0;}
    .row.reverse .row-media, .row.reverse .row-text{order:initial;}
    .intro{margin-top:3rem;}
  }
  @media (prefers-reduced-motion: reduce){
    html{scroll-behavior:auto;}
    .row-media img{transition:none;}
  }

/* ---------- gallery pages ---------- */
.page-hero{
  position:relative;
  margin-top:1.4rem;
  height:min(58vh,520px);
  min-height:300px;
  overflow:hidden;
}
.page-hero img{width:100%;height:100%;object-fit:cover;filter:grayscale(10%) contrast(1.03);}
.page-hero::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg, rgba(21,24,26,0.08) 0%, rgba(21,24,26,0.18) 55%, rgba(21,24,26,0.68) 100%);
}
.page-hero-content{
  position:absolute;left:0;right:0;bottom:0;
  padding:0 1.6rem 2.4rem;max-width:var(--maxw);margin:0 auto;color:#efece6;
}
.page-hero-content h1{
  font-family:'Fraunces',serif;font-weight:600;
  font-size:clamp(2.2rem,5.5vw,3.8rem);margin:0.35rem 0 0;letter-spacing:-0.01em;
}
.page-intro{max-width:640px;margin:2.6rem auto 0;padding:0 1.6rem;}
.page-intro p{font-size:1.05rem;line-height:1.6;margin:0;color:var(--ink-soft);}

.gallery-grid{
  max-width:var(--maxw);margin:2.6rem auto 0;padding:0 1.6rem 1rem;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:0.5rem;
}
.gallery-grid a{
  display:block;position:relative;overflow:hidden;aspect-ratio:4/3;background:var(--paper-2);
}
.gallery-grid img{
  width:100%;height:100%;object-fit:cover;transition:transform .5s ease, filter .5s ease;
  filter:grayscale(8%);
}
.gallery-grid a:hover img{transform:scale(1.045);filter:grayscale(0%);}
.gallery-grid a:focus-visible{outline:2px solid var(--ice);outline-offset:-2px;}

.gallery-count{
  max-width:var(--maxw);margin:0 auto;padding:0 1.6rem;
  font-family:'IBM Plex Mono',monospace;font-size:0.72rem;letter-spacing:0.08em;
  text-transform:uppercase;color:var(--slate);
}

.back-link{
  max-width:var(--maxw);margin:2.6rem auto 0;padding:0 1.6rem;
}
.back-link a{
  font-family:'IBM Plex Mono',monospace;font-size:0.75rem;letter-spacing:0.08em;
  text-transform:uppercase;color:var(--ink);border-bottom:1px solid var(--ink);padding-bottom:2px;
}
.back-link a:hover{color:var(--ice);border-color:var(--ice);}

/* simple text page (about/links/contact) */
.text-page{max-width:640px;margin:3rem auto 0;padding:0 1.6rem 4rem;}
.text-page h1{font-family:'Fraunces',serif;font-weight:600;font-size:clamp(2rem,4vw,2.8rem);color:var(--ink);margin:0 0 1.2rem;}
.text-page p{font-size:1.08rem;line-height:1.7;margin:0 0 1.1rem;}
.text-page a.inline-link{color:var(--ink);border-bottom:1px solid var(--ice);}
.link-list{list-style:none;margin:0;padding:0;}
.link-list li{padding:0.9rem 0;border-top:1px solid var(--rule);}
.link-list li:last-child{border-bottom:1px solid var(--rule);}
.link-list a{font-size:1.05rem;}
.link-list a:hover{color:var(--ice);}
.contact-form label{display:block;font-family:'IBM Plex Mono',monospace;font-size:0.7rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--slate);margin:1.1rem 0 0.4rem;}
.contact-form input, .contact-form textarea{
  width:100%;font-family:'Archivo',sans-serif;font-size:1rem;padding:0.6rem 0.7rem;
  border:1px solid var(--rule);background:#fff;color:var(--ink);border-radius:2px;
}
.contact-form textarea{min-height:130px;resize:vertical;}
.contact-form button{
  margin-top:1.4rem;font-family:'IBM Plex Mono',monospace;font-size:0.78rem;letter-spacing:0.08em;
  text-transform:uppercase;background:var(--ink);color:var(--paper);border:none;padding:0.75rem 1.6rem;
  cursor:pointer;transition:background .15s ease;
}
.contact-form button:hover{background:var(--ice);color:var(--ink);}


/* book pages */
.book-hero{
  max-width:var(--maxw);margin:3rem auto 0;padding:0 1.6rem;
  display:grid;grid-template-columns:280px 1fr;gap:2.6rem;align-items:start;
}
.book-hero img{width:100%;box-shadow:0 18px 40px rgba(21,24,26,0.18);}
.book-hero h1{font-family:'Fraunces',serif;font-weight:600;font-size:clamp(1.8rem,3.4vw,2.5rem);margin:0.2rem 0 0.8rem;color:var(--ink);}
.book-hero p{font-size:1.05rem;line-height:1.65;max-width:56ch;margin:0 0 1.2rem;}
.book-actions{display:flex;flex-wrap:wrap;gap:0.9rem;}
.book-actions a{
  font-family:'IBM Plex Mono',monospace;font-size:0.75rem;letter-spacing:0.08em;text-transform:uppercase;
  border:1px solid var(--ink);padding:0.65rem 1.2rem;color:var(--ink);transition:all .15s ease;
}
.book-actions a:hover{background:var(--ink);color:var(--paper);}
@media (max-width:640px){ .book-hero{grid-template-columns:1fr;} .book-hero img{max-width:220px;} }

/* books index */
.book-row{
  display:grid;grid-template-columns:140px 1fr;gap:1.6rem;align-items:start;
  padding:1.8rem 0;border-top:1px solid var(--rule);
}
.book-row:last-child{border-bottom:1px solid var(--rule);}
.book-row img{width:100%;box-shadow:0 10px 24px rgba(21,24,26,0.14);}
.book-row h2{font-family:'Fraunces',serif;font-weight:600;font-size:1.4rem;margin:0 0 0.4rem;color:var(--ink);}
.book-row p{margin:0 0 0.6rem;font-size:0.98rem;line-height:1.55;max-width:60ch;}
.book-row a.row-link{font-family:'IBM Plex Mono',monospace;font-size:0.72rem;letter-spacing:0.08em;text-transform:uppercase;color:var(--ink);border-bottom:1px solid var(--ice);}

/* video */
.video-wrap{max-width:var(--maxw);margin:3rem auto 0;padding:0 1.6rem;}
.video-frame{position:relative;width:100%;aspect-ratio:16/9;background:var(--ink);}
.video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}

/* ---------- lightbox ---------- */
.lightbox-overlay{
  position:fixed;inset:0;z-index:100;
  background:rgba(15,17,18,0.94);
  display:flex;align-items:center;justify-content:center;
  opacity:0;visibility:hidden;
  transition:opacity .22s ease;
}
.lightbox-overlay.is-open{opacity:1;visibility:visible;}
.lightbox-figure{
  position:relative;max-width:min(92vw,1400px);max-height:88vh;
  display:flex;flex-direction:column;align-items:center;
}
.lightbox-figure img{
  max-width:92vw;max-height:80vh;width:auto;height:auto;
  box-shadow:0 30px 70px rgba(0,0,0,0.5);
  opacity:0;transform:scale(0.98);
  transition:opacity .2s ease, transform .2s ease;
}
.lightbox-figure img.is-loaded{opacity:1;transform:scale(1);}
.lightbox-caption{
  margin-top:0.9rem;
  font-family:'IBM Plex Mono',monospace;font-size:0.72rem;letter-spacing:0.08em;
  text-transform:uppercase;color:#c8c4bb;
}
.lightbox-close, .lightbox-prev, .lightbox-next{
  position:fixed;
  background:transparent;border:0;cursor:pointer;
  color:#efece6;
  font-family:'IBM Plex Mono',monospace;
  transition:color .15s ease, opacity .15s ease;
}
.lightbox-close{top:1.6rem;right:1.8rem;font-size:0.85rem;letter-spacing:0.08em;text-transform:uppercase;}
.lightbox-close:hover{color:var(--ice);}
.lightbox-prev, .lightbox-next{
  top:50%;transform:translateY(-50%);
  font-size:2.4rem;line-height:1;padding:0.6rem 0.9rem;
}
.lightbox-prev{left:0.6rem;}
.lightbox-next{right:0.6rem;}
.lightbox-prev:hover, .lightbox-next:hover{color:var(--ice);}
.lightbox-counter{
  position:fixed;bottom:1.6rem;left:50%;transform:translateX(-50%);
  font-family:'IBM Plex Mono',monospace;font-size:0.72rem;letter-spacing:0.08em;
  color:#8f9aa1;
}
@media (max-width:640px){
  .lightbox-prev, .lightbox-next{font-size:1.8rem;padding:0.4rem 0.6rem;}
  .lightbox-close{top:1rem;right:1rem;}
}
body.lightbox-locked{overflow:hidden;}
