:root {
  --wine: #7b263d;
  --wine-dark: #57192a;
  --paper: #fff;
  --ink: #232127;
  --muted: #6e6870;
  --canvas: #f2eee9;
  --border: rgba(87, 25, 42, .16);
  --shadow: 0 20px 60px rgba(55, 36, 31, .14);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(123, 38, 61, .08), transparent 30rem),
    var(--canvas);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--paper);
  border-radius: 8px;
  transform: translateY(-180%);
}

.skip-link:focus { transform: translateY(0); }

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--border);
  background: rgba(250, 248, 245, .9);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1160px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.identity {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.identity strong,
.identity small { display: block; }

.identity strong {
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: 17px;
  letter-spacing: .08em;
}

.identity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .04em;
}

.monogram {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: white;
  background: var(--wine);
  border-radius: 50%;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: 18px;
}

.page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.page-nav strong { color: var(--wine); }

.nav-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--wine-dark);
  background: rgba(255, 255, 255, .72);
  font-size: 17px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

.nav-button:hover,
.nav-button:focus-visible {
  background: var(--paper);
  transform: translateY(-2px);
}

.intro {
  width: min(1040px, calc(100% - 40px));
  padding: clamp(64px, 10vw, 128px) 0 clamp(52px, 8vw, 92px);
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--wine);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .22em;
}

h1 {
  margin: 0;
  font-family: Georgia, "Noto Serif TC", serif;
  font-size: clamp(48px, 9vw, 98px);
  font-weight: 400;
  letter-spacing: -.04em;
  line-height: .98;
}

h1 span {
  display: block;
  margin-top: 18px;
  color: var(--wine);
  font-size: .36em;
  letter-spacing: .1em;
}

.intro > p:not(.eyebrow) {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.read-button {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  padding: 13px 20px;
  margin-top: 24px;
  color: white;
  background: var(--wine);
  border-radius: 999px;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s ease, transform .2s ease;
}

.read-button:hover,
.read-button:focus-visible {
  background: var(--wine-dark);
  transform: translateY(-2px);
}

.resume {
  width: min(1040px, calc(100% - 40px));
  padding-bottom: 80px;
  margin: 0 auto;
}

.resume-page {
  position: relative;
  margin: 0 0 clamp(48px, 8vw, 96px);
  scroll-margin-top: 104px;
}

.resume-page img {
  display: block;
  width: 100%;
  height: auto;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.page-label {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
}

.page-label span:first-child {
  color: var(--wine);
  font-family: Georgia, serif;
  font-size: 22px;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1040px, calc(100% - 40px));
  padding: 30px 0 48px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

footer p { margin: 0; }
footer a { text-decoration: none; }
.noscript { padding: 16px; text-align: center; }

@media (max-width: 600px) {
  html { scroll-padding-top: 78px; }

  .header-inner {
    width: min(100% - 24px, 1160px);
    min-height: 66px;
  }

  .identity small { display: none; }
  .monogram { width: 34px; height: 34px; font-size: 15px; }
  .page-nav { gap: 7px; font-size: 13px; }
  .nav-button { width: 32px; height: 32px; }
  .intro,
  .resume,
  footer { width: calc(100% - 24px); }
  .intro { padding-top: 64px; }
  .resume-page { scroll-margin-top: 82px; }
  .page-label { margin-left: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

@media print {
  .site-header,
  .intro,
  .page-label,
  footer,
  noscript { display: none !important; }
  body,
  .resume { width: 100%; margin: 0; padding: 0; background: white; }
  .resume-page { margin: 0; break-after: page; }
  .resume-page img { box-shadow: none; }
}
