:root {
  color-scheme: dark;
  --bg: #262626;
  --surface: #181a1c;
  --surface-raised: #202327;
  --text: #f5f3ef;
  --muted: #aaa7a0;
  --accent: #d7b46a;
  --border: rgb(255 255 255 / 0.11);
  --shadow: 0 24px 70px rgb(0 0 0 / 0.28);
  --header: rgb(38 38 38 / 0.82);
  --viewer-bg: #262626;
  --viewer-placeholder: #202224;
  --viewer-icon: #fff;
  --viewer-icon-secondary: #45484b;
  --viewer-panel: rgb(0 0 0 / 0.58);
  --viewer-caption: #fff;
  --viewer-metadata: rgb(255 255 255 / 0.68);
  --radius: 18px;
  --page: 1520px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f2ed;
  --surface: #fffdfa;
  --surface-raised: #ffffff;
  --text: #1a1b1c;
  --muted: #66635e;
  --accent: #8b621c;
  --border: rgb(20 20 20 / 0.12);
  --shadow: 0 24px 70px rgb(44 38 28 / 0.12);
  --header: rgb(244 242 237 / 0.84);
  --viewer-bg: #f4f2ed;
  --viewer-placeholder: #ddd9d1;
  --viewer-icon: #1a1b1c;
  --viewer-icon-secondary: #fff;
  --viewer-panel: rgb(255 253 250 / 0.82);
  --viewer-caption: #1a1b1c;
  --viewer-metadata: rgb(26 27 28 / 0.66);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Source Sans 3", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

:root[lang="en"] [lang="zh-Hans"],
:root[lang="zh-Hans"] [lang="en"] {
  display: none !important;
}

:root[lang="zh-Hans"],
[lang="zh-Hans"] {
  font-family: "Noto Sans SC", "PingFang SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 300;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
}

.skip-link:focus {
  transform: none;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 82px;
  padding: 12px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid var(--border);
  background: var(--header);
  backdrop-filter: blur(18px) saturate(130%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: auto;
  height: 54px;
  filter: var(--logo-filter, none);
}

:root[data-theme="light"] .brand img {
  filter: invert(1);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-button,
.text-button {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.icon-button:hover,
.text-button:hover {
  border-color: var(--border);
  background: var(--surface-raised);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.text-button {
  min-width: 58px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.page {
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: clamp(34px, 6vw, 92px) clamp(18px, 4vw, 64px) 96px;
}

.page--home {
  padding-top: clamp(14px, 2vw, 30px);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
  gap: 40px;
  align-items: end;
  margin-bottom: clamp(40px, 7vw, 90px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 16px;
  font-family: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.hero-copy {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.25rem);
}

.hero-meta {
  justify-self: end;
  padding: 18px 0 2px 24px;
  border-left: 1px solid var(--border);
  color: var(--muted);
}

.hero-meta strong {
  display: block;
  color: var(--text);
  font-family: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 400;
}

.album-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(10px, 1.25vw, 20px);
}

.album-grid::after {
  content: "";
  flex: 999 1 320px;
  height: 0;
}

.album-card {
  position: relative;
  flex: var(--ratio) 1 var(--basis);
  height: clamp(300px, 40vh, 520px);
  min-width: min(100%, 250px);
  overflow: hidden;
  border-radius: 6px;
  background: var(--surface);
}

.album-card picture,
.album-card img {
  width: 100%;
  height: 100%;
}

.album-card img {
  object-fit: cover;
  object-position: center;
  transition: filter 400ms ease, transform 700ms cubic-bezier(.2,.7,.2,1);
}

.album-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 42%, rgb(0 0 0 / 0.72));
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.album-card:hover img,
.album-card:focus-visible img {
  filter: saturate(1.08) contrast(1.03);
  transform: scale(1.025);
}

.album-card:hover::after,
.album-card:focus-visible::after {
  opacity: 1;
}

.album-card__label {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 22px;
  left: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.album-card:hover .album-card__label,
.album-card:focus-visible .album-card__label {
  opacity: 1;
  transform: none;
}

.album-card__label strong {
  font-family: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  font-weight: 400;
  line-height: 1.05;
}

.album-card__count {
  flex: none;
  color: rgb(255 255 255 / 0.74);
  font-size: 0.82rem;
}

.album-heading {
  margin-bottom: clamp(34px, 5vw, 64px);
}

.album-heading h1 {
  margin-bottom: 0;
}

.album-description {
  max-width: 760px;
  margin: clamp(18px, 2.5vw, 30px) 0 0;
  color: var(--muted);
}

.album-description p {
  margin: 0 0 0.9em;
}

.album-description p:last-child {
  margin-bottom: 0;
}

.album-description h1,
.album-description h2,
.album-description h3 {
  margin: 1.15em 0 0.45em;
  font: inherit;
  color: var(--text);
  font-weight: 650;
}

.album-description ul,
.album-description ol {
  padding-left: 1.4em;
}

.album-description a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.album-description blockquote {
  margin: 1em 0;
  padding-left: 1em;
  border-left: 2px solid var(--accent);
}

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(12px, 2vw, 24px);
}

.photo-grid::after {
  content: "";
  flex: 999 1 260px;
  height: 0;
}

.photo-card {
  position: relative;
  flex: var(--ratio) 1 var(--basis);
  width: var(--basis);
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--surface);
}

.photo-card a,
.photo-card picture,
.photo-card img {
  display: block;
  width: 100%;
}

.photo-card img {
  height: auto;
  object-position: center;
  transition: filter 200ms ease, transform 500ms cubic-bezier(.2,.7,.2,1);
}

.photo-card figcaption {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.photo-card:hover img {
  filter: brightness(0.92);
  transform: scale(1.012);
}

.context-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.context-line .eyebrow {
  margin: 0;
}

.context-line__separator {
  color: var(--muted);
  opacity: 0.55;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 0.76rem;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.prose {
  width: 100%;
  margin: 0;
}

.prose h1 {
  margin-bottom: 42px;
}

.prose h2 {
  margin: 48px 0 12px;
  font-family: "Source Serif 4", "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, "Times New Roman", serif;
  font-size: 1.8rem;
  font-weight: 400;
}

.prose p,
.prose li {
  color: var(--muted);
}

.contact-email {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  text-underline-offset: 0.18em;
}

.contact-email:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

.prose > div[lang] {
  max-width: 980px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, var(--page));
  margin: 0 auto;
  padding: 28px clamp(18px, 4vw, 64px) 42px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.83rem;
}

.pswp {
  --pswp-bg: var(--viewer-bg);
  --pswp-placeholder-bg: var(--viewer-placeholder);
  --pswp-icon-color: var(--viewer-icon);
  --pswp-icon-color-secondary: var(--viewer-icon-secondary);
  --pswp-icon-stroke-color: var(--viewer-icon-secondary);
  --pswp-preloader-color: color-mix(in srgb, var(--viewer-icon) 35%, transparent);
  --pswp-preloader-color-secondary: var(--viewer-icon);
}

.pswp__custom-caption {
  position: absolute;
  z-index: 10;
  right: 16px;
  bottom: 14px;
  left: 16px;
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--viewer-panel);
  color: var(--viewer-caption);
  backdrop-filter: blur(10px);
}

.pswp__caption-text {
  margin-bottom: 5px;
  text-align: center;
}

.pswp__metadata {
  color: var(--viewer-metadata);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-meta {
    justify-self: start;
  }

  .album-heading {
    display: block;
  }

  .album-description {
    margin-top: 22px;
  }
}

@media (max-width: 600px) {
  .site-header {
    min-height: 70px;
    padding: 10px 14px;
  }

  .brand img {
    height: 44px;
  }

  .site-nav {
    gap: 2px;
  }

  .page {
    padding-top: 42px;
  }

  .album-card,
  .album-card:nth-child(n) {
    flex-basis: 100%;
    min-height: 330px;
    height: min(68vh, 520px);
  }

  .album-grid::after {
    display: none;
  }

  .album-card::after,
  .album-card .album-card__label {
    opacity: 1;
    transform: none;
  }

  .photo-grid {
    display: block;
  }

  .photo-grid::after {
    display: none;
  }

  .photo-card {
    width: 100%;
    margin-bottom: clamp(12px, 2vw, 24px);
  }

  .photo-card a::after {
    opacity: 1;
  }

  .site-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
