/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: #fdfdfb;
  color: #000;
  font-family: "Times New Roman", Times, serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

:root {
  --ink: #000;
  --accent: #e85a1a; /* orange */
}

a {
  color: var(--ink);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent); }
.tile:hover .label { color: var(--accent); }
.tile:hover { opacity: 1; }

img, video { max-width: 100%; height: auto; display: block; }

/* ---------- Layout ---------- */
.site {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  padding: 40px 28px;
  border-right: 1px solid #eee;
  background: #fdfdfb;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  font-size: 13px;
}

.brand {
  font-size: 22px;
  letter-spacing: .01em;
  margin-bottom: 36px;
  font-weight: 400;
}
.brand a { border: none; }

.nav { list-style: none; }
.nav > li { margin-bottom: 14px; }
.nav a { display: inline-block; }

.subnav {
  list-style: none;
  margin-top: 8px;
  padding-left: 0;
  display: none;
}
.subnav li { margin: 6px 0; padding-left: 12px; font-size: 12px; color: #555; }
.subnav a { color: #555; }
.has-children.open .subnav { display: block; }

.toggle { cursor: pointer; user-select: none; }

.sidebar-foot {
  margin-top: 48px;
  font-size: 12px;
  color: #666;
  line-height: 1.8;
}
.sidebar-foot a { display: block; }

/* ---------- Main ---------- */
.main {
  padding: 30px 28px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-title {
  font-size: 22px;
  letter-spacing: .01em;
  font-weight: 400;
  margin: 20px 0 40px;
  text-align: center;
  color: #000;
}

.intro {
  max-width: 620px;
  margin: 20px auto 40px;
  text-align: center;
  font-size: 14px;
  color: #333;
  line-height: 1.8;
}

/* ---------- Hero (homepage) ---------- */
.hero {
  width: 100%;
  max-width: 880px;
  margin: 40px auto 0;
  text-align: center;
}
.hero img { width: 100%; margin-bottom: 18px; }
.caption {
  font-style: italic;
  font-size: 12px;
  color: #555;
  letter-spacing: .02em;
}

/* ---------- Slideshow ---------- */
.slideshow {
  width: 100%;
  max-width: 1050px;
  margin: 20px auto 0;
  position: relative;
}

.slide-stage {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.slide {
  display: none;
  width: 100%;
  text-align: center;
}
.slide.active { display: block; }
.slide img, .slide video {
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  margin: 0 auto;
}
.slide figcaption {
  margin-top: 16px;
  font-style: italic;
  font-size: 12px;
  color: #555;
}

/* Image frame: shrink-wrap the image so the meta strip can sit flush with its edges */
.slide-frame {
  display: inline-block;
  position: relative;
  max-width: 100%;
  text-align: left;
}
.slide-frame img, .slide-frame video {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  width: auto;
  margin: 0;
}
.slide-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-top: 10px;
  font-size: 13px;
  color: #444;
}
.slide-cap {
  font-style: italic;
}
.slide-num {
  font-style: normal;
  letter-spacing: .05em;
  color: #888;
}

/* Click-zones with arrow cursors — only at outer gutters so they don't cover image clicks or video controls */
.slide-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  z-index: 5;
  background: transparent;
}
.slide-zone.prev {
  left: 0;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><polyline points='24,10 12,20 24,30' fill='none' stroke='black' stroke-width='1.5'/></svg>") 12 20, w-resize;
}
.slide-zone.next {
  right: 0;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'><polyline points='16,10 28,20 16,30' fill='none' stroke='black' stroke-width='1.5'/></svg>") 28 20, e-resize;
}

/* Photos in a slideshow get a zoom cursor (click to enlarge) */
.slide img { cursor: zoom-in; }

/* Text-only slide */
.slide.text-slide {
  min-height: 60vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.slide.text-slide.active { display: flex; }
.slide.text-slide .text-body {
  max-width: 560px;
  font-size: 18px;
  line-height: 1.8;
  color: #1a1a1a;
  text-align: left;
}
.slide.text-slide .text-body p { margin-bottom: 1.2em; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: zoom-out;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}
body.lightbox-open { overflow: hidden; }

.slide-counter {
  text-align: center;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: .15em;
  color: #777;
}

/* ---------- Project index tiles (kept for potential use) ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 36px 28px;
  width: 100%;
  max-width: 1100px;
}
.tile { display: block; text-align: center; }
.tile img, .tile video {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 10px;
  background: #111;
  display: block;
}
.tile .label {
  font-size: 16px;
  letter-spacing: .01em;
  color: #000;
}
.tile a, .tile:hover { border: none; }

/* ---------- About / Contact ---------- */
.prose {
  max-width: 620px;
  margin: 30px auto;
  font-size: 14px;
  line-height: 1.9;
  color: #222;
  text-align: center;
}
.prose p { margin-bottom: 1.2em; }

.contact-block {
  text-align: center;
  font-size: 15px;
  line-height: 1.9;
  margin: 20px auto 0;
  max-width: 520px;
}
.contact-lead {
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 40px;
  color: #222;
}
.contact-name {
  font-size: 18px;
  margin-top: 10px;
}
.contact-loc {
  color: #555;
  margin-bottom: 30px;
}
.contact-line { margin: 4px 0; }
.contact-foot {
  margin-top: 50px;
  font-style: italic;
  font-size: 13px;
  color: #777;
}

/* ---------- Mobile ---------- */
.menu-toggle { display: none; }

@media (max-width: 800px) {
  .site { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding: 20px 24px;
  }
  .brand { margin-bottom: 0; display: inline-block; }
  .menu-toggle {
    display: inline-block;
    float: right;
    cursor: pointer;
    font-size: 13px;
    letter-spacing: .1em;
    text-transform: uppercase;
    border: none;
    background: none;
    color: #1a1a1a;
    padding: 0;
  }
  .nav-wrap { display: none; margin-top: 24px; }
  .nav-wrap.open { display: block; }
  .main { padding: 30px 24px 60px; }
  .slide img, .slide video { max-height: 60vh; }
}
