@font-face {
  font-family: 'Noto Sans TC';
  src: url('/assets/fonts/NotoSansTC-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@page {
  size: A4;
  margin: 0.65in 0.75in;
}

html,
body {
  font-family: 'Noto Sans TC', 'Helvetica Neue', Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.45;
  color: #1f2937;
  background: #fff !important;
}

/* Remove non-CV chrome */
.masthead,
.greedy-nav,
.page__footer,
.page__related,
.author__avatar,
.author__content,
.author__urls-wrapper,
.sidebar,
.page__meta,
.social-share,
.pagination,
.comments,
.btn,
.follow-button,
a.btn,
button {
  display: none !important;
}

#main,
.page,
.page__inner-wrap,
.initial-content,
.archive,
.page__content {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Typographic hierarchy */
h1,
h2,
h3 {
  color: #0f172a;
  margin: 0.85rem 0 0.45rem;
  page-break-after: avoid;
  break-after: avoid-page;
}

h1 {
  font-size: 1.85rem;
  border-bottom: 2px solid #0f766e;
  padding-bottom: 0.15rem;
  margin-top: 0;
}

h2 {
  font-size: 1.45rem;
  border-bottom: 1px solid #cbd5e1;
  padding-bottom: 0.1rem;
}

h3 {
  font-size: 1.15rem;
}

p,
ul,
ol,
li {
  orphans: 3;
  widows: 3;
}

ul,
ol {
  margin: 0.3rem 0 0.8rem 1.1rem;
  padding: 0;
}

li {
  margin: 0.15rem 0;
}

/* Keep CV list items compact */
.page__content > ul > li {
  margin-bottom: 0.35rem;
}

/* Links should print in readable dark color */
a,
a:visited {
  color: #0f4c81 !important;
  text-decoration: none !important;
  font-weight: 600;
}

/* Show URLs for external links in print */
a[href^="http"]::after {
  content: " (" attr(href) ")";
  font-weight: 400;
  color: #64748b;
  font-size: 0.85em;
}

/* Don't show href for local downloads */
a[href^="/"]::after,
a[href^="#"]::after {
  content: "";
}

/* Better page breaks for long sections */
h2,
h3 {
  break-inside: avoid;
}

li,
p {
  break-inside: avoid;
}

/* Keep section transitions neat */
h2:not(:first-of-type) {
  margin-top: 1rem;
}
