:root {
  --paper: #fffdf8;
  --paper-soft: #f5f4ee;
  --ink: #363433;
  --muted: #69625c;
  --teal: #148c99;
  --coral: #f25f4c;
  --yellow: #f4bf2f;
  --blue: #437fc0;
  --wood: #c89457;
  --plum: #5d4b73;
  --line: #ded6c8;
  --shadow: 0 18px 36px rgba(79, 57, 27, 0.16);
  --soft-shadow: 0 10px 22px rgba(65, 51, 34, 0.12);
  --radius: 8px;
  --display: "Comic Sans MS", "Segoe Print", "Bradley Hand ITC", cursive;
  --body: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12px 12px, rgba(20, 140, 153, 0.045) 1px, transparent 1px) 0 0 / 34px 34px,
    linear-gradient(180deg, var(--paper) 0%, #ffffff 52%, var(--paper-soft) 100%);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}

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

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 24px 14px;
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(222, 214, 200, 0.78);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  text-decoration: none;
}

.brand-title {
  position: relative;
  font-family: var(--display);
  font-size: 38px;
  line-height: 1;
  color: var(--teal);
  white-space: nowrap;
}

.brand-title::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 4px;
  background: var(--teal);
  border-radius: 999px;
  transform: rotate(-1deg);
}

.brand-title strong {
  color: var(--coral);
  font-weight: 400;
}

.sun-mark {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 4px solid var(--yellow);
  border-radius: 50%;
}

.sun-mark::before,
.sun-mark::after {
  content: "";
  position: absolute;
  inset: -12px;
  background:
    linear-gradient(var(--yellow), var(--yellow)) center 0 / 4px 9px no-repeat,
    linear-gradient(var(--yellow), var(--yellow)) center 100% / 4px 9px no-repeat,
    linear-gradient(90deg, var(--yellow), var(--yellow)) 0 center / 9px 4px no-repeat,
    linear-gradient(90deg, var(--yellow), var(--yellow)) 100% center / 9px 4px no-repeat;
}

.sun-mark::after {
  transform: rotate(45deg);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 26px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.nav-links a {
  padding: 8px 0;
  border-bottom: 3px solid transparent;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: var(--coral);
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 8px 18px rgba(68, 48, 28, 0.08);
}

.language-button {
  min-width: 52px;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.language-button.is-active {
  background: var(--ink);
  color: #fff;
}

.section-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  align-items: center;
  gap: 58px;
  padding: 86px 0 74px;
}

.hero-copy {
  max-width: 500px;
}

.hero h1 {
  margin: 0 0 24px;
  font-family: var(--display);
  font-size: 66px;
  font-weight: 400;
  line-height: 0.98;
  color: #373636;
  overflow-wrap: break-word;
}

.hero p {
  max-width: 450px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 20px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 30px;
  border-radius: 6px;
  background: var(--coral);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(242, 95, 76, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #e95342;
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(242, 95, 76, 0.34);
}

.art-frame {
  margin: 0;
  max-width: 100%;
  background: #fff;
  border: 12px solid var(--wood);
  border-image: linear-gradient(135deg, #dab67b 0%, #b77a3e 45%, #f0d19a 100%) 12;
  box-shadow: var(--shadow);
}

.art-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.hero-art {
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 3;
}

.hero-art figcaption {
  position: absolute;
  left: 18px;
  bottom: 14px;
  max-width: calc(100% - 36px);
  padding: 5px 10px;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.doodle {
  position: absolute;
  pointer-events: none;
}

.doodle-star {
  left: -46px;
  top: 150px;
  width: 42px;
  height: 42px;
}

.doodle-star::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  background: var(--teal);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 56%, 79% 91%, 50% 69%, 21% 91%, 32% 56%, 2% 35%, 39% 35%);
  opacity: 0.9;
}

.doodle-heart {
  left: 360px;
  top: 174px;
  width: 34px;
  height: 34px;
  transform: rotate(-9deg);
}

.doodle-heart::before,
.doodle-heart::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 28px;
  border: 4px solid var(--coral);
  border-left: 0;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.doodle-heart::before {
  left: 8px;
  transform: rotate(45deg);
}

.doodle-heart::after {
  left: 0;
  transform: rotate(-45deg);
}

.featured {
  padding: 18px 0 72px;
}

.section-heading {
  text-align: center;
  margin: 0 auto 30px;
}

.section-heading h2 {
  position: relative;
  display: inline-block;
  margin: 0;
  font-family: var(--display);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
}

.section-heading h2::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -9px;
  height: 4px;
  background: var(--coral);
  border-radius: 999px;
  transform: rotate(-1deg);
}

.section-heading p {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: start;
}

.featured-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.featured-card.is-raised {
  transform: translateY(-20px) rotate(1deg);
}

.featured-card h3 {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  margin: 0;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 253, 248, 0.93);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 900;
}

.gallery-band {
  padding: 72px 0 80px;
  background:
    linear-gradient(90deg, rgba(20, 140, 153, 0.12), transparent 18%, transparent 82%, rgba(242, 95, 76, 0.12)),
    #fff;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto 32px;
}

.filter-button {
  min-height: 42px;
  padding: 0 17px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.filter-button:hover,
.filter-button:focus-visible {
  transform: translateY(-1px);
  border-color: var(--teal);
}

.filter-button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.gallery-grid {
  column-count: 3;
  column-gap: 22px;
}

.art-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 22px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--soft-shadow);
  transition: opacity 160ms ease, transform 160ms ease;
}

.art-card.is-hidden {
  display: none;
}

.art-open {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
}

.art-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.art-card:hover .art-open img {
  transform: scale(1.025);
}

.art-card.is-portrait .art-open,
.art-card.is-note .art-open,
.art-card.is-photo .art-open {
  aspect-ratio: 3 / 4;
}

.art-card.is-poster .art-open {
  aspect-ratio: 0.72 / 1;
  background: #17191f;
}

.art-card.is-bookmark .art-open {
  aspect-ratio: 0.36 / 1;
  background: #f9f7f0;
}

.art-card.is-bookmark .art-open img,
.art-card.is-poster .art-open img {
  object-fit: contain;
}

.art-card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 66px;
  padding: 14px 14px 15px;
}

.art-card-body h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.22;
  font-weight: 900;
}

.favorite-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.favorite-toggle span,
.favorite-toggle span::before,
.favorite-toggle span::after {
  position: absolute;
  background: var(--coral);
  transition: transform 160ms ease, opacity 160ms ease;
}

.favorite-toggle span {
  width: 18px;
  height: 18px;
  left: 12px;
  top: 13px;
  transform: rotate(45deg) scale(0.78);
  opacity: 0.42;
}

.favorite-toggle span::before,
.favorite-toggle span::after {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.favorite-toggle span::before {
  left: -9px;
  top: 0;
}

.favorite-toggle span::after {
  left: 0;
  top: -9px;
}

.favorite-toggle.is-on {
  border-color: var(--coral);
}

.favorite-toggle.is-on span {
  transform: rotate(45deg) scale(0.92);
  opacity: 1;
}

.empty-state {
  margin: 24px auto 0;
  padding: 18px;
  max-width: 520px;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

.about {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  align-items: center;
  padding: 78px 0 86px;
}

.desk-sketch {
  position: relative;
  min-width: 0;
  margin: 0;
  transform: rotate(-1deg);
}

.desk-sketch::before {
  content: "";
  position: absolute;
  inset: 16px -14px -14px 16px;
  z-index: -1;
  border-radius: var(--radius);
  background: rgba(20, 140, 153, 0.18);
}

.desk-sketch img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 12px solid #fff;
  box-shadow: var(--shadow);
}

.about-copy h2 {
  margin: 0 0 22px;
  font-family: var(--display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
}

.about-copy p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 19px;
}

.signature {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 30px;
  color: var(--teal);
}

.site-footer {
  position: relative;
  overflow: hidden;
  padding: 36px 24px 42px;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.site-footer p {
  margin: 6px 0;
  font-size: 15px;
  font-weight: 700;
}

.footer-wave {
  width: 240px;
  height: 14px;
  margin: 0 auto 20px;
  background:
    radial-gradient(circle at 8px 8px, transparent 8px, var(--yellow) 9px, transparent 10px) 0 0 / 24px 14px repeat-x;
}

.art-dialog {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.art-dialog::backdrop {
  background: rgba(24, 21, 19, 0.66);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.94);
  color: var(--ink);
  cursor: pointer;
}

.dialog-close svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.dialog-image {
  width: 100%;
  max-height: 74vh;
  object-fit: contain;
  background: #151515;
}

.dialog-copy {
  padding: 20px 24px 24px;
}

.dialog-copy h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 400;
  line-height: 1.05;
}

.dialog-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

@media (max-width: 940px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 20px;
  }

  .language-switch {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .hero,
  .about {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 64px;
  }

  .hero-copy {
    max-width: none;
  }

  .hero-art {
    max-width: 760px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .featured-card {
    aspect-ratio: 4 / 3;
  }

  .featured-card.is-raised {
    transform: none;
  }

  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  .site-header {
    display: block;
    width: 100%;
    max-width: 100%;
    gap: 8px;
    padding: 14px 18px 12px;
  }

  .brand {
    gap: 8px;
    max-width: calc(100% - 92px);
  }

  .brand-title {
    font-size: 23px;
  }

  .sun-mark {
    width: 24px;
    height: 24px;
    border-width: 3px;
  }

  .sun-mark::before,
  .sun-mark::after {
    inset: -9px;
  }

  .nav-links {
    margin-top: 12px;
    gap: 16px;
    font-size: 14px;
  }

  .language-switch {
    position: fixed;
    top: 14px;
    right: auto;
    left: min(calc(100vw - 88px), 284px);
    z-index: 30;
  }

  .language-button {
    min-width: 32px;
    min-height: 34px;
    padding: 0 4px;
    font-size: 13px;
  }

  .section-shell {
    width: calc(100% - 32px);
  }

  .hero {
    gap: 34px;
    padding: 50px 0 58px;
  }

  .hero h1 {
    font-size: 38px;
    line-height: 1.08;
  }

  .hero p {
    max-width: 100%;
    font-size: 17px;
  }

  .section-heading h2,
  .about-copy h2 {
    font-size: 38px;
  }

  .filter-bar {
    justify-content: flex-start;
  }

  .filter-button {
    min-height: 39px;
    padding: 0 13px;
    font-size: 14px;
  }

  .doodle {
    display: none;
  }

  .gallery-grid {
    column-count: 1;
  }

  .about {
    padding: 60px 0 68px;
  }

  .dialog-copy h2 {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
