:root {
  --ink: #17262c;
  --ink-soft: #526168;
  --paper: #f3f1ea;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(23, 38, 44, 0.14);
  --accent: #b96b48;
  --accent-deep: #8f4e33;
  --sage: #788d81;
  --shadow: 0 28px 80px rgba(30, 42, 45, 0.14);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    repeating-linear-gradient(0deg, transparent 0, transparent 27px, rgba(23, 38, 44, 0.025) 28px),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.055'/%3E%3C/svg%3E");
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
  opacity: 0.42;
  z-index: -1;
}

.ambient--one {
  width: 420px;
  height: 420px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(185, 107, 72, 0.25), transparent 68%);
}

.ambient--two {
  width: 540px;
  height: 540px;
  right: -190px;
  top: 35vh;
  background: radial-gradient(circle, rgba(120, 141, 129, 0.22), transparent 70%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 24px auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand,
.topbar__actions,
.print-button,
.status {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.brand__text,
.status {
  font-size: 10px;
  letter-spacing: 0.18em;
}

.topbar__actions {
  gap: 20px;
}

.status {
  gap: 8px;
  color: var(--ink-soft);
}

.status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6f9f79;
  box-shadow: 0 0 0 5px rgba(111, 159, 121, 0.13);
}

.print-button {
  gap: 9px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: 180ms ease;
}

.print-button:hover {
  color: #fff;
  background: var(--ink);
  transform: translateY(-1px);
}

.print-button svg {
  width: 17px;
}

.resume {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 48px;
  overflow: hidden;
  background: rgba(250, 249, 245, 0.93);
  border: 1px solid rgba(23, 38, 44, 0.09);
  box-shadow: var(--shadow);
}

.hero {
  position: relative;
  padding: 58px 68px 46px;
  color: #f8f6ef;
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.08), transparent 24%),
    linear-gradient(120deg, #18282e, #22343a 58%, #263d3d);
}

.hero::before {
  content: "电";
  position: absolute;
  right: 44px;
  top: -112px;
  font-family: var(--serif);
  font-size: 330px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.025);
}

.hero::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 1px;
  right: 70px;
  top: 82px;
  background: rgba(255, 255, 255, 0.26);
  transform: rotate(-42deg);
  transform-origin: right;
}

.hero__eyebrow,
.meta-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__eyebrow {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.58);
}

.hero__eyebrow span:first-child {
  color: #e4a181;
}

.hero__main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 96px);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: 0.12em;
}

.hero h1 span {
  color: #e69b76;
}

.hero__en {
  margin: 18px 0 0 5px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  letter-spacing: 0.42em;
}

.hero__statement {
  margin: 0 0 7px;
  padding-left: 22px;
  border-left: 1px solid rgba(230, 155, 118, 0.65);
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.08em;
  line-height: 1.9;
}

.hero__meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 2.2fr;
  gap: 48px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.meta-label {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.42);
}

.hero__target strong,
.contact-list strong {
  font-size: 13px;
  font-weight: 500;
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.contact-list a {
  transition: color 160ms ease;
}

.contact-list a:hover {
  color: #e69b76;
}

.resume-grid {
  display: grid;
  grid-template-columns: 31% 69%;
}

.sidebar {
  padding: 50px 40px 42px 68px;
  border-right: 1px solid var(--line);
  background: rgba(228, 230, 220, 0.34);
}

.content {
  padding: 50px 68px 42px 56px;
}

.section + .section {
  margin-top: 46px;
}

.section-title {
  margin-bottom: 21px;
}

.section-title > span,
.section-title > div > span {
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.section-title h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.section-title--row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.section-title .section-index {
  color: rgba(23, 38, 44, 0.22);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0;
}

.facts {
  margin: 0;
}

.facts div {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(23, 38, 44, 0.08);
}

.facts dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.facts dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
}

.skill + .skill {
  margin-top: 17px;
}

.skill span {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 700;
}

.skill i {
  display: block;
  position: relative;
  width: 100%;
  height: 2px;
  background: rgba(23, 38, 44, 0.1);
}

.skill i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--level);
  background: var(--accent);
}

.skill p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.credentials,
.achievement-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credentials li {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(23, 38, 44, 0.08);
  font-size: 12px;
}

.credentials span {
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.timeline-card {
  position: relative;
  padding: 2px 0 3px 23px;
  border-left: 1px solid rgba(185, 107, 72, 0.34);
}

.timeline-card + .timeline-card {
  margin-top: 35px;
}

.timeline-card::before {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  left: -4px;
  top: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(185, 107, 72, 0.1);
}

.timeline-card__top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.timeline-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.06em;
}

.timeline-card__top p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.timeline-card time {
  flex-shrink: 0;
  padding-top: 3px;
  color: var(--ink-soft);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.card-tag {
  display: inline-block;
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.course-wrap {
  margin-top: 17px;
  padding: 14px 17px;
  background: rgba(120, 141, 129, 0.08);
}

.course-wrap .meta-label {
  color: var(--sage);
  font-weight: 700;
}

.course-wrap p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.achievement-list {
  margin-top: 15px;
}

.achievement-list li {
  position: relative;
  padding-left: 18px;
  color: #3d4d52;
  font-size: 12px;
  line-height: 1.75;
}

.achievement-list li + li {
  margin-top: 7px;
}

.achievement-list li::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 1px;
  left: 1px;
  top: 10px;
  background: var(--accent);
}

.pending-note {
  display: inline-block;
  margin: 12px 0 0;
  padding: 4px 9px;
  color: var(--accent-deep);
  background: rgba(185, 107, 72, 0.09);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.profile-grid > div {
  min-height: 132px;
  padding: 17px 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.44);
}

.profile-grid span {
  color: var(--accent);
  font-family: var(--serif);
  font-size: 13px;
}

.profile-grid p {
  margin: 13px 0 0;
  color: #3d4d52;
  font-size: 11px;
  line-height: 1.75;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 68px;
  padding: 22px 0 25px;
  border-top: 1px solid var(--line);
  color: rgba(23, 38, 44, 0.36);
  font-size: 9px;
  letter-spacing: 0.17em;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 820px) {
  .topbar,
  .resume {
    width: min(100% - 24px, 680px);
  }

  .status {
    display: none;
  }

  .hero {
    padding: 42px 30px 34px;
  }

  .hero__main,
  .hero__meta {
    display: block;
  }

  .hero__statement {
    margin-top: 32px;
  }

  .hero__meta {
    margin-top: 34px;
  }

  .contact-list {
    margin-top: 24px;
    grid-template-columns: 1fr 1fr;
  }

  .resume-grid {
    display: block;
  }

  .sidebar {
    padding: 42px 30px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .content {
    padding: 42px 30px;
  }

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

  .profile-grid > div {
    min-height: auto;
  }

  .footer {
    margin: 0 30px;
  }
}

@media (max-width: 520px) {
  .brand__text {
    display: none;
  }

  .print-button {
    padding: 9px 11px;
    font-size: 11px;
  }

  .hero h1 {
    font-size: 54px;
  }

  .hero__statement {
    font-size: 14px;
  }

  .contact-list {
    grid-template-columns: 1fr;
  }

  .timeline-card__top {
    display: block;
  }

  .timeline-card time {
    display: inline-block;
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@page {
  size: A4;
  margin: 0;
}

@media print {
  :root {
    --shadow: none;
  }

  html,
  body {
    width: 210mm;
    background: #fff;
  }

  body {
    /* Keep print dimensions deterministic across Chromium versions. */
    zoom: 1;
  }

  body::before,
  .ambient,
  .topbar {
    display: none !important;
  }

  .resume {
    width: 210mm;
    height: 297mm;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .resume-grid {
    display: flex;
    align-items: stretch;
  }

  .sidebar {
    flex: 0 0 31%;
  }

  .content {
    flex: 0 0 69%;
  }

  .hero {
    padding: 12mm 15mm 9mm;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .hero h1 {
    font-size: 47pt;
  }

  .hero__statement {
    font-size: 10pt;
  }

  .hero__meta {
    margin-top: 8mm;
    padding-top: 4mm;
  }

  .sidebar {
    padding: 9mm 7mm 6mm 15mm;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .content {
    padding: 9mm 15mm 6mm 9mm;
  }

  .section + .section {
    margin-top: 7mm;
  }

  .section-title {
    margin-bottom: 3.5mm;
  }

  .timeline-card + .timeline-card {
    margin-top: 5mm;
  }

  .profile-grid > div {
    min-height: 25mm;
    padding: 3mm;
  }

  .pending-note {
    display: none;
  }

  .footer {
    margin: 0 15mm;
    padding: 4mm 0;
  }

  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }

  .timeline-card,
  .profile-grid > div {
    break-inside: avoid;
  }
}
