@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,340;0,9..144,440;0,9..144,560;1,9..144,440&family=Inter:wght@400;500&display=swap');

:root{
  --paper: #FAFAF7;
  --ink: #17140F;
  --stone: #726C60;
  --rule: #E4E0D3;
  --oxide: #9C4B2E;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*{ box-sizing: border-box; }

html{ background: var(--paper); }

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

::selection{ background: var(--oxide); color: #fff; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a:focus-visible, button:focus-visible{
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

/* Splash gate (index.html only) */

.splash{
  display: block;
  position: relative;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
}

.splash img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.splash::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.5) 100%);
}

.splash-mark{
  position: absolute;
  top: 28px;
  left: 32px;
  z-index: 2;
  font-family: var(--serif);
  font-size: 18px;
  color: #FAFAF7;
}

.splash-center{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
}

.splash-enter{
  display: inline-block;
  font-family: var(--sans);
  font-size: 16px;
  color: #FAFAF7;
  border: 1px solid rgba(250,250,247,0.75);
  padding: 14px 34px;
  border-radius: 2px;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(2px);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.splash-enter:hover{
  background: rgba(0,0,0,0.35);
  border-color: #FAFAF7;
}

.splash-sub{
  position: absolute;
  left: 32px;
  bottom: 28px;
  z-index: 2;
  font-size: 13px;
  color: rgba(250,250,247,0.85);
}

/* Header / nav (inner pages) */

.site-header{
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.site-header .mark{
  font-family: var(--serif);
  font-weight: 440;
  font-size: 17px;
}

.site-nav{
  display: flex;
  gap: 22px;
  font-size: 14px;
  color: var(--stone);
}

.site-nav a{
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"]{
  color: var(--ink);
  border-bottom-color: var(--ink);
}

.nav-toggle{
  display: none;
  background: none;
  border: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 640px){
  .site-header{ padding: 18px 20px; }
  .site-nav{
    position: fixed;
    inset: 0;
    top: 58px;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 32px;
    gap: 22px;
    font-family: var(--serif);
    font-size: 26px;
    color: var(--ink);
    display: none;
  }
  .site-nav.open{ display: flex; }
  .nav-toggle{ display: block; }
}

/* Footer */

.site-footer{
  border-top: 1px solid var(--rule);
  padding: 40px 32px 60px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  color: var(--stone);
  font-size: 13px;
}

.site-footer .socials{ display: flex; gap: 16px; }
.site-footer a:hover{ color: var(--ink); }

/* Home intro (home.html) */

.intro{
  max-width: 640px;
  margin: 0 auto;
  padding: 70px 32px 60px;
}

.intro p{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 3vw, 27px);
  line-height: 1.45;
  color: var(--ink);
}

.intro p + p{ margin-top: 20px; }

/* Page header (non-hero pages) */

.page-head{
  padding: 60px 32px 30px;
  max-width: 900px;
}

.page-head h1{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 14px;
}

.page-head .lede{
  color: var(--stone);
  font-size: 16px;
  max-width: 56ch;
}

/* Projects archive list */

.archive{
  padding: 40px 32px 90px;
  border-top: 1px solid var(--rule);
}

.archive-row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.archive-row .year{
  font-size: 13px;
  color: var(--stone);
  width: 80px;
  flex-shrink: 0;
}

.archive-row .title{
  font-family: var(--serif);
  font-size: clamp(19px, 3vw, 28px);
  font-weight: 400;
  flex: 1;
  transition: color 0.2s ease;
}

.archive-row .medium{
  font-size: 13px;
  color: var(--stone);
  text-align: right;
  width: 220px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 780px){
  .archive-row .medium{ display: block; }
}

.archive-row:hover .title{ color: var(--oxide); }

.archive-preview{
  position: fixed;
  width: 260px;
  height: 340px;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.15s ease;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}
.archive-preview img{
  width: 100%; height: 100%; object-fit: cover;
}
.archive-preview.visible{ opacity: 1; }

@media (max-width: 780px){
  .archive-preview{ display: none; }
}

/* About */

.about-grid{
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 60px;
  padding: 0 32px 100px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.about-grid figure{ margin: 0; position: sticky; top: 90px; }
.about-grid figcaption{ font-size: 12px; color: var(--stone); margin-top: 10px; }

.about-copy p{
  max-width: 62ch;
  font-size: 17px;
  color: var(--ink);
}
.about-copy p + p{ margin-top: 20px; }

.about-copy .lead-line{
  font-family: var(--serif);
  font-size: clamp(20px, 3vw, 26px);
  line-height: 1.4;
}

.info-toggle{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 22px;
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--stone);
  border-bottom: 1px solid var(--stone);
  padding-bottom: 2px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.info-toggle:hover{ color: var(--ink); border-color: var(--ink); }

.info-body{
  margin-top: 24px;
  padding-top: 4px;
}
.info-body[hidden]{ display: none; }

@media (max-width: 820px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-grid figure{ position: static; max-width: 320px; }
}

/* Project detail */

.project-head{
  padding: 60px 32px 30px;
  max-width: 900px;
}
.project-head h1{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 44px);
  margin: 0 0 10px;
}
.project-head .meta{ color: var(--stone); font-size: 14px; }

.project-media{
  margin: 50px 0;
}
.project-media img{ width: 100%; }
.project-media .caption{
  font-size: 12px;
  color: var(--stone);
  padding: 10px 32px 0;
}

.project-media.two-up{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin: 0;
}

.project-body{
  max-width: 680px;
  margin: 60px auto;
  padding: 0 32px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
}
.project-body p{ margin: 0 0 26px; }
.project-body em{ font-style: italic; color: var(--stone); }

.project-nav{
  display: flex;
  justify-content: space-between;
  padding: 40px 32px 90px;
  border-top: 1px solid var(--rule);
  margin-top: 40px;
  font-size: 14px;
  color: var(--stone);
}
.project-nav a:hover{ color: var(--oxide); }

/* Writing */

.writing-list{
  padding: 0 32px 100px;
  max-width: 900px;
  margin: 0 auto;
}
.writing-item{
  display: flex;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
  align-items: flex-start;
}
.writing-item:last-child{ border-bottom: 1px solid var(--rule); }
.writing-item img{
  width: 84px; height: 84px;
  object-fit: cover;
  flex-shrink: 0;
}
.writing-item h2{
  font-family: var(--serif);
  font-weight: 400;
  font-size: 19px;
  margin: 0 0 6px;
}
.writing-item .venue{ color: var(--stone); font-size: 13px; margin-bottom: 10px; }
.writing-item .read{ font-size: 13px; border-bottom: 1px solid var(--stone); padding-bottom: 2px; }
.writing-item .read:hover{ border-color: var(--oxide); color: var(--oxide); }
.writing-item .unavailable{ font-size: 13px; color: var(--stone); font-style: italic; }

/* Contact */

.contact-wrap{
  padding: 60px 32px 120px;
  max-width: 700px;
}
.contact-wrap p{ color: var(--stone); font-size: 16px; margin-bottom: 40px; }
.contact-email{
  font-family: var(--serif);
  font-size: clamp(26px, 5vw, 40px);
  display: inline-block;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 8px;
}
.contact-email:hover{ color: var(--oxide); border-color: var(--oxide); }

/* ---------- Project slideshow ---------- */

.ss-body{
  margin: 0;
  overflow: hidden;
  background: #FAFAF7;
}

.slideshow{
  position: fixed;
  inset: 0;
  background: #FAFAF7;
  overflow: hidden;
}

.ss-track{
  position: relative;
  width: 100%;
  height: 100%;
}

.ss-slide{
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
}
.ss-slide.is-active{
  opacity: 1;
  visibility: visible;
}
.ss-slide img{
  max-width: 92vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.ss-close{
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 30;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 24px;
  line-height: 1;
  color: #17140F;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  opacity: 0.9;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.ss-close:hover{ opacity: 1; background: #ffffff; }

.ss-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 1px 6px rgba(0,0,0,0.12);
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: #17140F;
  opacity: 0.85;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.ss-arrow:hover{ opacity: 1; background: #ffffff; }
.ss-prev{ left: 12px; }
.ss-next{ right: 12px; }

.ss-counter{
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 10;
  font-family: var(--sans);
  font-size: 12px;
  color: #17140F;
  background: rgba(255,255,255,0.85);
  padding: 4px 10px;
  border-radius: 10px;
}

.ss-info-toggle{
  position: absolute;
  right: 20px;
  bottom: 16px;
  z-index: 30;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(23,20,15,0.35);
  border-radius: 2px;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 13px;
  color: #17140F;
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.ss-info-toggle:hover{
  background: #ffffff;
  border-color: #17140F;
}

.ss-info-panel{
  position: absolute;
  inset: 0;
  z-index: 20;
  background: #FAFAF7;
  overflow-y: auto;
  padding: 70px 24px 90px;
}
.ss-info-panel[hidden]{ display: none; }

.ss-info-inner{
  max-width: 640px;
  margin: 0 auto;
  color: #17140F;
  padding: 30px 28px;
  border-radius: 3px;
}
.ss-info-inner h1{
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 38px);
  margin: 0 0 10px;
  color: #17140F;
}
.ss-info-inner .meta{
  font-size: 13px;
  color: rgba(23,20,15,0.65);
  margin-bottom: 34px;
}
.ss-info-inner p{
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 22px;
  color: #17140F;
}
.ss-info-inner em{ font-style: italic; color: rgba(23,20,15,0.7); }

/* When the (now light) info panel is open, the close/info buttons
   sitting on top of it switch to dark ink so they stay readable. */
.slideshow.panel-open .ss-close{ color: #17140F; }
.slideshow.panel-open .ss-info-toggle{
  color: #17140F;
  border-color: rgba(23,20,15,0.4);
  background: rgba(255,255,255,0.6);
}
.slideshow.panel-open .ss-info-toggle:hover{
  background: rgba(255,255,255,0.9);
  border-color: #17140F;
}

@media (max-width: 640px){
  .ss-arrow{ font-size: 30px; padding: 8px; }
  .ss-info-toggle{ padding: 7px 14px; }
}

/* Video slides inside the project slideshow */
.ss-video-wrap{
  width: 90vw;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
}
.ss-video-wrap iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.ss-video-caption{
  position: absolute;
  bottom: 54px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  color: rgba(23,20,15,0.65);
  pointer-events: none;
}

/* Link slides — for pieces hosted elsewhere (interactive works, articles) */
.ss-link-box{
  max-width: 420px;
  text-align: center;
  padding: 40px 32px;
  border: 1px solid rgba(23,20,15,0.15);
  border-radius: 4px;
  background: rgba(255,255,255,0.6);
}
.ss-link-label{
  font-family: var(--serif);
  font-size: 22px;
  color: #17140F;
  margin-bottom: 10px;
}
.ss-link-note{
  font-size: 13px;
  color: #726C60;
  line-height: 1.5;
  margin-bottom: 22px;
}
.ss-link-btn{
  display: inline-block;
  padding: 10px 26px;
  border: 1px solid #17140F;
  border-radius: 2px;
  font-size: 14px;
  color: #17140F;
  transition: background 0.2s ease, color 0.2s ease;
}
.ss-link-btn:hover{
  background: #17140F;
  color: #FAFAF7;
}
