/**
 * 预览版式。所有数值取自 `--k-*` 变量（由 `toCssVars` 注入），
 * 因此预览与 PDF 使用同一套 token，改旋钮时两边同步变化。
 *
 * 结构靠字号层级、字重与细分隔线建立，不使用装饰性竖线或色块。
 */

.k-page-viewport {
  width: 100%;
  position: relative;
}

.k-page-slot {
  position: relative;
  width: 100%;
}

/* 固定 A4 宽度并按缩放比显示；transform-origin 在 JS 中按偏移量对齐 */
.k-page-scale {
  width: 210mm;
  transform-origin: top left;
}

.k-page {
  padding: var(--k-margin);
  color: var(--k-color-text);
  font-family: var(--k-font-body);
  font-size: var(--k-size-body);
  line-height: var(--k-line-height);
}

/* 页眉：姓名、定位、联系方式 */
.k-header {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--k-size-body) * 1.15);
  margin-bottom: var(--k-section-gap);
  padding-bottom: var(--k-section-gap);
  border-bottom: 1px solid var(--k-color-rule);
}

.k-header-main {
  min-width: 0;
  flex: 1 1 auto;
}

.k-photo {
  flex: 0 0 auto;
  width: 25mm;
  height: 33.333mm;
  object-fit: cover;
  outline: 1px solid rgb(0 0 0 / 10%);
  outline-offset: -1px;
}

.k-name {
  margin: 0;
  font-family: var(--k-font-heading);
  font-size: var(--k-size-name);
  font-weight: var(--k-weight-heading);
  letter-spacing: 0.01em;
}

.k-headline {
  margin: calc(var(--k-size-body) * 0.4) 0 0;
  color: var(--k-color-accent);
}

.k-contact {
  margin: calc(var(--k-size-body) * 0.32) 0 0;
  color: var(--k-color-muted);
  font-size: calc(var(--k-size-body) * 0.94);
}

/* 章节 */
.k-section + .k-section {
  margin-top: var(--k-section-gap);
}

.k-section-title {
  margin: 0;
  padding-bottom: calc(var(--k-size-section-title) * 0.3);
  border-bottom: 1px solid var(--k-color-rule);
  color: var(--k-color-accent);
  font-family: var(--k-font-heading);
  font-size: var(--k-size-section-title);
  font-weight: var(--k-weight-heading);
  letter-spacing: 0.12em;
}

.k-section-body {
  margin-top: calc(var(--k-size-section-title) * 0.6);
}

/* 条目 */
.k-item + .k-item {
  margin-top: var(--k-item-gap);
}

.k-item--tight + .k-item--tight {
  margin-top: calc(var(--k-item-gap) * 0.5);
}

.k-item-head {
  display: flex;
  align-items: baseline;
  gap: calc(var(--k-size-body) * 0.8);
}

.k-item-title {
  font-family: var(--k-font-heading);
  font-size: var(--k-size-item-title);
  font-weight: var(--k-weight-heading);
}

.k-item-meta {
  margin-left: auto;
  color: var(--k-color-muted);
  font-size: calc(var(--k-size-body) * 0.94);
  white-space: nowrap;
}

.k-item-note {
  margin: calc(var(--k-size-body) * 0.22) 0 0;
  color: var(--k-color-muted);
  font-size: calc(var(--k-size-body) * 0.92);
}

.k-paragraph {
  margin: 0;
}

.k-paragraph + .k-paragraph {
  margin-top: calc(var(--k-size-body) * 0.5);
}

/* 列表：小圆点对齐首行中线，不使用竖线 */
.k-bullets {
  margin: calc(var(--k-size-body) * 0.4) 0 0;
  padding: 0;
  list-style: none;
}

.k-bullet {
  position: relative;
  padding-left: calc(var(--k-bullet-indent) * 0.8);
}

.k-bullet + .k-bullet {
  margin-top: calc(var(--k-size-body) * 0.2);
}

.k-bullet::before {
  content: '';
  position: absolute;
  left: calc(var(--k-bullet-indent) * 0.2);
  top: calc(var(--k-size-body) * var(--k-line-height) / 2 - 1.4px);
  width: 2.8px;
  height: 2.8px;
  border-radius: 50%;
  background: var(--k-color-muted);
}

/* 技能：标签列对齐 */
.k-skill {
  display: flex;
  gap: calc(var(--k-size-body) * 0.9);
}

.k-skill + .k-skill {
  margin-top: calc(var(--k-size-body) * 0.24);
}

.k-skill-group {
  flex: 0 0 auto;
  min-width: 6.2em;
  color: var(--k-color-muted);
}

.k-skill-words {
  flex: 1 1 auto;
}

/* Static template and example pages. The resume rules are appended by the build script. */

:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: #1a1a1a;
  background: #f4f4f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f4f4f2;
}

a {
  color: inherit;
}

.seo-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.seo-brand {
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.seo-nav {
  display: flex;
  gap: 1rem;
  color: #6a7076;
  font-size: 0.82rem;
}

.seo-nav a {
  text-decoration: none;
}

.seo-nav a:hover,
.seo-nav a:focus-visible {
  color: #1c1e21;
}

.seo-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

.seo-hero {
  max-width: 760px;
  margin-bottom: 2rem;
}

.seo-eyebrow {
  margin: 0 0 0.65rem;
  color: #6a7076;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
}

.seo-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.seo-lead {
  max-width: 680px;
  margin: 1rem 0 0;
  color: #5d646b;
  font-size: 1.05rem;
  line-height: 1.8;
}

.seo-section {
  margin-top: 2.5rem;
}

.seo-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.seo-section-copy {
  max-width: 760px;
  margin: 0;
  color: #5d646b;
  line-height: 1.8;
}

.seo-preview-shell {
  overflow-x: auto;
  padding: 1.25rem;
  border: 1px solid #dedfe0;
  border-radius: 1rem;
  background: #e9e9e6;
  box-shadow: 0 12px 40px rgb(28 30 33 / 8%);
}

.seo-preview-shell .k-page {
  margin: 0 auto;
}

.seo-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.seo-card {
  display: block;
  min-height: 9rem;
  padding: 1.25rem;
  border: 1px solid #dedfe0;
  border-radius: 0.8rem;
  background: #fff;
  text-decoration: none;
}

.seo-card:hover,
.seo-card:focus-visible {
  border-color: #9fa4a9;
}

.seo-card-title {
  margin: 0;
  font-size: 1rem;
}

.seo-card-copy {
  margin: 0.55rem 0 0;
  color: #6a7076;
  font-size: 0.88rem;
  line-height: 1.65;
}

.seo-footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.5rem;
  border-top: 1px solid #dedfe0;
  color: #7b8085;
  font-size: 0.78rem;
}

.seo-footer a {
  color: #5d646b;
}

@media (max-width: 760px) {
  .seo-site-header,
  .seo-main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .seo-site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .seo-card-grid {
    grid-template-columns: 1fr;
  }
}
