@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/noto-sans-sc-chinese-simplified-400-normal.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("assets/fonts/noto-sans-sc-chinese-simplified-700-normal.woff2") format("woff2");
  unicode-range: U+2E80-2EFF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FF00-FFEF;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/noto-sans-sc-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url("assets/fonts/noto-sans-sc-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/newsreader/newsreader-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url("assets/fonts/newsreader/newsreader-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("assets/fonts/newsreader/newsreader-latin-600-normal.woff2") format("woff2");
}

:root {
  --ink: #1c1b19;
  --ink-soft: #625f59;
  --paper: #fffefa;
  --canvas: #e8e3da;
  --canvas-deep: #d8d0c4;
  --accent: #c94e32;
  --accent-dark: #9d3521;
  --accent-border: #d8b0a5;
  --surface-soft: #f3f0e9;
  --surface-portrait: #ede8df;
  --surface-accent: #fff8f5;
  --surface-edit: #fff7f3;
  --line: #d8d2c8;
  --edit: rgba(201, 78, 50, .09);
  --shadow: 0 24px 70px rgba(53, 43, 31, .17), 0 2px 8px rgba(53, 43, 31, .08);
  --ui: "Noto Sans SC", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  --serif: "Noto Sans SC", "Songti SC", "STSong", "SimSun", sans-serif;
  --editorial-serif: "Newsreader", "Noto Sans SC", "Songti SC", serif;
  --resume-font: 13.2px;
  --resume-line: 1.54;
  --page-pad-y: 48px;
  --page-pad-x: 56px;
  --header-height: 112px;
  --summary-gap: 14px;
  --section-gap: 17px;
  --entry-gap: 13px;
}
body[data-theme="classic"] {
  --paper: #fff; --canvas: #e9ecef; --canvas-deep: #d8dde1;
  --accent: #555b61; --accent-dark: #34383c; --edit: rgba(85,91,97,.09);
  --accent-border: #bfc4c8; --surface-soft: #f3f4f5; --surface-portrait: #e7e9eb;
  --surface-accent: #f6f7f8; --surface-edit: #f3f4f5;
}
body[data-theme="blue"] {
  --paper: #fff; --canvas: #e6edf4; --canvas-deep: #cedbe8;
  --accent: #275f9e; --accent-dark: #174777; --edit: rgba(39,95,158,.09);
  --accent-border: #aac3df; --surface-soft: #f0f5fa; --surface-portrait: #e3ebf3;
  --surface-accent: #f3f7fc; --surface-edit: #eef5fb;
}
body[data-theme="forest"] {
  --paper: #fffefb; --canvas: #e5ebe6; --canvas-deep: #ccd8cf;
  --accent: #3e6b58; --accent-dark: #294d3e; --edit: rgba(62,107,88,.09);
  --accent-border: #afc7bb; --surface-soft: #f0f5f1; --surface-portrait: #e3ece6;
  --surface-accent: #f2f7f3; --surface-edit: #edf5f0;
}
body[data-density="1"] {
  --resume-font: 12.9px; --resume-line: 1.47; --page-pad-y: 43px; --section-gap: 14px; --entry-gap: 10px;
}
body[data-density="2"] {
  --resume-font: 12.5px; --resume-line: 1.41; --page-pad-y: 39px; --page-pad-x: 52px;
  --header-height: 102px; --summary-gap: 11px; --section-gap: 12px; --entry-gap: 8px;
}
body[data-density="3"] {
  --resume-font: 12px; --resume-line: 1.35; --page-pad-y: 35px; --page-pad-x: 48px;
  --header-height: 94px; --summary-gap: 8px; --section-gap: 9px; --entry-gap: 6px;
}
body[data-density="4"] {
  --resume-font: 11.5px; --resume-line: 1.3; --page-pad-y: 31px; --page-pad-x: 44px;
  --header-height: 88px; --summary-gap: 7px; --section-gap: 7px; --entry-gap: 4px;
}

@page { size: A4; margin: 10mm 13mm; }
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 18%, rgba(255,255,255,.7) 0 1px, transparent 2px),
    linear-gradient(115deg, rgba(255,255,255,.26), transparent 34%),
    var(--canvas);
  background-size: 18px 18px, auto, auto;
  font-family: var(--ui);
}
button { font: inherit; }
button:focus-visible, [contenteditable]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.app-bar {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 64px);
  color: #f7f2e9;
  background: rgba(28, 27, 25, .96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}
.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: block;
  flex: 0 0 auto;
  border-radius: 50%;
}
.brand > span {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .025em;
}
.brand small {
  display: inline;
  color: #d4cdc2;
  font-family: var(--editorial-serif);
  font-size: 16px;
  font-style: italic;
  letter-spacing: .04em;
}
.document-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bdb7ad;
  font-size: 12px;
  white-space: nowrap;
}
.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ea87e;
  box-shadow: 0 0 0 4px rgba(126,168,126,.12);
}
.is-dirty .state-dot { background: #e1a14f; box-shadow: 0 0 0 4px rgba(225,161,79,.13); }
.toolbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}
.button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-ghost { color: #d7d1c8; background: transparent; border-color: #504d48; }
.button-ghost:hover { background: #34322f; border-color: #706b64; }
.button-secondary { color: #eee8df; background: #373430; border-color: #5d5953; }
.button-primary { color: #fff; background: var(--accent); border-color: var(--accent); }
.button-primary:hover { background: #dd5b3c; }
.button[disabled] { cursor: wait; opacity: .55; transform: none; }
.style-button { display: none; }

.mobile-hint { display: none; }
.site-footer {
  padding: 0 20px 28px;
  color: #756e65;
  text-align: center;
  font-size: 11px;
  letter-spacing: .04em;
}
.site-footer a {
  color: inherit;
  text-decoration: none;
}
.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
}
.workspace {
  position: relative;
  min-height: calc(100vh - 76px);
  display: flex;
  justify-content: center;
  padding: 48px 32px 80px;
  overflow: auto;
}
.editor-note {
  position: fixed;
  top: 148px;
  left: max(24px, calc(50vw - 620px));
  width: 150px;
  color: #625b52;
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
}
.note-index { color: var(--accent); font: 700 10px/1 var(--ui); letter-spacing: .12em; }
.editor-note strong { color: #302c27; font-size: 13px; }
.note-line { display: block; width: 46px; height: 1px; margin: 20px 0; background: #ada599; }
.paper-wrap { position: relative; width: 794px; margin-left: 24px; }
.paper-ruler {
  position: absolute;
  top: -28px;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7f776d;
  font-size: 9px;
  letter-spacing: .14em;
}
.paper-ruler i { height: 1px; flex: 1; background: repeating-linear-gradient(90deg, #aaa196 0 1px, transparent 1px 8px); }
.paper-ruler-v {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -24px;
  width: 24px;
  display: flex;
  justify-content: center;
}
.paper-ruler-v i {
  width: 1px;
  height: 100%;
  background: repeating-linear-gradient(180deg, #aaa196 0 1px, transparent 1px 8px);
}
.resume-page {
  width: 794px;
  min-height: 1123px;
  padding: var(--page-pad-y) var(--page-pad-x) calc(var(--page-pad-y) + 6px);
  background: var(--paper);
  box-shadow: var(--shadow);
  font-family: var(--ui);
  font-size: var(--resume-font);
  line-height: var(--resume-line);
  transition: background .25s ease, padding .2s ease;
}
.privacy-caption {
  margin: 15px 0 0;
  color: #888075;
  text-align: center;
  font-size: 9px;
  letter-spacing: .08em;
}

.resume-header {
  position: relative;
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 30px;
  border-bottom: 1px solid var(--ink);
}
.resume-header.has-portrait { grid-template-columns: 1fr 80px; }
.identity { text-align: center; }
.resume-header.has-portrait .identity { padding-left: 118px; }
.resume-name {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: .18em;
  font-weight: 700;
}
.resume-role { margin: 0 0 8px; color: var(--accent-dark); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.contact-line { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 12px; color: #4b4843; font-size: 12px; }
.contact-line span + span::before { content: "·"; margin-right: 12px; color: #9d968b; }
.portrait-shell {
  position: relative;
  width: 70px;
  height: 98px;
  justify-self: end;
  overflow: hidden;
  background: var(--surface-portrait);
  border: 1px solid var(--accent-border);
}
.portrait-shell img { width: 100%; height: 100%; display: block; object-fit: cover; }
.portrait-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #8c8479; font-family: var(--serif); font-size: 13px; }
.portrait-button {
  position: absolute;
  inset: auto 3px 3px;
  padding: 5px;
  border: 0;
  color: #fff;
  background: rgba(28,27,25,.78);
  cursor: pointer;
  font-size: 10px;
}
.resume-section { position: relative; margin-top: var(--section-gap); }
.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 10px;
}
.section-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  letter-spacing: .08em;
}
.section-heading::after { content: ""; height: 1px; flex: 1; background: var(--ink); }
.section-add {
  order: 3;
  padding: 3px 7px;
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  color: var(--accent-dark);
  background: var(--surface-accent);
  cursor: pointer;
  font-size: 10px;
}
.section-remove {
  order: 4;
  padding: 3px 5px;
  border: 0;
  color: #8b8378;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
}
.section-remove:hover { color: var(--accent-dark); }
.editorial-section-remove {
  position: absolute;
  top: 0;
  right: -40px;
  padding: 2px 5px;
  border: 0;
  color: #8b8378;
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  white-space: nowrap;
}
.editorial-section-remove:hover { color: var(--accent-dark); }
.section-move-controls {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}
.section-restore {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: var(--section-gap);
  padding: 10px 12px;
  color: #7f786e;
  background: var(--surface-accent);
  border: 1px dashed var(--accent-border);
  font-size: 11px;
}
.section-restore button {
  padding: 4px 8px;
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  color: var(--accent-dark);
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.summary-box {
  margin-top: var(--summary-gap);
  padding: 10px 13px;
  color: #36332f;
  background: var(--surface-soft);
  border-left: 3px solid var(--accent);
  line-height: calc(var(--resume-line) + .1);
  text-align: justify;
}
.entry {
  position: relative;
  margin: 0 0 var(--entry-gap);
  break-inside: avoid;
}
.entry:last-child { margin-bottom: 0; }
.entry-top, .entry-sub {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
}
.entry-top { font-size: 14px; font-weight: 700; }
.entry-sub { margin-top: 2px; color: #4e4a45; font-size: 12px; }
.entry-summary { margin: 5px 0 0; color: #45413c; text-align: justify; }
.entry ul { margin: 5px 0 0; padding-left: 18px; }
.entry li { position: relative; margin: 0 0 4px; padding-left: 2px; text-align: justify; }
.entry li::marker { color: var(--accent); font-size: 9px; }
.bullet-remove {
  position: absolute;
  top: 0;
  right: -25px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
  opacity: 0;
}
.entry li:hover .bullet-remove { opacity: 1; }
.bullet-add {
  margin: 1px 0 0 19px;
  padding: 2px 5px;
  border: 0;
  color: var(--accent-dark);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
}
.entry-controls {
  position: absolute;
  top: -4px;
  right: -48px;
  display: grid;
  gap: 3px;
  opacity: 0;
  transition: opacity .15s ease;
}
.entry:hover .entry-controls, .entry:focus-within .entry-controls { opacity: 1; }
.icon-button {
  width: 27px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d4cdc3;
  border-radius: 2px;
  color: #655e55;
  background: #fff;
  cursor: pointer;
  font-size: 11px;
}
.icon-button:hover { color: var(--accent-dark); border-color: var(--accent-border); background: var(--surface-accent); }
.education-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; }
.education-main { font-size: 13px; font-weight: 700; }
.education-meta { color: #4e4a45; text-align: right; white-space: nowrap; }

.layout-editorial {
  --ed-body: 11.5px;
  --ed-small: 9.5px;
  --ed-heading: 17px;
  --ed-name: 46px;
  --ed-section-gap: 25px;
  --ed-entry-gap: 19px;
  --ed-profile-gap: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--page-pad-y) var(--page-pad-x);
  font-family: var(--ui);
  font-size: var(--ed-body);
  line-height: 1.5;
  background:
    linear-gradient(90deg, var(--accent) 0 7px, transparent 7px),
    var(--paper);
}
.editorial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 208px;
  gap: 38px;
  align-items: end;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}
.editorial-hero.has-portrait {
  grid-template-columns: minmax(0, 1fr) 208px 72px;
}
.editorial-portrait-shell {
  position: relative;
  width: 72px;
  height: 101px;
  justify-self: end;
  overflow: hidden;
  background: var(--surface-portrait);
  border: 1px solid var(--accent-border);
}
.editorial-portrait-shell img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.editorial-eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.editorial-name {
  margin: 0;
  font-family: var(--editorial-serif);
  font-size: var(--ed-name);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.025em;
}
.editorial-tagline {
  margin-top: 11px;
  color: #55514b;
  font-family: var(--editorial-serif);
  font-size: 16px;
  font-style: italic;
  line-height: 1.25;
}
.editorial-contact {
  display: grid;
  gap: 6px;
  padding-bottom: 2px;
  color: #5f5a54;
  font-size: 13px;
  text-align: right;
}
.editorial-contact > div {
  display: block;
}
.editorial-profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 10px;
  margin: var(--ed-profile-gap) 0;
  padding: 17px 19px;
  color: #3b3935;
  background: var(--surface-soft);
  border-left: 4px solid var(--accent);
}
.editorial-profile strong {
  color: var(--accent-dark);
  font-size: 11px;
  letter-spacing: .06em;
}
.editorial-profile p {
  margin: 0;
  font-family: var(--editorial-serif);
  font-size: 14px;
  line-height: 1.48;
}
.editorial-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 33px;
}
.editorial-main { min-width: 0; }
.editorial-side {
  position: relative;
  min-width: 0;
  padding-left: 21px;
  border-left: 1px solid var(--line);
}
.editorial-divider-handle {
  position: absolute;
  left: -5px;
  top: 0;
  bottom: 0;
  width: 11px;
  cursor: col-resize;
  z-index: 10;
}
.editorial-divider-handle::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 32px;
  border-radius: 2px;
  background: transparent;
  transition: background .2s ease, height .2s ease;
}
.editorial-divider-handle:hover::after,
.editorial-divider-handle:active::after {
  background: var(--accent);
  height: 48px;
}
.editorial-section { margin: 0 0 var(--ed-section-gap); }
.editorial-section:last-child { margin-bottom: 0; }
.editorial-heading {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.editorial-heading h2 {
  margin: 0;
  font-family: var(--editorial-serif);
  font-size: var(--ed-heading);
  font-weight: 600;
  line-height: 1;
}
.editorial-heading i { height: 1px; background: var(--line); }
.editorial-heading > span {
  color: #9b958c;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .14em;
}
.editorial-add {
  padding: 2px 5px;
  border: 1px solid var(--accent-border);
  border-radius: 2px;
  color: var(--accent-dark);
  background: var(--surface-accent);
  cursor: pointer;
  font-size: 8px;
}
.editorial-timeline-entry {
  margin: 0 0 var(--ed-entry-gap);
  padding-left: 20px;
}
.editorial-timeline-entry::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
}
.editorial-timeline-entry:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 14px;
  bottom: calc(var(--ed-entry-gap) * -1 + 4px);
  left: 3px;
  width: 1px;
  background: var(--line);
}
.editorial-entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}
.editorial-entry-head h3,
.editorial-project-card h3,
.editorial-compact-entry h3 {
  margin: 0;
  font-family: var(--editorial-serif);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
}
.editorial-period {
  color: var(--accent-dark);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .05em;
  white-space: nowrap;
}
.editorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  margin: 3px 0 6px;
  color: #716b63;
  font-size: 11.5px;
}
.editorial-meta span + span::before,
.editorial-project-meta span + span::before,
.editorial-compact-entry > div span + span::before {
  content: "·";
  margin-right: 9px;
  color: var(--accent);
}
.editorial-summary {
  margin: 4px 0 0;
  color: #5b5650;
  line-height: 1.5;
}
.layout-editorial .entry ul {
  margin-top: 5px;
  padding-left: 14px;
  color: #45413c;
}
.layout-editorial .entry li { margin-bottom: 3px; padding-left: 2px; }
.layout-editorial .bullet-add { margin-left: 13px; font-size: 8.5px; }
.layout-editorial .bullet-remove { right: -18px; width: 16px; height: 16px; }
.layout-editorial .entry-controls { right: -35px; }
.editorial-project-card {
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
}
.editorial-project-no {
  margin-right: 6px;
  color: var(--accent-dark);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: .05em;
}
.editorial-project-card h3 {
  margin: 0;
  font-family: var(--editorial-serif);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.2;
}
.editorial-project-card > .editorial-project-meta,
.editorial-project-card > .editorial-summary,
.editorial-project-card > ul,
.editorial-project-card > .bullet-add {
  grid-column: 1 / -1;
}
.editorial-project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  margin: 5px 0;
  color: #777068;
  font-size: 11px;
}
.editorial-project-card ul { font-size: 11.5px; line-height: 1.52; }
.editorial-compact-entry { margin-bottom: 16px; color: #6d675f; }
.editorial-compact-entry > div {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 7px;
  margin-top: 4px;
  font-size: 10px;
}
.editorial-compact-entry h3 + div { color: #4f4b46; font-size: 10.5px; }
.editorial-skill {
  margin-bottom: 12px;
}
.editorial-skill strong {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: 8px;
  letter-spacing: .13em;
}
.editorial-skill p {
  margin: 0;
  color: #57524c;
  font-size: 11.5px;
  line-height: 1.52;
}
.editorial-empty { margin: 0; color: #9b958c; font-size: 10px; }
.editorial-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #99938b;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .13em;
}
.editorial-footer-credit { color: var(--accent); }

body[data-density="1"] .layout-editorial {
  --ed-body: 11.1px; --ed-small: 9.2px; --ed-heading: 16.5px; --ed-name: 44px;
  --ed-section-gap: 21px; --ed-entry-gap: 16px; --ed-profile-gap: 21px;
}
body[data-density="1"] .editorial-hero { padding-bottom: 24px; }
body[data-density="2"] .layout-editorial {
  --ed-body: 10.7px; --ed-small: 8.9px; --ed-heading: 16px; --ed-name: 42px;
  --ed-section-gap: 18px; --ed-entry-gap: 13px; --ed-profile-gap: 18px;
}
body[data-density="2"] .editorial-hero { padding-bottom: 20px; }
body[data-density="2"] .editorial-profile { padding-top: 14px; padding-bottom: 14px; }
body[data-density="3"] .layout-editorial {
  --ed-body: 10.2px; --ed-small: 8.6px; --ed-heading: 15px; --ed-name: 39px;
  --ed-section-gap: 14px; --ed-entry-gap: 10px; --ed-profile-gap: 14px;
}
body[data-density="3"] .editorial-hero { padding-bottom: 17px; }
body[data-density="3"] .editorial-profile { padding: 11px 15px; }
body[data-density="4"] .layout-editorial {
  --ed-body: 9.7px; --ed-small: 8.2px; --ed-heading: 14px; --ed-name: 36px;
  --ed-section-gap: 11px; --ed-entry-gap: 7px; --ed-profile-gap: 11px;
}
body[data-density="4"] .editorial-hero { padding-bottom: 14px; }
body[data-density="4"] .editorial-profile { padding: 9px 13px; }

.is-editing [contenteditable="true"] {
  border-radius: 2px;
  cursor: text;
  transition: background .12s ease, box-shadow .12s ease;
}
.is-editing [contenteditable="true"]:hover { background: var(--edit); box-shadow: 0 0 0 3px var(--edit); }
.is-editing [contenteditable="true"]:focus { background: var(--surface-edit); box-shadow: 0 0 0 3px var(--edit); }
[contenteditable]:empty::before { content: attr(data-placeholder); color: #a39c92; font-weight: 400; }
.is-saved .editor-note, .is-saved .paper-ruler, .is-saved .paper-ruler-v, .is-saved .privacy-caption,
.is-saved .edit-only, .is-exporting .edit-only { display: none !important; }
.is-saved .workspace { padding-top: 34px; }

.theme-dock {
  position: fixed;
  top: 148px;
  right: max(24px, calc(50vw - 630px));
  width: 176px;
  color: #544f48;
}
.dock-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
}
.theme-dock h2 {
  margin: 7px 0 14px;
  color: #2d2a26;
  font-family: var(--serif);
  font-size: 18px;
}
.theme-dock h3 {
  margin: 22px 0 10px;
  color: #777066;
  font-size: 11px;
  letter-spacing: .1em;
}
.layout-options { display: grid; gap: 7px; }
.layout-choice {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #5d574f;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.layout-choice:hover, .layout-choice.is-active {
  color: #282521;
  background: rgba(255,255,255,.6);
  border-color: rgba(91,80,67,.18);
}
.layout-choice > span { min-width: 0; }
.layout-choice strong { display: block; font-size: 12px; line-height: 1.25; }
.layout-choice small { display: block; margin-top: 3px; color: #8b8378; font-size: 10px; }
.layout-preview {
  position: relative;
  width: 39px;
  height: 48px;
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid #cfc8be;
  box-shadow: inset 3px 0 0 var(--accent);
}
.layout-preview b { position: absolute; display: block; height: 2px; background: #777169; }
.layout-preview-classic b:nth-child(1) { top: 10px; left: 9px; width: 21px; height: 3px; }
.layout-preview-classic b:nth-child(2) { top: 20px; left: 7px; width: 25px; }
.layout-preview-classic b:nth-child(3) { top: 28px; left: 7px; width: 25px; box-shadow: 0 6px 0 #aaa39a; }
.layout-preview-editorial b:nth-child(1) { top: 9px; left: 6px; width: 27px; height: 3px; }
.layout-preview-editorial b:nth-child(2) { top: 19px; left: 6px; width: 17px; height: 18px; background: repeating-linear-gradient(#8e877e 0 2px, transparent 2px 6px); }
.layout-preview-editorial b:nth-child(3) { top: 19px; right: 5px; width: 7px; height: 18px; background: repeating-linear-gradient(#aaa39a 0 2px, transparent 2px 6px); }
.theme-options { display: grid; gap: 8px; }
.theme-choice {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #5d574f;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
}
.theme-choice:hover, .theme-choice.is-active {
  color: #282521;
  background: rgba(255,255,255,.55);
  border-color: rgba(91,80,67,.16);
}
.theme-choice i {
  position: relative;
  width: 28px;
  height: 19px;
  display: block;
  flex: 0 0 auto;
  background: var(--swatch-paper);
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: inset 5px 0 0 var(--swatch-accent);
}
.theme-choice.is-active i::after {
  content: "✓";
  position: absolute;
  right: -5px;
  bottom: -6px;
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font: 700 8px/1 var(--ui);
}
.page-meter {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(73,65,56,.2);
}
.page-meter span { display: block; color: #7b7369; font-size: 11px; letter-spacing: .08em; }
.page-meter strong { display: block; margin-top: 5px; color: var(--accent-dark); font-size: 12px; line-height: 1.55; }

.drawer-layer {
  position: fixed;
  z-index: 300;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}
.drawer-layer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.drawer-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(22, 21, 19, .48);
  opacity: 0;
  cursor: default;
  backdrop-filter: blur(2px);
  transition: opacity .24s ease;
}
.drawer-layer.is-open .drawer-scrim { opacity: 1; }
.privacy-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100vw);
  height: 100%;
  overflow-y: auto;
  padding: 38px 38px 28px;
  color: #292622;
  background:
    linear-gradient(135deg, rgba(201,78,50,.055), transparent 34%),
    #fffdf8;
  border-left: 1px solid rgba(72,62,51,.16);
  box-shadow: -24px 0 70px rgba(28,27,25,.2);
  transform: translateX(102%);
  transition: transform .3s cubic-bezier(.22,.8,.25,1);
}
.drawer-layer.is-open .privacy-drawer { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.drawer-kicker {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
}
.drawer-head h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: .04em;
}
.drawer-close {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid #d7d0c6;
  border-radius: 50%;
  color: #625b52;
  background: transparent;
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}
.drawer-close:hover { color: var(--accent-dark); border-color: var(--accent-border); background: var(--surface-accent); }
.drawer-lead {
  margin: 20px 0 24px;
  color: #5d574f;
  font-size: 13px;
  line-height: 1.8;
}
.privacy-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: privacy;
}
.privacy-list li {
  position: relative;
  min-height: 52px;
  padding: 0 0 17px 43px;
  counter-increment: privacy;
}
.privacy-list li::before {
  content: "0" counter(privacy);
  position: absolute;
  top: 1px;
  left: 0;
  color: var(--accent);
  font: 700 10px/1.4 var(--ui);
  letter-spacing: .08em;
}
.privacy-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  bottom: 3px;
  left: 9px;
  width: 1px;
  background: #ddd5ca;
}
.privacy-list strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}
.privacy-list span {
  display: block;
  color: #716a61;
  font-size: 12px;
  line-height: 1.65;
}
.privacy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.drawer-action {
  position: relative;
  min-height: 74px;
  padding: 12px 12px 12px 42px;
  border: 1px solid #d9d1c7;
  border-radius: 3px;
  color: #38342f;
  background: rgba(255,255,255,.68);
  cursor: pointer;
  text-align: left;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.drawer-action:hover { border-color: var(--accent-border); background: var(--surface-accent); transform: translateY(-1px); }
.drawer-action > span {
  position: absolute;
  top: 15px;
  left: 15px;
  color: var(--accent);
  font-size: 18px;
}
.drawer-action strong { display: block; font-size: 12px; }
.drawer-action small { display: block; margin-top: 4px; color: #8a8176; font-size: 10px; }
.drawer-action-danger {
  grid-column: 1 / -1;
  min-height: 62px;
  color: #852f22;
  border-color: #dfb9b1;
  background: #fff9f7;
}
.privacy-law {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 1px solid #ddd5ca;
  color: #7a7268;
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}
.privacy-law a { color: var(--accent-dark); text-underline-offset: 3px; }
body.is-drawer-open { overflow: hidden; }

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 28px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 11px 16px;
  border-radius: 3px;
  color: #fff;
  background: #282623;
  box-shadow: 0 12px 38px rgba(0,0,0,.24);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: .22s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #8e2f22; }
.export-mask {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(28,27,25,.72);
  backdrop-filter: blur(5px);
}
.export-mask.is-visible { display: grid; }
.export-card {
  min-width: 270px;
  padding: 28px;
  color: var(--ink);
  background: #fffdf8;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  text-align: center;
}
.export-card strong { display: block; margin-top: 14px; font-family: var(--serif); font-size: 16px; }
.export-card p { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; }
.spinner {
  width: 28px;
  height: 28px;
  display: inline-block;
  border: 2px solid #ddd4ca;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; color: #fff; background: #222; }

@media (max-width: 1120px) {
  .editor-note { display: none; }
  .style-button { display: inline-block; }
  .theme-dock {
    z-index: 120;
    top: 86px;
    right: 14px;
    width: 220px;
    max-height: calc(100vh - 104px);
    padding: 18px;
    overflow-y: auto;
    background: #fffdf8;
    border: 1px solid rgba(73,65,56,.16);
    box-shadow: 0 18px 52px rgba(28,27,25,.24);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
  }
  .is-style-open .theme-dock {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}
@media (max-width: 900px) {
  .app-bar { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 14px; }
  .document-state { display: none; }
  .toolbar-actions { gap: 5px; }
  .button { min-height: 34px; padding: 0 9px; font-size: 11px; }
  #resetButton { display: none; }
  .workspace { justify-content: flex-start; padding: 44px 22px 70px; }
}
@media (max-width: 620px) {
  .app-bar { position: sticky; grid-template-columns: 1fr; align-items: start; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .toolbar-actions {
    width: 100%;
    justify-self: stretch;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .button { width: 100%; padding: 0 7px; }
  .privacy-drawer { padding: 28px 22px 24px; }
  .drawer-head h2 { font-size: 22px; }
  .mobile-hint { display: block; padding: 7px 14px; color: #6c655b; background: #dcd5ca; text-align: center; font-size: 10px; }
  .workspace {
    min-height: calc(100vh - 184px);
    padding: 34px 14px 36px;
    overflow-x: hidden;
  }
  .paper-wrap {
    width: 100%;
    margin-left: 0;
  }
  .paper-ruler { display: none; }
  .resume-page {
    width: 100%;
    min-height: 0;
    padding: 28px 20px 32px;
    transform-origin: top left;
  }
  .privacy-caption { margin-top: 10px; font-size: 10px; }
  .resume-header { gap: 16px; }
  .resume-header.has-portrait {
    grid-template-columns: minmax(0, 1fr) 64px;
    gap: 12px;
  }
  .resume-header.has-portrait .identity { padding-left: 0; }
  .resume-name { font-size: clamp(23px, 8vw, 30px); letter-spacing: .1em; }
  .resume-role { font-size: 12px; letter-spacing: .06em; }
  .contact-line { gap: 2px 8px; font-size: 11px; }
  .contact-line span + span::before { margin-right: 8px; }
  .editorial-grid { grid-template-columns: 1fr; gap: 22px; }
  .editorial-side {
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .editorial-divider-handle { display: none; }
  .site-footer { padding-bottom: 20px; font-size: 10px; }
}

@media print {
  html, body { background: #fff !important; }
  body { margin: 0; padding: 0; }
  .app-bar, .mobile-hint, .editor-note, .paper-ruler, .paper-ruler-v, .privacy-caption, .site-footer,
  .edit-only, .toast, .export-mask { display: none !important; }
  .workspace { display: block; min-height: 0; padding: 0; overflow: visible; }
  .paper-wrap { width: auto; margin-left: 0; }
  .resume-page {
    width: auto;
    min-height: 0;
    padding: 0;
    box-shadow: none;
    font-size: 8.6pt;
    line-height: 1.42;
  }
  .resume-header { min-height: 28mm; grid-template-columns: 1fr; gap: 7mm; }
  .resume-header.has-portrait { grid-template-columns: 1fr 21mm; }
  .identity { padding-left: 0; }
  .resume-header.has-portrait .identity { padding-left: 31mm; }
  .resume-name { font-size: 20pt; }
  .portrait-shell { width: 18mm; height: 25.2mm; }
  .summary-box { margin-top: 3mm; padding: 2mm 3mm; }
  .resume-section { margin-top: 4mm; }
  .section-heading { margin-bottom: 2.4mm; }
  .section-heading h2 { font-size: 12pt; }
  .entry { margin-bottom: 2.7mm; }
  .entry-top { font-size: 9.6pt; }
  .entry-sub { font-size: 8.2pt; }
  .entry-summary, .entry li { font-size: 8.4pt; }
}
