:root {
  --ink: #19211f;
  --muted: #68726e;
  --paper: #ffffff;
  --canvas: #e9eee9;
  --line: #d8dfd8;
  --accent: #db4b3f;
  --shadow: 0 20px 55px rgba(22, 38, 31, .14);
}
* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); font-family: 'DM Sans', sans-serif; background: linear-gradient(120deg, #eef2ed, #e2ebe5 55%, #f4ebe2); }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 72px; padding: 0 28px; background: rgba(255, 255, 255, .84); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; }
.brand small { display: block; color: var(--muted); font: 500 11px 'DM Sans', sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--accent); border-radius: 9px; font-weight: 700; }
.top-actions, .tool-row, .preview-toolbar { display: flex; align-items: center; gap: 10px; }
.save-status { color: var(--muted); font-size: 12px; }
.button, .icon-button { padding: 9px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; font: 600 13px 'DM Sans', sans-serif; cursor: pointer; }
.button.primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.button.subtle { background: rgba(255, 255, 255, .65); }
.danger-button { color: #a22f28; border-color: #e8b8b2; }
.icon-button { padding: 8px 11px; }
.workspace { display: grid; grid-template-columns: minmax(360px, 560px) minmax(500px, 1fr); gap: 30px; max-width: 1500px; margin: 0 auto; padding: 30px 28px 60px; }
.editor-panel { padding: 26px; background: rgba(255, 255, 255, .72); border: 1px solid rgba(255, 255, 255, .9); border-radius: 14px; box-shadow: 0 12px 35px rgba(32, 51, 42, .06); }
.panel-heading, .legend-row { display: flex; align-items: flex-start; justify-content: space-between; }
.panel-actions { display: flex; align-items: center; gap: 8px; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.panel-heading h1 { margin: 7px 0 8px; font: 700 30px 'Space Grotesk', sans-serif; }
.intro { margin: 0 0 25px; color: var(--muted); font-size: 13px; line-height: 1.6; }
fieldset { margin: 0; padding: 20px 0 4px; border: 0; border-top: 1px solid var(--line); }
legend { margin-bottom: 13px; padding: 0; font: 700 15px 'Space Grotesk', sans-serif; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
label { display: grid; gap: 6px; margin-bottom: 13px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field-hint { color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.35; }
input, textarea, select { width: 100%; padding: 10px 11px; color: var(--ink); background: rgba(255, 255, 255, .8); border: 1px solid var(--line); border-radius: 6px; outline: none; font: 400 13px 'DM Sans', sans-serif; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(219, 75, 63, .12); }
.hint { color: var(--muted); font-size: 11px; font-weight: 400; }
.text-button { color: var(--accent); background: transparent; border: 0; font-size: 12px; font-weight: 700; cursor: pointer; }
.repeat-item { position: relative; margin-bottom: 12px; padding: 14px; background: rgba(255, 255, 255, .48); border: 1px solid var(--line); border-radius: 8px; }
.repeat-item .remove { position: absolute; top: 8px; right: 9px; color: var(--muted); background: transparent; border: 0; cursor: pointer; }
.repeat-item .field-grid { padding-right: 22px; }
.data-tools { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.data-tools summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.file-button { display: inline-flex; cursor: pointer; }
.file-button input { display: none; }
.preview-panel { min-width: 0; }
.preview-toolbar { justify-content: flex-end; flex-wrap: wrap; margin-bottom: 13px; }
.preview-toolbar label { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12px; }
.switch-label, .check-label { display: inline-flex !important; align-items: center; gap: 7px; cursor: pointer; }
.switch-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; width: 34px; height: 19px; background: #c8d1ca; border-radius: 99px; transition: .2s; }
.switch-track::after { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; background: #fff; border-radius: 50%; content: ''; transition: .2s; }
.switch-label input:checked + .switch-track { background: var(--accent); }
.switch-label input:checked + .switch-track::after { transform: translateX(15px); }
.check-label input { width: auto; }
.field-option { display: flex; align-items: center; gap: 7px; margin: -4px 0 12px; }
.field-option input { width: auto; }
.preview-toolbar select { width: auto; padding: 7px 9px; }
.preview-toolbar input { width: 34px; height: 30px; padding: 2px; cursor: pointer; }
.resume-page { position: relative; width: min(100%, 820px); min-height: 1060px; margin: 0 auto; padding: 68px 72px; overflow-wrap: anywhere; color: #202522; background: var(--paper); box-shadow: var(--shadow); }
.resume-pages { display: grid; gap: 24px; }
.page-content { height: 960px; overflow: hidden; }
.company-heading { margin: 20px 0 8px; color: #3f4b44; font: 700 12px 'Space Grotesk', sans-serif; }
.resume-header { margin-bottom: 26px; padding-bottom: 22px; border-bottom: 3px solid var(--resume-accent, var(--accent)); }
.resume-header h2 { margin: 0 0 10px; font: 700 42px/1 'Space Grotesk', sans-serif; letter-spacing: -.02em; }
.resume-header .headline { color: var(--resume-accent, var(--accent)); font-size: 17px; font-weight: 700; }
.contact-line { display: flex; flex-wrap: wrap; gap: 6px 17px; margin-top: 16px; color: #65716b; font-size: 11px; }
.contact-line a, .item-heading a { color: inherit; text-decoration: none; }
.contact-line a:hover, .item-heading a:hover { text-decoration: underline; }
.contact-item, .contact-line a { display: inline-flex; align-items: center; gap: 5px; }
.contact-icon { color: var(--resume-accent, var(--accent)); font-size: 11px; font-weight: 700; }
.resume-section { margin: 0 0 25px; }
.resume-section h3 { margin: 0 0 12px; color: var(--resume-accent, var(--accent)); font: 700 11px 'Space Grotesk', sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.resume-section p { margin: 0; font-size: 12px; line-height: 1.65; }
.resume-item { margin-bottom: 17px; }
.item-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.item-heading strong { font: 700 14px 'Space Grotesk', sans-serif; }
.item-heading time { color: #738078; font-size: 10px; white-space: nowrap; }
.item-subtitle { margin: 3px 0 6px; color: var(--resume-accent, var(--accent)); font-size: 12px; font-weight: 700; }
.skill-list { display: flex; flex-wrap: wrap; gap: 7px; }
.skill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 9px; color: #4b5a51; border: 1px solid #ccd5ce; border-radius: 99px; font-size: 11px; }
.skill-rating { color: var(--resume-accent, var(--accent)); font-size: 9px; letter-spacing: 1px; white-space: nowrap; }
.item-meta { margin: 4px 0 6px; color: #637068; font-size: 10px; }
.language-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 11px; }
.language-list li { display: flex; flex-direction: column; gap: 2px; }
.language-list span { color: #68726e; }
.resume-footer { position: absolute; right: 72px; bottom: 22px; left: 72px; display: flex; justify-content: space-between; margin: 0; padding-top: 8px; color: #7c8780; border-top: 1px solid #d8dfd8; font-size: 8px; }
.page-number::after { content: 'Page ' counter(page) ' of ' counter(pages); }
.template-editorial .resume-header { padding-bottom: 0; border: 0; }
.template-editorial .resume-header h2 { font-size: 48px; }
.template-editorial .resume-section h3 { padding-bottom: 6px; border-bottom: 1px solid #d8dfd8; font-size: 13px; }
.template-compact { padding: 48px 58px; }
.template-compact .resume-header { margin-bottom: 18px; padding-bottom: 14px; }
.template-compact .resume-header h2 { font-size: 32px; }
.template-compact .resume-section { margin-bottom: 15px; }
.template-compact .resume-item { margin-bottom: 10px; }
.template-compact .resume-section p, .template-compact .item-heading strong { font-size: 11px; }
.template-professional .resume-section h3 { border-bottom: 1px solid #d8dfd8; padding-bottom: 5px; }
.toast { position: fixed; right: 22px; bottom: 22px; padding: 11px 15px; color: #fff; background: var(--ink); border-radius: 6px; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.toast.visible { opacity: 1; transform: none; }
.dark { --ink: #edf2ed; --muted: #a8b4ac; --canvas: #16201b; --line: #35443b; }
.dark body { background: #16201b; }
.dark .editor-panel, .dark .topbar, .dark input, .dark textarea, .dark select { color: var(--ink); background: #202d25; }
.share-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; background: rgba(255, 255, 255, .9); border-bottom: 1px solid var(--line); }
.preview-only { background: #f0f0f0; }
.preview-only .workspace { display: block; padding: 22px; }
.preview-only .preview-panel { max-width: 820px; margin: 0 auto; }
.preview-only .preview-toolbar { justify-content: flex-end; }
.preview-only .resume-page { min-height: 1060px; }
.preview-only .topbar { display: none; }
.preview-only .preview-toolbar { position: fixed; top: 18px; right: 22px; z-index: 10; gap: 8px; margin: 0; }
.preview-only .floating-action { box-shadow: 0 8px 24px rgba(22, 38, 31, .16); }
.homepage-float { position: fixed; left: 22px; bottom: 22px; z-index: 11; padding: 10px 14px; color: #fff; background: #b44436; border-radius: 999px; box-shadow: 0 8px 24px rgba(22, 38, 31, .2); font-size: 11px; font-weight: 700; text-decoration: none; }
.pagination-staging { position: absolute; left: -100000px; width: 820px; visibility: hidden; }
.utility-attribution { padding: 0 28px 28px; color: var(--muted); text-align: center; font-size: 11px; }
.utility-attribution a { color: var(--accent); font-weight: 700; text-decoration: none; }
@page { size: A4; margin: 0; }
@media (max-width: 1000px) { .workspace { grid-template-columns: 1fr; } .preview-panel { order: -1; } .resume-page { width: min(100%, 820px); } }
@media (max-width: 600px) { .topbar { align-items: flex-start; height: auto; gap: 14px; padding: 15px; } .top-actions { flex-wrap: wrap; justify-content: flex-end; } .save-status { display: none; } .workspace { gap: 18px; padding: 15px 10px 40px; } .editor-panel { padding: 18px; } .field-grid { grid-template-columns: 1fr; } .resume-page { min-height: 0; padding: 38px 30px; } .resume-header h2, .template-editorial .resume-header h2 { font-size: 32px; } .preview-toolbar { justify-content: flex-start; } .preview-toolbar .icon-button { margin-left: auto; } .panel-actions { align-items: flex-end; flex-direction: column; } }
@media (min-width: 1001px) { .preview-panel { position: sticky; top: 92px; align-self: start; } }
@media print { html, body { width: 210mm; background: #fff; } .topbar, .editor-panel, .preview-toolbar, .share-actions, .homepage-float { display: none !important; } .workspace, .preview-only .workspace { display: block; margin: 0; padding: 0; } .preview-panel, .preview-only .preview-panel { display: block; max-width: none; } .resume-pages { display: block; } .resume-page, .preview-only .resume-page { width: 210mm; height: 297mm; min-height: 297mm; margin: 0; padding: 16mm 17mm 18mm; box-shadow: none; page-break-after: always; break-after: page; } .page-content { height: 254mm; overflow: hidden; } .resume-footer { right: 17mm; bottom: 8mm; left: 17mm; } .preview-only { background: #fff; } .language-list { grid-template-columns: repeat(3, 1fr); } }
