*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fff6f8;
  color: #1c1c1c;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
}

body.is-work {
  background: #eef5fb;
}

a {
  color: #1c1c1c;
}

button {
  font-family: Georgia, "Times New Roman", serif;
}

.mast {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #fff6f8;
}

body.is-work .mast {
  background: #eef5fb;
}

.wordmark {
  display: block;
  width: min(300px, 68vw);
  height: auto;
  margin: 0.75rem auto 0.4rem;
}

.mast-rule {
  width: 100%;
  height: 5px;
  margin: 0.25rem 0 0;
  background-image: radial-gradient(circle, #1a1a1a 0.85px, transparent 1px);
  background-size: 22px 5px;
  background-repeat: repeat-x;
  background-position: center;
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 2.25rem;
  margin: 0;
  padding: 0.55rem 1rem 0.35rem;
  background: transparent;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #1c1c1c;
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: 0;
  cursor: pointer;
}

.tab.is-active {
  text-decoration: underline;
  text-underline-offset: 0.28em;
}

.page {
  width: min(68rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 0.45rem 0 5rem;
}

.framed {
  display: block;
  width: fit-content;
  margin: 0 auto 1.35rem;
  text-align: center;
}

.shot {
  position: relative;
  display: block;
  margin: 0 auto;
}

.shot-gown {
  width: min(380px, 86vw);
  aspect-ratio: 360 / 430;
}

.shot-young {
  width: min(560px, 94vw);
  aspect-ratio: 620 / 430;
}

.shot img {
  position: absolute;
  display: block;
  object-fit: cover;
  border-radius: 0.35rem;
}

.shot-gown img {
  left: 18.9%;
  top: 19.1%;
  width: 62.2%;
  height: 60.9%;
}

.shot-young img {
  left: 18.4%;
  top: 17.4%;
  width: 63.2%;
  height: 59.4%;
}

.frame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.frame-svg path {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frame-svg .beads {
  stroke-width: 2.5;
  stroke-dasharray: 0.15 6.4;
}

.frame-svg circle {
  fill: #1a1a1a;
  stroke: none;
}

.welcome {
  margin: -1.7rem 0 0;
  font-size: 1.65rem;
  font-style: italic;
  letter-spacing: 0.01em;
}

.panel {
  width: min(40rem, 100%);
  margin: 0 auto;
  scroll-margin-top: 8.5rem;
}

#work.panel {
  width: 100%;
}

.panel h2 {
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 400;
  font-family: "Courier New", Courier, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-align: center;
}

.panel p {
  margin: 0 0 1.15rem;
}

.panel[hidden] {
  display: none;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 2.25rem;
  align-items: flex-start;
  padding-top: 0.5rem;
}

.mag {
  display: block;
  width: 220px;
  color: #1c1c1c;
  text-decoration: none;
  text-align: center;
}

.book {
  position: relative;
  width: 190px;
  height: 260px;
  margin: 0 auto 0.15rem;
  perspective: 1000px;
}

.book-inside,
.book-cover {
  position: absolute;
  inset: 0;
}

.book-inside {
  overflow: hidden;
  background: #fffef8;
  border: 1px solid #1c1c1c;
  padding: 0.55rem 0.6rem 0.5rem;
  font-family: "Caveat", "Segoe Script", cursive;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.12;
  text-align: left;
}

.book-inside p {
  margin: 0;
}

.book-cover {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #1c1c1c;
  transform-origin: left center;
  transition: transform 0.45s ease;
  backface-visibility: hidden;
}

.book-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.book-cover--art img,
.book-cover--forest img,
.book-cover--orange img {
  object-fit: contain;
  object-position: center;
  background: transparent;
}

.book-cover--logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111111;
  padding: 0.75rem;
}

.book-cover--orange {
  background: #f6c48a;
}

.book-cover--forest {
  background: #1e4d38;
}

.book-cover--mint {
  background: #d7f3d4;
}

.book-cover--blue {
  background: #9ec3e0;
}

.book-cover--lilac {
  background: #e4d4f6;
}

.book-cover--pink {
  background: #f8d0dc;
}

.book-cover--butter {
  background: #f8efc4;
}

.book-cover--peach {
  background: #f8d8c4;
}

.book-cover--sage {
  background: #cfe8d8;
}

.book-cover--logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.mag:hover .book-cover,
.mag:focus-visible .book-cover,
.mag.is-open .book-cover {
  transform: rotateY(-155deg);
}

.mag-title,
.mag-pub {
  margin: 0.7rem 0 0;
  text-align: center;
}

.mag-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.84rem;
  line-height: 1.35;
}

.mag-pub {
  margin-top: 0.35rem;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .page {
    width: min(68rem, calc(100% - 1.4rem));
    padding-top: 0.55rem;
  }

  .welcome {
    font-size: 1.35rem;
  }

  body {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-cover {
    transition: none;
  }
}
