:root {
  --ink: #1c1917;
  --muted: #57534e;
  --faint: #a8a29e;
  --line: #e7e5e4;
  --paper: #fffdf9;
  --cream: #f6f1ea;
  --sun: #ea580c;
  --sun-ink: #9a3412;
  --shadow: 0 18px 50px rgba(28, 25, 23, 0.08);
  --radius: 18px;
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  min-height: 100vh;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 80; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(246, 241, 234, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink);
  font-family: var(--display); font-size: 1.25rem;
}
.brand span span { color: var(--sun); font-style: italic; }
.brand-mark { color: var(--sun); }
.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.topnav a:hover { color: var(--sun-ink); }

.hero { padding: 56px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: start; }
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sun-ink); margin-bottom: 12px;
}
.hero h1 {
  font-family: var(--display); font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 500; line-height: 1.12; margin-bottom: 16px;
}
.lede { color: var(--muted); font-size: 1.08rem; max-width: 42ch; }
.hero-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-pills span {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; font-size: 0.8rem; color: var(--muted);
}
.hero-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.hero-card-kicker { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin-bottom: 8px; }
.hero-card p { margin-bottom: 12px; color: var(--muted); }
.hero-card textarea, .editor input, .editor textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
  padding: 10px 12px;
}
.hero-card textarea:focus, .editor input:focus, .editor textarea:focus {
  outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip-row button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 12px; cursor: pointer; font: inherit; font-size: 0.8rem; color: var(--muted);
}
.chip-row button:hover { border-color: var(--sun); color: var(--sun-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font: inherit; font-weight: 600;
  border-radius: 999px; padding: 10px 16px;
}
.btn-primary { background: var(--sun); color: #fff; width: 100%; margin-top: 10px; }
.btn-primary:hover { background: #c2410c; }
.preview-bar .btn-primary { width: auto; margin: 0; }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 8px 12px; font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--sun); color: var(--sun-ink); }
.btn-add {
  background: transparent; color: var(--sun-ink); border: 1.5px dashed #fdba74;
  border-radius: 10px; width: 100%; margin-top: 8px;
}
.btn-add:hover { background: #fff7ed; }

.mode-section { padding: 20px 0 10px; }
.section-head { margin-bottom: 18px; }
.section-head h2, .editor-head h2, .preview-bar h2 {
  font-family: var(--display); font-size: 1.55rem; font-weight: 500;
}
.section-head p { color: var(--muted); }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-btn {
  text-align: left; background: var(--paper); border: 2px solid var(--line);
  border-radius: 16px; padding: 18px 20px; cursor: pointer; font: inherit;
}
.mode-btn strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.mode-btn span { color: var(--muted); font-size: 0.9rem; }
.mode-btn.is-on { border-color: var(--sun); background: #fff7ed; box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.08); }
.import-section { padding: 12px 0 8px; }
.dropzone {
  background: var(--paper); border: 2px dashed #fdba74; border-radius: var(--radius);
  padding: 28px 22px; text-align: center; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.dropzone.is-over { background: #fff7ed; border-color: var(--sun); }
.dropzone-title { font-weight: 700; margin-bottom: 6px; }
.dropzone-hint { color: var(--muted); font-size: 0.9rem; max-width: 62ch; margin: 0 auto 14px; }
.dropzone .chip-row { justify-content: center; }
.dropzone .btn { width: auto; margin: 0; }
.photo-row { display: flex; align-items: center; gap: 10px; margin: -4px 0 12px; }
.field-lead { margin-bottom: 10px; }
.work-thumb {
  width: 100%; height: 88px; object-fit: cover; border-radius: 8px;
  background: #fff; border: 1px solid var(--line);
}
.work-thumb-row { display: flex; align-items: center; gap: 8px; }
.doc .work-img {
  width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px;
  margin-bottom: 10px; display: block;
}
.doc-gallery .proj .work-img { max-height: 180px; border-radius: 0; margin: -18px -18px 12px; width: calc(100% + 36px); max-width: none; }
.doc-classic .work-img, .doc-split .work-img, .doc-compact .work-img { max-height: 120px; }

.template-label { margin: 22px 0 10px; font-weight: 600; }
.template-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.template-card {
  background: var(--paper); border: 2px solid var(--line); border-radius: 14px;
  padding: 14px; cursor: pointer; text-align: left; font: inherit;
}
.template-card.is-on { border-color: var(--sun); }
.template-card .swatch {
  height: 42px; border-radius: 8px; margin-bottom: 10px;
}
.template-card strong { display: block; font-size: 0.92rem; }
.template-card span { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

.builder { padding: 36px 0 64px; }
.builder-grid { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 24px; align-items: start; }
.editor, .preview-pane {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.editor { padding: 22px; }
.editor-head, .preview-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.editor-actions, .preview-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
fieldset { border: 0; margin: 0 0 22px; }
legend { font-weight: 700; margin-bottom: 12px; }
.editor label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.editor label input, .editor label textarea { margin-top: 5px; font-weight: 400; color: var(--ink); }
.hint { font-weight: 400; color: var(--faint); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry {
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px; margin-bottom: 10px; display: grid; gap: 8px;
}
.entry-top { display: flex; justify-content: space-between; align-items: center; }
.entry-top span { font-size: 0.75rem; color: var(--faint); font-family: var(--mono); }
.btn-x {
  width: 28px; height: 28px; border: 0; border-radius: 50%; cursor: pointer;
  background: #fee2e2; color: #991b1b; font: inherit;
}
.mini-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.skill-row { grid-template-columns: 1fr 88px auto; display: grid; gap: 8px; align-items: center; }
.privacy { font-size: 0.8rem; color: var(--faint); }

.preview-pane { position: sticky; top: 80px; overflow: hidden; }
.preview-bar { padding: 14px 16px 0; margin: 0; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.preview-stage {
  height: min(78vh, 920px); overflow: auto; background: #ece7df;
}

.doc { min-height: 100%; }
.doc a { color: inherit; }

/* —— Fun: Spark —— */
.doc-spark {
  background: linear-gradient(160deg, #fff7ed, #fff 40%, #ecfeff);
  color: #1c1917; padding: 40px 32px 56px;
  font-family: "DM Sans", sans-serif;
}
.doc-spark .hero-block { text-align: center; margin-bottom: 32px; }
.doc-spark .avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fb923c; margin-bottom: 12px;
}
.doc-spark h1 { font-family: "Fraunces", serif; font-size: 2.4rem; font-weight: 700; }
.doc-spark .role { color: #c2410c; font-weight: 700; margin: 6px 0 12px; }
.doc-spark .bio { max-width: 46ch; margin: 0 auto 16px; color: #57534e; }
.doc-spark .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; font-size: 0.88rem; color: #44403c; }
.doc-spark .socials { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.doc-spark .socials a {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; border: 1px solid #fed7aa; text-decoration: none; font-size: 0.72rem; font-weight: 700;
}
.doc-spark .cards { display: grid; gap: 12px; }
.doc-spark h2 { font-family: "Fraunces", serif; font-size: 1.2rem; margin: 22px 0 10px; }
.doc-spark .chip {
  display: inline-flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid #fed7aa; border-radius: 999px; padding: 6px 12px; margin: 0 6px 8px 0; font-size: 0.85rem;
}
.doc-spark .bar { width: 56px; height: 6px; background: #ffedd5; border-radius: 99px; overflow: hidden; }
.doc-spark .bar i { display: block; height: 100%; background: #ea580c; }
.doc-spark .card {
  background: #fff; border: 1px solid #fed7aa; border-radius: 16px; padding: 14px 16px;
  box-shadow: 4px 4px 0 #fdba74;
}
.doc-spark .when { color: #9a3412; font-size: 0.8rem; }

/* —— Fun: Bold —— */
.doc-bold { background: #111827; color: #f9fafb; padding: 48px 36px; font-family: "DM Sans", sans-serif; }
.doc-bold .kicker { font-family: "IBM Plex Mono", monospace; color: #34d399; letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.72rem; }
.doc-bold h1 { font-size: clamp(2.4rem, 6vw, 4rem); line-height: 0.95; letter-spacing: -0.04em; margin: 10px 0; }
.doc-bold .role { font-size: 1.2rem; color: #a7f3d0; }
.doc-bold .split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; margin-top: 28px; }
.doc-bold h2 { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: #6ee7b7; margin: 0 0 12px; }
.doc-bold .item { border-top: 1px solid #374151; padding: 12px 0; }
.doc-bold .item h3 { font-size: 1.05rem; }
.doc-bold .muted { color: #9ca3af; }
.doc-bold a { color: #6ee7b7; }
.doc-bold .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-bold .tags span { border: 1px solid #374151; padding: 4px 8px; font-size: 0.78rem; }

/* —— Fun: Neon —— */
.doc-neon {
  background: radial-gradient(1200px 500px at 10% -10%, #3b0764, #020617 45%);
  color: #e2e8f0; padding: 44px 32px; font-family: "DM Sans", sans-serif;
}
.doc-neon h1 {
  font-family: "Fraunces", serif; font-size: 2.6rem;
  background: linear-gradient(90deg, #f0abfc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.doc-neon .role { color: #c4b5fd; margin: 6px 0 14px; }
.doc-neon .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc-neon .tile {
  background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(192, 132, 252, 0.35);
  border-radius: 18px; padding: 16px;
}
.doc-neon h2 { color: #67e8f9; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 10px; }
.doc-neon a { color: #f0abfc; }
.doc-neon .pills span { display: inline-block; margin: 0 6px 6px 0; padding: 4px 10px; border-radius: 999px; background: rgba(103, 232, 249, 0.12); color: #a5f3fc; font-size: 0.8rem; }

/* —— Fun: Gallery —— */
.doc-gallery { background: #fafaf9; color: #1c1917; padding: 36px 28px 50px; font-family: "Newsreader", Georgia, serif; }
.doc-gallery header { display: flex; justify-content: space-between; gap: 20px; align-items: end; border-bottom: 2px solid #1c1917; padding-bottom: 16px; margin-bottom: 22px; }
.doc-gallery h1 { font-size: 2.5rem; font-weight: 500; }
.doc-gallery .role { font-style: italic; }
.doc-gallery .projects { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-gallery .proj {
  min-height: 160px; padding: 18px; background: #fff; border: 1px solid #e7e5e4;
}
.doc-gallery .proj:nth-child(3n) { background: #1c1917; color: #fafaf9; }
.doc-gallery h2 { font-family: "DM Sans", sans-serif; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 22px 0 10px; }
.doc-gallery .sans { font-family: "DM Sans", sans-serif; font-size: 0.9rem; }
.doc-gallery a { text-underline-offset: 3px; }

/* —— Simple resumes —— */
.doc-classic, .doc-split, .doc-compact {
  background: #fff; color: #111; padding: 36px 40px 48px;
  font-family: "DM Sans", system-ui, sans-serif; max-width: 820px; margin: 0 auto;
}
.doc-classic h1 { font-size: 1.7rem; letter-spacing: 0.02em; text-transform: uppercase; }
.doc-classic .role { color: #444; margin: 2px 0 8px; }
.doc-classic .line { font-size: 0.82rem; color: #444; }
.doc-classic h2 {
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid #111; padding-bottom: 4px; margin: 18px 0 10px;
}
.doc-classic .job { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin-bottom: 12px; }
.doc-classic .job p { grid-column: 1 / -1; color: #333; font-size: 0.92rem; }
.doc-classic .skills { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.9rem; }

.doc-split { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.doc-split .side { background: #f4f4f5; padding: 22px 18px; margin: -36px 0 -48px -40px; }
.doc-split h1 { font-size: 1.55rem; line-height: 1.15; }
.doc-split h2 { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 16px 0 8px; color: #52525b; }
.doc-split .main h2 { border-bottom: 1px solid #d4d4d8; padding-bottom: 4px; }
.doc-split .item { margin-bottom: 12px; }
.doc-split .when { font-size: 0.78rem; color: #71717a; }

.doc-compact { padding: 28px 32px; font-size: 0.88rem; }
.doc-compact h1 { font-size: 1.35rem; }
.doc-compact .head { display: flex; justify-content: space-between; gap: 12px; border-bottom: 2px solid #18181b; padding-bottom: 8px; margin-bottom: 12px; }
.doc-compact h2 { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; margin: 10px 0 6px; }
.doc-compact .row { display: flex; justify-content: space-between; gap: 12px; }
.doc-compact .item { margin-bottom: 8px; }

/* —— Fun: Terminal —— */
.doc-terminal {
  background: #020617; color: #4ade80; padding: 0; font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.doc-terminal .term-bar {
  display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #0b1220;
  border-bottom: 1px solid #14532d;
}
.doc-terminal .term-bar span { width: 11px; height: 11px; border-radius: 50%; }
.doc-terminal .term-bar span:nth-child(1) { background: #ef4444; }
.doc-terminal .term-bar span:nth-child(2) { background: #f59e0b; }
.doc-terminal .term-bar span:nth-child(3) { background: #22c55e; }
.doc-terminal .term-bar em { margin-left: 8px; color: #64748b; font-style: normal; font-size: 0.78rem; }
.doc-terminal .term-body { padding: 22px 24px 40px; }
.doc-terminal .cmd { color: #67e8f9; margin-top: 14px; }
.doc-terminal .out { color: #4ade80; margin: 4px 0; white-space: pre-wrap; word-break: break-word; }
.doc-terminal .out a { color: #67e8f9; text-decoration: underline; }
.doc-terminal .file { margin: 6px 0; }
.doc-terminal .file .work-img { border-radius: 6px; border: 1px solid #14532d; max-height: 160px; }
.doc-terminal .cursor { animation: caret-blink 1s steps(1) infinite; }

/* —— Fun: Pastel —— */
.doc-pastel {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #fdf2f8, #eff6ff 60%, #fefce8);
  color: #3f3d56; padding: 40px 32px 56px; font-family: "DM Sans", sans-serif;
}
.doc-pastel .blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.55; z-index: 0; }
.doc-pastel .blob.b1 { width: 220px; height: 220px; background: #fbcfe8; top: -60px; right: -40px; }
.doc-pastel .blob.b2 { width: 200px; height: 200px; background: #bfdbfe; bottom: -70px; left: -50px; }
.doc-pastel > * { position: relative; z-index: 1; }
.doc-pastel header { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.doc-pastel .avatar { width: 84px; height: 84px; border-radius: 24px; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 24px rgba(129, 140, 248, 0.25); }
.doc-pastel h1 { font-size: 1.9rem; font-weight: 600; }
.doc-pastel .role { color: #818cf8; font-weight: 600; }
.doc-pastel .bio { color: #6b7280; margin-bottom: 12px; }
.doc-pastel .meta { font-size: 0.88rem; color: #6b7280; }
.doc-pastel .socials { display: flex; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.doc-pastel .socials a { background: #fff; border-radius: 999px; padding: 4px 12px; text-decoration: none; font-size: 0.8rem; box-shadow: 0 4px 12px rgba(129, 140, 248, 0.15); }
.doc-pastel h2 { font-size: 1.1rem; margin: 22px 0 10px; color: #4c1d95; }
.doc-pastel .cards { display: grid; gap: 12px; }
.doc-pastel .card { background: rgba(255, 255, 255, 0.8); border-radius: 18px; padding: 14px 16px; box-shadow: 0 8px 22px rgba(129, 140, 248, 0.12); }
.doc-pastel .when { color: #818cf8; font-size: 0.82rem; }
.doc-pastel .chip { display: inline-block; background: #e0e7ff; color: #4338ca; border-radius: 999px; padding: 5px 12px; margin: 0 6px 8px 0; font-size: 0.82rem; }
.doc-pastel .work-img { border-radius: 12px; }

/* —— Fun: Bauhaus —— */
.doc-bauhaus {
  position: relative; overflow: hidden; background: #f5f0e6; color: #1a1a1a;
  padding: 44px 34px 56px; font-family: "DM Sans", sans-serif;
}
.doc-bauhaus .shape { position: absolute; z-index: 0; opacity: 0.9; }
.doc-bauhaus .shape.circle { width: 90px; height: 90px; border-radius: 50%; background: #ef4444; top: 24px; right: 40px; }
.doc-bauhaus .shape.square { width: 70px; height: 70px; background: #2563eb; top: 120px; right: 70px; }
.doc-bauhaus .shape.tri { width: 0; height: 0; border-left: 45px solid transparent; border-right: 45px solid transparent; border-bottom: 78px solid #fbbf24; bottom: 30px; right: 30px; }
.doc-bauhaus > *:not(.shape) { position: relative; z-index: 1; }
.doc-bauhaus h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em; max-width: 70%; }
.doc-bauhaus .role { color: #ef4444; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.85rem; margin: 6px 0 14px; }
.doc-bauhaus .bio { max-width: 46ch; margin-bottom: 12px; }
.doc-bauhaus .meta { font-size: 0.88rem; }
.doc-bauhaus .socials { display: flex; gap: 8px; margin: 12px 0 6px; }
.doc-bauhaus .socials a { border: 2px solid #1a1a1a; padding: 3px 10px; text-decoration: none; font-weight: 700; font-size: 0.78rem; }
.doc-bauhaus h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; margin: 24px 0 10px; border-bottom: 3px solid #1a1a1a; padding-bottom: 5px; }
.doc-bauhaus .blocks { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-bauhaus .block { background: #1a1a1a; color: #f5f0e6; padding: 6px 12px; font-size: 0.82rem; font-weight: 600; }
.doc-bauhaus .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.doc-bauhaus .tile { padding: 16px; border: 2px solid #1a1a1a; background: #fff; }
.doc-bauhaus .tile.c1 { box-shadow: 6px 6px 0 #ef4444; }
.doc-bauhaus .tile.c2 { box-shadow: 6px 6px 0 #2563eb; }
.doc-bauhaus .tile.c3 { box-shadow: 6px 6px 0 #fbbf24; }
.doc-bauhaus .tile h3 { margin-bottom: 6px; }
.doc-bauhaus .tile .work-img { border-radius: 0; }
.doc-bauhaus .rows { display: grid; gap: 12px; }
.doc-bauhaus .row { border-left: 4px solid #2563eb; padding-left: 12px; }
.doc-bauhaus .row .co { color: #ef4444; font-weight: 600; display: block; font-size: 0.88rem; }
.doc-bauhaus .row .when { font-size: 0.8rem; color: #6b7280; }

/* —— Fun: Pop —— */
.doc-pop {
  background: #fde047; color: #1c1917; padding: 40px 32px 56px; font-family: "DM Sans", sans-serif;
}
.doc-pop header { border: 4px solid #1c1917; border-radius: 18px; padding: 22px; background: #fff; box-shadow: 8px 8px 0 #f43f5e; margin-bottom: 20px; }
.doc-pop h1 { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; }
.doc-pop .role { background: #1c1917; color: #fde047; display: inline-block; padding: 3px 12px; border-radius: 999px; margin-top: 8px; font-weight: 700; }
.doc-pop .bio { margin-bottom: 12px; font-size: 1.02rem; }
.doc-pop .meta { font-size: 0.88rem; }
.doc-pop .socials { display: flex; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.doc-pop .socials a { background: #1c1917; color: #fff; border-radius: 999px; padding: 4px 12px; text-decoration: none; font-size: 0.78rem; font-weight: 600; }
.doc-pop h2 { font-size: 1.2rem; font-weight: 800; margin: 22px 0 12px; }
.doc-pop .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-pop .pop-chip { background: #f43f5e; color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 600; box-shadow: 3px 3px 0 #1c1917; }
.doc-pop .pop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.doc-pop .pop-card { border: 4px solid #1c1917; border-radius: 16px; padding: 16px; background: #fff; }
.doc-pop .pop-card.c1 { box-shadow: 6px 6px 0 #2563eb; }
.doc-pop .pop-card.c2 { box-shadow: 6px 6px 0 #22c55e; }
.doc-pop .pop-card h3 { margin-bottom: 6px; }
.doc-pop .pop-card a { color: #f43f5e; font-weight: 700; }
.doc-pop .pop-rows { display: grid; gap: 14px; }
.doc-pop .pop-row { border: 3px solid #1c1917; border-radius: 14px; padding: 14px 16px; background: #fff; }
.doc-pop .pop-row span { font-size: 0.8rem; color: #6b7280; }

/* —— Simple: Timeline —— */
.doc-timeline {
  background: #fff; color: #18181b; padding: 36px 40px 48px; max-width: 820px; margin: 0 auto;
  font-family: "DM Sans", system-ui, sans-serif;
}
.doc-timeline h1 { font-size: 1.7rem; }
.doc-timeline .role { color: #0ea5e9; font-weight: 600; margin: 2px 0 6px; }
.doc-timeline .line { font-size: 0.82rem; color: #52525b; }
.doc-timeline h2 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; margin: 20px 0 12px; color: #0f172a; }
.doc-timeline .track { border-left: 2px solid #bae6fd; padding-left: 20px; display: grid; gap: 16px; }
.doc-timeline .node { position: relative; }
.doc-timeline .node .dot { position: absolute; left: -27px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #0ea5e9; border: 2px solid #fff; box-shadow: 0 0 0 2px #bae6fd; }
.doc-timeline .node .when { font-size: 0.78rem; color: #71717a; margin: 2px 0 4px; }
.doc-timeline .node .work-img { max-height: 130px; }

/* —— Simple: Modern —— */
.doc-modern { background: #fff; color: #0f172a; max-width: 820px; margin: 0 auto; font-family: "DM Sans", system-ui, sans-serif; }
.doc-modern header { background: #0f172a; color: #fff; padding: 30px 40px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.doc-modern h1 { font-size: 1.9rem; }
.doc-modern .role { color: #38bdf8; font-weight: 600; margin-top: 2px; }
.doc-modern .contact { font-size: 0.84rem; color: #cbd5e1; text-align: right; }
.doc-modern .socials { display: flex; gap: 8px; margin-top: 8px; justify-content: flex-end; }
.doc-modern .socials a { color: #38bdf8; text-decoration: none; }
.doc-modern .body { padding: 28px 40px 48px; }
.doc-modern h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: #0ea5e9; margin: 20px 0 10px; }
.doc-modern .item { margin-bottom: 14px; }
.doc-modern .item-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.doc-modern .item-head span { color: #475569; font-size: 0.9rem; }
.doc-modern .item-head em { margin-left: auto; font-style: normal; font-size: 0.8rem; color: #94a3b8; }
.doc-modern .item-head a { margin-left: auto; color: #0ea5e9; font-size: 0.82rem; }
.doc-modern .item p { color: #334155; font-size: 0.92rem; }
.doc-modern .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-modern .chips span { background: #e0f2fe; color: #0369a1; border-radius: 6px; padding: 4px 10px; font-size: 0.82rem; }
.doc-modern .work-img { max-height: 140px; }

/* —— Simple: Elegant —— */
.doc-elegant {
  background: #fffdf7; color: #3f3a2e; padding: 44px 48px 56px; max-width: 780px; margin: 0 auto;
  font-family: "Newsreader", Georgia, serif;
}
.doc-elegant header { text-align: center; margin-bottom: 26px; }
.doc-elegant h1 { font-size: 2.2rem; font-weight: 600; letter-spacing: 0.01em; }
.doc-elegant .role { font-style: italic; color: #a16207; margin-top: 4px; }
.doc-elegant .rule { width: 60px; height: 2px; background: #a16207; margin: 16px auto; }
.doc-elegant .meta { font-size: 0.85rem; color: #6b6350; font-family: "DM Sans", sans-serif; }
.doc-elegant .socials { display: flex; justify-content: center; gap: 14px; margin-top: 10px; font-family: "DM Sans", sans-serif; }
.doc-elegant .socials a { color: #a16207; text-decoration: none; font-size: 0.82rem; border-bottom: 1px solid #e7d8b0; }
.doc-elegant h2 { font-family: "DM Sans", sans-serif; font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; color: #a16207; text-align: center; margin: 26px 0 14px; }
.doc-elegant .item { text-align: center; margin-bottom: 18px; }
.doc-elegant h3 { font-size: 1.15rem; font-weight: 600; }
.doc-elegant .org { font-style: italic; color: #6b6350; }
.doc-elegant .when { font-size: 0.78rem; color: #9a927f; font-family: "DM Sans", sans-serif; margin: 2px 0 6px; }
.doc-elegant .desc { font-size: 0.96rem; color: #4b4536; max-width: 60ch; margin: 0 auto; }
.doc-elegant .desc a { color: #a16207; }
.doc-elegant .work-img { max-height: 160px; border-radius: 4px; margin: 0 auto 10px; }

.empty {
  padding: 80px 24px; text-align: center; color: #78716c;
}

.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  background: #1c1917; color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 0.9rem; box-shadow: var(--shadow);
}
.overlay {
  position: fixed; inset: 0; z-index: 100; background: #ece7df; overflow: auto; padding: 48px 20px;
}
.overlay-close {
  position: fixed; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: #1c1917; color: #fff; cursor: pointer; font-size: 1.1rem;
}
.site-foot { padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }

@media print {
  .grain, .topbar, .hero, .mode-section, .editor, .preview-bar, .site-foot { display: none !important; }
  .builder, .builder-grid, .preview-pane, .preview-stage { all: unset; }
  .preview-stage { overflow: visible; }
  .doc { box-shadow: none; }
}

@media (max-width: 980px) {
  .hero-grid, .builder-grid, .mode-toggle, .template-grid { grid-template-columns: 1fr; }
  .preview-pane { position: static; }
  .doc-bold .split, .doc-neon .grid, .doc-gallery .projects, .doc-split { grid-template-columns: 1fr; }
  .doc-split .side { margin: 0 0 16px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 24px); }
  .row-2, .skill-row, .mini-2 { grid-template-columns: 1fr; }
  .topnav { display: none; }
}
/* ————————————————————————————— personality ————————————————————————————— */

/* hand-drawn underline behind a hero word */
.scribble { position: relative; display: inline-block; }
.scribble-line {
  position: absolute; left: -4%; bottom: -0.28em; width: 108%; height: 0.34em;
  color: var(--sun); opacity: 0.85; overflow: visible;
}
.scribble-line path {
  stroke-dasharray: 240; stroke-dashoffset: 240;
  animation: scribble-draw 0.9s 0.25s ease forwards;
}
@keyframes scribble-draw { to { stroke-dashoffset: 0; } }

/* emoji row — gentle float, staggered */
.emoji-row { display: flex; gap: 10px; font-size: 1.4rem; margin-top: 20px; }
.emoji-row span { display: inline-block; animation: emoji-float 3.4s ease-in-out infinite; }
.emoji-row span:nth-child(1) { animation-delay: 0s; }
.emoji-row span:nth-child(2) { animation-delay: 0.35s; }
.emoji-row span:nth-child(3) { animation-delay: 0.7s; }
.emoji-row span:nth-child(4) { animation-delay: 1.05s; }
.emoji-row span:nth-child(5) { animation-delay: 1.4s; }
.emoji-row span:nth-child(6) { animation-delay: 1.75s; }
.emoji-row span:nth-child(7) { animation-delay: 2.1s; }
@keyframes emoji-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}

/* typing bar */
.typing-bar {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px;
  font-family: var(--mono); font-size: 0.85rem; color: var(--muted);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.typing-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--sun);
  box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.5); animation: typing-pulse 1.4s infinite;
}
@keyframes typing-pulse {
  0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(234, 88, 12, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0); }
}
.typing-caret {
  display: inline-block; width: 2px; height: 1em; background: var(--sun-ink);
  animation: caret-blink 1s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }

/* button bounce + press */
.btn { transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn.is-bounce { animation: btn-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes btn-bounce {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  60% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.mode-btn, .template-card { transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease; }
.mode-btn:hover, .template-card:hover { transform: translateY(-2px); }

/* ink-drop focus bloom on form fields */
.editor input, .editor textarea, .hero-card textarea { transition: box-shadow 0.3s ease, border-color 0.2s ease; }
.ink-drop { animation: ink-drop 0.5s ease; }
@keyframes ink-drop {
  0% { box-shadow: 0 0 0 0 rgba(234, 88, 12, 0.35); }
  100% { box-shadow: 0 0 0 10px rgba(234, 88, 12, 0); }
}

/* sparkle cursor trail */
.sparkle {
  position: fixed; z-index: 95; pointer-events: none; user-select: none;
  font-size: 0.85rem; color: var(--sun);
  animation: sparkle-fade 0.7s ease forwards;
}
@keyframes sparkle-fade {
  0% { transform: translate(-50%, -50%) scale(0.4) rotate(0deg); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.1) rotate(35deg) translateY(-14px); opacity: 0; }
}

/* confetti burst */
.confetti-piece {
  position: fixed; z-index: 96; width: 8px; height: 12px; pointer-events: none;
  animation: confetti-fly 0.9s ease-out forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--cx), var(--cy)) rotate(var(--cr)); opacity: 0; }
}

/* toast variants — a touch of personality */
.toast { animation: toast-in 0.28s cubic-bezier(0.34, 1.56, 0.64, 1); }
.toast-emoji { margin-right: 8px; }
.toast.toast-accent { background: var(--sun); }
.toast.toast-soft { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
@keyframes toast-in {
  from { transform: translateY(14px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* pop-in for freshly rendered preview docs */
.preview-stage .doc { animation: doc-pop 0.32s ease; }
@keyframes doc-pop {
  from { transform: translateY(8px); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

/* Teejay chat */
.chat { margin-top: 28px; }
.chat-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); border: 2px solid var(--line); border-radius: 999px;
  padding: 10px 16px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.chat-toggle:hover { transform: translateY(-2px); border-color: var(--sun); }
.chat-toggle-dot {
  width: 9px; height: 9px; border-radius: 50%; background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); animation: typing-pulse 1.8s infinite;
}
.chat-toggle-hint { font-weight: 400; color: var(--faint); font-size: 0.82rem; }
.chat-panel {
  margin-top: 12px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; max-width: 720px;
}
.chat-log { display: grid; gap: 10px; max-height: 320px; overflow-y: auto; margin-bottom: 12px; }
.chat-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: 0.9rem; line-height: 1.45; }
.chat-msg.is-teejay { background: var(--cream); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.chat-msg.is-you { background: var(--sun); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; font: inherit; color: var(--ink); background: #fff;
  border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.chat-form input:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15); }
.chat-form .btn-primary { width: auto; margin: 0; }
.chat-hint { font-size: 0.78rem; color: var(--faint); margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  .emoji-row span, .typing-dot, .typing-caret, .preview-stage .doc { animation: none !important; }
  .scribble-line path { animation: none; stroke-dashoffset: 0; }
}

@media print {
  .chat, .sparkle, .confetti-piece { display: none !important; }
}
