:root {
  --bg: #ffffff;
  --text: #222222;
  --muted: #6f6f6f;
  --line: #d2d2d2;
  --link-card-image-size: 120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Times New Roman", "Noto Serif SC", "Songti SC", serif;
  line-height: 1.65;
}

.site {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 80px 28px 70px;
  text-align: center;
}

.brand {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
}

.brand-logo {
  width: min(100%, 86px);
  height: auto;
  display: block;
}

.brand-name {
  width: min(100%, 210px);
  height: auto;
  display: block;
}

.top-nav {
  margin: 26px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: clamp(11px, 1vw, 14px);
}

.top-nav a {
  text-decoration: none;
}

.hero {
  margin: 42px auto 58px;
}

.hero-photo {
  margin: 0 auto;
  width: min(100%, 335px);
  aspect-ratio: 3 / 4;
  border: 1px solid #d8d8d8;
  display: block;
  object-fit: cover;
}

.section {
  margin: 0 auto 52px;
  max-width: 670px;
}

.section h2 {
  margin: 0 0 22px;
  font-size: clamp(14px, 1.7vw, 18px);
  font-weight: 500;
}

.section p {
  margin: 0;
  font-size: clamp(11.5px, 1.05vw, 15px);
}

.about p {
  text-wrap: pretty;
}

a {
  color: var(--text);
  text-underline-offset: 4px;
}

.external-link {
  text-decoration: none;
}

.external-link::after {
  content: " ↗";
  display: inline-block;
  font-size: 0.9em;
}

.qr-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.qr-trigger {
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  line-height: inherit;
  cursor: pointer;
}

.qr-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: 120px;
  padding: 6px;
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 10;
}

.qr-popover img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.qr-item:hover .qr-popover,
.qr-item:focus-within .qr-popover,
.qr-item.is-open .qr-popover {
  opacity: 1;
  visibility: visible;
}

.links-grid {
  margin-top: 10px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--link-card-image-size), var(--link-card-image-size))
  );
  justify-content: center;
}

.link-card {
  display: grid;
  gap: 0;
  width: var(--link-card-image-size);
  justify-items: start;
  text-align: left;
  text-decoration: none;
}

.card-art {
  width: var(--link-card-image-size);
  height: var(--link-card-image-size);
  display: block;
  border-radius: 0;
  border: 0;
  object-fit: cover;
  background: transparent;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.card-title {
  display: block;
  margin-top: 10px;
  font-size: clamp(9.75px, 0.7125vw, 11.25px);
  font-weight: 700;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-subtitle {
  display: block;
  margin-top: 5px;
  font-size: clamp(9px, 0.615vw, 9.75px);
  color: #555555;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.footer {
  margin: 34px auto 0;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}

.footer p {
  margin: 0;
  font-size: clamp(10px, 0.9vw, 15px);
  color: var(--muted);
}

@media (max-width: 900px) {
  .site {
    padding-top: 44px;
    padding-bottom: 48px;
  }

  .hero {
    margin: 24px auto 36px;
  }

  .section {
    margin-bottom: 34px;
  }

  .section h2 {
    margin-bottom: 12px;
  }

  .links-grid {
    margin: 8px auto 0;
  }

  .card-title {
    font-size: 11.25px;
  }

  .card-subtitle {
    font-size: 9.75px;
  }
}
