.content-page {
  min-height: 100vh;
  padding: 42px clamp(18px, 7vw, 150px) 70px;
}

:where(
  .page-banner,
  .glass-card,
  .archive-page-heading,
  .notes-page-heading,
  .project-timeline-content,
  .little-note-paper,
  .notebook-directory-page,
  .notebook-intro-page,
  .music-panel,
  .contact-letter-sheet,
  .contact-envelope-front
) {
  border-radius: var(--radius-lg);
}

.page-banner {
  max-width: 1420px;
  margin: 0 auto 28px;
  padding: 28px 32px;
  border-radius: 34px;
}

.page-banner p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--fg-secondary);
}

.page-kicker {
  margin: 0;
  color: var(--accent-strong);
  font: var(--caption);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-banner h1 {
  margin: 3px 0 0;
  font: var(--h1);
  letter-spacing: -0.05em;
}

.back-map {
  position: fixed;
  top: 24px;
  left: 26px;
  z-index: 50;
  display: grid;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--accent-strong);
  box-shadow: 0 12px 32px rgba(33, 117, 112, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform var(--duration-fast) var(--ease-bounce-soft), background var(--duration-fast) ease;
}

.back-map svg {
  width: 34px;
  height: 34px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 4.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-map:hover {
  background: rgba(255, 255, 255, 0.83);
  transform: translateX(-3px) scale(1.06);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 1420px;
  margin: 0 auto;
}

.glass-card {
  min-height: 230px;
  padding: 28px;
  border-radius: 34px;
  transition: transform var(--duration-base) var(--ease-bounce-soft), background var(--duration-fast) ease;
}

a.glass-card:hover {
  background: rgba(255, 255, 255, 0.66);
  transform: translateY(-6px);
}

.card-head {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.card-mark {
  display: grid;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font: 700 0.78rem / 1.2 var(--font-mono);
  place-items: center;
  text-align: center;
}

.glass-card h2 {
  margin: 0;
  font: var(--h3);
}

.card-year {
  margin-left: 8px;
  color: var(--fg-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: var(--weight-regular);
}

.glass-card p {
  margin: 22px 0 0;
  color: var(--fg-secondary);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.tag {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.42);
  color: var(--fg-muted);
  font: var(--caption);
}

.card-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin-top: 20px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--accent-strong);
  font-weight: var(--weight-bold);
}

.wide-card {
  grid-column: 1 / -1;
}

/* Technical article notebook */
.article-notebook-page {
  display: grid;
  min-height: 100svh;
  padding: 72px clamp(84px, 7vw, 142px) 70px;
  place-items: center;
  overflow: hidden;
}

.open-tech-notebook {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(530px, 1.28fr);
  width: min(1460px, 100%);
  min-height: 690px;
  filter: drop-shadow(0 30px 46px rgba(67, 127, 113, .17));
  isolation: isolate;
  animation: notebook-open 640ms var(--ease-map) both;
}

.open-tech-notebook::before,
.open-tech-notebook::after {
  position: absolute;
  top: 25px;
  bottom: 21px;
  z-index: -1;
  width: 51%;
  border: 1px solid rgba(224, 193, 93, .18);
  background: rgba(255, 250, 219, .72);
  content: "";
}

.open-tech-notebook::before {
  left: -13px;
  border-radius: 41px 16px 18px 52px;
  transform: rotate(-1.15deg);
}

.open-tech-notebook::after {
  right: -13px;
  border-radius: 16px 43px 53px 18px;
  transform: rotate(1.1deg);
}

.notebook-page-stack {
  position: absolute;
  bottom: 8px;
  z-index: -1;
  width: 48%;
  height: 52px;
  border-bottom: 3px double rgba(202, 169, 67, .22);
  background: rgba(255, 252, 232, .8);
}

.notebook-page-stack-left {
  left: 8px;
  border-radius: 0 0 14px 46px;
  transform: rotate(.45deg);
}

.notebook-page-stack-right {
  right: 8px;
  border-radius: 0 0 46px 14px;
  transform: rotate(-.45deg);
}

.notebook-intro-page,
.notebook-directory-page {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .96);
  background-color: rgba(255, 253, 235, .91);
  background-image: repeating-linear-gradient(to bottom, transparent 0 43px, rgba(180, 158, 91, .095) 43px 44px);
}

.notebook-intro-page {
  padding: 88px clamp(38px, 4vw, 68px) 54px;
  border-radius: 44px 9px 17px 54px;
  box-shadow: inset -22px 0 32px rgba(129, 109, 52, .06), inset 0 1px 0 #fff;
  transform: perspective(1200px) rotateY(1.2deg);
}

.notebook-directory-page {
  padding: 70px clamp(44px, 4vw, 70px) 42px;
  border-radius: 9px 45px 55px 17px;
  box-shadow: inset 22px 0 32px rgba(129, 109, 52, .055), inset 0 1px 0 #fff;
  transform: perspective(1200px) rotateY(-1.2deg);
}

.notebook-tape {
  position: absolute;
  top: 29px;
  left: 50%;
  width: 105px;
  height: 27px;
  background: rgba(171, 229, 208, .47);
  box-shadow: inset 0 1px rgba(255,255,255,.55);
  transform: translateX(-50%) rotate(-3deg);
}

.notebook-kicker,
.notebook-directory-heading p {
  margin: 0;
  color: #a9851f;
  font: 700 .78rem/1.2 var(--font-cute);
  letter-spacing: .13em;
}

.notebook-intro-page h1 {
  position: relative;
  width: max-content;
  margin: 18px 0 25px;
  font: 700 clamp(3.4rem, 4.7vw, 5.8rem)/.91 var(--font-cute);
  letter-spacing: .04em;
}

.notebook-intro-page h1::after {
  position: absolute;
  right: -24px;
  bottom: 2px;
  left: 3px;
  z-index: -1;
  height: 18px;
  border-radius: 60% 35% 45% 28%;
  background: rgba(250, 221, 91, .48);
  content: "";
  transform: rotate(-2deg);
}

.notebook-lead {
  max-width: 330px;
  margin: 0;
  color: var(--fg-secondary);
  font-size: clamp(.93rem, 1.05vw, 1.08rem);
  line-height: 1.95;
}

.notebook-tabs {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  margin-top: 44px;
}

.notebook-tabs button {
  position: relative;
  min-height: 42px;
  padding: 5px 17px 6px 19px;
  border: 0;
  border-radius: 3px 15px 15px 3px;
  background: rgba(255,255,255,.4);
  color: var(--fg-secondary);
  cursor: pointer;
  text-align: left;
  transition: color 180ms ease, padding 260ms var(--ease-bounce-soft), background 180ms ease;
}

.notebook-tabs button::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  border-radius: 4px;
  background: var(--tab-color, #83d6c7);
  content: "";
}

.notebook-tabs button:nth-child(2) { --tab-color: #83d6c7; }
.notebook-tabs button:nth-child(3) { --tab-color: #f4ca68; }
.notebook-tabs button:nth-child(4) { --tab-color: #ef9e83; }

.notebook-tabs button:hover,
.notebook-tabs button.is-active {
  padding-left: 27px;
  background: rgba(255,255,255,.75);
  color: var(--fg-primary);
}

.notebook-doodle {
  position: absolute;
  right: 42px;
  bottom: 48px;
  width: 84px;
  height: 48px;
  opacity: .34;
  transform: rotate(-7deg);
}

.notebook-doodle i {
  position: absolute;
  height: 2px;
  border-radius: 50%;
  background: var(--accent-primary);
  transform-origin: right center;
}

.notebook-doodle i:nth-child(1) { top: 9px; right: 0; width: 72px; transform: rotate(8deg); }
.notebook-doodle i:nth-child(2) { top: 23px; right: 5px; width: 58px; transform: rotate(-4deg); }
.notebook-doodle i:nth-child(3) { top: 36px; right: 13px; width: 40px; transform: rotate(7deg); }

.notebook-directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 24px;
  border-bottom: 2px solid rgba(111, 190, 174, .27);
}

.notebook-directory-heading h2 {
  margin: 4px 0 0;
  font: 700 clamp(1.85rem, 2.4vw, 2.65rem)/1.1 var(--font-cute);
}

.notebook-directory-heading > span {
  padding-bottom: 4px;
  color: var(--fg-muted);
  font-size: .84rem;
}

.notebook-article-list {
  margin-top: 4px;
}

.notebook-article-row {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  gap: 18px;
  align-items: start;
  padding: 28px 3px 26px;
  border-bottom: 1px dashed rgba(110, 100, 62, .23);
  transition: transform 240ms var(--ease-bounce-soft);
}

.notebook-article-row[hidden] {
  display: none;
}

.notebook-article-row.is-latest::before {
  position: absolute;
  top: 58px;
  right: 28px;
  left: 57px;
  z-index: -1;
  height: 15px;
  border-radius: 45% 30% 48% 22%;
  background: rgba(250, 221, 91, .35);
  content: "";
  transform: rotate(-.5deg);
}

.notebook-article-row:hover,
.notebook-article-row:focus-visible {
  transform: translateX(7px);
}

.notebook-article-number {
  display: grid;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 50%;
  background: rgba(191, 235, 221, .65);
  color: var(--accent-strong);
  font: 700 .8rem/1 var(--font-cute);
  place-items: center;
}

.notebook-article-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  color: var(--fg-muted);
  font-size: .72rem;
}

.notebook-article-meta b {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(248, 214, 94, .29);
  color: #a37313;
  font-weight: 700;
}

.notebook-article-copy > strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(1.13rem, 1.55vw, 1.55rem);
  line-height: 1.38;
}

.notebook-article-copy > small {
  display: block;
  margin-top: 9px;
  color: var(--fg-secondary);
  font-size: .86rem;
  line-height: 1.65;
}

.notebook-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.notebook-row-tags i {
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--fg-muted);
  font-size: .68rem;
  font-style: normal;
}

.notebook-article-arrow {
  margin-top: 24px;
  color: var(--accent-strong);
  font-size: 1.2rem;
  transition: transform 220ms var(--ease-bounce-soft);
}

.notebook-article-row:hover .notebook-article-arrow {
  transform: translate(3px,-3px);
}

.notebook-csdn-bookmark {
  position: absolute;
  top: 176px;
  right: -18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 54px;
  min-height: 156px;
  padding: 17px 7px 24px;
  border-radius: 7px 9px 17px 8px;
  background: #f29a79;
  box-shadow: 0 12px 21px rgba(174, 92, 66, .19);
  color: #fffdf0;
  writing-mode: vertical-rl;
  transition: right 240ms var(--ease-bounce-soft), background 180ms ease;
}

.notebook-csdn-bookmark::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 19px;
  background: linear-gradient(135deg, transparent 50%, rgba(255,253,235,.94) 51%) left, linear-gradient(225deg, transparent 50%, rgba(255,253,235,.94) 51%) right;
  background-size: 50% 100%;
  background-repeat: no-repeat;
  content: "";
}

.notebook-csdn-bookmark span {
  font-size: .72rem;
  letter-spacing: .12em;
}

.notebook-csdn-bookmark strong {
  margin-top: 6px;
  font-size: .83rem;
}

.notebook-csdn-bookmark i {
  margin-top: auto;
  font-style: normal;
}

.notebook-csdn-bookmark:hover {
  right: -26px;
  background: #ec8865;
}

.notebook-page-number {
  display: flex;
  justify-content: space-between;
  margin-top: 29px;
  color: rgba(73, 94, 91, .54);
  font-size: .67rem;
  letter-spacing: .09em;
}

.notebook-spine {
  position: absolute;
  top: 38px;
  bottom: 36px;
  left: 36%;
  z-index: 3;
  width: 18px;
  pointer-events: none;
  transform: translateX(-50%);
}

.notebook-spine::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: linear-gradient(transparent, rgba(132,112,53,.18) 10% 90%, transparent);
  content: "";
}

.notebook-spine::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 78%;
  border-radius: 50%;
  box-shadow: 0 0 23px rgba(100,85,44,.11);
  content: "";
  transform: translate(-50%,-50%);
}

.notebook-empty {
  margin: 70px auto;
  color: var(--fg-muted);
  text-align: center;
}

@keyframes notebook-open {
  from { opacity: 0; transform: translateY(22px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.music-panel {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.record-disc {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, white 0 8%, var(--accent-primary) 9% 15%, #daefea 16% 42%, var(--accent-strong) 43% 46%, #effaf6 47% 100%);
  box-shadow: 0 16px 32px rgba(67, 148, 141, 0.16);
}

.record-disc.is-playing {
  animation: record-spin 7s linear infinite;
}

@keyframes record-spin {
  to { transform: rotate(360deg); }
}

.track-bar {
  height: 9px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
}

.track-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-primary);
}

.play-button {
  width: 58px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.94);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: var(--weight-bold);
}

.play-button:hover {
  background: white;
}

.project-archive-page,
.little-notes-page {
  min-height: 100svh;
  padding: 70px clamp(18px, 7vw, 130px) 90px;
}

.archive-page-heading {
  display: grid;
  grid-template-columns: minmax(240px, .75fr) minmax(320px, 1.25fr);
  grid-template-rows: auto auto;
  column-gap: 40px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto 30px;
  padding: 23px 32px;
  border-radius: 25px 36px 27px 33px / 34px 25px 36px 28px;
}

.archive-page-heading p,
.notes-page-heading p {
  margin: 0;
  color: #a98724;
  font: 700 .76rem/1.4 var(--font-cute);
  letter-spacing: .14em;
}

.archive-page-heading h1,
.notes-page-heading h1 {
  margin: 5px 0 8px;
  color: var(--fg-primary);
  font-family: var(--font-cute);
  font-size: clamp(2.5rem, 6vw, 4.8rem);
  line-height: 1;
}

.archive-page-heading p {
  grid-column: 1;
  grid-row: 1;
}

.archive-page-heading h1 {
  grid-column: 1;
  grid-row: 2;
  margin: 3px 0 0;
  font-size: clamp(2rem, 3.3vw, 3rem);
}

.archive-page-heading > span,
.notes-page-heading > span {
  color: var(--fg-secondary);
  font-family: var(--font-cute);
}

.archive-page-heading > span {
  grid-column: 2;
  grid-row: 1 / 3;
  max-width: 530px;
  padding-left: 32px;
  border-left: 1px solid rgba(166, 143, 70, .22);
  font-size: .9rem;
  line-height: 1.75;
}

.project-timeline {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 0 12px;
}

.project-timeline::before {
  position: absolute;
  top: 35px;
  bottom: 46px;
  left: 180px;
  width: 2px;
  border-radius: 999px;
  background: linear-gradient(#d9c88e, #9bd9cd 58%, #dfcf93);
  box-shadow: 0 0 0 1px rgba(255,255,255,.6);
  content: "";
}

.project-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 60px minmax(0, 1fr);
  min-height: 142px;
  padding-bottom: 20px;
}

.project-timeline-item > time {
  padding-top: 14px;
  color: var(--fg-muted);
  font: 700 .78rem/1.4 var(--font-cute);
  letter-spacing: .03em;
  text-align: right;
}

.project-timeline-dot {
  z-index: 2;
  display: block;
  width: 15px;
  height: 15px;
  margin: 13px auto 0;
  border: 3px solid #bcae83;
  border-radius: 50%;
  background: #fffdf1;
  box-shadow: 0 0 0 5px rgba(255,255,255,.58);
  transition: border-color 220ms ease, background 220ms ease, transform 300ms var(--ease-bounce-soft);
}

.project-timeline-content {
  display: block;
  padding: 7px 18px 18px 22px;
  border-bottom: 1px solid rgba(172, 153, 94, .24);
  border-radius: 18px;
  color: var(--fg-primary);
  transition: background 220ms ease, box-shadow 220ms ease, transform 300ms var(--ease-bounce-soft);
}

.project-timeline-content header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a66e32;
  font: 700 .68rem/1.3 var(--font-cute);
  letter-spacing: .08em;
}

.project-timeline-content header b {
  color: rgba(92, 112, 107, .42);
  font-size: .7rem;
}

.project-timeline-content h2 {
  margin: 6px 0 8px;
  font-family: var(--font-cute);
  font-size: clamp(1.2rem, 2vw, 1.72rem);
  line-height: 1.15;
}

.project-timeline-content .tag-list {
  margin-bottom: 10px;
}

.project-timeline-content .tag {
  padding: 4px 9px;
  font-size: .66rem;
}

.project-timeline-content p {
  max-width: 760px;
  margin: 0;
  color: var(--fg-secondary);
  font-size: .88rem;
  line-height: 1.75;
}

.project-timeline-link {
  display: inline-block;
  margin-top: 11px;
  color: var(--accent-strong);
  font-family: var(--font-cute);
  font-size: .75rem;
}

.project-timeline-item.is-latest {
  min-height: 168px;
}

.project-timeline-item.is-latest .project-timeline-dot {
  border-color: #b66c32;
  background: #b66c32;
}

.project-timeline-item.is-latest .project-timeline-content {
  background: linear-gradient(110deg, rgba(255,255,255,.46), rgba(255,245,190,.3), rgba(213,245,232,.28));
}

.project-timeline-item:hover .project-timeline-dot {
  border-color: var(--accent-primary);
  background: var(--accent-primary);
  transform: scale(1.13);
}

.project-timeline-content:hover,
.project-timeline-content:focus-visible {
  background: rgba(255,255,255,.6);
  box-shadow: 0 18px 42px rgba(69, 143, 132, .1);
  transform: translateX(7px);
}

.notes-page-heading {
  max-width: 980px;
  margin: 0 auto 45px;
  text-align: center;
}

.little-notes-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 35px 30px;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.notes-status {
  grid-column: 1 / -1;
  margin: 34px 0;
  color: var(--fg-muted);
  font-family: var(--font-cute);
  text-align: center;
}

.little-note-paper {
  position: relative;
  min-height: 245px;
  padding: 38px 30px 25px;
  border: 2px solid rgba(255,255,255,.95);
  border-radius: 14px 18px 12px 20px;
  background:
    linear-gradient(rgba(163, 152, 104, .11) 1px, transparent 1px) 0 74px / 100% 30px,
    #fffef0;
  box-shadow: 0 24px 50px rgba(94, 141, 122, .13), inset 0 1px 0 white;
  transition: box-shadow 220ms ease, transform 320ms var(--ease-bounce-soft);
}

.little-note-paper:first-child {
  grid-column: span 2;
  min-height: 280px;
  padding: 48px 42px 30px;
}

.note-paper-1 { background-color: #f2fae7; transform: rotate(1.4deg); }
.note-paper-2 { background-color: #fff1bd; transform: rotate(-1.2deg); }
.note-paper-3 { background-color: #edf9f3; transform: rotate(.8deg); }
.note-paper-4 { background-color: #fff8d7; transform: rotate(-.7deg); }

.note-paper-tape {
  position: absolute;
  top: -11px;
  left: 50%;
  width: 72px;
  height: 24px;
  background: rgba(150, 218, 200, .62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.62);
  transform: translateX(-50%) rotate(-2deg);
}

.note-paper-1 .note-paper-tape,
.note-paper-4 .note-paper-tape { background: rgba(241, 211, 98, .58); }

.little-note-paper header {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.little-note-paper time {
  color: #a08326;
  font: 700 .82rem/1 var(--font-cute);
  letter-spacing: .08em;
}

.little-note-paper h2 {
  margin: 20px 0 0;
  font-family: var(--font-cute);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.little-note-paper p {
  margin: 15px 0 0;
  color: var(--fg-secondary);
  font-family: var(--font-cute);
  line-height: 1.8;
}

.little-note-image {
  display: block;
  width: 100%;
  max-height: 360px;
  margin-top: 18px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 9px;
  object-fit: cover;
}

.little-note-paper code {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,.58);
  color: var(--accent-strong);
  font-family: var(--font-mono);
  font-size: .88em;
}

.little-note-paper footer {
  margin-top: 26px;
  color: rgba(93, 116, 107, .55);
  font: 700 .65rem/1 var(--font-cute);
  letter-spacing: .09em;
}

.little-note-paper:hover {
  box-shadow: 0 31px 58px rgba(84, 145, 131, .18), inset 0 1px 0 white;
  transform: translateY(-7px) rotate(0);
}

.contact-letter-page {
  position: relative;
  display: grid;
  min-height: 100svh;
  padding: 68px 24px 50px;
  overflow: hidden;
  place-items: center;
}

.contact-letter-page::before,
.contact-letter-page::after {
  position: fixed;
  z-index: -1;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  content: "";
  filter: blur(52px);
  opacity: .55;
  pointer-events: none;
}

.contact-letter-page::before {
  top: 7%;
  left: 5%;
  background: var(--oi-cyan-1);
}

.contact-letter-page::after {
  right: 3%;
  bottom: -7%;
  background: var(--oi-yellow-1);
}

.contact-mail-scene {
  position: relative;
  width: min(1120px, 94vw);
  min-height: 500px;
  isolation: isolate;
}

.contact-envelope-back {
  position: absolute;
  right: 2%;
  bottom: 10px;
  left: 2%;
  z-index: 0;
  height: 280px;
  border: 3px solid rgba(255, 255, 255, 0.93);
  border-radius: 34px 34px 46px 46px;
  background: linear-gradient(145deg, rgba(255, 252, 223, .97), rgba(242, 225, 143, .88));
  box-shadow: 0 35px 70px rgba(146, 127, 58, .16), inset 0 1px 0 white;
  transform: rotate(-.8deg);
}

.contact-envelope-back::before {
  position: absolute;
  right: 7%;
  bottom: 47%;
  left: 7%;
  height: 83%;
  border: 3px solid rgba(255,255,255,.82);
  border-radius: 24px;
  background: linear-gradient(160deg, #f5e9a2, #fff9d5 72%);
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
  content: "";
}

.contact-letter-sheet {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  width: min(1000px, 88vw);
  min-height: 0;
  padding: 46px clamp(34px, 4vw, 58px) 20px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 18px 22px 16px 24px;
  background:
    linear-gradient(rgba(218, 203, 142, .12) 1px, transparent 1px) 0 120px / 100% 32px,
    radial-gradient(circle at 16% 12%, rgba(255,255,255,.98), transparent 34%),
    linear-gradient(150deg, rgba(255,255,249,.98), rgba(255,251,221,.96));
  box-shadow: 0 27px 65px rgba(70, 131, 121, .16), inset 0 1px 0 white;
  transform: translateX(-50%) rotate(.45deg);
}

.contact-letter-sheet::before {
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(201, 179, 91, .28);
  border-radius: 12px 16px 11px 18px;
  content: "";
  pointer-events: none;
}

.contact-letter-heading {
  position: relative;
  z-index: 1;
  text-align: center;
}

.contact-letter-heading p {
  margin: 0;
  color: #b19331;
  font: 700 .74rem/1.4 var(--font-cute);
  letter-spacing: .14em;
}

.contact-letter-heading h1 {
  margin: 5px 0 8px;
  color: var(--fg-primary);
  font-family: var(--font-cute);
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  line-height: 1;
  letter-spacing: .02em;
}

.contact-letter-heading span {
  color: var(--fg-secondary);
  font-family: var(--font-cute);
  font-size: 1rem;
}

.contact-stamps {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 22px);
  width: 96%;
  margin: 30px auto 0;
}

.contact-stamp {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 166px;
  padding: 16px 11px 14px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  border: 3px dashed rgba(95, 101, 83, .31);
  border-radius: 10px;
  background: rgba(255, 255, 255, .83);
  box-shadow: 0 13px 22px rgba(103, 100, 67, .12), inset 0 0 0 7px rgba(255,255,255,.5);
  color: var(--fg-primary);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: box-shadow 220ms ease, transform 300ms var(--ease-bounce-soft);
}

.contact-stamp:nth-child(1) { transform: rotate(-2.3deg); }
.contact-stamp:nth-child(2) { transform: translateY(5px) rotate(1.4deg); }
.contact-stamp:nth-child(3) { transform: rotate(-.8deg); }
.contact-stamp:nth-child(4) { transform: translateY(3px) rotate(-1.4deg); }

.contact-stamp:hover,
.contact-stamp:focus-visible {
  z-index: 4;
  box-shadow: 0 21px 34px rgba(88, 100, 70, .18), inset 0 0 0 7px rgba(255,255,255,.64);
  transform: translateY(-8px) rotate(0) scale(1.035);
}

.contact-stamp-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin-bottom: 12px;
  border: 2px solid rgba(255,255,255,.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  place-items: center;
}

.contact-stamp-icon img,
.contact-stamp-icon svg {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.contact-stamp-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.contact-stamp strong {
  font-family: var(--font-cute);
  font-size: 1.35rem;
  line-height: 1.1;
}

.contact-stamp small {
  display: block;
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  color: var(--fg-secondary);
  font-family: var(--font-cute);
  font-size: .78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-stamp em {
  position: absolute;
  top: 9px;
  right: 10px;
  color: rgba(77, 87, 79, .42);
  font: 700 .62rem/1 var(--font-cute);
  letter-spacing: .08em;
  transform: rotate(7deg);
}

.contact-stamp-github {
  border-color: rgba(34, 38, 42, .32);
  background: linear-gradient(145deg, rgba(250,250,248,.98), rgba(227,235,231,.86));
}

.contact-stamp-github .contact-stamp-icon {
  background: #22272c;
}

.contact-stamp-github .contact-stamp-icon img {
  filter: brightness(0) invert(1);
}

.contact-stamp-csdn {
  border-color: rgba(219, 101, 76, .36);
  background: linear-gradient(145deg, #fff8ec, #fff0dd);
}

.contact-stamp-csdn .contact-stamp-icon {
  background: #fffaf4;
}

.contact-stamp-email {
  border-color: rgba(36, 168, 153, .34);
  background: linear-gradient(145deg, #f4fff9, #fff7c9);
}

.contact-stamp-email .contact-stamp-icon {
  color: #06a999;
  background: rgba(255,255,255,.79);
}

.contact-stamp-wechat {
  border-color: rgba(71, 167, 102, .38);
  background: linear-gradient(145deg, #f4fff3, #e7f7c9);
}

.contact-stamp-wechat .contact-stamp-icon {
  color: #45a45f;
  background: rgba(255,255,255,.82);
}

.contact-stamp-email.is-copied {
  animation: stamp-copy-pop 480ms var(--ease-bounce-soft) both;
}

.contact-letter-signoff {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: center;
  margin: 23px 8px 0 auto;
  width: min(300px, 58%);
  color: #b29330;
  transform: rotate(-2deg);
}

.contact-letter-signoff span {
  font: 700 .66rem/1 var(--font-cute);
  letter-spacing: .12em;
}

.contact-letter-signoff strong {
  color: var(--fg-primary);
  font-family: var(--font-cute);
  font-size: 1.05rem;
}

.contact-letter-signoff i {
  height: 1px;
  background: rgba(181, 151, 53, .48);
}

.contact-envelope-front {
  position: absolute;
  right: 2%;
  bottom: 10px;
  left: 2%;
  z-index: 3;
  height: 120px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-top: 0;
  border-radius: 0 0 46px 46px;
  background: linear-gradient(162deg, rgba(255,248,201,.9), rgba(235,215,125,.94));
  clip-path: polygon(0 15%, 50% 68%, 100% 15%, 100% 100%, 0 100%);
  pointer-events: none;
  transform: rotate(-.8deg);
}

.contact-envelope-front::before,
.contact-envelope-front::after {
  position: absolute;
  bottom: 0;
  width: 57%;
  height: 95%;
  background: rgba(255, 251, 218, .46);
  content: "";
}

.contact-envelope-front::before {
  left: 0;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.contact-envelope-front::after {
  right: 0;
  clip-path: polygon(100% 0, 0 100%, 100% 100%);
}

.contact-envelope-front span {
  position: absolute;
  right: 28px;
  bottom: 23px;
  z-index: 3;
  width: 88px;
  height: 88px;
  border: 2px solid rgba(190, 149, 46, .36);
  border-radius: 50%;
  opacity: .38;
}

.contact-envelope-front span::before,
.contact-envelope-front span::after {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 54px;
  height: 2px;
  background: #bb9130;
  content: "";
}

.contact-envelope-front span::after {
  transform: rotate(90deg);
}

.letter-spark {
  position: absolute;
  z-index: 5;
  color: #d8b944;
  font-size: 2.4rem;
  line-height: 1;
  text-shadow: 0 4px 13px rgba(203, 171, 55, .22);
  animation: letter-spark 2.5s ease-in-out infinite alternate;
}

.letter-spark-one { top: 48px; left: 2%; }
.letter-spark-two { top: 170px; right: 0; animation-delay: -1.1s; }

.contact-copy-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  z-index: 70;
  padding: 12px 19px;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 16px;
  background: rgba(255,255,245,.9);
  box-shadow: 0 17px 38px rgba(51, 118, 106, .16);
  color: var(--accent-strong);
  font-family: var(--font-cute);
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px) scale(.9);
  transition: opacity 180ms ease, transform 280ms var(--ease-bounce-soft);
}

.contact-copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

/* Resume-forward shape language: flatter cards, restrained rounding. */
:where(
  .page-banner,
  .glass-card,
  .archive-page-heading,
  .notes-page-heading,
  .project-timeline-content,
  .little-note-paper,
  .notebook-directory-page,
  .notebook-intro-page,
  .music-panel
) {
  border-radius: var(--radius-lg);
}

:where(.back-map, .card-mark, .card-link, .notebook-article-row, .contact-stamp-icon) {
  border-radius: var(--radius-md);
}

.contact-envelope-back {
  border-radius: 14px 14px 18px 18px;
}

.contact-envelope-back::before,
.contact-letter-sheet,
.contact-letter-sheet::before,
.contact-envelope-front {
  border-radius: var(--radius-lg);
}

.contact-stamp {
  border-radius: 6px;
}

.contact-stamp-github {
  background: linear-gradient(145deg, rgba(250,250,248,.98), rgba(224,235,225,.88));
}

.contact-stamp-csdn {
  background: linear-gradient(145deg, #fffaf0, #fcefc4);
}

.contact-stamp-email,
.contact-stamp-wechat {
  background: linear-gradient(145deg, #f7fff8, #dcebd8);
}

@keyframes stamp-copy-pop {
  40% { transform: translateY(-10px) rotate(-3deg) scale(1.07); }
}

@keyframes letter-spark {
  to { opacity: .46; transform: translateY(-8px) rotate(12deg) scale(.8); }
}

@media (max-width: 760px) {
  .content-page {
    padding: 82px 12px 40px;
  }

  .page-banner {
    padding: 22px;
    border-radius: 26px;
  }

  .back-map {
    top: 12px;
    left: 12px;
    width: 54px;
    height: 54px;
  }

  .page-banner h1 {
    font-size: 2.2rem;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .glass-card {
    min-height: 0;
    padding: 20px;
    border-radius: 25px;
  }

  .wide-card {
    grid-column: auto;
  }

  .article-notebook-page {
    display: block;
    padding: 82px 10px 36px;
    overflow: visible;
  }

  .open-tech-notebook {
    display: block;
    width: 100%;
    min-height: 0;
    filter: drop-shadow(0 20px 32px rgba(67, 127, 113, .14));
  }

  .open-tech-notebook::before,
  .open-tech-notebook::after,
  .notebook-page-stack,
  .notebook-spine {
    display: none;
  }

  .notebook-intro-page,
  .notebook-directory-page {
    transform: none;
  }

  .notebook-intro-page {
    padding: 54px 24px 26px;
    border-radius: 30px 30px 7px 7px;
    background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(180, 158, 91, .09) 39px 40px);
  }

  .notebook-intro-page h1 {
    margin: 12px 0 14px;
    font-size: 3.15rem;
    line-height: 1;
  }

  .notebook-intro-page h1 br {
    display: none;
  }

  .notebook-lead {
    font-size: .88rem;
    line-height: 1.75;
  }

  .notebook-tabs {
    flex-direction: row;
    gap: 6px;
    margin-top: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .notebook-tabs button {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 6px 13px 6px 16px;
    border-radius: 4px 13px 13px 4px;
    font-size: .79rem;
  }

  .notebook-tabs button:hover,
  .notebook-tabs button.is-active {
    padding-left: 19px;
  }

  .notebook-doodle {
    display: none;
  }

  .notebook-directory-page {
    padding: 28px 18px 42px;
    border-radius: 7px 7px 30px 30px;
    background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(180, 158, 91, .09) 39px 40px);
  }

  .notebook-directory-heading {
    align-items: center;
    padding: 0 5px 18px;
  }

  .notebook-directory-heading h2 {
    font-size: 1.7rem;
  }

  .notebook-directory-heading > span {
    font-size: .72rem;
  }

  .notebook-article-row {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 11px;
    padding: 22px 2px;
  }

  .notebook-article-number {
    width: 36px;
    height: 36px;
  }

  .notebook-article-copy > strong {
    font-size: 1.06rem;
  }

  .notebook-article-copy > small {
    font-size: .78rem;
  }

  .notebook-article-row.is-latest::before {
    top: 52px;
    left: 45px;
  }

  .notebook-csdn-bookmark {
    position: relative;
    top: auto;
    right: auto;
    display: inline-flex;
    flex-direction: row;
    gap: 8px;
    width: auto;
    min-height: 44px;
    margin: 24px 0 0 48px;
    padding: 10px 18px;
    border-radius: 13px;
    writing-mode: horizontal-tb;
  }

  .notebook-csdn-bookmark::after {
    display: none;
  }

  .notebook-csdn-bookmark strong,
  .notebook-csdn-bookmark i {
    margin: 0;
  }

  .notebook-csdn-bookmark:hover {
    right: auto;
    transform: translateY(-2px);
  }

  .music-panel {
    grid-template-columns: 72px 1fr auto;
    gap: 12px;
  }

  .record-disc {
    width: 72px;
    height: 72px;
  }

  .project-archive-page,
  .little-notes-page {
    padding: 82px 12px 50px;
  }

  .archive-page-heading {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    row-gap: 0;
    padding: 25px 23px;
    border-radius: 25px;
  }

  .archive-page-heading p,
  .archive-page-heading h1,
  .archive-page-heading > span {
    grid-column: 1;
  }

  .archive-page-heading p {
    grid-row: 1;
  }

  .archive-page-heading h1 {
    grid-row: 2;
    font-size: 2.15rem;
  }

  .archive-page-heading > span {
    grid-row: 3;
    margin-top: 12px;
    padding: 12px 0 0;
    border-top: 1px solid rgba(166, 143, 70, .2);
    border-left: 0;
    font-size: .82rem;
  }

  .little-notes-wall {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .little-note-paper:first-child {
    grid-column: auto;
  }

  .project-timeline {
    padding: 15px 0 0;
  }

  .project-timeline::before {
    top: 30px;
    bottom: 40px;
    left: 11px;
  }

  .project-timeline-item,
  .project-timeline-item.is-latest {
    grid-template-columns: 28px minmax(0, 1fr);
    min-height: 0;
    padding-bottom: 22px;
  }

  .project-timeline-item > time {
    grid-column: 2;
    padding: 0 0 7px 13px;
    font-size: .78rem;
    text-align: left;
  }

  .project-timeline-dot {
    grid-row: 1 / 3;
    grid-column: 1;
    width: 14px;
    height: 14px;
    margin: 1px auto 0;
    border-width: 2px;
  }

  .project-timeline-content {
    grid-column: 2;
    padding: 15px 16px 22px;
  }

  .project-timeline-content h2 {
    font-size: 1.55rem;
  }

  .project-timeline-content:hover,
  .project-timeline-content:focus-visible {
    transform: translateX(3px);
  }

  .little-note-paper,
  .little-note-paper:first-child {
    min-height: 220px;
    padding: 38px 24px 24px;
    transform: rotate(0);
  }

  .contact-letter-page {
    display: block;
    padding: 82px 10px 28px;
    overflow: visible;
  }

  .contact-mail-scene {
    width: 100%;
    min-height: 650px;
  }

  .contact-envelope-back,
  .contact-envelope-front {
    right: 0;
    left: 0;
  }

  .contact-letter-sheet {
    width: calc(100% - 18px);
    min-height: 0;
    padding: 40px 24px 22px;
  }

  .contact-letter-heading h1 {
    font-size: 2.45rem;
  }

  .contact-letter-heading span {
    font-size: .9rem;
  }

  .contact-stamps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 27px;
  }

  .contact-stamp {
    display: flex;
    min-height: 156px;
    padding: 13px 9px;
    text-align: center;
  }

  .contact-stamp:nth-child(n) {
    grid-column: auto;
    transform: rotate(0);
  }

  .contact-stamp-icon {
    width: 46px;
    height: 46px;
    margin: 0 0 8px;
  }

  .contact-stamp-icon img,
  .contact-stamp-icon svg {
    width: 29px;
    height: 29px;
  }

  .contact-stamp strong {
    align-self: center;
    font-size: 1.16rem;
  }

  .contact-stamp small {
    align-self: center;
    margin-top: 2px;
    font-size: .7rem;
  }

  .contact-letter-signoff {
    margin-top: 27px;
    width: 76%;
  }

  .contact-envelope-front {
    height: 110px;
  }

  .letter-spark {
    display: none;
  }
}

:where(
  .page-banner,
  .glass-card,
  .archive-page-heading,
  .notes-page-heading,
  .project-timeline-content,
  .little-note-paper,
  .notebook-directory-page,
  .notebook-intro-page,
  .music-panel,
  .contact-letter-sheet,
  .contact-envelope-front
) {
  border-radius: var(--radius-lg);
}
