:root {
  --page-pad: clamp(18px, 3vw, 48px);
  --nav-h: 76px;
  --text: #111;
  --muted: #666;
  --line: #e8e8e8;
  --bg: #fff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px var(--page-pad);
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.logo img {
  display: block;
  max-height: 50px;
  max-width: min(320px, 52vw);
  object-fit: contain;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
a { color: inherit; text-decoration: none; }
a:hover { opacity: .68; }
main { padding: 42px var(--page-pad) 72px; }
.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 34px 28px;
  max-width: 1500px;
  margin: 0 auto;
}
.project-card { display: block; }
.thumb-wrap {
  aspect-ratio: 4 / 3;
  background: #eee;
  overflow: hidden;
}
.thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.caption {
  text-align: center;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.25;
}
.page-title {
  text-align: center;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 400;
  letter-spacing: .02em;
  margin: 0 0 34px;
}

main.gallery-main {
  padding: 0;
}
.gallery-scroll {
  width: 100%;
  margin: 0;
}
.gallery-frame {
  margin: 0;
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: hidden;
}
.gallery-frame img {
  display: block;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  object-fit: cover;
}

.empty-note {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.5;
}
.about-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(300px, 680px);
  gap: clamp(28px, 5vw, 70px);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}
.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}
.about-copy h1 {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 400;
  margin: 0 0 22px;
}
.about-copy p {
  font-size: 18px;
  line-height: 1.65;
  color: #222;
}
.contact {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.back-link {
  display: inline-block;
  margin: 0 0 24px;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 1050px) {
  .home-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { height: auto; min-height: var(--nav-h); align-items: center; }
  .home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 18px; }
  .about-wrap { grid-template-columns: 1fr; }
  .nav-links { font-size: 12px; gap: 12px; }
}
@media (max-width: 460px) {
  .home-grid { grid-template-columns: 1fr; }
}

/* FINAL PUBLISHABLE GALLERY LAYOUT — EACH IMAGE FITS INSIDE THE BROWSER WINDOW */
.site-header .nav-links a[href="index.html"] {
  display: none;
}

:root {
  --nav-h: 72px;
}

body.gallery-page {
  background: #f3f3f3;
}

body.gallery-page .site-header {
  background: rgba(255,255,255,.98);
}

body.gallery-page main.gallery-main {
  padding: 0;
}

body.gallery-page .gallery-scroll {
  width: 100%;
  margin: 0;
}

body.gallery-page .gallery-frame {
  width: 100%;
  height: calc(100vh - var(--nav-h));
  min-height: 520px;
  margin: 0;
  padding: 18px 18px 30px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  border: none !important;
  overflow: hidden;
  line-height: 0;
}

body.gallery-page .gallery-frame img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - var(--nav-h) - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 760px) {
  :root {
    --nav-h: 64px;
  }

  body.gallery-page .gallery-frame {
    height: calc(100vh - var(--nav-h));
    min-height: 420px;
    padding: 12px 12px 24px;
  }

  body.gallery-page .gallery-frame img {
    max-height: calc(100vh - var(--nav-h) - 36px);
  }
}
