@charset "UTF-8";

/* ===== Reset ===== */
body, h1, h2, h3, h4, h5, h6, blockquote, p, a, form {
  margin: 0;
  padding: 0;
  line-height: 16px;
}
img { display: block; max-width: 100%; }

/* ===== Fonts ===== */
header a {
  font-family: 'Playfair Display SC', serif;
  font-size: 14px;
  letter-spacing: 3px;
}
nav a {
  font-family: 'Cardo', serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  vertical-align: top;
}
main {
  font-family: 'Noto Serif SC', serif;
  font-size: 12px;
  letter-spacing: 1px;
  vertical-align: baseline;
  line-height: 18px;
  color: #111;
  -webkit-text-size-adjust: none;
}
footer {
  font-family: 'Cardo', serif;
  font-size: 10px;
  color: #222;
  letter-spacing: 1.5px;
  text-align: right;
}

/* ===== Links ===== */
a:link, a:visited {
  color: #111;
  position: relative;
  display: inline-block;
  text-decoration: none;
}
nav a::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  content: '';
  width: 110px;
  height: 1px;
  background: #333;
  transform: scale(0, 1);
  transform-origin: left top;
  transition: transform .3s;
}
a:hover::after {
  transform: scale(1, 1);
}
a::after {
  position: absolute;
  bottom: -1px;
  left: 0;
  content: '';
  width: 100%;
  height: 1px;
  background: #333;
  transform: scale(0, 1);
  transform-origin: left top;
  transition: transform .3s;
}
.works a::after {
  height: 0px;
}

/* ===== Sub-page elements ===== */
.selected {
  border-bottom: solid 1px #333;
  width: 110px;
}

/* ===== Layout ===== */
#bg-container {
  background-color: #FFF;
  width: 100%;
  margin: 0 auto;
  max-width: 570px;
  padding: 0 4%;
}
.container {
  display: grid;
  grid-template-columns: 220px 350px;
  grid-template-rows: 120px auto 50px;
  margin: 120px 0 0;
  padding: 0;
}
header {
  grid-column: 1 / 3;
  grid-row: 1;
}
nav {
  grid-column: 1;
  grid-row: 2;
  margin: 0 0 40px 0;
  padding: 0 110px 0 0;
  display: flex;
  height: 210px;
  flex-wrap: wrap;
}
.menu { width: 110px; }
main {
  grid-column: 2;
  grid-row: 2;
}
footer {
  grid-column: 1 / 3;
  grid-row: 3;
  margin: 5px 0 0 0;
}

/* ===== Works 作品墙 ===== */
.works {
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: space-between;
  flex-wrap: wrap;
}
.works-item {
  margin-bottom: 30px;
}
.works-item img {
  width: auto;
  height: 142px;
}

/* ===== About ===== */
.about-text {
  padding: 0 0 30px 0;
}
.about-text p {
  line-height: 20px;
  padding: 0 0 12px 0;
}
.about-portrait {
  width: 160px;
  margin: 0 0 20px 0;
  display: block;
}
.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== Statement ===== */
.statement-text {
  padding: 0 0 30px 0;
}
.statement-text p {
  line-height: 20px;
  padding: 0 0 12px 0;
}
.page-statement #bg-container {
  max-width: 650px;
}
.page-statement .container {
  grid-template-columns: 200px 450px;
}

/* about 页扩宽内容区 */
.page-about #bg-container {
  max-width: 650px;
}
.page-about .container {
  grid-template-columns: 200px 450px;
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.lightbox.active {
  display: flex;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.lightbox-img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
}
.lightbox-caption {
  position: absolute;
  bottom: -2.2rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Cardo', serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  white-space: nowrap;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-family: 'Cardo', serif;
  transition: color 0.2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }
.lightbox-close {
  top: -3rem;
  right: 0;
  font-size: 1.8rem;
  line-height: 1;
}
.lightbox-prev {
  left: -3.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  line-height: 1;
}
.lightbox-next {
  right: -3.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.5rem;
  line-height: 1;
}

/* ===== Responsive ===== */
@media (max-width: 620px) {
  #bg-container {
    max-width: 620px;
    padding: 0;
  }
  .container {
    grid-template-columns: 100%;
    grid-template-rows: 44px 44px auto 10px;
    margin: 30px 4%;
  }
  header { grid-column: 1; grid-row: 1; }
  nav {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    justify-content: space-between;
    padding: 0;
    margin: 0;
    height: auto;
  }
  nav a::after { width: 100%; }
  .menu { width: auto; }
  main {
    grid-column: 1;
    grid-row: 3;
    margin: 20px 0 0;
  }
  footer { grid-column: 1; grid-row: 4; }
  .works-item img { max-width: 100%; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}
