:root {
  --ink: #18202b;
  --blue: #173f72;
  --blue-2: #245b96;
  --muted: #657184;
  --rule: #d8dee8;
  --paper: #ffffff;
  --canvas: #eef1f5;
  --soft-blue: #f2f6fb;
  --cyan: #2a86aa;
  --cyan-soft: rgba(42, 134, 170, 0.12);
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

html {
  color: var(--ink);
  background: var(--canvas);
  font-family:
    "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-size: 12px;
  line-height: 1.62;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--blue-2);
  outline-offset: 3px;
}

button {
  font: inherit;
}

.screen-toolbar {
  position: relative;
  display: flex;
  width: min(210mm, calc(100vw - 32px));
  min-height: 48px;
  margin: 16px auto 10px;
  padding: 9px 14px;
  align-items: center;
  justify-content: space-between;
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 7px 22px rgba(20, 35, 55, 0.12);
}

.screen-toolbar > span:first-child {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.screen-toolbar button,
.download-resume,
.primary-link {
  padding: 8px 14px;
  border: 0;
  color: var(--blue);
  background: #ffffff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.download-resume {
  border: 1px solid rgba(255, 255, 255, 0.42);
  color: #ffffff;
  background: transparent;
}

.resume {
  display: grid;
  gap: 18px;
  justify-content: center;
  padding-bottom: 32px;
}

.sheet {
  width: 210mm;
  height: 297mm;
  padding: 13.5mm 15mm 11.5mm;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(20, 35, 55, 0.1);
}

.sheet[data-page="1"],
.sheet[data-page="2"] {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sheet[data-page="1"] > .resume-section,
.sheet[data-page="2"] > .resume-section {
  margin-top: 0;
}

.identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36mm;
  gap: 9mm;
  padding-bottom: 7mm;
  border-bottom: 1px solid var(--rule);
}

.identity-copy {
  position: relative;
  min-width: 0;
}

.name-mark {
  display: block;
  width: 32px;
  height: 3px;
  margin-top: 5px;
  margin-bottom: -2px;
  border-radius: 99px;
  background: var(--cyan);
  transform-origin: left center;
  animation: name-mark-enter 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.profile-photo {
  width: 36mm;
  height: 36mm;
  border: 1px solid var(--rule);
  object-fit: cover;
  object-position: center;
}

.eyebrow,
.project-kicker {
  margin: 0 0 2px;
  color: var(--blue-2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--blue);
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0.08em;
}

.target-role {
  margin: 7px 0 11px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.identity-signature {
  display: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
  margin: 0;
}

.contact-grid div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 4px;
  min-width: 0;
}

.contact-grid dt {
  color: var(--muted);
}

.contact-grid dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.resume-section {
  margin-top: 6mm;
}

.resume-section > h2,
.page-header h2 {
  margin: 0 0 3.3mm;
  color: var(--blue);
  font-size: 17px;
  line-height: 1.25;
  letter-spacing: 0.035em;
}

.resume-section > h2 {
  display: flex;
  gap: 9px;
  align-items: center;
}

.resume-section > h2::after {
  width: 100%;
  height: 1px;
  flex: 1;
  background: var(--rule);
  content: "";
}

.entry-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
}

.entry-heading h3,
.entry-heading strong {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
}

.entry-heading time {
  flex: 0 0 auto;
  color: var(--muted);
}

.resume-section p {
  margin: 4px 0 0;
}

.profile-summary p {
  text-align: justify;
}

.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}

.skill-grid p {
  margin: 0;
  padding: 7px 10px 7px 0;
  border-bottom: 1px solid var(--rule);
}

.skill-grid p:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

.skill-grid strong {
  display: block;
  color: var(--blue);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 41mm minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline strong {
  color: var(--blue);
}

.timeline span {
  color: #394556;
}

.page-header {
  display: flex;
  padding-bottom: 5mm;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.page-header h2 {
  margin: 0;
  font-size: 22px;
}

.page-header > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8mm;
  padding: 7mm 0;
  border-bottom: 1px solid var(--rule);
}

.project h3 {
  margin: 0 0 5px;
  color: var(--blue);
  font-size: 16px;
  line-height: 1.35;
}

.project p {
  margin: 0 0 7px;
}

.project ul {
  margin: 6px 0 10px;
  padding-left: 18px;
}

.project li + li {
  margin-top: 2px;
}

.project-index {
  align-self: start;
  color: #d8e2ef;
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
}

.metric-stack {
  display: grid;
  min-width: 28mm;
  align-content: center;
  padding-left: 6mm;
  border-left: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}

.metric-stack strong {
  color: var(--blue);
  font-size: 23px;
  line-height: 1.1;
}

.metric-stack strong span {
  font-size: 11px;
}

.metric-stack small {
  margin-bottom: 7px;
  color: var(--muted);
}

.project-visual {
  grid-template-columns: 68mm minmax(0, 1fr);
  align-items: center;
}

.project-visual > img {
  display: block;
  width: 68mm;
  height: 51mm;
  border: 1px solid var(--rule);
  background: #f1eee9;
  object-fit: contain;
}

.project-apex {
  grid-template-columns: 54mm minmax(0, 1fr) 27mm;
  gap: 6mm;
  align-items: center;
}

.media-preview,
.poster-strip {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.media-preview img {
  display: block;
  width: 54mm;
  height: 30.375mm;
  border: 1px solid var(--rule);
  background: #111722;
  object-fit: contain;
}

.project-apex .text-button {
  margin-left: 12px;
}

.primary-link {
  display: inline-block;
  color: #ffffff;
  background: var(--blue);
}

.primary-link::after,
.text-link::after,
.text-button::after {
  margin-left: 5px;
  content: "↗";
}

.text-link,
.text-button {
  color: var(--blue);
  font-weight: 700;
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  cursor: pointer;
}

.text-button::after {
  content: "+";
}

.award {
  margin-top: 6mm;
}

.award-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6mm;
  align-items: start;
}

.award-layout p {
  margin: 4px 0 3px;
}

.poster-strip {
  display: grid;
  grid-template-columns: repeat(3, 18mm);
  gap: 2mm;
}

.poster-strip img {
  display: block;
  width: 18mm;
  height: 32mm;
  border: 1px solid var(--rule);
  background: #e7f3fa;
  object-fit: cover;
}

.award-link {
  display: none;
}

dialog {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: #ffffff;
}

dialog::backdrop {
  background: rgba(12, 22, 36, 0.72);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.gallery-controls button:disabled {
  opacity: 0.45;
  cursor: default;
}

.gallery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.gallery-stage {
  display: grid;
  min-height: 520px;
  padding: 24px;
  place-items: center;
  background: #f1eee9;
}

.gallery-stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.gallery-copy {
  display: flex;
  padding: 42px 34px;
  flex-direction: column;
  justify-content: center;
}

.gallery-copy h2 {
  margin: 0 0 12px;
  color: var(--blue);
}

.gallery-copy > p:not(.eyebrow) {
  margin: 0;
  color: #394556;
}

.gallery-controls {
  display: flex;
  margin-top: 26px;
  align-items: center;
  justify-content: space-between;
}

.gallery-controls button {
  padding: 7px 11px;
  border: 1px solid var(--rule);
  color: var(--blue);
  background: #ffffff;
  cursor: pointer;
}

.scroll-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.16);
}

#scroll-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: #59c3d7;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 120ms linear;
}

.reveal-target {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease var(--reveal-delay, 0ms),
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms);
}

.reveal-target.is-visible {
  opacity: 1;
  transform: none;
}

@media screen, print {
  .sheet {
    border: 1px solid rgba(23, 63, 114, 0.08);
    background:
      radial-gradient(circle at 96% 3%, rgba(69, 174, 207, 0.12), transparent 25%),
      radial-gradient(circle at 3% 98%, rgba(52, 99, 162, 0.06), transparent 28%),
      var(--paper);
    box-shadow: 0 18px 46px rgba(20, 43, 71, 0.12);
  }

  .sheet[data-page="1"] {
    position: relative;
    counter-reset: resume-section;
    isolation: isolate;
  }

  .sheet[data-page="1"] .identity {
    position: relative;
    margin: -13.5mm -15mm 0;
    padding: 13.5mm 15mm 8mm;
    overflow: hidden;
    border: 1px solid #dbe4ee;
    border-top: 4px solid var(--blue);
    border-radius: 0 0 14px 14px;
    color: var(--ink);
    background: #f7f9fc;
    box-shadow: 0 12px 26px rgba(26, 57, 91, 0.09);
  }

  .sheet[data-page="1"] .identity::before,
  .sheet[data-page="1"] .identity::after {
    position: absolute;
    content: "";
    pointer-events: none;
  }

  .sheet[data-page="1"] .identity::before {
    top: 0;
    right: 0;
    width: 22mm;
    height: 4px;
    background: var(--cyan);
  }

  .sheet[data-page="1"] .identity::after {
    display: none;
  }

  .sheet[data-page="1"] .identity-copy,
  .sheet[data-page="1"] .profile-photo {
    position: relative;
    z-index: 1;
  }

  .sheet[data-page="1"] h1,
  .sheet[data-page="1"] .identity a {
    color: var(--blue);
  }

  .sheet[data-page="1"] .identity .eyebrow {
    color: var(--blue-2);
  }

  .sheet[data-page="1"] .target-role {
    margin-bottom: 7px;
    color: var(--ink);
  }

  .sheet[data-page="1"] .identity-signature {
    display: flex;
    gap: 6px;
    margin: 0 0 11px;
  }

  .sheet[data-page="1"] .identity-signature span {
    padding: 2px 7px;
    border: 1px solid #cbd9e7;
    border-radius: 99px;
    color: var(--blue-2);
    background: #ffffff;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.12em;
  }

  .sheet[data-page="1"] .contact-grid dt {
    color: var(--muted);
  }

  .sheet[data-page="1"] .profile-photo {
    border: 3px solid #ffffff;
    border-radius: 10px;
    box-shadow:
      0 0 0 2px rgba(42, 134, 170, 0.36),
      0 10px 22px rgba(24, 61, 98, 0.16);
    transform: rotate(1.2deg);
  }

  .sheet[data-page="1"] > .resume-section {
    counter-increment: resume-section;
  }

  .sheet[data-page="1"] .resume-section > h2::before {
    display: grid;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    place-items: center;
    border-radius: 6px;
    color: #ffffff;
    background: var(--blue);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    content: counter(resume-section, decimal-leading-zero);
  }

  .sheet[data-page="1"] .profile-summary {
    position: relative;
    padding: 4mm 5mm 4mm 6mm;
    border: 1px solid rgba(36, 91, 150, 0.1);
    border-radius: 10px;
    background: #f3f7fb;
  }

  .sheet[data-page="1"] .profile-summary::before {
    position: absolute;
    top: 5mm;
    bottom: 5mm;
    left: 0;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--cyan);
    content: "";
  }

  .sheet[data-page="1"] .profile-summary > h2 {
    margin-bottom: 2.5mm;
  }

  .sheet[data-page="1"] .education .entry-heading {
    padding: 3mm 4mm 1mm;
    border: 1px solid var(--rule);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #ffffff;
  }

  .sheet[data-page="1"] .education > p {
    margin: 0;
    padding: 1mm 4mm 3mm;
    border: 1px solid var(--rule);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    color: #46566a;
    background: #ffffff;
  }

  .sheet[data-page="1"] .skill-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    border-top: 0;
  }

  .sheet[data-page="1"] .skill-grid p,
  .sheet[data-page="1"] .skill-grid p:nth-child(even) {
    position: relative;
    min-height: 46px;
    padding: 7px 10px 7px 14px;
    overflow: hidden;
    border: 1px solid rgba(36, 91, 150, 0.12);
    border-radius: 8px;
    background: #f7f9fc;
  }

  .sheet[data-page="1"] .skill-grid p::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: var(--cyan);
    content: "";
  }

  .sheet[data-page="1"] .skill-grid p:last-child {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .sheet[data-page="1"] .timeline {
    position: relative;
    gap: 4px;
    padding-left: 18px;
  }

  .sheet[data-page="1"] .timeline::before {
    position: absolute;
    top: 8px;
    bottom: 10px;
    left: 4px;
    width: 1px;
    background: #b9c9dc;
    content: "";
  }

  .sheet[data-page="1"] .timeline li {
    position: relative;
    padding: 5px 8px 7px;
    border-bottom-color: #e3e8ef;
  }

  .sheet[data-page="1"] .timeline li::before {
    position: absolute;
    top: 10px;
    left: -18px;
    width: 7px;
    height: 7px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 0 1px var(--cyan);
    content: "";
  }

  .resume-section > h2::before {
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 1px;
    background: var(--cyan);
    content: "";
  }

  .project {
    position: relative;
    margin-right: -4mm;
    margin-left: -4mm;
    padding-right: 4mm;
    padding-left: 4mm;
    border-radius: 12px;
    transition:
      transform 280ms ease,
      border-color 280ms ease,
      background-color 280ms ease,
      box-shadow 280ms ease;
  }

  .media-preview,
  .poster-strip,
  .project-visual > img {
    border-radius: 8px;
  }

  .media-preview,
  .poster-strip {
    position: relative;
    overflow: hidden;
  }

  .media-preview::after,
  .poster-strip::after {
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 99px;
    color: #ffffff;
    background: rgba(15, 47, 79, 0.78);
    box-shadow: 0 4px 12px rgba(12, 34, 57, 0.18);
    font-size: 9px;
    font-weight: 700;
    content: "查看作品";
    opacity: 0;
    transform: translateY(5px);
    transition:
      opacity 220ms ease,
      transform 220ms ease;
    pointer-events: none;
  }

  .media-preview img,
  .poster-strip img,
  .project-visual > img {
    transition:
      transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
      border-color 280ms ease,
      box-shadow 280ms ease;
  }

  .text-link,
  .text-button,
  .download-resume,
  .primary-link,
  .screen-toolbar button,
  .gallery-controls button,
  .dialog-close {
    transition:
      color 200ms ease,
      background-color 200ms ease,
      border-color 200ms ease,
      box-shadow 200ms ease,
      transform 200ms ease;
  }

  .screen-toolbar button:hover,
  .download-resume:hover,
  .primary-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(7, 27, 50, 0.2);
  }

  .text-link:hover,
  .text-button:hover {
    color: var(--cyan);
  }

  dialog {
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 26px 70px rgba(9, 26, 46, 0.3);
  }

  dialog[open] {
    animation: dialog-enter 300ms cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  dialog[open]::backdrop {
    animation: backdrop-enter 240ms ease both;
  }

  .gallery-image-enter {
    animation: gallery-image-enter 260ms ease both;
  }
}

@media (hover: hover) and (pointer: fine) {
  .project:hover {
    border-color: rgba(42, 134, 170, 0.28);
    background: rgba(246, 250, 253, 0.86);
    box-shadow: 0 14px 30px rgba(24, 63, 101, 0.1);
    transform: translateY(-3px);
  }

  .media-preview:hover::after,
  .poster-strip:hover::after {
    opacity: 1;
    transform: none;
  }

  .media-preview:hover img,
  .poster-strip:hover img,
  .project-visual:hover > img {
    border-color: rgba(42, 134, 170, 0.62);
    box-shadow: 0 10px 22px rgba(24, 66, 105, 0.13);
    transform: scale(1.018);
  }
}

@keyframes name-mark-enter {
  from {
    opacity: 0;
    transform: scaleX(0.25);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes dialog-enter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes backdrop-enter {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes gallery-image-enter {
  from {
    opacity: 0.35;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

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

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .screen-toolbar {
    width: 100%;
    margin: 0;
  }

  .screen-toolbar > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .toolbar-actions {
    gap: 5px;
  }

  .screen-toolbar button,
  .download-resume {
    padding: 7px 9px;
    white-space: nowrap;
  }

  .resume {
    display: block;
    padding: 0;
  }

  .sheet {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 24px 20px;
    overflow: visible;
    box-shadow: none;
  }

  .sheet + .sheet {
    border-top: 10px solid var(--canvas);
  }

  .identity {
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 16px;
  }

  .sheet[data-page="1"] .identity {
    margin: -24px -20px 0;
    padding: 24px 20px 22px;
    border-radius: 0 0 16px 16px;
  }

  .sheet[data-page="1"] .profile-summary {
    padding: 18px 18px 18px 22px;
  }

  .profile-photo {
    width: 88px;
    height: 88px;
  }

  h1 {
    font-size: 27px;
  }

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

  .contact-grid div {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .sheet[data-page="1"] .skill-grid {
    grid-template-columns: 1fr;
  }

  .sheet[data-page="1"] .skill-grid p:last-child {
    grid-column: auto;
  }

  .skill-grid p:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .resume-section {
    margin-top: 30px;
  }

  .timeline li,
  .project,
  .project-visual,
  .project-apex,
  .award-layout {
    grid-template-columns: 1fr;
  }

  .project-index {
    display: none;
  }

  .metric-stack {
    grid-template-columns: auto 1fr auto 1fr;
    gap: 4px 8px;
    padding: 12px 0 0;
    align-items: baseline;
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .metric-stack small {
    margin: 0;
  }

  .project-visual > img {
    width: 100%;
    height: auto;
    max-height: 320px;
  }

  .media-preview img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .project-apex .text-button {
    margin-left: 12px;
  }

  .poster-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .poster-strip img {
    width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
  }

  .award-link {
    display: inline-block;
  }

  .gallery-layout {
    grid-template-columns: 1fr;
  }

  .gallery-stage {
    min-height: 0;
    padding: 18px;
  }

  .gallery-copy {
    padding: 26px 22px;
  }
}

@media (max-width: 440px) {
  .identity {
    grid-template-columns: 1fr 76px;
    gap: 12px;
  }

  .profile-photo {
    width: 76px;
    height: 76px;
  }

  .contact-grid div {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .timeline li {
    gap: 3px;
  }

  .entry-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

@media print {
  html,
  body {
    background: #ffffff;
  }

  body {
    color: #121a25;
    font-size: 12.25px;
    line-height: 1.56;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet {
    text-rendering: geometricPrecision;
  }

  .profile-summary p,
  .education p,
  .skill-grid p,
  .timeline span,
  .project p,
  .project li,
  .award p {
    color: #202b39;
  }

  .screen-toolbar,
  dialog {
    display: none !important;
  }

  .resume {
    display: block;
    padding: 0;
  }

  .sheet {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    margin: 0;
    padding: 13.5mm 15mm 11.5mm;
    overflow: hidden;
    border: 0;
    background:
      radial-gradient(circle at 98% 2%, rgba(69, 174, 207, 0.13), transparent 25%),
      radial-gradient(circle at 2% 98%, rgba(52, 99, 162, 0.07), transparent 29%),
      #ffffff;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  .sheet[data-page="1"],
  .sheet[data-page="2"] {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .sheet[data-page="1"] > .resume-section,
  .sheet[data-page="2"] > .resume-section {
    margin-top: 0;
  }

  .sheet + .sheet {
    border-top: 0;
  }

  .sheet:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  .identity {
    grid-template-columns: minmax(0, 1fr) 36mm;
    gap: 9mm;
  }

  .profile-photo {
    width: 36mm;
    height: 36mm;
  }

  h1 {
    font-size: 30px;
  }

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

  .contact-grid div {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .skill-grid p:nth-child(even) {
    padding-left: 12px;
    border-left: 1px solid var(--rule);
  }

  .resume-section {
    margin-top: 6mm;
  }

  .timeline li {
    grid-template-columns: 41mm minmax(0, 1fr);
    gap: 10px;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .project-visual {
    grid-template-columns: 68mm minmax(0, 1fr);
  }

  .project-apex {
    grid-template-columns: 54mm minmax(0, 1fr) 27mm;
    gap: 6mm;
  }

  .project-index {
    display: block;
  }

  .metric-stack {
    grid-template-columns: none;
    gap: normal;
    padding: 0 0 0 6mm;
    align-items: normal;
    align-content: center;
    border-top: 0;
    border-left: 1px solid var(--rule);
  }

  .metric-stack small {
    margin-bottom: 7px;
  }

  .project-visual > img {
    width: 68mm;
    height: 51mm;
    max-height: none;
  }

  .media-preview img {
    width: 54mm;
    height: 30.375mm;
  }

  .award-layout {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6mm;
  }

  .poster-strip {
    grid-template-columns: repeat(3, 18mm);
    gap: 2mm;
  }

  .poster-strip img {
    width: 18mm;
    height: 32mm;
  }

  .award-link {
    display: none;
  }

  .entry-heading {
    gap: 12px;
    align-items: baseline;
    flex-direction: row;
  }

  .primary-link {
    border: 1px solid var(--blue);
    color: var(--blue);
    background: #ffffff;
  }

  .name-mark {
    display: block;
  }

  .identity-signature {
    display: flex;
  }

  .reveal-target,
  .reveal-target.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .sheet *,
  .sheet *::before,
  .sheet *::after {
    animation: none !important;
    transition: none !important;
  }
}
