/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box; /* width includes padding + border */
  background-color: seashell;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.menu-select {
  color: transparent;
}

body {
  font-family: "EB Garamond", serif;
  color: #222;
}

header {
  margin-top: 50px;
  min-width: 40%;
  max-width: 900px;
  margin: 50px auto 0 auto;
}

header h1 {
  display: flex;
  justify-content: center;
  font-size: large;
}

header h1 a {
  color: black;
  text-decoration-line: none;
}

nav {
  margin-right: 20%;
  margin-left: 20%;
  padding-top: 15px;
}

nav ul {
  display: flex;
  justify-content: space-between; /* spaces items evenly */
  list-style: none;
  font-style: italic;
}

nav ul a {
  color: black;
  font-size: large;
  text-decoration-line: none;
}

a:hover .menu-select {
  display: inline;
  color: black;
}

p a {
  color: black;
  transition: font-size 0.2s;
}

p a:hover {
  font-size: 1.1em;
}

footer {
  display: flex;
  padding-left: 10%;
  margin-top: auto;
  margin-bottom: 10vh;
  width: 100%;
}

.center-image {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 50px auto;
  max-width: 600px;
  min-height: 320px;
}

.center-image img {
  position: relative;
  z-index: 1;
  width: 300px;
  height: 300px;
  object-fit: cover;
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
}

.center-image pre {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-10%, -50%);
  color: rgb(255, 73, 73);
  font-size: 1.5em;
  z-index: 2;
  background: transparent;
  white-space: pre;
  pointer-events: none;
}

.bio {
  display: flex;
  flex-direction: column;
  justify-content: left;
  margin: 0 25% 20px 25%;
  margin-top: 60px;
  text-indent: 1.5em;
}

.jp {
  padding-top: 2em;
}

.art-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  padding: 32px 20%;
}

.art-photo {
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}

.art-photo img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}

/* Lightbox Modal Styles */
#art-lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(30, 30, 30, 0.85);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#art-lightbox-close {
  position: fixed;
  top: 24px;
  left: 24px;
  font-size: 2.2em;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  padding: 0 8px;
  line-height: 1;
  transition: background 0.2s;
}
#art-lightbox-close:hover {
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

#art-lightbox-modal {
  position: relative;
  background: transparent;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
  gap: 2vw;
}

#art-lightbox-caption {
  min-width: 180px;
  max-width: 260px;
  color: #e0e0e0;
  font-family: 'Fira Mono', 'Menlo', 'Consolas', 'Liberation Mono', monospace;
  font-size: 1.05em;
  background: rgba(30,30,30,0.15);
  padding: 1.2em 1.2em 1.2em 0.8em;
  border-radius: 8px;
  margin-right: 0.5vw;
  white-space: pre-line;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: 120px;
}

#art-lightbox-img {
  max-width: 60vw;
  max-height: 80vh;
  box-shadow: 0 4px 32px rgba(0,0,0,0.4);
  border-radius: 6px;
  background: #fff;
}

#art-lightbox-prev, #art-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2em;
  color: #fff;
  background: rgba(0,0,0,0.3);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
#art-lightbox-prev { left: -60px; }
#art-lightbox-next { right: -60px; }

@media (max-width: 600px) {
  #art-lightbox-img {
    max-width: 96vw;
    max-height: 60vh;
  }
  #art-lightbox-prev, #art-lightbox-next {
    position: absolute;
    top: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5em;
    left: unset;
    right: unset;
    /* Place over the image */
    background: rgba(0,0,0,0.45);
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  }
  #art-lightbox-prev {
    left: 8px;
    right: auto;
  }
  #art-lightbox-next {
    right: 8px;
    left: auto;
  }
  #art-lightbox-close {
    top: 8px;
    left: 8px;
    font-size: 1.5em;
  }
}

.art-photo:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.art-photo:hover img {
  transform: scale(1.04);
}

#mirror {
  display: flex;
  align-content: center;
  margin: 50px auto 0 auto;
  margin-top: 50px;
  width: 256px;
  height: 361.125px;
}

@media (max-width: 900px) {
  #art-lightbox-modal {
    flex-direction: column;
    gap: 1vw;
    max-width: 98vw;
  }
  #art-lightbox-caption {
    max-width: 90vw;
    min-width: 0;
    margin: 0 0 1vw 0;
    font-size: 0.98em;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  #art-lightbox-img {
    max-width: 96vw;
    max-height: 60vh;
  }
  #art-lightbox-modal {
    flex-direction: column;
    gap: 1vw;
    max-width: 98vw;
  }
  #art-lightbox-caption {
    max-width: 96vw;
    min-width: 0;
    margin: 0 0 1vw 0;
    font-size: 0.95em;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  header, nav, .center-image, .art-gallery {
    margin-left: auto;
    margin-right: auto;
    padding: 0;
  }
  header {
    max-width: 500px;
  }
  .center-image {
    flex-direction: column;
    margin-top: 24px;
    margin-bottom: 24px;
  }
  .center-image img, .center-image p {
    transform: none;
    width: 80vw;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
    text-align: center;
  }
  .center-image pre {
    transform: rotate(90deg);
    left: 30%;
    top: 50%;
    width: auto;
  }
  .art-gallery {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 16px 5%;
  }
  .art-photo img {
    height: 140px;
  }
}

@media (max-width: 600px) {
  header, nav, .art-gallery {
    margin-left: 5%;
    margin-right: 5%;
    padding: 0;
  }
  .center-image img {
    width: 96vw;
    max-width: 96vw;
  }
  .center-image pre {
    transform: rotate(90deg);
    left: 20%;
    top: 50%;
    width: auto;
    font-size: clamp(1.2em, 6vw, 2.5em);
  }
  .art-gallery {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 0;
  }
  .art-photo img {
    height: 96px;
  }
}
