/* ==========================================
   Pierre Putman — Portfolio
   Layout B: Sans-serif, left sidebar, 3-col grid
   ========================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: #c00; opacity: 1; }
img { display: block; max-width: 100%; }

/* Visually hidden but accessible to screen readers & search engines */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Fixed Left Sidebar ---- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 10;
}

.site-title {
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 48px;
}

.site-title a {
  color: #1a1a1a;
}
.site-title a:hover {
  opacity: 0.45;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar nav a {
  font-size: 1.05rem;
  color: #666;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

.sidebar nav a:hover {
  color: #c00;
  opacity: 1;
}

.sidebar nav a.active {
  color: #1a1a1a;
  opacity: 1;
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-bottom a {
  font-size: 0.9rem;
  color: #bbb;
  letter-spacing: 0.02em;
}

.sidebar-bottom a:hover {
  color: #c00;
  opacity: 1;
}

/* ---- Main Content ---- */
.main {
  margin-left: 240px;
  padding: 40px 40px 80px;
}

/* ---- Hero (homepage fullscreen image) ---- */
.hero {
  margin-left: 240px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.hero a {
  display: block;
}

.hero a:hover {
  opacity: 1;
}

.hero img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

/* ---- Works Grid (3-col landscape) ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.grid-item {
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 2;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}

.grid-item:hover img {
  opacity: 0.88;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 88vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: fixed;
  top: 24px;
  right: 28px;
  font-size: 1rem;
  line-height: 1;
  font-family: inherit;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: none;
  border: none;
  cursor: pointer;
  color: #1a1a1a;
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px;
}

.lightbox-close:hover {
  color: #c00;
}

/* Invisible click zones: left half = prev, right half = next */
.lightbox-zone {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 105;
}

.lightbox-zone-prev {
  left: 0;
  cursor: w-resize;
}

.lightbox-zone-next {
  right: 0;
  cursor: e-resize;
}

/* ---- About Page ---- */
.about {
  max-width: 580px;
}

.about p {
  font-size: 0.95rem;
  line-height: 1.85;
  margin-bottom: 1.4em;
  color: #444;
}

.about h2 {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
  margin-top: 2.8em;
  margin-bottom: 0.8em;
}

.about ul {
  list-style: none;
  font-size: 0.9rem;
  color: #666;
  line-height: 2;
}

.about .contact-line {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
  color: #666;
}

.about .contact-line a {
  color: #1a1a1a;
  border-bottom: 1px solid #ddd;
  padding-bottom: 1px;
}

.about .contact-line a:hover {
  color: #c00;
  border-color: #c00;
  opacity: 1;
}

/* ---- Responsive ---- */
@media (max-width: 1000px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 20px;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }

  .sidebar-top {
    display: flex;
    align-items: baseline;
    gap: 24px;
  }

  .sidebar nav {
    flex-direction: row;
    gap: 12px;
  }

  .sidebar-bottom {
    display: none;
  }

  .site-title {
    margin-bottom: 0;
  }

  .main {
    margin-left: 0;
    padding: 20px 20px 60px;
  }

  .hero {
    margin-left: 0;
    height: auto;
    padding: 20px;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .lightbox-close { top: 16px; right: 16px; }
}
