@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Playfair+Display:wght@400;500;600;700&display=swap");

:root {
  --font-outfit: "Outfit", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #0b0e13;
  --muted: #747984;
  --panel: #fffdfa;
  --line: #ded9d1;
  --ui-accent: #96d6d0;
  --blue: #154fbc;
  --nav: #0a1017;
  --shadow: 0 30px 80px rgba(24, 19, 14, 0.22);
  --radius: 8px;
  font-family: var(--font-outfit);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #ece8e2;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-outfit);
  background:
    radial-gradient(circle at 73% 24%, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(135deg, #fffdfa 0%, #f0ece6 47%, #ded8d0 100%);
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.sprite,
.template-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app-shell {
  display: grid;
  grid-template-columns: 88px minmax(650px, 760px) minmax(610px, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  padding: 36px 12px 22px;
  color: #f7f9fb;
  background:
    radial-gradient(circle at 94% 8%, rgba(150, 214, 208, 0.13), transparent 23%),
    linear-gradient(180deg, #0c141d 0%, #060a10 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 0 54px;
  color: #f7f9fb;
  text-decoration: none;
  border-radius: 18px;
  background:
    radial-gradient(circle at 74% 20%, rgba(150, 214, 208, 0.34), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

.brand-icon {
  display: block;
  width: 40px;
  height: 40px;
}


.nav-list {
  display: grid;
  gap: 10px;
}

.nav-link {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  min-height: 52px;
  padding: 0;
  color: #f4f7f9;
  text-decoration: none;
  border-radius: var(--radius);
}

.nav-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.nav-link.is-active {
  color: var(--ui-accent);
  background: rgba(255, 255, 255, 0.08);
}

.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: -12px;
  width: 4px;
  height: 52px;
  background: var(--ui-accent);
}

.builder-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  height: 100vh;
  padding: 35px 28px 0 38px;
  background: rgba(255, 253, 250, 0.72);
  border-right: 1px solid rgba(168, 160, 150, 0.28);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.builder-header {
  margin-bottom: 28px;
}

.builder-header h1 {
  margin: 0 0 5px;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.builder-header p,
.template-heading p {
  margin: 0;
  color: #565b64;
  font-size: 14px;
  line-height: 1.45;
}

.builder-grid {
  display: grid;
  /* Style column includes 16px side padding so thumbnail shadows aren't clipped. */
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 14px;
  min-height: 0;
  overflow: hidden;
}

.form-column {
  min-height: 0;
  padding-right: 30px;
  padding-bottom: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--line);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.form-column::-webkit-scrollbar,
.template-panel::-webkit-scrollbar,
.template-list::-webkit-scrollbar,
.top-actions::-webkit-scrollbar {
  display: none;
}

.template-list,
.top-actions {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.editor-form {
  display: grid;
  gap: 2px;
}

.form-section {
  margin-bottom: 18px;
  padding: 0;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(214, 209, 201, 0.82);
  border-radius: var(--radius);
}

.form-section[open] {
  padding-bottom: 16px;
}

.form-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 0 15px;
  color: #11151b;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.form-section summary::-webkit-details-marker {
  display: none;
}

.form-section summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid #68707a;
  border-bottom: 2px solid #68707a;
  transform: rotate(45deg);
  transition: transform 160ms ease, border-color 160ms ease;
}

.form-section[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
  border-color: #11151b;
}

.form-section summary:focus-visible {
  outline: 3px solid rgba(150, 214, 208, 0.4);
  outline-offset: 2px;
}

.form-section summary span {
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0;
}

.section-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 20px;
  row-gap: 15px;
  padding: 0 15px;
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field .field-label {
  color: #545a63;
  font-size: 12px;
  font-weight: 650;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.field-hint {
  margin: 0;
  color: #7a7f87;
  font-size: 11.5px;
  line-height: 1.4;
}

.photo-control {
  display: flex;
  align-items: center;
  gap: 16px;
}

.photo-control-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 80px;
  object-fit: cover;
  object-position: center top;
  background: #e4e4e4;
  border: 1px solid #d2ccc3;
  border-radius: var(--radius);
}

.photo-control-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.photo-control-actions {
  display: grid;
  gap: 6px;
}

.photo-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.secondary-action.small-action,
.primary-action.small-action {
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
  font-size: 12.5px;
}

/* The upload control is a <label>, so override the form's field-label styling. */
.field label.primary-action.small-action {
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
}

.primary-action.small-action.small-action {
  padding: 0 12px 0 10px;
  box-shadow: 0 8px 16px rgba(8, 11, 16, 0.16);
}

.small-action svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.secondary-action.small-action.icon-action {
  width: 36px;
  padding: 0;
}

.icon-action svg {
  fill: currentColor;
  stroke: none;
}

.small-action.is-active {
  background: #fff;
  border-color: #0b0f15;
  box-shadow: 0 0 0 1px #0b0f15;
}

.photo-control-row label:has(+ input:focus-visible) {
  outline: 2px solid #0b0f15;
  outline-offset: 2px;
}

.pill-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-option {
  min-height: 30px;
  padding: 0 13px;
  color: #3b414a;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(194, 188, 181, 0.68);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.pill-option:hover {
  background: #fff;
}

.pill-option.is-active {
  color: #fff;
  background: #0b0f15;
  border-color: #0b0f15;
}

.avatar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.avatar-option {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #e9e6e0;
  border: 1px solid rgba(194, 188, 181, 0.68);
  border-radius: var(--radius);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

/* Zoom toward the face so each avatar reads at button size. */
.avatar-option img {
  display: block;
  width: 150%;
  max-width: none;
  margin: -2px 0 0 -25%;
}

/* Portrait faces sit higher and left of center, gazing up. */
.portrait-option img {
  width: 165%;
  margin: -4px 0 0 -22%;
}

.avatar-option:hover {
  transform: translateY(-1px);
}

.avatar-option.is-active {
  border-color: #0b0f15;
  box-shadow: 0 0 0 1px #0b0f15;
}

.logo-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.logo-option {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #545a63;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(194, 188, 181, 0.68);
  border-radius: var(--radius);
  font-size: 10.5px;
  font-weight: 700;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.logo-option:hover {
  background: #fff;
}

.logo-option.is-active {
  color: #0b0f15;
  background: #fff;
  border-color: #0b0f15;
  box-shadow: 0 0 0 1px #0b0f15;
}

.logo-option-icon {
  display: block;
  width: 20px;
  height: 20px;
  color: #0b0f15;
  fill: currentColor;
}

.logo-option-initials {
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

.logo-option-off {
  fill: none;
  stroke: currentColor;
  stroke-width: 8;
}

input,
textarea {
  width: 100%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid #d2ccc3;
  border-radius: var(--radius);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input {
  height: 40px;
  padding: 0 14px;
}

textarea {
  min-height: 112px;
  padding: 14px 14px 24px;
  resize: vertical;
  line-height: 1.52;
}

input:focus,
textarea:focus {
  background: #fff;
  border-color: #4fa9a1;
  box-shadow: 0 0 0 3px rgba(150, 214, 208, 0.2);
}

.counter {
  position: absolute;
  right: 13px;
  bottom: 9px;
  color: #68707a;
  font-size: 11px;
}

.entry-card {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid #d6d1c9;
  border-radius: var(--radius);
}

.entry-card h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #1a1d22;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.template-panel {
  min-width: 0;
  min-height: 0;
  padding: 0 16px 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.template-heading {
  margin-bottom: 23px;
}

.template-heading h2 {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.2;
}

.template-list {
  display: grid;
  gap: 24px;
}

.template-card {
  display: grid;
  gap: 11px;
}

.template-option {
  display: grid;
  gap: 11px;
  cursor: pointer;
}

.template-preview {
  position: relative;
  display: block;
  aspect-ratio: 8.5 / 11;
  overflow: hidden;
  background: #f8f6f2;
  border: 1px solid #d5d0c8;
  border-radius: var(--radius);
  box-shadow: 0 10px 22px -6px rgba(28, 22, 16, 0.14);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.template-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}

.template-option strong {
  margin-left: 12px;
  color: #1a1d22;
  font-size: 13px;
  line-height: 1;
}

.style-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-left: 12px;
  margin-top: -2px;
}

.color-swatch {
  width: 21px;
  height: 21px;
  padding: 0;
  cursor: pointer;
  background: var(--swatch);
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(14, 18, 24, 0.18), 0 4px 10px rgba(14, 18, 24, 0.12);
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.template-card-elegant .color-swatch {
  background: linear-gradient(135deg, var(--swatch) 0 50%, var(--swatch-secondary) 50% 100%);
}

.color-swatch:hover,
.color-swatch:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(14, 18, 24, 0.24), 0 6px 14px rgba(14, 18, 24, 0.16);
}

.color-swatch.is-active {
  box-shadow: 0 0 0 2px #10151d, 0 0 0 5px rgba(255, 255, 255, 0.95), 0 8px 16px rgba(14, 18, 24, 0.16);
}

#template-modern:checked ~ .app-shell .option-modern .template-preview,
#template-elegant:checked ~ .app-shell .option-elegant .template-preview,
#template-structured:checked ~ .app-shell .option-structured .template-preview,
#template-creative:checked ~ .app-shell .option-creative .template-preview {
  border-color: var(--ui-accent);
  box-shadow: 0 0 0 2px var(--ui-accent), 0 12px 24px -6px rgba(28, 22, 16, 0.2);
  transform: translateY(-1px);
}

#template-modern:checked ~ .app-shell .option-modern .template-preview::before,
#template-elegant:checked ~ .app-shell .option-elegant .template-preview::before,
#template-structured:checked ~ .app-shell .option-structured .template-preview::before,
#template-creative:checked ~ .app-shell .option-creative .template-preview::before {
  content: "";
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  width: 15px;
  height: 15px;
  background: var(--ui-accent);
  border-radius: 3px;
  box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.13);
}

.saved-resumes-panel {
  min-height: 0;
  padding-right: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.saved-resumes-panel::-webkit-scrollbar {
  display: none;
}

.saved-resumes-panel h1 {
  margin: 0 0 22px;
  color: #11151b;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.saved-resumes-list {
  display: grid;
  gap: 14px;
}

.saved-resume-card {
  display: grid;
  grid-template-columns: 144px minmax(220px, 1.5fr) minmax(140px, 0.75fr) minmax(180px, 0.85fr) auto;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(214, 209, 201, 0.9);
  border-radius: var(--radius);
}

.saved-resume-thumb {
  display: block;
  width: 144px;
  aspect-ratio: 8.5 / 11;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d5d0c8;
  border-radius: 4px;
  box-shadow: 0 8px 16px -8px rgba(28, 22, 16, 0.3);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.saved-resume-thumb:hover,
.saved-resume-thumb:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px -8px rgba(28, 22, 16, 0.36);
}

.saved-resume-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.saved-resume-card h2 {
  margin: 0 0 5px;
  color: #11151b;
  font-size: 18px;
  line-height: 1.2;
}

.saved-resume-card p {
  margin: 0;
  color: #626974;
  font-size: 12px;
  line-height: 1.4;
}

.saved-resume-style,
.saved-resume-date {
  font-weight: 800;
}

.saved-resume-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.saved-resume-actions button {
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 800;
}

.saved-resume-load {
  color: #fff;
  background: #0b0f15;
  border: 1px solid #0b0f15;
}

.saved-resume-delete {
  color: #5b2222;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(170, 78, 78, 0.32);
}

.saved-resumes-empty {
  margin: 0;
  padding: 24px 18px;
  color: #626974;
  background: rgba(255, 255, 255, 0.48);
  border: 1px dashed rgba(168, 160, 150, 0.58);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
}

.app-shell.is-saved-page .builder-panel {
  grid-column: 2 / -1;
  padding-right: 56px;
  border-right: 0;
}

.app-shell.is-saved-page .builder-grid {
  display: none !important;
}

.app-shell.is-saved-page .builder-header {
  display: none;
}

.app-shell.is-saved-page .preview-pane {
  display: none;
}

.app-shell:not(.is-saved-page) .saved-resumes-panel {
  display: none !important;
}

.app-shell.is-saved-page .saved-resumes-panel {
  display: block !important;
  width: min(100%, 1120px);
  padding-right: 0;
}

.app-shell.is-saved-page .saved-resumes-list {
  gap: 16px;
}

.app-shell.is-saved-page .saved-resume-card {
  padding: 18px;
}

.preview-pane {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 100vh;
  height: 100vh;
  /* No bottom padding: the stage scrolls to the window edge instead of stopping short. */
  padding: 13.5px 17px 0;
  overflow: hidden;
}

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 51px;
  margin-bottom: 23px;
}

.top-actions-left,
.top-actions-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.top-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.top-actions svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.secondary-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.secondary-action:disabled,
.primary-action:disabled {
  cursor: wait;
  opacity: 0.66;
}

.secondary-action {
  padding: 0 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(194, 188, 181, 0.68);
}

.primary-action {
  padding: 0 18px 0 22px;
  color: #fff;
  background: #0b0f15;
  border: 1px solid #0b0f15;
  box-shadow: 0 14px 24px rgba(8, 11, 16, 0.2);
}

.primary-action span {
  align-self: stretch;
  width: 1px;
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.16);
}

.paper-stage {
  display: block;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  /* Room for the paper's full drop shadow (0 30px 80px) on every side. */
  padding: 36px 48px 104px;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

@media screen {
  /* Scale the fixed-size paper to fit the stage instead of clipping it; app.js sets --paper-zoom. */
  .paper-stage .resume-paper {
    margin: 0 auto;
    zoom: var(--paper-zoom, 1);
  }
}

.paper-stage::-webkit-scrollbar {
  display: none;
}

.resume-paper {
  --accent: #96d6d0;
  --accent-ink: #0b0e13;
  --accent-contrast: #0b0e13;
  --accent-on-dark: var(--accent);
  --paper-bg: #ffffff;
  --side-bg: #f7f8f2;
  --rule: #c8c5bd;
  --resume-muted: #5d626a;
  position: relative;
  display: grid;
  grid-template-columns: 25% minmax(0, 1fr);
  gap: 28px;
  width: min(120%, 912px);
  aspect-ratio: 8.5 / 11;
  padding: 18px;
  color: #0a0d12;
  background: var(--paper-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font-outfit);
}

body.is-exporting-image .resume-paper {
  box-shadow: none;
}

.resume-export-host .resume-paper {
  width: 912px !important;
  height: 1181px !important;
  max-width: none !important;
  box-shadow: none !important;
}

.resume-export-host .contact-row {
  flex-wrap: nowrap;
}

.resume-export-host .contact-item {
  flex: 0 0 auto;
  white-space: nowrap;
}

.resume-export-host .project-meta a {
  white-space: nowrap;
}

.resume-export-host.is-html2canvas .timeline-date,
.resume-export-host.is-html2canvas .project-meta {
  transform: translateX(-4px);
}

.resume-export-host .template-modern .portrait::before {
  display: none;
}

.export-modern-photo-shape {
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  fill: var(--accent);
  pointer-events: none;
  z-index: 0;
}

.live-resume.template-modern {
  font-family: var(--font-outfit);
}

.live-resume.template-modern .contact-item svg {
  color: #0b0e13;
}

.live-resume.template-modern .monogram {
  width: 55px;
  height: 55px;
}

.live-resume.template-elegant {
  --accent: #b9704f;
  --accent-secondary: #718679;
  --accent-ink: #25352f;
  --paper-bg: #fffdfa;
  --side-bg: #fffdfa;
  --rule: #d8cfc4;
  grid-template-columns: 34% minmax(0, 1fr);
  gap: 0;
  padding: 36px;
}

.live-resume.template-elegant::before {
  content: "";
  position: absolute;
  top: 315px;
  right: 36px;
  left: 36px;
  height: 1px;
  background: var(--rule);
}

.live-resume.template-structured {
  --accent: #154fbc;
  --accent-ink: #0f2f73;
  --paper-bg: #ffffff;
  --side-bg: #ffffff;
  --rule: #1f242c;
  grid-template-columns: 30% minmax(0, 1fr);
  gap: 34px;
  padding: 30px 42px 34px 26px;
}

.template-structured .resume-main .resume-section + .resume-section {
  margin-top: 16px;
}

.template-structured .timeline {
  gap: 12px;
}

.template-structured .timeline-item {
  row-gap: 6px;
}

.template-structured .project-item p {
  line-height: 1.45;
}

.template-structured .project-item {
  padding-bottom: 10px;
}

.template-structured .project-item + .project-item {
  padding-top: 10px;
}

.live-resume.template-creative {
  --accent: #1457c9;
  --accent-ink: #0b2d75;
  --paper-bg: #fffefd;
  --side-bg: #fffefd;
  --rule: #bfc4cc;
  grid-template-columns: 28% minmax(0, 1fr);
  gap: 32px;
  padding: 30px 42px 34px 30px;
}

.resume-paper::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: var(--accent);
}

.resume-side {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 22px 21px 24px;
  background: var(--side-bg);
  border-right: 1px solid var(--rule);
}

.live-resume.template-modern .resume-side {
  padding: 0 0 24px;
}

.live-resume.template-modern .resume-side > :not(.portrait) {
  margin-right: 21px;
  margin-left: 21px;
}

.portrait {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  color: var(--accent-ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.08)),
    var(--accent);
  border-radius: 4px;
  font-size: 55.2px;
  font-weight: 900;
  letter-spacing: 0.12em;
  overflow: hidden;
}

.portrait img {
  grid-area: 1 / 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 1;
}

.live-resume.template-modern .portrait {
  aspect-ratio: 4 / 5;
  background: #e1e1e1;
  border-radius: 0;
}

.live-resume.template-modern .portrait::before {
  content: "";
  grid-area: 1 / 1;
  align-self: stretch;
  justify-self: stretch;
  width: 100%;
  height: 100%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='1122' height='1402' viewBox='0 0 1122 1402' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M618.375 622.898C615.629 630.565 204.981 884.196 0 1010.05V1402H1122V0C955.269 204.438 621.121 615.232 618.375 622.898Z' fill='black'/%3E%3C/svg%3E") center / cover no-repeat;
  mask: url("data:image/svg+xml,%3Csvg width='1122' height='1402' viewBox='0 0 1122 1402' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M618.375 622.898C615.629 630.565 204.981 884.196 0 1010.05V1402H1122V0C955.269 204.438 621.121 615.232 618.375 622.898Z' fill='black'/%3E%3C/svg%3E") center / cover no-repeat;
  pointer-events: none;
  z-index: 0;
}

.resume-tagline {
  margin: 0;
  max-width: 170px;
  font-size: 19.2px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.resume-main {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px 0 18px;
}

.resume-head {
  position: relative;
  padding-right: 52px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule);
}

.monogram {
  position: absolute;
  top: -18px;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--accent-contrast);
  background: var(--accent);
  border-radius: 0;
  font-size: 15.6px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.monogram-logo {
  display: block;
  width: 68%;
  height: 68%;
  fill: currentColor;
  stroke: none;
}

.monogram[hidden] {
  display: none;
}

.monogram-logo.monogram-shape {
  width: 52%;
  height: 52%;
}

.live-resume.template-modern .monogram.is-initials {
  font-size: 18px;
}

.resume-head h1 {
  margin: 0;
  font-size: 51.6px;
  line-height: 0.96;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume-head h1 strong {
  display: block;
  font-weight: 900;
}

.resume-head p {
  margin: 16px 0 19px;
  color: var(--accent-ink);
  font-size: 13.2px;
  font-weight: 800;
  letter-spacing: 0.46em;
  text-transform: uppercase;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  color: #242931;
  font-size: 10.8px;
  line-height: 1.3;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.contact-item svg {
  width: 13px;
  height: 13px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.contact-item span,
.contact-item a {
  color: inherit;
  min-width: 0;
  text-decoration: none;
}

.resume-section {
  padding-top: 20px;
}

.resume-section + .resume-section {
  margin-top: 20px;
  border-top: 1px solid var(--rule);
}

.resume-section h2 {
  margin: 0 0 14px;
  font-size: 14.4px;
  line-height: 1;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.resume-section h3 {
  margin: 0 0 7px;
  color: var(--accent-ink);
  font-size: 9.6px;
  line-height: 1.2;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.resume-section p {
  margin: 0;
  font-size: 12.6px;
  line-height: 1.55;
}

.compact-section {
  padding-top: 0;
}

.elegant-profile-section {
  display: none;
}

.structured-contact-list,
.structured-intro {
  display: none;
}

.compact-section h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin-top: 8px;
  background: var(--accent);
}

.compact-section + .compact-section {
  margin-top: 0;
  padding-top: 20px;
}

.resume-list {
  display: grid;
  gap: 5px;
  margin: 0 0 17px;
  padding: 0;
  list-style: none;
  font-size: 11.4px;
  line-height: 1.28;
}

.resume-list li {
  position: relative;
  padding-left: 10px;
}

.resume-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 3px;
  height: 3px;
  background: var(--accent-ink);
  border-radius: 50%;
}

.education-item + .education-item {
  margin-top: 14px;
}

.education-item strong,
.timeline-item strong,
.project-item strong {
  display: block;
  font-size: 13.2px;
  line-height: 1.3;
}

.education-item span,
.timeline-item .meta,
.project-item span {
  display: block;
  color: #3b414a;
  font-size: 10.8px;
  line-height: 1.35;
}

.timeline {
  position: relative;
  display: grid;
  gap: 17px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 8px;
  width: 1px;
  background: var(--rule);
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 8px;
}

.timeline-copy {
  min-width: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  margin: 3px 0 0 4px;
  background: var(--accent);
  border: 2px solid var(--accent-ink);
  border-radius: 50%;
}

.timeline-date {
  color: #0d1117;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
}

.timeline-summary {
  grid-column: 2 / -1;
  margin: 0;
  color: #0d1117;
  font-size: 11.4px;
  line-height: 1.38;
}

.timeline-bullets {
  grid-column: 2 / -1;
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 14px;
  font-size: 11.4px;
  line-height: 1.38;
}

.projects-section {
  margin-top: auto;
}

.project-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 0 0 14px;
}

.project-item + .project-item {
  padding-top: 14px;
  border-top: 1px solid var(--rule);
}

.project-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent-on-dark);
  background: #0b0e13;
  font-size: 20.4px;
  font-weight: 900;
}

.project-item p {
  margin-top: 4px;
  font-size: 10.8px;
}

.project-meta {
  text-align: right;
  white-space: nowrap;
}

.project-meta b {
  display: block;
  margin-bottom: 7px;
  font-size: 10.8px;
}

.project-meta a {
  color: #0b0e13;
  font-size: 9.6px;
  font-weight: 900;
  text-decoration: none;
}

.template-elegant .resume-side {
  gap: 0;
  padding: 22px 28px 0 0;
  overflow: visible;
  background: transparent;
  border-right: 0;
  border-top: 0;
}

.template-elegant .resume-side::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 0;
  z-index: 0;
  width: 56px;
  height: 80px;
  background-image: radial-gradient(#11151c 1.35px, transparent 1.5px);
  background-size: 15px 15px;
  opacity: 0.8;
}

.template-elegant .portrait {
  z-index: 1;
  width: calc(100% - 26px);
  margin: 4px 0 34px 26px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  color: #fffdfa;
}

.template-elegant .portrait::before {
  content: "";
  position: absolute;
  top: -14px;
  right: 6px;
  z-index: 0;
  width: 54%;
  height: 58%;
  background: var(--accent);
  border-radius: 999px 999px 0 0;
  opacity: 0.9;
}

.template-elegant .portrait::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: -26px;
  z-index: 2;
  width: 45%;
  aspect-ratio: 1;
  background: var(--accent-secondary);
  border-radius: 0 100% 0 0;
}

.template-elegant .portrait img {
  align-self: end;
  justify-self: end;
  width: 82%;
  height: 94%;
  background: #ebe8e0;
  border-radius: 999px 999px 2px 2px;
  filter: grayscale(1);
  object-position: center top;
}

.template-elegant .resume-tagline,
.template-elegant .monogram {
  display: none;
}

.template-elegant .elegant-profile-section {
  display: block;
}

.template-elegant .elegant-profile-section + .compact-section {
  margin-top: 20px;
}

.template-elegant .main-profile-section {
  display: none;
}

.template-elegant .main-profile-section + .resume-section {
  margin-top: 0;
  border-top: 0;
}

.template-elegant .resume-main {
  padding: 28px 0 0;
}

.template-elegant .resume-head {
  min-height: 238px;
  padding: 0 0 34px;
  border-bottom: 0;
}

.template-elegant .resume-head h1 {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  color: #20242a;
  font-size: 90px;
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.01em;
  text-transform: none;
}

.template-elegant .resume-head h1 strong {
  display: inline;
  font-weight: 400;
}

.template-elegant .resume-head p {
  margin: 20px 0 26px;
  color: var(--accent);
  font-size: 13.2px;
  letter-spacing: 0.28em;
}

.template-elegant .contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 16px;
  color: #333941;
  font-size: 10.8px;
}

.template-elegant .contact-item {
  gap: 6px;
}

.template-elegant .contact-item svg {
  color: #728177;
}

.template-elegant .resume-section {
  padding-top: 16px;
}

.template-elegant .resume-section + .resume-section {
  margin-top: 16px;
}

.template-elegant .timeline {
  gap: 10px;
}

.template-elegant .resume-section h2 {
  margin-bottom: 12px;
}

.template-elegant .timeline-item {
  row-gap: 6px;
}

.template-elegant .timeline-summary {
  font-size: 12px;
  line-height: 1.5;
}

.template-elegant .project-item {
  padding-bottom: 8px;
}

.template-elegant .project-item + .project-item {
  padding-top: 8px;
}

.template-elegant .project-item p {
  line-height: 1.45;
}

.template-elegant .resume-section h2::after {
  content: "";
  display: block;
  width: 34px;
  height: 2px;
  margin-top: 9px;
  background: var(--accent);
}

.live-resume.template-elegant::after {
  height: 0;
  width: 0;
}

.template-structured .resume-side {
  position: relative;
  gap: 24px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border-right: 0;
}

.template-structured .resume-side::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -26px;
  z-index: 0;
  width: 94%;
  height: 323px;
  background: #242a31;
}

.template-structured .portrait {
  z-index: 1;
  align-self: end;
  width: calc(100% - 22px);
  margin: 36px 0 0 22px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #eee8dc;
  border-radius: 130px 0 0 0;
  color: #fff;
}

/* Leave headroom so the rounded corner never clips the top of the head. */
.template-structured .portrait img {
  align-self: end;
  height: 88%;
  filter: grayscale(1);
  object-position: center top;
}

.resume-paper.is-vibrant-photo .portrait img {
  filter: none;
}

.template-structured .structured-contact-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin-top: 22px;
  color: #232831;
  font-size: 15.1px;
  line-height: 1.2;
}

.template-structured .structured-contact-list .contact-item {
  gap: 12.6px;
}

.template-structured .structured-contact-list svg {
  width: 22.4px;
  height: 22.4px;
  padding: 4.2px;
  color: #ffffff;
  background: #1f252d;
  border-radius: 50%;
  stroke-width: 2.4;
}

.template-structured .resume-tagline {
  display: none;
}

.template-structured .resume-main {
  padding: 32px 0 0;
}

.template-structured .resume-head {
  min-height: 226px;
  padding: 0 54px 28px 0;
  border-bottom: 1px solid var(--rule);
}

.template-structured .resume-head h1 {
  color: #1f242c;
  font-size: 48px;
  line-height: 1.16;
  font-weight: 500;
  letter-spacing: 0.28em;
}

.template-structured .resume-head h1 strong {
  font-weight: 500;
}

.template-structured .resume-head > p {
  margin: 14px 0 18px;
  color: var(--accent);
  font-size: 13.8px;
  letter-spacing: 0.42em;
}

.template-structured .structured-intro {
  display: grid;
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  max-width: 500px;
}

.template-structured .structured-intro span {
  width: 22px;
  height: 1px;
  margin-top: 9px;
  background: #1f242c;
}

.template-structured .structured-intro p {
  margin: 0;
  color: #20242a;
  font-size: 12px;
  line-height: 1.48;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 400;
}

.template-structured .resume-head .contact-row {
  display: none;
}

.template-structured .monogram {
  top: 0;
  right: 0;
  width: 52px;
  height: 52px;
  color: var(--accent);
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  font-weight: 500;
}

.template-structured .monogram::before {
  display: none;
}

.template-structured .main-profile-section {
  display: none;
}

.template-structured .main-profile-section + .resume-section {
  margin-top: 0;
  border-top: 0;
}

.template-structured .project-mark {
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.live-resume.template-structured::after {
  height: 0;
}

.live-resume.template-creative::after {
  height: 0;
}

.template-creative .resume-side {
  gap: 20px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
}

.template-creative .resume-side::before {
  content: "";
  position: absolute;
  top: -30px;
  left: -30px;
  z-index: 0;
  width: 158px;
  height: 178px;
  background: var(--accent);
  border-radius: 0 0 100% 0;
}

.template-creative .resume-side::after {
  content: "";
  position: absolute;
  top: 150px;
  right: -7px;
  z-index: 2;
  width: 58px;
  height: 88px;
  background-image: radial-gradient(#12161d 1.4px, transparent 1.5px);
  background-size: 14px 14px;
  opacity: 0.9;
  pointer-events: none;
}

.template-creative .portrait {
  z-index: 1;
  width: calc(100% - 20px);
  aspect-ratio: 4 / 5;
  margin: 26px 0 14px 14px;
  overflow: visible;
  background: transparent;
  border-radius: 0;
  color: #fff;
}

.template-creative .portrait::before {
  content: "";
  position: absolute;
  inset: 0 18px 14px 0;
  z-index: 0;
  background: #e4e4e4;
  border-radius: 999px 999px 0 999px;
}

.template-creative .portrait::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 0;
  width: 46%;
  height: 40%;
  background: #eee6d8;
  border-radius: 999px 999px 999px 0;
}

.template-creative .portrait img {
  position: relative;
  z-index: 1;
  align-self: stretch;
  justify-self: stretch;
  width: calc(100% - 18px);
  height: calc(100% - 14px);
  filter: grayscale(1);
  border-radius: 999px 999px 999px 0;
  object-position: center top;
}

.template-creative .structured-contact-list,
.template-creative .resume-tagline,
.template-creative .structured-intro {
  display: none;
}

.template-creative .elegant-profile-section {
  display: block;
}

.template-creative .main-profile-section {
  display: none;
}

.template-creative .main-profile-section + .resume-section {
  margin-top: 0;
  border-top: 0;
}

.template-creative .resume-main {
  padding: 22px 0 0;
}

.template-creative .resume-head {
  padding: 0 74px 18px 0;
  border-bottom: 0;
}

.template-creative .resume-head h1 {
  color: #111419;
  font-size: 48px;
  line-height: 1.06;
  font-weight: 900;
  letter-spacing: 0.26em;
}

.template-creative .resume-head h1 strong {
  font-weight: 900;
}

.template-creative .resume-head > p {
  position: relative;
  margin: 14px 0 18px;
  color: var(--accent);
  font-size: 14.4px;
  letter-spacing: 0.45em;
}

.template-creative .resume-head > p::after {
  content: "";
  display: block;
  width: 28px;
  height: 2px;
  margin-top: 14px;
  background: var(--accent);
}

.template-creative .contact-row {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 9px 28px;
  color: #252a31;
  font-size: 12.6px;
  line-height: 1.25;
}

.template-creative .contact-item {
  gap: 11px;
}

.template-creative .contact-item svg {
  width: 15px;
  height: 15px;
  color: #2d333b;
  stroke-width: 2.1;
}

.template-creative .monogram {
  top: -22px;
  right: 0;
  width: 64px;
  height: 64px;
  color: #111419;
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-indent: 0.42em;
}

.template-creative .monogram::before {
  display: none;
}

.template-creative .resume-section {
  padding-top: 0;
}

.template-creative .resume-section + .resume-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}

.template-creative .resume-section h2 {
  position: relative;
  margin-bottom: 16px;
  padding-left: 30px;
  color: #111419;
  font-size: 14.4px;
  letter-spacing: 0.42em;
}

.template-creative .resume-section h2::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
}

.template-creative .resume-section h2::after {
  content: "";
  display: block;
  width: 26px;
  height: 2px;
  margin-top: 12px;
  background: #111419;
}

.template-creative .elegant-profile-section h2::after,
.template-creative .resume-side .compact-section:nth-of-type(2) h2::after,
.template-creative .main-profile-section + .resume-section h2::after {
  display: none;
}

.template-creative .resume-section p {
  font-size: 12.6px;
  line-height: 1.5;
}

.template-creative .compact-section {
  padding-left: 0;
}

.template-creative .resume-list {
  gap: 6px;
  font-size: 12.4px;
}

.template-creative .resume-list li {
  padding-left: 22px;
}

.template-creative .resume-list li::before {
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--accent);
}

.template-creative .education-item strong,
.template-creative .timeline-item strong,
.template-creative .project-item strong {
  font-size: 14.2px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.template-creative .education-item span,
.template-creative .timeline-item .meta,
.template-creative .project-item span {
  font-size: 11.4px;
}

.template-creative .timeline {
  gap: 0;
}

.template-creative .timeline::before {
  display: none;
}

.template-creative .timeline-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 4px;
  padding-bottom: 11px;
}

.template-creative .timeline-item + .timeline-item {
  padding-top: 11px;
  border-top: 1px solid var(--rule);
}

.template-creative .timeline-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: 0;
  color: #ffffff;
  background: var(--accent);
  border: 0;
  border-radius: 50%;
}

.template-creative .timeline-dot::before {
  content: "\2197";
  font-size: 19px;
  line-height: 1;
  transform: translateY(-1px);
}

.template-creative .timeline-date {
  color: #20242a;
  font-size: 12.6px;
  font-weight: 500;
}

.template-creative .timeline-summary {
  font-size: 11.4px;
  line-height: 1.4;
}

.template-creative .timeline-bullets {
  grid-column: 2 / -1;
  gap: 3px;
  padding-left: 18px;
  font-size: 11.4px;
  line-height: 1.4;
}

.template-creative .project-mark {
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
}

.template-creative .project-item {
  padding-bottom: 8px;
}

.template-creative .project-item + .project-item {
  padding-top: 8px;
}

.template-creative .project-item p {
  font-size: 11.4px;
  line-height: 1.4;
}

@media (max-width: 1440px) {
  .app-shell {
    grid-template-columns: 88px minmax(600px, 660px) minmax(0, 1fr);
  }

  .sidebar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .builder-panel {
    padding-left: 30px;
    padding-right: 24px;
  }

  .app-shell.is-saved-page .builder-panel {
    padding-right: 40px;
  }

  .builder-grid {
    grid-template-columns: minmax(0, 1fr) 196px;
    gap: 6px;
  }

  .form-column {
    padding-right: 22px;
  }

  .preview-pane {
    padding-left: 12px;
    padding-right: 12px;
  }

  .resume-paper {
    padding: 15.5px;
    gap: 22px;
  }

  .live-resume.template-elegant {
    gap: 0;
    padding: 30px;
  }

  .live-resume.template-elegant::before {
    top: 300px;
    right: 30px;
    left: 30px;
  }

  .resume-head h1 {
    font-size: 44.4px;
  }

  .template-elegant .resume-head h1 {
    font-size: 48px;
  }

  .template-elegant .resume-head {
    min-height: 224px;
  }

  .secondary-action {
    padding: 0 20px;
  }

  .primary-action {
    padding: 0 16px 0 18px;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .sidebar {
    padding: 25px 9px 18px;
  }

  .brand {
    margin: 0 auto 35px;
  }

  .nav-link {
    justify-content: center;
    min-height: 48px;
    padding: 0;
  }

  .nav-link.is-active::before {
    left: -9px;
    height: 48px;
  }

  .builder-panel {
    min-height: auto;
    height: auto;
    overflow: visible;
    border-right: 0;
  }

  .app-shell.is-saved-page .builder-panel {
    grid-column: 2;
    padding-right: 30px;
  }

  .preview-pane {
    grid-column: 2;
    min-height: 780px;
    padding-top: 12px;
  }
}

@media (max-width: 850px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 14px 16px;
  }

  .brand {
    margin: 0;
  }

  .nav-list {
    display: flex;
    justify-content: center;
    gap: 6px;
  }

  .nav-link {
    width: 42px;
    min-height: 42px;
  }

  .nav-link.is-active::before {
    display: none;
  }

  .builder-panel,
  .preview-pane {
    grid-column: 1;
  }

  .app-shell.is-saved-page .builder-panel {
    grid-column: 1;
    padding-right: 18px;
  }

  .preview-pane {
    position: static;
    height: auto;
  }

  .builder-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .form-column {
    padding-right: 0;
    padding-bottom: 0;
    overflow: visible;
    border-right: 0;
  }

  .template-panel {
    padding: 0;
    overflow: visible;
  }

  .template-list {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .template-option {
    min-width: 120px;
  }

  .template-card {
    min-width: 120px;
  }

  .top-actions {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .resume-paper {
    width: min(120%, 780px);
  }
}

@media (max-width: 580px) {
  .builder-panel {
    padding: 26px 18px;
  }

  .builder-header h1 {
    font-size: 28px;
  }

  .section-fields,
  .entry-card {
    grid-template-columns: 1fr;
  }

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

  .saved-resume-actions {
    justify-content: flex-start;
  }

  .template-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .preview-pane {
    padding: 4px 8px 14px;
    min-height: 560px;
  }

  .secondary-action,
  .primary-action {
    min-height: 42px;
    padding-left: 14px;
    padding-right: 14px;
    font-size: 12px;
  }

  .resume-paper {
    padding: 10.5px;
    gap: 15px;
  }

  .live-resume.template-elegant {
    gap: 0;
    padding: 14px;
  }

  .live-resume.template-elegant::before {
    top: 164px;
    right: 14px;
    left: 14px;
  }

  .resume-side {
    padding: 15px 13px 18px;
  }

  .live-resume.template-modern .resume-side {
    padding: 0 0 18px;
  }

  .live-resume.template-modern .resume-side > :not(.portrait) {
    margin-right: 13px;
    margin-left: 13px;
  }

  .template-elegant .resume-side {
    padding: 10px 12px 0 0;
  }

  .template-elegant .resume-side::before {
    top: 14px;
    width: 34px;
    height: 48px;
    background-size: 10px 10px;
  }

  .template-elegant .portrait {
    width: calc(100% - 16px);
    margin: 0 0 20px 16px;
  }

  .template-elegant .portrait::after {
    left: -16px;
  }

  .template-elegant .resume-main {
    padding-top: 10px;
  }

  .template-elegant .resume-head {
    min-height: 128px;
    padding-bottom: 14px;
  }

  .resume-head h1 {
    font-size: 33.6px;
  }

  .template-elegant .resume-head h1 {
    font-size: 37.2px;
  }

  .template-elegant .resume-head p {
    margin: 10px 0 12px;
    font-size: 8.4px;
  }

  .template-elegant .contact-row {
    gap: 4px;
    font-size: 7.2px;
  }

  .live-resume.template-structured {
    gap: 16px;
    padding: 14px 16px 16px 12px;
  }

  .template-structured .resume-side::before {
    top: -14px;
    left: -12px;
    height: 108px;
  }

  .template-structured .portrait {
    width: calc(100% - 12px);
    margin: 16px 0 0 12px;
    border-radius: 70px 0 0 0;
  }

  .template-structured .structured-contact-list {
    gap: 5px;
    margin-top: 12px;
    font-size: 10.1px;
  }

  .template-structured .structured-contact-list .contact-item {
    gap: 7px;
  }

  .template-structured .structured-contact-list svg {
    width: 16.8px;
    height: 16.8px;
    padding: 2.8px;
  }

  .template-structured .resume-main {
    padding-top: 14px;
  }

  .template-structured .resume-head {
    min-height: 126px;
    padding-right: 26px;
    padding-bottom: 13px;
  }

  .template-structured .resume-head h1 {
    font-size: 24px;
  }

  .template-structured .resume-head > p {
    margin: 8px 0 9px;
    font-size: 7.8px;
  }

  .template-structured .structured-intro {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 8px;
  }

  .template-structured .structured-intro p {
    font-size: 7.2px;
  }

  .template-structured .monogram {
    width: 28px;
    height: 28px;
    font-size: 8px;
  }

  .resume-tagline {
    font-size: 13.2px;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0;
  }

  :root {
    --print-preview-width: 912px;
    --print-preview-height: 1180.235px;
    --print-page-inset: 8px;
    --print-letter-scale: 0.8771929825;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    width: 8.5in;
    height: 11in;
    background: #fff !important;
    overflow: hidden;
  }

  .sidebar,
  .builder-panel,
  .top-actions {
    display: none;
  }

  .app-shell,
  .preview-pane,
  .paper-stage {
    display: block;
    width: 8.5in;
    height: 11in;
    min-height: 0;
    padding: 0;
    overflow: visible;
  }

  .resume-paper {
    width: var(--print-preview-width);
    height: var(--print-preview-height);
    max-width: none;
    margin: var(--print-page-inset) 0 0 var(--print-page-inset);
    transform: none;
    zoom: var(--print-letter-scale);
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resume-paper,
  .resume-paper::before,
  .resume-paper::after,
  .resume-paper *::before,
  .resume-paper *::after,
  .portrait,
  .monogram,
  .project-mark,
  .timeline-dot,
  .resume-list li::before,
  .compact-section h2::after,
  .template-creative .resume-section h2::before {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .sprite {
    clip: auto;
    width: 0;
    height: 0;
  }

  .resume-paper svg {
    display: inline-block !important;
    overflow: visible !important;
    color: currentColor;
    fill: none;
    stroke: currentColor;
  }

  .resume-paper .monogram-logo,
  .resume-paper .monogram-logo path {
    fill: currentColor !important;
    stroke: none !important;
  }
}

