/* Palette matched to https://blog.qjyg.de/ light theme. */
:root {
  --bg: #fdfbfb;
  --gradient-bg-start: #fdfbfb;
  --gradient-bg-end: #ebedee;
  --card: #fff;
  --ink: #333;
  --muted: #595959;
  --line: #d9dddd;
  --primary: #30b5a8;
  --shoka: #1fa38e;
  --shoka-dark: #178573;
  --shoka-light: #3ec5b1;
  --gradient-pink: linear-gradient(to right, #3ec5b1 0%, #5ac9c0 100%);
  --gradient-header: linear-gradient(-225deg, #e3f4ef 0%, #d9eeed 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(to top, var(--gradient-bg-end) 0, var(--gradient-bg-start) 30%);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Heiti SC", Arial, sans-serif;
  line-height: 1.7;
}

a {
  color: var(--shoka);
  text-decoration: none;
}

img {
  max-width: 100%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip-link:focus {
  left: 12px;
  z-index: 40;
  background: var(--shoka-dark);
  color: #fff;
  padding: 8px 12px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
  padding: 0 36px;
  background: linear-gradient(to bottom, rgba(253, 251, 251, 0.96), rgba(253, 251, 251, 0.82));
}

.logo {
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: 0.04em;
  background: var(--gradient-pink);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transform: skewX(-6deg);
}

.nav {
  display: flex;
  gap: 8px;
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  font-size: 0.98rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--shoka);
  border-bottom-color: var(--shoka);
}

.nav svg {
  width: 15px;
  height: 15px;
  opacity: 0.9;
}

.banner {
  position: relative;
  z-index: 0;
  height: 60dvh;
  max-height: 50rem;
  min-height: 22rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #8caa9d 0%, #9ab1a7 50%, #9ea5a3 100%);
}

.banner-title {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(31, 65, 56, 0.2);
  padding: 0 20px 4rem;
}

.wave-wrap {
  width: 100%;
  height: 15dvh;
  min-height: 3.125rem;
  max-height: 9.375rem;
  position: absolute;
  left: 0;
  bottom: 0;
  pointer-events: none;
}

.wave-wrap .wave {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
}

.wave-wrap .parallax > use {
  fill: var(--gradient-bg-start);
  animation: move-forever 12s linear infinite;
}

.wave-wrap .parallax > use:first-child {
  opacity: 0.75;
  filter: brightness(110%);
  animation-delay: -2s;
}

.wave-wrap .parallax > use:nth-child(2) {
  opacity: 0.6;
  filter: brightness(125%);
  animation-duration: 7s;
  animation-delay: -3s;
}

.wave-wrap .parallax > use:nth-child(3) {
  opacity: 1;
  animation-duration: 4s;
  animation-delay: -4s;
}

@keyframes move-forever {
  0% {
    transform: translate(-90px);
  }
  100% {
    transform: translate(85px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wave-wrap .parallax > use {
    animation: none;
  }
}

.banner-title .en {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.banner-title h1 {
  margin: 4px 0 10px;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 500;
}

.banner-title .sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  letter-spacing: 0.18em;
  font-size: 0.92rem;
}

.page-inner .banner {
  height: 42dvh;
  min-height: 16rem;
}

.page-inner .banner-title {
  padding-bottom: 3rem;
}

.page-inner .banner-title h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
}

.layout {
  width: min(1180px, calc(100% - 48px));
  margin: -48px auto 0;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  position: relative;
  z-index: 2;
  padding-bottom: 80px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 8px;
}

.avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.4rem;
  font-weight: 700;
  background: radial-gradient(circle at 35% 30%, var(--shoka-light), var(--shoka) 55%, var(--shoka-dark));
  box-shadow: 0 0 0 6px rgba(31, 163, 142, 0.14);
}

.sidebar h2 {
  margin: 14px 0 4px;
  font-size: 1.15rem;
  font-weight: 500;
}

.sidebar .bio {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 220px;
}

.stats {
  display: flex;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.content {
  min-width: 0;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.posts {
  display: grid;
  gap: 16px;
}

.post {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  background: var(--card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(31, 163, 142, 0.08);
  border-radius: 14px;
  overflow: hidden;
  min-height: 168px;
}

.post-cover {
  min-height: 168px;
  background: linear-gradient(135deg, #a2a2a2 0%, #717171 50%, #c7c7c7 100%);
}

.post:nth-child(2) .post-cover {
  background: linear-gradient(135deg, #8caa9d 0%, #9ab1a7 50%, #9ea5a3 100%);
}

.post:nth-child(3) .post-cover {
  background: linear-gradient(135deg, #a6a6a6 0%, #7e7e7e 50%, #e8e8e8 100%);
}

.post-body {
  padding: 16px 18px 14px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(31, 163, 142, 0.1);
  color: var(--shoka-dark);
  font-size: 0.75rem;
}

.post-body h3 {
  margin: 8px 0 6px;
  font-size: 1.28rem;
  font-weight: 500;
}

.post-body h3 a {
  color: var(--shoka);
}

.post-body h3 a:hover {
  color: var(--shoka-dark);
}

.post-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.article {
  background: var(--card);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  padding: 22px 26px 32px;
}

.article h2 {
  margin: 0 0 8px;
  font-size: 1.7rem;
  font-weight: 500;
}

.article h3 {
  margin: 26px 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
}

.article .lead {
  color: var(--muted);
  margin-top: 0;
}

.article p,
.article li {
  color: var(--ink);
}

.article ul {
  padding-left: 1.2em;
}

.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 8px 0 40px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 900px) {
  .topbar {
    padding: 0 16px;
    gap: 12px;
  }

  .layout {
    width: min(1180px, calc(100% - 24px));
    grid-template-columns: 1fr;
    margin-top: -48px;
  }

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

  .post-cover {
    min-height: 140px;
  }
}

@media (max-width: 640px) {
  .logo {
    font-size: 1.2rem;
  }

  .nav a span {
    display: none;
  }

  .nav a {
    padding: 8px;
  }
}

/* Personal homepage: a raised wave and generous space before the introduction. */
.page-home .banner {
  height: 50dvh;
  min-height: 20rem;
}

.page-home .layout {
  margin-top: 48px;
  align-items: start;
}

.home-welcome {
  padding: 30px 34px 34px;
  background: var(--card);
  border: 1px solid rgba(31, 163, 142, 0.08);
  border-radius: 18px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.home-eyebrow {
  margin: 0 0 12px;
  color: var(--shoka);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
}

.home-welcome h2 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
}

.home-welcome > p:not(.home-eyebrow) {
  margin: 0;
  color: var(--muted);
  max-width: 38em;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--gradient-pink);
  color: #fff;
  transition: box-shadow 0.2s;
}

.home-button-secondary {
  color: var(--shoka-dark);
  background: #eef8f5;
  border-color: #cde8df;
}

.home-button:hover {
  box-shadow: 0 4px 14px rgba(31, 163, 142, 0.18);
}

.home-button:focus-visible {
  outline: 2px solid var(--shoka-dark);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .page-home .layout { margin-top: 32px; gap: 32px; }
}

@media (max-width: 640px) {
  .home-welcome { padding: 24px; }
  .home-actions { flex-direction: column; }
}

/* Center the homepage title within the clear area above the animated wave. */
.page-home .banner {
  --home-wave-height: clamp(3.125rem, 15dvh, 9.375rem);
  padding-bottom: var(--home-wave-height);
}

.page-home .banner-title {
  padding: 0 20px;
}

.page-home .wave-wrap {
  height: var(--home-wave-height);
}

/* Keep the photo centered inside the existing circular avatar. */
img.avatar {
  object-fit: cover;
  object-position: 50% 45%;
}

/* User-selected photograph behind the homepage title. */
.page-home .banner {
  background-image: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.28)), url("assets/banner.jpeg");
  background-size: cover;
  background-position: center 48%;
  background-repeat: no-repeat;
}

.page-home .banner-title {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Photo belongs only to the homepage banner above the wave. */
.page-home .banner {
  isolation: isolate;
  overflow: hidden;
  background: #dedbd3;
}

:is(.page-home, .page-about) .banner::before {
  content: "";
  position: absolute;
  inset: -6px;
  z-index: -1;
  background: url("assets/background.jpeg") center 46% / cover no-repeat;
  filter: blur(3px);
}

:is(.page-home, .page-about) .banner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, rgba(25, 27, 26, 0.16), rgba(25, 27, 26, 0.22) 65%, rgba(253, 251, 251, 0.12));
}

.page-home .wave-wrap {
  opacity: 1;
}

/* Show more of the photo within the banner. */
:is(.page-home, .page-about) .banner::before {
  background-size: auto 220%;
  background-position: center 48%;
  mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 18%, #000 82%, transparent);
}

@media (max-width: 640px) {
  :is(.page-home, .page-about) .banner::before { background-size: auto 140%; }
}

/* Matching homepage navigation buttons. */
.home-button,
.home-button-secondary {
  min-width: 168px;
  min-height: 48px;
  padding: 12px 24px;
  gap: 22px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: linear-gradient(110deg, #239f8c, #39b6a6);
  color: #fff;
  font-weight: 500;
  box-shadow: 0 5px 14px rgba(31, 163, 142, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.home-button span {
  font-size: 1.1em;
  transition: transform 0.2s;
}

.home-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 8px 20px rgba(31, 163, 142, 0.24);
}

.home-button:hover span {
  transform: translate(2px, -2px);
}

.home-button:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .home-button, .home-button span { transition: none; }
  .home-button:hover, .home-button:hover span { transform: none; }
}

.social-links { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.social-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 13px; font-family: inherit; background: #eef7f4; color: #1fa38e; transition: background .2s, color .2s, transform .2s; }
.social-button svg { width: 23px; height: 23px; }
.social-rednote span { font-size: 10px; font-weight: 800; letter-spacing: -1px; }
.social-button:disabled { opacity: .7; cursor: default; }
a.social-button:hover { color: #fff; transform: translateY(-2px); }
a.social-email:hover { background: #55acd5; }
a.social-bilibili:hover { background: #fb7299; }
a.social-rednote:hover { background: #ff2442; }
.social-button:focus-visible { outline: 2px solid var(--shoka); outline-offset: 3px; }

button.social-button { cursor: pointer; }
button.social-email:hover { background: #55acd5; color: white; }
.email-text { border: 0; padding: 0; background: transparent; color: var(--shoka); font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.email-notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 14px; background: #fff; color: #178573; box-shadow: 0 4px 24px #0002; opacity: 0; visibility: hidden; overflow-wrap: anywhere; }
.email-notice.visible { opacity: 1; visibility: visible; }

/* Align introductory paragraphs with the full width of the welcome card. */
.home-welcome > p:not(.home-eyebrow) {
  max-width: none;
  width: 100%;
  text-wrap: pretty;
  overflow-wrap: break-word;
}

.home-welcome { position: relative; isolation: isolate; }
.home-decoration { position: absolute; right: 18px; top: 78px; width: 160px; height: 150px; color: var(--shoka); z-index: -1; pointer-events: none; }
@media (max-width: 640px) { .home-decoration { width: 95px; height: 90px; right: 12px; top: 135px; opacity: .7; } }

.home-welcome { position: relative; isolation: isolate; }
.home-decoration { position: absolute; top: 12px; right: 18px; width: 150px; height: 100px; color: #80c5b6; opacity: .3; pointer-events: none; z-index: -1; }
@media (max-width: 640px) { .home-decoration { width: 95px; height: 64px; right: 8px; top: 8px; opacity: .2; } }

/* Large pale-green motif fading into the upper-right quarter of the card. */
.home-welcome { overflow: hidden; }
.home-decoration {
  top: -22px;
  right: -28px;
  width: 50%;
  height: 50%;
  min-height: 200px;
  color: #a8dbc0;
  opacity: .5;
  mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%);
  -webkit-mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%);
}
.home-welcome::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 55%;
  height: 55%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at top right, rgba(183, 228, 199, .35), rgba(218, 241, 225, .12) 48%, transparent 74%);
}
@media (max-width: 640px) {
  .home-decoration { width: 60%; height: 32%; min-height: 150px; top: -10px; right: -24px; opacity: .4; }
}

/* Match the planet motif to the homepage buttons. */
.home-decoration { color: #239f8c; }

/* Pale-green homepage buttons. */
.home-button, .home-button-secondary {
  background: #daf0df;
  color: #237b65;
  border-color: #c4e3cd;
  box-shadow: 0 4px 12px rgba(55, 119, 81, .1), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.home-button:hover {
  background: #cde9d4;
  filter: none;
  box-shadow: 0 7px 18px rgba(55, 119, 81, .16);
}

/* Use the same resting colors as the social buttons. */
.home-button, .home-button-secondary {
  background: #eef7f4;
  color: #1fa38e;
  border-color: #dceee7;
}
.home-button:hover { background: #dfefe8; }

.about-sections { display: grid; gap: 24px; align-content: start; }
.about-navigation { display: flex; gap: 12px; flex-wrap: wrap; }
.about-navigation a { padding: 9px 20px; border-radius: 999px; background: #eef7f4; color: #1fa38e; border: 1px solid #dceee7; }
.about-navigation a:hover { background: #dfefe8; }
.about-panel { scroll-margin-top: 90px; position: relative; border: 1px solid #e4efe9; padding: 30px; background: linear-gradient(135deg, #fff 65%, #f0f8f3); }
.about-kicker { margin: 0 0 12px; font-size: .75rem; letter-spacing: .15em; color: var(--shoka) !important; }
.about-panel .about-placeholder { color: var(--muted); }
@media(max-width:640px) { .about-panel { padding:24px; } }

.about-cards { display: flex; flex-direction: column; gap: 22px; }
.about-cards .section-title { margin-bottom: 0; }
.about-entry { display: grid; grid-template-columns: 38% 1fr; overflow: hidden; border-radius: 16px; background: white; box-shadow: 0 5px 22px #0000000c; transition: box-shadow .2s; }
.about-entry:hover { box-shadow: 0 8px 26px #00000015; }
.about-entry-cover { min-height: 225px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #338d79; background: linear-gradient(135deg,#e1f3ec,#b6d8cd); }
.about-entry-cover span { font-size: 76px; line-height: 1; }
.about-entry-cover small { letter-spacing: .2em; font-size: 10px; }
.personal-cover { background: linear-gradient(135deg,#edf4de,#c7dfca); }
.about-entry-body { padding: 28px; }
.about-entry-body h2 { font-size: 1.5rem; margin: 12px 0 10px; font-weight: 500; }
.about-entry-body p { color: var(--muted); margin: 0 0 20px; font-size: .93rem; }
.about-read { display: inline-flex; align-items: center; gap: 18px; border-radius: 999px; padding: 8px 18px; background: #eef7f4; color: #1fa38e; font-size: .85rem; }
.personal-entry .about-entry-cover { order: 2; }
.personal-entry { grid-template-columns: 1fr 38%; }
.back-to-about { display: inline-block; margin: 0 0 18px; }
@media (max-width: 900px) { .about-entry, .personal-entry { grid-template-columns: 1fr; } .personal-entry .about-entry-cover { order: 0; } .about-entry-cover { min-height: 160px; } }

/* Keep inner-page content clear of the wave. */
.page-inner .layout { margin-top: 40px; }
@media (max-width: 900px) { .page-inner .layout { margin-top: 32px; } }

.about-poem { position: relative; margin: 0 0 12px; padding: 42px 46px 36px; border-radius: 18px; background: linear-gradient(135deg,#f5faf7,#e7f2ec); overflow: hidden; }
.poem-mark { position: absolute; right: 26px; top: -24px; font-family: Georgia,serif; font-size: 180px; color: #bfdccd; opacity: .6; line-height: 1.2; }
.about-poem blockquote { position: relative; margin: 0; color: #355d50; font-family: "Noto Serif SC","Songti SC",serif; font-size: clamp(1.25rem,2.1vw,1.65rem); line-height: 2; letter-spacing: .08em; }
.about-poem blockquote p { margin: 0 0 22px; }
.about-poem blockquote p:last-child { margin-bottom: 0; }
.about-poem figcaption { margin-top: 28px; color: #6d887d; font-size: .85rem; letter-spacing: .04em; }
.about-poem cite { font-style: normal; }
.about-poem figcaption small { display: block; margin-top: 5px; font-size: .7rem; opacity: .8; }
@media(max-width:640px) { .about-poem { padding: 30px 24px; } }

/* Poetry replaces the About heading above the wave. */
.page-about .banner { height: 46dvh; min-height: 340px; padding-bottom: clamp(50px,15dvh,150px); }
.page-about .banner-title { width: 100%; box-sizing: border-box; justify-self: center; align-self: center; padding: 0 24px; text-align: center; }
.page-about .about-banner-poem, .page-about .poem-source { text-align: center; margin-left: auto; margin-right: auto; }
.page-about .banner-title .about-banner-poem { margin: 0; font-family: "Noto Serif SC", "Songti SC", serif; font-size: clamp(1.2rem,2.5vw,1.9rem); line-height: 1.8; letter-spacing: .08em; }
.about-banner-poem span { display: block; }
.about-banner-poem .poem-final { margin-top: 10px; }
.poem-source { margin: 12px 0 0; font-size: .8rem; letter-spacing: .08em; color: rgba(255,255,255,.8); }

/* Slight optical adjustment for the About poem. */
.page-about .banner-title { transform: translateX(16px); }

/* The About poem shares the homepage photo treatment. */
.page-about .banner { isolation: isolate; overflow: hidden; background: #dedbd3; }
.page-about .banner-title { text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }

/* Shared serif lettering for the homepage and About banners. */
.page-home .banner-title, .page-about .banner-title { font-family: "Noto Serif SC", "Songti SC", serif; }

/* Slightly smaller lettering across the homepage banner. */
.page-home .banner-title .en { font-size: clamp(1.9rem, 4.4vw, 3rem); }
.page-home .banner-title h1 { font-size: clamp(2.1rem, 5.2vw, 3.3rem); }
.page-home .banner-title .sub { font-size: clamp(.9rem, 1.35vw, 1.05rem); line-height: 1.7; }

/* Align the homepage title group with the About banner. */
.page-home .banner { height: 46dvh; min-height: 340px; padding-bottom: clamp(50px, 15dvh, 150px); }
.page-home .banner-title { width: 100%; box-sizing: border-box; padding: 0 24px; transform: translateX(16px); }
.page-home .banner-title .en { font-size: clamp(1.7rem, 3.1vw, 2.25rem); line-height: 1.5; }
.page-home .banner-title h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.5; margin: 6px 0 10px; }
.page-home .banner-title .sub { font-size: clamp(.95rem, 1.35vw, 1.1rem); line-height: 1.7; }

/* Align About cards with the homepage welcome card. */
.page-about .layout { margin-top: 48px; align-items: start; }
@media (max-width: 900px) { .page-about .layout { margin-top: 32px; } }

.academic-cover { position: relative; overflow: hidden; }
.academic-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }

.personal-cover { position: relative; overflow: hidden; }
.personal-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 65%; }

/* Soft capsule labels for the two personal archives. */
.about-entry-body .chip {
  gap: 7px;
  padding: 6px 13px;
  border: 1px solid #d5e9df;
  background: linear-gradient(135deg, #f4faf6, #e7f3ec);
  color: #43836d;
  font-size: .76rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .04em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.about-entry-body .chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #81b9a0;
  flex-shrink: 0;
}

/* Book badge for the academic archive. */
.academic-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border: 1px solid #d6e8df; border-radius: 10px; background: linear-gradient(135deg, #f1f8f3, #e3f1e9); color: #42816d; font-size: .78rem; letter-spacing: .04em; box-shadow: 0 2px 6px rgba(50, 110, 85, .05); }
.academic-chip svg { width: 19px; height: 19px; flex: none; }

/* A quiet handwritten-style aside above the academic title. */
.academic-musing { display: inline-flex; align-items: center; gap: 9px; color: #719386; font-size: .8rem; letter-spacing: .08em; line-height: 1.7; }
.academic-musing svg { width: 18px; height: 18px; flex: none; opacity: .8; transform: rotate(-8deg); }
.academic-musing::after { content: ""; width: 28px; height: 1px; margin-left: 3px; background: linear-gradient(to right, #a6c6b8, transparent); transform: rotate(-8deg); }

/* Academic details share the About page's banner and content grid. */
.page-academic .about-detail { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.page-academic .back-to-about { align-self: flex-start; line-height: 1.5; }
.page-academic .about-panel { margin: 0; box-sizing: border-box; width: 100%; }
.page-academic .banner-title h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.5; }

/* Balanced three-line verse on the academic page. */
.page-academic .banner-title .about-banner-poem { font-size: clamp(1.15rem, 2.4vw, 1.8rem); line-height: 1.85; font-weight: 500; letter-spacing: .06em; }
.page-academic .about-banner-poem .poem-final { margin-top: 0; }
.page-academic .poem-source { margin-top: 18px; font-size: .78rem; line-height: 1.6; letter-spacing: .06em; }

/* Academic resume: readable sections within the existing card. */
.academic-profile .lead { margin-bottom: 18px; }
.research-interests { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.research-interests span { padding: 6px 12px; border-radius: 8px; background: #eef7f2; color: #49816b; font-size: .82rem; }
.academic-nav { display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 16px 0; border-top: 1px solid #e5eee9; border-bottom: 1px solid #e5eee9; font-size: .85rem; }
.academic-nav a { color: #43836d; }
.cv-section { margin-top: 36px; scroll-margin-top: 90px; }
.cv-section h3 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; font-size: 1.15rem; margin: 0 0 20px; color: #355b4e; }
.cv-section h3 small { color: #8da497; font-size: .65rem; letter-spacing: .1em; font-weight: 400; }
.cv-entry { margin-left: 4px; padding: 0 0 22px 18px; border-left: 2px solid #dcebe2; }
.cv-entry:last-child { padding-bottom: 0; }
.cv-entry-heading { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.cv-entry h4 { margin: 0; font-size: 1rem; line-height: 1.65; font-weight: 500; }
.cv-entry time { color: #86988e; font-size: .78rem; }
.academic-profile .cv-entry p { margin: 6px 0; font-size: .9rem; line-height: 1.9; overflow-wrap: anywhere; }
.academic-profile .cv-role { color: #64917c; font-size: .8rem; }
.publication-citation { color: #3b5147; }
.cv-skills { margin: 0; display: grid; gap: 14px; }
.cv-skills div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; font-size: .9rem; line-height: 1.8; }
.cv-skills dt { color: #53846b; }
.cv-skills dd { margin: 0; color: var(--muted); }
.cv-contact { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 32px; padding-top: 20px; border-top: 1px solid #e5eee9; font-size: .85rem; color: #53846b; }
@media(max-width:640px) { .academic-profile { padding: 24px 20px; } .cv-entry { padding-left: 12px; } .cv-skills div { grid-template-columns: 1fr; gap: 2px; } }

/* Resume disclosure supports mouse, touch and keyboard. */
.profile-details { margin-top: 24px; }
.profile-details > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 18px; border: 1px solid #dceee7; border-radius: 12px; background: #eef7f4; color: #43836d; font-size: .9rem; cursor: pointer; }
.profile-details > summary::-webkit-details-marker { display: none; }
.profile-details > summary:hover { background: #dfefe8; }
.profile-details > summary:focus-visible { outline: 2px solid #1fa38e; outline-offset: 4px; }
.profile-toggle { font-size: 1.2rem; }
.profile-close { display: none; }
.profile-details[open] > summary .profile-open { display: none; }
.profile-details[open] > summary .profile-close { display: inline; }
.profile-details > summary .profile-toggle { transform: rotate(0deg); }
.profile-details[open] > summary .profile-toggle { transform: rotate(45deg); }
.profile-details-body { padding-top: 22px; }

/* Consistent Chinese typography; preserve the poetry's serif lettering. */
button, input, textarea, select { font-family: inherit; }
.page-home .banner-title { font-family: inherit; }
.page-home .banner-title .sub { font-family: "Noto Serif SC", "Songti SC", serif; }

.academic-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.academic-profile-heading h2 { margin: 0; }
.cv-download { display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid #dceee7; border-radius: 12px; background: #eef7f4; color: #43836d; font-size: .85rem; transition: background .2s, transform .2s; }
.cv-download:hover { background: #dfefe8; transform: translateY(-2px); }
.cv-download svg { width: 22px; height: 22px; flex: none; }
.cv-download small { display: block; color: #789789; font-size: .65rem; letter-spacing: .04em; }
.cv-download:focus-visible { outline: 2px solid #1fa38e; outline-offset: 4px; }

/* A restrained sage download button. */
.cv-download { gap: 10px; padding: 10px 18px; border: 1px solid #dce5ce; border-radius: 999px; background: #edf2e3; color: #617348; font-family: inherit; font-size: .82rem; font-weight: 500; letter-spacing: .03em; box-shadow: none; }
.cv-download:hover { background: #e2ebd4; border-color: #cddbbd; transform: translateY(-1px); }
.cv-download svg { width: 18px; height: 18px; opacity: .8; }
.cv-download small { color: #8a9879; font-size: .6rem; font-weight: 400; letter-spacing: .05em; line-height: 1.6; }

.cv-download-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; color: #648675; font-size: .82rem; text-underline-offset: 4px; }
.cv-download-link span { color: #94a599; font-size: .68rem; }
.cv-download-link:hover { color: #1fa38e; text-decoration: underline; }
.cv-download-link:focus-visible { outline: 2px solid #1fa38e; outline-offset: 5px; }

/* Homepage title and motto in Song-style serif. */
.page-home .banner-title { font-family: "Songti SC", "SimSun", "Noto Serif SC", serif; }
.page-home .banner-title .sub { font-family: inherit; }

/* A small album of Lund, with each photograph kept at its own ratio. */
.memory-divider { display: flex; align-items: center; gap: 18px; margin: 36px 0 28px; color: #99bba9; }
.memory-divider::before, .memory-divider::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, #c8dece); }
.memory-divider::after { transform: rotate(180deg); }
.memory-divider span { font-size: 20px; }
.memory-kicker { color: #89a294; font-size: .65rem; letter-spacing: .18em; margin: 0 0 6px; }
.lund-memory h3 { margin: 0 0 14px; font-size: 1.2rem; font-weight: 500; color: #476c59; }
.lund-memory > p:not(.memory-kicker) { line-height: 1.95; margin-bottom: 24px; }
.lund-gallery { columns: 2; column-gap: 14px; }
.lund-photo { display: block; break-inside: avoid; margin: 0 0 14px; padding: 5px; background: #fff; border: 1px solid #e5ebe4; border-radius: 11px; box-shadow: 0 3px 12px rgba(44,65,49,.06); transition: transform .2s; }
.lund-photo:hover { transform: translateY(-3px); }
.lund-photo img { display: block; width: 100%; height: auto; border-radius: 7px; }
.lund-photo:focus-visible { outline: 2px solid #1fa38e; outline-offset: 3px; }
@media(max-width:540px) { .lund-gallery { columns: 1; } }

/* Gentle photo zoom on hover. */
.lund-photo { overflow: hidden; }
.lund-photo img { transition: transform .35s ease; }
@media (hover: hover) { .lund-photo:hover { transform: none; } .lund-photo:hover img { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .lund-photo img { transition: none; } }

/* Planet motifs stay behind content and remain confined to the card corner. */
.academic-profile, .academic-notes { position: relative; isolation: isolate; overflow: hidden; }
.academic-profile::before, .academic-notes::before { content: ""; position: absolute; top: 0; right: 0; width: 55%; height: 260px; pointer-events: none; z-index: -1; background: radial-gradient(ellipse at top right, rgba(183,228,199,.35), rgba(218,241,225,.12) 48%, transparent 74%); }
.academic-decoration { position: absolute; top: -24px; right: -30px; width: 48%; height: 230px; color: #239f8c; opacity: .3; pointer-events: none; z-index: -1; mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%); -webkit-mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%); }
@media(max-width:640px) { .academic-decoration { width: 58%; height: 170px; opacity: .22; } }

/* Smaller corner accents with generous space between them. */
.academic-decoration { width: 150px; height: 110px; top: 12px; right: 14px; opacity: .16; mask-image: none; -webkit-mask-image: none; }
.academic-profile::before, .academic-notes::before { width: 180px; height: 140px; opacity: .4; }
.about-entry-body { position: relative; isolation: isolate; }
.archive-sprinkles { position: absolute; inset: 12px 12px auto auto; width: 130px; height: 75px; color: #8cb39d; opacity: .35; z-index: -1; pointer-events: none; }
@media(max-width:640px) { .academic-decoration { width: 110px; height: 90px; opacity: .12; } }

/* Clear geometric accents replace the illustrative motifs. */
.archive-sprinkles { width: 150px; height: 100px; top: 14px; right: 12px; color: #709c85; opacity: .8; }
.academic-decoration { width: 180px; height: 120px; top: 14px; right: 16px; color: #709c85; opacity: .8; }
.academic-profile::before, .academic-notes::before { display: none; }
@media(max-width:640px) { .academic-decoration, .archive-sprinkles { width: 110px; height: 80px; opacity: .65; } }

/* Restore the original illustrations on academic detail cards only. */
.academic-decoration { top: -24px; right: -30px; width: 48%; height: 230px; color: #239f8c; opacity: .3; mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%); -webkit-mask-image: linear-gradient(225deg, #000 12%, rgba(0,0,0,.8) 42%, transparent 78%); }
.academic-profile::before, .academic-notes::before { display: block; width: 55%; height: 260px; opacity: 1; }
@media(max-width:640px) { .academic-decoration { width: 58%; height: 170px; opacity: .22; } }

/* Botanical illustrations for the two About entry cards. */
.archive-sprinkles { width: 145px; height: 100px; top: 10px; right: 10px; color: #759d81; opacity: .7; }
.personal-entry .archive-sprinkles { color: #83a17c; }
@media(max-width:640px) { .archive-sprinkles { width: 110px; height: 80px; opacity: .6; } }

/* Personal archive matches the academic page's content alignment. */
.page-personal .about-detail { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.page-personal .back-to-about { align-self: flex-start; line-height: 1.5; }
.page-personal .about-panel { margin: 0; box-sizing: border-box; width: 100%; }
.page-personal .banner-title h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.5; }


/* Three-line poem above the personal archive wave. */
.page-personal .banner-title .about-banner-poem { font-size: clamp(1.15rem, 2.4vw, 1.8rem); line-height: 1.85; letter-spacing: .06em; }
.page-personal .poem-source { margin-top: 18px; font-size: .78rem; line-height: 1.6; }

/* Floating section guide remains visible while reading the expanded CV. */
.page-academic .academic-profile { overflow: visible; }
.academic-nav { position: sticky; top: 80px; z-index: 8; display: flex; justify-content: center; gap: 4px; margin: 0 0 24px; padding: 7px; border: 1px solid #dce9df; border-radius: 16px; background: rgba(244,249,243,.96); box-shadow: 0 6px 24px rgba(43,78,55,.12); backdrop-filter: blur(12px); font-size: .76rem; }
.academic-nav a { padding: 7px 10px; border-radius: 10px; white-space: nowrap; }
.academic-nav a:hover, .academic-nav a:focus-visible { background: #dfeddf; color: #265e45; }
.cv-section { scroll-margin-top: 160px; }
@media(max-width:640px) { .academic-nav { top: 68px; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; max-width: 100%; border-radius: 12px; } .academic-nav a { flex: none; } }

/* Refined floating reading guide. */
.academic-nav { width: fit-content; max-width: 100%; margin: 0 auto 28px; padding: 6px; gap: 3px; border: 1px solid rgba(192,214,199,.65); border-radius: 999px; background: rgba(255,255,255,.92); box-shadow: 0 8px 28px rgba(51,78,59,.09), inset 0 1px 0 #fff; backdrop-filter: blur(16px); }
.academic-nav a { padding: 8px 12px; border-radius: 999px; color: #71877a; font-size: .75rem; font-weight: 500; letter-spacing: .025em; transition: background .2s, color .2s; }
.academic-nav a:hover { background: #f0f6ef; color: #3f7355; }
.academic-nav a.is-current { background: #e5efdf; color: #426849; box-shadow: inset 0 0 0 1px #d9e6d1; }
@media(max-width:640px) { .academic-nav { width: 100%; border-radius: 18px; } .academic-nav a { padding: 8px 11px; } }

.academic-resources { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #e5eee9; }
.academic-resources .cv-download-link { margin-top: 0; }
.academic-email { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .82rem; }
.academic-email > span { color: #81978a; }

.personal-video { width: 100%; aspect-ratio: 16 / 9; margin-top: 24px; overflow: hidden; border-radius: 14px; background: #edf4ee; border: 1px solid #dce9df; }
.personal-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-source { margin: 10px 0 28px; font-size: .8rem; text-align: right; }

.potatodog-intro { display: flex; align-items: center; gap: 28px; margin: 20px 0 28px; }
.potatodog-intro-text { flex: 1; min-width: 0; }
.potatodog-intro-text .lead { margin-top: 0; }
.potatodog-intro-text a { font-size: .82rem; }
.vtuber-bubble { width: 150px; height: 150px; flex: none; border-radius: 50%; object-fit: cover; object-position: center 30%; border: 5px solid #edf5ef; box-shadow: 0 0 0 1px #d8e7dd, 0 8px 22px rgba(61,83,67,.13); }
@media(max-width:540px) { .potatodog-intro { gap: 16px; } .vtuber-bubble { width: 100px; height: 100px; border-width: 3px; } }

/* Larger portrait bubble beside the introduction. */
.potatodog-intro { gap: 16px; }
.potatodog-intro-text { flex: 0 1 430px; }
.vtuber-bubble { width: 185px; height: 185px; transition: transform .3s ease, box-shadow .3s ease; }
@media(hover:hover) { .vtuber-bubble:hover { transform: scale(1.07); box-shadow: 0 0 0 1px #cbded1, 0 12px 28px rgba(61,83,67,.18); } }
@media(max-width:540px) { .potatodog-intro { gap: 12px; } .potatodog-intro-text { flex: 1; } .vtuber-bubble { width: 125px; height: 125px; } }
@media(prefers-reduced-motion:reduce) { .vtuber-bubble { transition: none; } }

/* Floating portrait bubble with a glassy rim and small satellite bubbles. */
.vtuber-bubble-wrap { position: relative; flex: none; margin-left: 14px; margin-top: -35px; animation: portrait-float 5s ease-in-out infinite; }
.vtuber-bubble-wrap .vtuber-bubble { display: block; border: 6px solid rgba(231,244,236,.85); box-shadow: inset 0 0 12px #fff, 0 0 0 1px #cddfd3, 0 12px 25px rgba(61,83,67,.12); }
.vtuber-bubble-wrap::before { content: ""; position: absolute; top: 12px; left: 22px; width: 58px; height: 22px; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.65), transparent); transform: rotate(-35deg); pointer-events: none; z-index: 1; }
.vtuber-bubble-wrap::after { content: ""; position: absolute; width: 15px; height: 15px; right: -12px; top: 25px; border-radius: 50%; border: 1px solid #c6dfd1; background: radial-gradient(circle at 30% 25%, #fff, #e2f0e7); box-shadow: -8px 155px 0 -3px #deede3; pointer-events: none; }
@keyframes portrait-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@media(max-width:540px) { .vtuber-bubble-wrap { margin-left: 0; margin-top: -18px; } .vtuber-bubble-wrap::after { box-shadow: none; } }
@media(prefers-reduced-motion:reduce) { .vtuber-bubble-wrap { animation: none; } }

.vtuber-showcase-link { display: inline-flex; align-items: center; gap: 10px; color: #367d60; line-height: 1.8; }
.showcase-arrow { font-size: 1.25rem; flex: none; transition: transform .25s ease; }
.vtuber-showcase-link:hover .showcase-arrow, .vtuber-showcase-link:focus-visible .showcase-arrow { transform: translate(4px, -3px); }

.vtuber-bubbles { display: flex; align-items: center; flex: none; margin-left: 8px; }
.vtuber-bubbles .vtuber-bubble-wrap { margin-left: 0; }
.vtuber-bubbles .vtuber-bubble-second { margin-left: -28px; margin-top: 65px; animation-delay: -2.5s; }
.vtuber-bubble-second .vtuber-bubble { width: 145px; height: 145px; object-position: center 25%; }
.potatodog-intro-text { flex: 1; }
@media(max-width:700px) { .potatodog-intro { flex-wrap: wrap; } .potatodog-intro-text { flex-basis: 100%; } .vtuber-bubbles { margin: 24px auto 0; } }
@media(max-width:540px) { .vtuber-bubbles .vtuber-bubble-second { margin-top: 40px; margin-left: -16px; } .vtuber-bubble-second .vtuber-bubble { width: 110px; height: 110px; } }

/* Compact text beside the model bubbles. */
.potatodog-intro { gap: 12px; }
.potatodog-intro-text { letter-spacing: 0; }
.potatodog-intro-text .lead { font-size: .95rem; line-height: 1.6; margin: 0 0 10px; }
.potatodog-intro-text p { margin: 0; }
.potatodog-intro-text .vtuber-showcase-link { gap: 6px; font-size: .79rem; line-height: 1.5; }

/* Keep the personal heading close to its introduction. */
.page-personal #personal-title { margin-bottom: 8px; }
.page-personal .potatodog-intro { margin-top: 8px; }

.page-personal #personal-title { margin-bottom: 2px; }
.page-personal .potatodog-intro { margin-top: 2px; align-items: flex-start; }

.page-personal #personal-title { margin-bottom: 10px; }
.page-personal .potatodog-intro { margin-top: 10px; }
.page-personal .potatodog-intro-text .lead { line-height: 1.7; margin-bottom: 12px; }

.personal-reflections { margin: 24px 0 30px; }
.personal-reflections > p { line-height: 1.85; margin: 0 0 14px; }
.personal-quote { margin: 22px 0 24px 18px; padding: 12px 0 12px 22px; border-left: 2px solid #a8cbb7; }
.personal-quote blockquote { margin: 0; font-family: "Songti SC", "SimSun", serif; font-size: 1.05rem; line-height: 1.8; color: #47755c; }
.personal-quote figcaption { margin-top: 8px; color: #8a9e90; font-size: .78rem; }

/* Compact personal introduction and inline poetry credit. */
.page-personal #personal-title { margin-bottom: 6px; }
.page-personal .potatodog-intro { margin-top: 4px; margin-bottom: 18px; }
.personal-reflections { margin-top: 14px; }
.personal-quote { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; padding-top: 8px; padding-bottom: 8px; }
.personal-quote figcaption { margin-top: 0; white-space: nowrap; }

/* Lower the text beside the bubbles to fill the space above the divider. */
.page-personal .potatodog-intro-text { padding-top: 24px; }
.page-personal .personal-divider { margin-top: 20px; }
@media(max-width:700px) { .page-personal .potatodog-intro-text { padding-top: 12px; } }

.page-personal .potatodog-intro-text { padding-top: 36px; }
@media(max-width:700px) { .page-personal .potatodog-intro-text { padding-top: 20px; } }

/* Match the livestream introduction to the personal prose below. */
.page-personal .potatodog-intro-text .lead { font-family: inherit; font-size: 1rem; font-weight: 400; color: var(--ink); line-height: 1.85; margin: 0 0 14px; }

.game-preferences h3 { margin: 24px 0 12px; font-size: 1rem; font-weight: 500; color: #47755c; }
.article .game-list { list-style: none; margin: 0 0 20px; padding: 0; }
.game-list li { position: relative; padding-left: 16px; margin-bottom: 9px; font-size: 1rem; line-height: 1.85; }
.game-list li::before { content: ""; position: absolute; left: 0; top: .85em; width: 4px; height: 4px; border-radius: 50%; background: #99bda5; }
.game-list strong { font-weight: 500; color: #426e55; }
.game-preferences > p { line-height: 1.85; margin: 0 0 14px; }

.game-portrait-bubble { float: right; width: 190px; height: 190px; margin: 22px 0 22px 24px; border-radius: 50%; animation: portrait-float 6s ease-in-out infinite; }
.game-portrait-bubble img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 47% center; border-radius: 50%; border: 6px solid #edf5ef; box-shadow: 0 0 0 1px #d8e7dd, 0 10px 24px rgba(61,83,67,.13); transition: transform .3s ease; }
.game-preferences::after { content: ""; display: block; clear: both; }
@media(hover:hover) { .game-portrait-bubble:hover img { transform: scale(1.07); } }
@media(max-width:640px) { .game-portrait-bubble { width: 125px; height: 125px; margin-left: 14px; } }
@media(prefers-reduced-motion:reduce) { .game-portrait-bubble { animation: none; } .game-portrait-bubble img { transition: none; } }

.game-portrait-bubble { position: relative; }
.game-portrait-toggle { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.game-portrait-toggle:focus-visible { outline: 2px solid #1fa38e; outline-offset: 5px; }
.game-portrait-caption { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); padding: 8px 12px; border-radius: 12px; background: #edf5e9; color: #47755c; border: 1px solid #d8e6d0; box-shadow: 0 4px 12px #00000008; white-space: nowrap; font-size: .8rem; }
.game-portrait-caption[hidden] { display: none; }

.game-bubble-gallery { float: right; width: 190px; margin: 20px 0 30px 24px; }
.game-bubble-gallery .game-portrait-bubble { float: none; margin: 0 0 60px; }
.game-bubble-gallery .poland-bubble { width: 160px; height: 160px; margin-left: 20px; animation-delay: -3s; }
.poland-bubble img { object-position: center 40%; }
.game-bubble-gallery .game-portrait-caption { white-space: normal; width: 190px; text-align: center; z-index: 2; }
@media(max-width:640px) { .game-bubble-gallery { width: 125px; margin-left: 14px; } .game-bubble-gallery .poland-bubble { width: 115px; height: 115px; margin-left: 5px; } .game-bubble-gallery .game-portrait-caption { width: 145px; } }

/* The larger keyboard bubble overlaps the two surrounding portraits. */
.game-bubble-gallery .game-portrait-bubble { margin-bottom: 0; }
.game-bubble-gallery .wooting-bubble { width: 220px; height: 220px; margin: -24px 0 0 -30px; z-index: 2; animation-delay: -1.5s; }
.game-bubble-gallery .poland-bubble { margin-top: -26px; z-index: 1; }
.wooting-bubble img { object-position: center 55%; }
.game-bubble-gallery .game-portrait-bubble:has(.game-portrait-toggle[aria-expanded="true"]) { z-index: 5; }
@media(max-width:640px) { .game-bubble-gallery .wooting-bubble { width: 150px; height: 150px; margin-left: -20px; margin-top: -14px; } .game-bubble-gallery .poland-bubble { margin-top: -16px; } }

/* Three bubbles form a left-pointing triangle. */
.game-bubble-gallery { position: relative; float: right; width: 300px; height: 380px; margin: 16px 0 24px 20px; }
.game-bubble-gallery .game-portrait-bubble { position: absolute; width: 165px; height: 165px; top: 0; right: 0; margin: 0; z-index: 1; }
.game-bubble-gallery .wooting-bubble { width: 205px; height: 205px; top: 85px; left: 0; right: auto; margin: 0; z-index: 2; }
.game-bubble-gallery .poland-bubble { width: 155px; height: 155px; top: 218px; right: 0; left: auto; margin: 0; }
@media(max-width:640px) { .game-bubble-gallery { float: none; width: 280px; max-width: 100%; height: 350px; margin: 20px auto; } .game-bubble-gallery .game-portrait-bubble { width: 150px; height: 150px; } .game-bubble-gallery .wooting-bubble { width: 185px; height: 185px; top: 78px; margin: 0; } .game-bubble-gallery .poland-bubble { width: 140px; height: 140px; top: 204px; margin: 0; } }

/* Airier triangular arrangement and a full-width invitation. */
.game-bubble-gallery { width: 315px; height: 415px; margin-left: 22px; }
.game-bubble-gallery .wooting-bubble { top: 104px; }
.game-bubble-gallery .poland-bubble { top: 255px; }
.game-preferences .game-invitation { clear: both; width: 100%; padding-top: 18px; margin-bottom: 0; overflow-wrap: break-word; }
@media(max-width:640px) { .game-bubble-gallery { width: 280px; height: 385px; margin: 20px auto; } .game-bubble-gallery .wooting-bubble { top: 96px; } .game-bubble-gallery .poland-bubble { top: 239px; } }

/* Keep the ellipsis together with the full-width invitation. */
.game-preferences > p:has(+ .game-invitation) { clear: both; padding-top: 0; margin-bottom: 6px; }
.game-preferences .game-invitation { padding-top: 0; margin-top: 0; }

/* Reduce the bubble group's reserved height before the closing text. */
.game-bubble-gallery { height: 330px; margin-bottom: 8px; }
.game-bubble-gallery .wooting-bubble { top: 65px; }
.game-bubble-gallery .poland-bubble { top: 174px; }
@media(max-width:640px) { .game-bubble-gallery { height: 320px; margin-bottom: 12px; } .game-bubble-gallery .wooting-bubble { top: 64px; } .game-bubble-gallery .poland-bubble { top: 178px; } }

.cat-bubbles { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; justify-items: center; margin: 28px 0 12px; }
.cat-bubble { width: min(100%,185px); aspect-ratio: 1; border-radius: 50%; animation: portrait-float 6s ease-in-out infinite; }
.cat-bubble:nth-child(2) { animation-delay: -2s; }
.cat-bubble:nth-child(3) { animation-delay: -4s; }
.cat-bubble img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 5px solid #edf5ef; box-shadow: 0 0 0 1px #d8e7dd, 0 8px 22px rgba(61,83,67,.12); transition: transform .3s ease; }
.cat-bubble:nth-child(1) img { object-position: right 65%; }
.cat-bubble:nth-child(2) img { object-position: 56% 63%; }
.cat-bubble:nth-child(3) img { object-position: 45% center; }
@media(hover:hover) { .cat-bubble:hover img { transform: scale(1.06); } }
@media(max-width:540px) { .cat-bubbles { gap: 12px; } .cat-bubble img { border-width: 3px; } }
@media(prefers-reduced-motion:reduce) { .cat-bubble { animation: none; } .cat-bubble img { transition: none; } }

/* Small screenshot at the upper-left, behind the keyboard bubble. */
.game-bubble-gallery .delta-bubble { width: 145px; height: 145px; top: -25px; left: 0; right: auto; z-index: 1; animation-delay: -2s; }
.delta-bubble img { object-position: 60% center; }
@media(max-width:640px) { .game-bubble-gallery .delta-bubble { width: 125px; height: 125px; top: -20px; left: 0; } }

.game-bubble-gallery .delta-bubble { top: -45px; left: -20px; }
@media(max-width:640px) { .game-bubble-gallery .delta-bubble { top: -35px; left: -10px; } }

/* Consistent prose rhythm throughout the personal daily section. */
.personal-daily > p { font-size: 1rem; line-height: 1.85; margin: 0 0 14px; }
.caleb-bubbles { margin-bottom: 26px; }
.caleb-bubbles .cat-bubble:nth-child(1) img { object-position: center 60%; }
.caleb-bubbles .cat-bubble:nth-child(2) img { object-position: center 65%; }
.caleb-bubbles .cat-bubble:nth-child(3) img { object-position: center 25%; }

.caleb-bubbles .cat-bubble:nth-child(2) img { object-position: center 25%; }
.caleb-bubbles .cat-bubble:nth-child(3) img { object-position: center 65%; }

.inline-poet-credit { display: inline; white-space: nowrap; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; font-size: .78rem; color: #8a9e90; margin-left: 10px; }

.personal-farewell { display: flex; align-items: center; gap: 16px; margin-top: 28px; padding: 22px 24px; border-radius: 16px; background: linear-gradient(115deg, #edf5e9, #f8fbf5); border: 1px solid #e0ebd9; }
.personal-farewell p { margin: 0; line-height: 1.9; color: #496d50; }
.personal-farewell strong { font-weight: 600; }
.farewell-star { font-size: 30px; color: #8eaf84; flex: none; }
@media(max-width:540px) { .personal-farewell { padding: 18px; gap: 12px; } }

/* Centered closing words without a surrounding card. */
.personal-farewell { display: block; text-align: center; padding: 12px 0; background: none; border: 0; border-radius: 0; }
.personal-farewell .farewell-star { display: block; font-size: 22px; margin-bottom: 8px; }
.personal-farewell p { text-align: center; }

.caleb-work-cover { display: grid; place-items: center; overflow: hidden; background: #fffaf0; }
.caleb-work-cover img { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: contain; }

.game-itch-link { display: inline-flex; align-items: center; gap: 18px; margin: 8px 0 24px; padding: 11px 18px; border-radius: 12px; background: #edf5e9; color: #47755c; border: 1px solid #d8e6d0; font-size: .9rem; font-weight: 500; }
.game-itch-link:hover { background: #dfecd8; }
.game-screen { margin: 0; }
.game-screen img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid #e6ebe2; }
.game-screen figcaption { margin-top: 8px; font-size: .78rem; color: #8a998e; }
.game-scene-heading { display: flex; align-items: center; gap: 20px; margin: 30px 0 22px; padding: 18px 20px; border-radius: 14px; background: #f1f6ed; }
.scene-number { font-size: 3.2rem; line-height: 1; color: #95b185; font-family: Georgia, serif; }
.game-scene-heading h3 { margin: 0 0 6px; color: #47755c; }
.game-scene-heading p { margin: 0; font-size: .9rem; line-height: 1.8; }
.game-screens { display: grid; gap: 24px; margin-bottom: 28px; }
@media(max-width:540px) { .game-scene-heading { gap: 14px; padding: 16px; } .scene-number { font-size: 2.6rem; } }

.game-itch-text-link { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 24px; color: #47755c; font-size: .9rem; }

.game-merch { margin: 32px 0 26px; padding-top: 26px; border-top: 1px solid #dce8df; }
.game-project-detail .game-merch-intro { font-size: 1.12rem; line-height: 1.9; margin: 0 0 22px; font-weight: 500; }
.game-merch-gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 18px; }
.game-merch-gallery figure { grid-column: span 2; margin: 0; min-width: 0; }
.game-merch-gallery figure:nth-child(n+4) { grid-column: span 3; }
.game-merch-gallery img { display: block; width: 100%; height: auto; border-radius: 12px; }
.game-merch-gallery figcaption { margin-top: 9px; text-align: center; font-size: .8rem; color: #7a8d80; }
@media (max-width: 600px) {
 .game-merch-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
 .game-merch-gallery figure, .game-merch-gallery figure:nth-child(n+4) { grid-column: span 1; }
 .game-merch-gallery figure:last-child { grid-column: 1 / -1; width: 75%; justify-self: center; }
}

#work-1 .post-body { position: relative; padding-bottom: 82px; }
.game-card-decoration { position: absolute; right: 12px; bottom: 2px; width: 150px; height: 105px; color: #80bda9; opacity: .5; pointer-events: none; transform: rotate(-12deg); }
@media (max-width: 600px) { .game-card-decoration { width: 120px; height: 84px; } }

.hand-art-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 24px 20px; }
.hand-art-gallery figure { margin: 0; min-width: 0; overflow: hidden; border-radius: 12px; background: #fff; border: 1px solid #edf0eb; }
.hand-art-gallery img { display: block; width: 100%; height: auto; transition: transform .35s ease; }
@media (hover: hover) { .hand-art-gallery figure:hover img { transform: scale(1.035); } }
@media (max-width: 600px) { .hand-art-gallery { grid-template-columns: 1fr; gap: 18px; } }
@media (prefers-reduced-motion: reduce) { .hand-art-gallery img { transition: none; } }

.digital-art-pair { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
@media (max-width: 600px) { .digital-art-pair { gap: 12px; } }

.prose-reading { max-width: 42rem; margin: 0 auto; padding: 28px 10px 12px; color: #3d443f; }
.article .prose-reading p { font-size: 1rem; line-height: 2; text-indent: 2em; margin: 0 0 .65em; overflow-wrap: anywhere; }
.prose-break { text-align: center; color: #94b5a2; margin: 28px 0; font-size: 18px; }
@media (max-width: 600px) { .prose-reading { padding: 22px 0 8px; } }

.article .prose-reading p { text-align: justify; text-justify: inter-ideograph; text-indent: 2em; white-space: pre-wrap; }
.prose-reading .prose-break { height: 1em; margin: 1em 0; }

.article .prose-reading p { text-indent: 0; padding-inline-start: 2em; text-align: justify; white-space: normal; }
.prose-reading .prose-break { height: auto; margin: 28px 0; }

.prose-reading { margin-left: max(0px, calc((100% - 42rem) / 4)); margin-right: auto; }
.article .prose-reading p { padding-inline-start: 1.5em; }

.chapter-details > summary { display: flex; box-sizing: border-box; width: 75%; min-width: 0; margin-inline: auto; gap: 18px; padding: 12px 18px; border-radius: 12px; font-size: .9rem; }
.article .prose-reading p { text-align: justify; text-align-last: auto; text-justify: inter-ideograph; }

.chapter-details > .prose-reading { box-sizing: border-box; width: 75%; max-width: none; margin-inline: auto; padding-inline: 0; }
.article .chapter-details > .prose-reading p { padding-inline: 0; text-indent: 0; text-align: justify; text-align-last: auto; }

.portfolio-cover { position: relative; overflow: hidden; }
.portfolio-cover img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }

#work-1, #work-2, #work-3 { min-height: 280px; }
#work-1 .post-cover, #work-2 .post-cover, #work-3 .post-cover { height: 280px; min-height: 280px; display: grid; place-items: center; background: #fff; }
#work-1 .post-cover img, #work-2 .post-cover img { position: static; width: 100%; height: 100%; max-height: 280px; object-fit: contain; object-position: center; }
@media (min-width: 761px) { #work-1, #work-2, #work-3 { height: 280px; } }

#work-2 .post-body { position: relative; padding-bottom: 82px; }
.art-card-decoration { position: absolute; right: 12px; bottom: 2px; width: 150px; height: 105px; color: #80bda9; opacity: .5; pointer-events: none; transform: rotate(-10deg); }
@media (max-width: 600px) { .art-card-decoration { width: 120px; height: 84px; } }

#work-3 .post-body { position: relative; padding-bottom: 82px; }
.esports-card-decoration { position: absolute; right: 12px; bottom: 2px; width: 150px; height: 105px; color: #80bda9; opacity: .5; pointer-events: none; transform: rotate(-8deg); }
@media (max-width: 600px) { .esports-card-decoration { width: 120px; height: 84px; } }

#work-3 .post-cover img { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: contain; object-position: center; }

#work-3 .post-cover { overflow: hidden; }
#work-3 .post-cover img { object-fit: contain; object-position: center; transform: none; }
#work-3 .esports-work-cover { background: #fff url("assets/our-game-cover.jpeg") center / 135% auto no-repeat; }
#work-3 .esports-work-cover img { visibility: hidden; }

/* Music sits directly below the sidebar social links. */
.sidebar-music { margin: 20px auto 0; padding: 14px 10px 10px; width: 100%; max-width: 250px; box-sizing: border-box; border: 1px solid #dce9e1; border-radius: 16px; background: rgba(248,252,249,.9); }
.sidebar-music-title { margin: 0 0 9px; color: #658776; font-size: .85rem; font-weight: 600; }
.sidebar-music-title span { margin-right: 5px; }
.sidebar-music audio { display: block; width: 100%; height: 36px; }
.sidebar-music-note { margin: 7px 0 0; color: #8b9c92; font-size: .72rem; }

.sidebar-music .sidebar-music-title { display: block; width: 100%; border: 0; background: transparent; font-family: inherit; text-align: center; cursor: pointer; padding: 3px 0; }
.sidebar-music audio { display: none; }
.music-controls { display: flex; align-items: center; gap: 10px; padding: 4px 5px; }
.music-play { flex: 0 0 32px; height: 32px; border: 0; border-radius: 50%; background: #e0eee5; color: #547c64; cursor: pointer; font-size: 13px; }
.music-play:hover { background: #cfe4d7; }
.music-volume-icon { color: #658776; }
.music-volume { width: 100%; min-width: 0; accent-color: #80a98e; cursor: pointer; }

.sidebar-music .sidebar-music-title { margin: 0; padding: 0; cursor: default; line-height: 1.5; }
.sidebar-music-artist { margin: 4px 0 9px; font-size: .75rem; color: #8b9c92; text-align: center; }

.music-adjustments { flex: 1; min-width: 0; }
.music-time { margin-bottom: 7px; color: #658776; font-size: .75rem; font-variant-numeric: tabular-nums; text-align: right; }
.music-volume-row { display: flex; align-items: center; gap: 8px; }
.music-volume-label { display: flex; align-items: center; gap: 4px; flex-shrink: 0; color: #547c64; font-size: .75rem; font-weight: 600; }
.music-volume-label svg { width: 19px; height: 19px; }
.music-volume-row .music-volume { height: 20px; margin: 0; }
.music-controls .music-play { align-self: center; }

/* Compact sidebar music layout. */
.sidebar-music { margin-top: 14px; padding: 10px 12px; border-radius: 13px; }
.sidebar-music .sidebar-music-title { font-size: .8rem; line-height: 1.35; }
.sidebar-music-artist { margin: 2px 0 6px; font-size: .68rem; line-height: 1.2; }
.music-controls { gap: 8px; padding: 0; align-items: center; }
.music-play { flex-basis: 28px; height: 28px; font-size: 11px; }
.music-adjustments { display: grid; gap: 2px; }
.music-time { margin: 0; font-size: .68rem; line-height: 1.2; }
.music-volume-row { gap: 5px; }
.music-volume-label { gap: 2px; font-size: .68rem; }
.music-volume-label svg { width: 16px; height: 16px; }
.music-volume-row .music-volume { height: 16px; }

.sidebar-music { margin-top: 30px; }


.home-introduction { margin-top: 24px; text-align: left; }
.home-introduction p { margin: 0 0 18px; max-width: none; line-height: 1.95; text-wrap: pretty; overflow-wrap: break-word; }
.home-emoticon { white-space: pre; }
.home-invitation { margin-top: 0; padding-top: 0; border-top: 0; }
.home-invitation p { margin-bottom: 18px; }
.home-invitation p:last-child { margin-bottom: 0; }
@media(max-width:640px) { .home-introduction p { line-height: 1.85; } }

.language-toggle { margin-left: 16px; padding: 7px 11px; border: 1px solid #d2e5da; border-radius: 999px; background: #f4faf6; color: #547c64; font: inherit; font-size: .78rem; cursor: pointer; flex-shrink: 0; }
.language-toggle:hover { background: #e3f0e8; }
.language-toggle:focus-visible { outline: 2px solid #80a98e; outline-offset: 3px; }
.topbar .nav { margin-left: auto; }
html[lang="en"] .about-banner-poem { font-family: Georgia, serif; font-size: clamp(1rem, 2vw, 1.6rem); letter-spacing: .01em; line-height: 1.65; }
html[lang="en"] .banner-title { max-width: 90%; margin-inline: auto; }
html[lang="en"] .post-body p { font-size: .84rem; line-height: 1.65; }
html[lang="en"] .prose-reading p { hyphens: auto; }
@media(max-width:640px) { .language-toggle { margin-left: 8px; padding: 6px 8px; } }
