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

/* ── Base ── */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #1a1a1a;
  text-decoration: none;
  border-bottom: 1px solid #1a1a1a;
}

a:hover {
  opacity: 0.6;
}

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

/* ── Layout ── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 30%;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 60px 32px;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  margin-bottom: 0;
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── About ── */
.about {
  padding: 36px 0 28px;
}

.about-content {
  max-width: 600px;
  width: 100%;
}

.about-heading {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.5;
}

.bio {
  font-size: 0.8rem;
  line-height: 1.55;
  margin-bottom: 12px;
}

.bio a {
  color: #2563eb;
  border-bottom: 1px solid #2563eb;
}

.bio a:hover {
  opacity: 0.7;
}

.contact {
  font-size: 0.75rem;
  line-height: 1.7;
  opacity: 0.7;
  margin-top: 20px;
}

/* ── Footer ── */
.site-footer {
  margin-top: auto;
  padding: 20px 0 0;
  font-size: 0.75rem;
  opacity: 0.4;
}

/* ── Gallery Masonry ── */
.gallery {
  width: 70%;
  padding: 20px 20px 60px;
  position: relative;
}

.gallery-tile {
  position: absolute;
  overflow: hidden;
  cursor: pointer;
  background: #f5f5f5;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-tile.loaded {
  opacity: 1;
}

.gallery-tile img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-tile .tile-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  padding: 24px 10px 8px;
}

.gallery-tile .tile-overlay span {
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: none;
  opacity: 0.85;
}

.gallery-tile:hover img {
  transform: scale(1.03);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
  z-index: 1001;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
}

.lightbox-img {
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: none;
  margin-top: 16px;
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 1199px) {
  .sidebar {
    width: 35%;
  }

  .gallery {
    width: 65%;
    padding: 20px 16px 48px;
  }
}

/* Read more - hidden on desktop/tablet, bio always visible */
.read-more-btn {
  display: none !important;
}

.bio-more {
  display: block;
}

/* Mobile */
@media (max-width: 767px) {
  .bio-more {
    max-height: 0 !important;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
  }

  .bio-more.expanded {
    max-height: 1000px !important;
    opacity: 1;
  }

  .read-more-btn {
    display: inline-block !important;
    background: none;
    border: none;
    font-size: 0.8rem;
    color: #1a1a1a;
    opacity: 0.5;
    cursor: pointer;
    padding: 0;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.3);
  }
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
    overflow-y: visible;
    padding: 40px 20px 32px;
  }

  .wordmark {
    font-size: 0.95rem;
  }

  .bio {
    font-size: 0.85rem;
  }

  .site-footer {
    padding: 12px 0 0;
  }

  .gallery {
    width: 100%;
    padding: 0 12px 40px;
  }

  .lightbox-close {
    top: 12px;
    right: 16px;
    font-size: 1.6rem;
  }

  .lightbox-caption {
    font-size: 0.7rem;
    margin-top: 12px;
  }

  .scroll-top {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    bottom: 16px;
    right: 16px;
  }
}

/* Smaller phones — tighten spacing so gallery peeks above fold */
@media (max-width: 429px) {
  .sidebar {
    padding: 24px 20px 16px;
  }

  .about {
    padding: 20px 0 12px;
  }

  .about-heading {
    margin-bottom: 8px;
  }

  .bio {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  .contact {
    margin-top: 8px;
    line-height: 1.5;
    font-size: 0.65rem;
  }

  .site-footer {
    padding: 4px 0 0;
  }
}

/* ── Scroll to Top ── */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scroll-top.visible {
  opacity: 0.7;
  visibility: visible;
}

.scroll-top:hover {
  opacity: 1;
}
