:root {
  color-scheme: light;
  --paper: #f0e9db;
  --paper-image: linear-gradient(#fff8ed33,#fff8ed33), url("./assets/stationery.webp");
  --ivory: #fbf6e8;
  --ink: #372b28;
  --muted: #665750;
  --rose-ink: #7a4248;
  --line: #aa9180;
  --rose: #d9babb;
  --sage: #b9c3ac;
  --blue: #a9bcc6;
  --gold: #d7c6a2;
  --lace: #fff9ea;
  --serif: "Noto Serif SC", "Songti SC", SimSun, STIX Two Text, Georgia, serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font: 400 15px/1.7 var(--sans);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 11% 5%, #fff9e8a8, transparent 46%),
    radial-gradient(ellipse at 87% 44%, #caa49d26, transparent 56%),
    repeating-linear-gradient(14deg, transparent 0 3px, #8c6e4b06 4px 5px);
}
h1, h2, h3, p, figure, dl { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #814b53; outline-offset: 5px; }
.site-shell { width: min(1140px, calc(100% - 56px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid #a996824f; background: #f9f3e7d9; }
.header-inner { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.signature { color: var(--rose-ink); font: 800 1.08rem/1.4 var(--serif); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 25px; }
.site-nav a { white-space: nowrap; font-size: .84rem; text-decoration: none; color: var(--muted); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--rose-ink); text-decoration: underline; text-underline-offset: 5px; }

.scrapbook {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 132px 133px 156px 121px;
  gap: 18px;
  margin-block: 23px 38px;
  padding: 37px 53px 40px;
  background-color: #f1e9d8;
  background-image: var(--paper-image, radial-gradient(ellipse at 70% 40%, #fcf7e6, #ebdfca));
  background-size: cover;
  background-position: center;
  border: 1px solid #b8a28b8c;
  box-shadow: 0 8px 27px #4d302518, inset 0 0 40px #80664d14;
}
.scrapbook::before, .scrapbook::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}
.scrapbook::before {
  inset: 11px;
  border: 1px solid #a38d7245;
  background: repeating-linear-gradient(90deg, #faf5e726 0 1px, transparent 1px 5px);
}
.scrapbook::after {
  inset: auto 0 -1px;
  height: 14px;
  background:
    radial-gradient(ellipse at 50% 0, #e8dcc7 2px, transparent 3px) 0 5px / 18px 9px repeat-x,
    radial-gradient(ellipse at 50% 0, #fffaed 10px, transparent 10.7px) 0 3px / 18px 11px repeat-x;
}
.cover-title { grid-area: 1 / 1 / 2 / 8; align-self: center; padding: 2px 0 2px 9px; }
.cover-title h1 {
  font: 850 clamp(36px, 5.15vw, 67px)/1.08 var(--serif);
  color: #4e3431;
  letter-spacing: -.045em;
}
.cover-title p { margin-top: 10px; color: #6d564b; font-size: .92rem; letter-spacing: .08em; }
.cover-ornament { display: flex; align-items: center; gap: 9px; color: #946a62; font: 1.25rem/1 Georgia, serif; margin-bottom: 10px; }
.cover-ornament span { display: inline-block; width: 36px; height: 1px; background: linear-gradient(90deg, transparent, #9c7d6a); }
.cover-ornament span:last-child { transform: rotate(180deg); }
.cover-card {
  --mount: var(--rose);
  --tilt: 0deg;
  --shift: 0px;
  position: relative;
  display: block;
  min-width: 0;
  padding: 11px;
  border: 1px solid #77634e4d;
  background-color: var(--mount);
  background-image: repeating-linear-gradient(0deg, #fff4dd25 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, #fffaf01c 0 1px, transparent 1px 4px);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(var(--shift)) rotate(var(--tilt));
  box-shadow: 0 11px 17px #5a39292e, 1px 1px 0 #f9eed8 inset;
  transition: transform .22s ease, box-shadow .22s ease;
}
.cover-card:hover, .cover-card:focus-visible {
  z-index: 2;
  transform: translateY(calc(var(--shift) - 5px)) rotate(0deg);
  box-shadow: 0 17px 23px #5a39293a;
}
.cover-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  background: var(--ivory);
  border: 1px solid #fff9ec;
  outline: 1px solid #92796869;
  outline-offset: -4px;
}
.cover-english { grid-area: 2 / 1 / 4 / 7; --tilt: -3.4deg; --shift: 0px; }
.cover-social { grid-area: 1 / 8 / 3 / 13; --mount: var(--sage); --tilt: 4.1deg; --shift: 4px; }
.cover-data { grid-area: 3 / 7 / 5 / 13; --mount: var(--blue); --tilt: -2.4deg; --shift: 7px; margin-left: 8px; }
.cover-profile { grid-area: 4 / 1 / 5 / 7; --mount: var(--gold); --tilt: 2.4deg; --shift: 6px; margin: 0 12px 0 17px; }
.cover-english::before, .cover-profile::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 9px solid transparent;
  border-image: url("./assets/lace-frame.webp") 14% / 9px round;
  pointer-events: none;
}
.cover-profile .cover-card-inner { flex-direction: row; align-items: center; padding-left: 14px; }
.cover-profile .cover-caption { flex: 1; border: 0; padding-left: 11px; }
.cover-media { flex: 1; min-height: 0; margin: 5px 5px 0; overflow: hidden; background: #e5d5bd; }
.cover-media img { height: 100%; width: 100%; object-fit: cover; }
.cover-english .cover-media img { object-position: 50% 58%; }
.cover-data .cover-media img { object-position: 50% 35%; }
.cover-caption {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 15px 10px;
  min-width: 0;
  border-top: 1px solid #bba58c66;
  background: var(--ivory);
}
.cover-caption h2 { font: 850 clamp(22px, 2.6vw, 33px)/1.2 var(--serif); }
.cover-caption p { color: var(--muted); font-size: .77rem; margin-top: 3px; }
.cover-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 29px;
  height: 29px;
  border-radius: 50%;
  border: 1px solid #98796386;
  color: var(--rose-ink);
}
.cover-card:hover .cover-arrow { background: #f3e2d7; }
.cover-film {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  min-height: 90px;
  margin: 5px 5px 0;
  background: repeating-linear-gradient(112deg, #b1bdac54 0 1px, transparent 1px 5px), radial-gradient(ellipse at 50% 50%, #e0e4ce, #bdc6b0);
}
.film-sheet {
  position: absolute;
  width: 66%;
  height: 61%;
  border: 2px solid #fff5dc;
  border-radius: 3px;
  box-shadow: 0 7px 13px #443f2c33;
}
.film-back { transform: translate(8%, -2%) rotate(9deg); background: #c1a0a3; }
.film-front {
  display: grid;
  place-items: center;
  transform: translate(-6%, 3%) rotate(-7deg);
  background:
    repeating-linear-gradient(90deg, #e6d9bd 0 5px, transparent 5px 11px) 5px 5px / calc(100% - 10px) 4px no-repeat,
    repeating-linear-gradient(90deg, #e6d9bd 0 5px, transparent 5px 11px) 5px calc(100% - 5px) / calc(100% - 10px) 4px no-repeat,
    radial-gradient(ellipse at 42% 38%, #ad8b7b, #624944);
}
.film-front i { display: grid; place-items: center; width: 45px; height: 45px; border: 1px solid #f7eddc; border-radius: 50%; background: #f7eddc2e; }
.film-front i::after { content: ""; margin-left: 4px; border: 7px solid transparent; border-left: 11px solid #fff2d4; border-right: 0; }
.seal {
  display: grid;
  flex: 0 0 49px;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 43% 49% 42% 48% / 49% 41% 49% 43%;
  background: radial-gradient(ellipse at 36% 24%, #b9797e, #8a515a 72%, #75424a);
  border: 2px solid #8b5259;
  box-shadow: inset 0 0 0 2px #ca94978a, 0 3px 5px #5d342c38;
  color: #fff0da;
  font: 780 1.35rem/1 var(--serif);
}

.page { padding-block: 30px 53px; }
.page-heading { margin-bottom: 23px; }
.page-heading h1 { color: #4e3431; font: 850 clamp(34px, 5.15vw, 56px)/1.16 var(--serif); margin-top: 9px; }
.page-heading p { max-width: 66ch; margin-top: 8px; color: var(--muted); }
.kicker, .card-meta { font-size: .8rem; color: #72584e; }
.back-link { font-size: .84rem; font-weight: 680; text-decoration: none; color: var(--rose-ink); }
.back-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.lace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.lace-card {
  --mount: var(--rose);
  position: relative;
  isolation: isolate;
  display: block;
  min-width: 0;
  padding: 26px;
  border: 1px solid #9c82716b;
  border-radius: 12px;
  background-color: var(--mount);
  background-image: repeating-linear-gradient(0deg, #fffae329 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, #fff8ed1f 0 1px, transparent 1px 4px);
  box-shadow: 0 8px 18px #4d30251c;
}
.lace-card:nth-child(3n+2) { --mount: var(--blue); }
.lace-card:nth-child(3n+3) { --mount: var(--sage); }
.lace-card::before, .lace-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
}
.lace-card::before {
  inset: 3px;
  border: 24px solid transparent;
  border-image: url("./assets/lace-frame.webp") 14% / 24px round;
  filter: drop-shadow(0 1px 1px #65463839);
}
.lace-card::after { inset: 16px; border: 1px dotted #a689777b; border-radius: 6px; }
.lace-inner {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ivory);
  border: 1px solid #a48d775d;
  border-radius: 5px;
}
.card-media { min-width: 0; overflow: hidden; background: #e4d7c3; }
.card-media > img { display: block; width: 100%; object-fit: cover; }
.card-copy { padding: 15px 19px 19px; }
.card-copy h2, .lace-card h2 { color: #4b3531; font: 800 clamp(20px, 2.7vw, 29px)/1.3 var(--serif); }
.card-copy p { margin-top: 5px; color: var(--muted); }
.paper-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 12px;
  padding: 7px 14px;
  border: 1px solid #83545a;
  border-radius: 5px;
  background: #f1dfd8;
  color: #713c44;
  text-decoration: none;
  font: 700 .85rem/1.35 var(--sans);
  cursor: pointer;
}
.paper-button:hover { background: #e6c9c3; }
.profile-grid { align-items: start; }
.profile-letter .card-copy, .education-letter .card-copy, .experience-letter .card-copy { padding: 23px clamp(17px, 3vw, 31px); }
.experience-letter { grid-column: 1 / -1; }
.experience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.profile-letter .seal { margin-bottom: 10px; }
.profile-details { margin-top: 16px; }
.profile-details > div { display: grid; grid-template-columns: 4.5em 1fr; gap: 8px; padding-block: 9px; border-top: 1px solid #ac947257; }
.profile-details dt { color: var(--rose-ink); font-size: .86rem; font-weight: 680; }
.profile-details dd { margin: 0; overflow-wrap: anywhere; }
.profile-details a { color: #744a48; text-underline-offset: 4px; }
.education-entry { margin-top: 12px; padding-top: 12px; border-top: 1px solid #ac947257; }
.education-entry h3 { font: 750 1.12rem/1.4 var(--serif); }

@media (max-width: 880px) {
  .site-shell { width: calc(100% - 38px); }
  .scrapbook { padding: 29px 33px 38px; grid-template-rows: 117px 113px 139px 106px; }
  .cover-title h1 { font-size: clamp(35px, 5.7vw, 54px); }
  .site-nav { gap: 14px; }
}
@media (max-width: 680px) {
  .site-shell { width: calc(100% - 26px); }
  .header-inner { align-items: start; flex-direction: column; gap: 4px; min-height: auto; padding-block: 9px 7px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 5px; }
  .site-nav a { font-size: .77rem; }
  .scrapbook {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto auto auto auto;
    gap: 13px 9px;
    margin-block: 14px 28px;
    padding: 22px 12px 25px;
  }
  .cover-title { grid-area: 1 / 1 / 2 / 3; padding-left: 4px; }
  .cover-title h1 { font-size: clamp(31px, 8.5vw, 47px); }
  .cover-title p { font-size: .75rem; margin-top: 7px; }
  .cover-english { grid-area: 2 / 1 / 3 / 3; min-height: 208px; margin-inline: 5px 8px; --tilt: -2deg; }
  .cover-social { grid-area: 3 / 1 / 4 / 2; min-height: 160px; --tilt: 2.5deg; --shift: 1px; }
  .cover-data { grid-area: 3 / 2 / 4 / 3; min-height: 160px; margin-left: 0; --tilt: -2deg; --shift: 5px; }
  .cover-profile { grid-area: 4 / 1 / 5 / 3; min-height: 83px; margin: 0 10px; --tilt: 1.8deg; --shift: 3px; }
  .cover-card { padding: 7px; }
  .cover-caption { padding: 7px 8px 8px; }
  .cover-caption h2 { font-size: clamp(16px, 4.25vw, 24px); }
  .cover-caption p { font-size: .67rem; line-height: 1.45; }
  .cover-arrow { flex-basis: 22px; height: 22px; font-size: .75rem; }
  .cover-media { margin: 3px 3px 0; }
  .cover-film { min-height: 75px; margin: 3px 3px 0; }
  .film-front i { width: 32px; height: 32px; }
  .cover-profile .cover-card-inner { padding-left: 9px; }
  .cover-profile .seal { width: 39px; height: 39px; flex-basis: 39px; font-size: 1.1rem; }
  .page { padding-block: 20px 31px; }
  .page-heading { margin-bottom: 16px; }
  .lace-grid, .experience-grid { grid-template-columns: 1fr; gap: 14px; }
  .lace-card { padding: 22px; }
  .lace-card::before { border-image-width: 20px; }
  .card-copy { padding: 13px 14px 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
