:root {
  --ink: #111;
  --muted: #666;
}

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

body {
  background: #fff;
  color: var(--ink);
  font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- header ---------- */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 2rem;
}
.logo img { width: clamp(120px, 18vw, 170px); height: auto; }
header.site nav a { font-size: 0.95rem; padding: 0.6rem 0.2rem; }
header.site nav a:hover { opacity: 0.6; }

/* ---------- home slideshow ---------- */
.stage-wrap { padding: 1.4rem 2rem 3rem; }
.stage {
  position: relative;
  height: min(78vh, 52rem);
  display: flex; align-items: center; justify-content: center;
}
.stage img#slide {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  opacity: 0; transition: opacity 0.5s ease;
}
@media (prefers-reduced-motion: reduce) { .stage img#slide { transition: none; } }
.ctl {
  position: absolute; top: 50%; transform: translateY(-50%);
  border: 0; background: rgba(255,255,255,0.7);
  width: 44px; height: 64px; cursor: pointer;
  font-size: 2rem; line-height: 1; color: #333;
  display: flex; align-items: center; justify-content: center;
}
.ctl:hover { background: rgba(255,255,255,0.95); }
.ctl.prev { left: 0; }
.ctl.next { right: 0; }

/* ---------- about ---------- */
.container { max-width: 56rem; margin: 0 auto; padding: 1rem 2rem 4rem; }
.about-img { margin-bottom: 2.4rem; }
.prose { max-width: 40rem; margin: 0 auto; }
.prose p + p { margin-top: 1.2em; }
.contact { margin-top: 2.6rem; text-align: center; }
.btn {
  display: inline-block; border: 1px solid var(--ink);
  padding: 0.8rem 2.4rem; font-size: 0.95rem; letter-spacing: 0.06em;
  min-height: 44px;
}
.btn:hover { background: var(--ink); color: #fff; }

/* ---------- portfolios index ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1.2rem; }
.tile { position: relative; display: block; }
.tile img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #f2f2f2; }
.tile span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.25); color: #fff;
  font-size: 1.3rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase;
  opacity: 1; transition: background 0.3s;
}
.tile:hover span { background: rgba(0,0,0,0.45); }

/* ---------- category masonry ---------- */
.cat-title { font-weight: 400; font-size: 1.4rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 0.4rem 0 1.8rem; }
.masonry { columns: 3 16rem; column-gap: 1rem; }
.m-item { display: block; break-inside: avoid; margin-bottom: 1rem; }
.m-item img { width: 100%; background: #f2f2f2; }
.m-item:hover img { opacity: 0.9; }

/* ---------- lightbox ---------- */
dialog#lb {
  border: 0; padding: 0; background: rgba(255,255,255,0.98);
  width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh;
  display: none; align-items: center; justify-content: center;
}
dialog#lb[open] { display: flex; }
dialog#lb::backdrop { background: rgba(255,255,255,0.9); }
#lb-img { max-width: 92vw; max-height: 92vh; width: auto; height: auto; object-fit: contain; }
#lb-close {
  position: absolute; top: 0.8rem; right: 1.2rem;
  border: 0; background: none; font-size: 2.4rem; cursor: pointer; color: #333;
  width: 44px; height: 44px;
}
