:root {
  --white: #fff;
  --tint: #f0f4ff;
  --tint-2: #e4eaf8;
  --border: #d0d7e8;
  --text: #0a0e1a;
  --text-2: #3d4a66;
  --text-3: #7985a0;
  --accent: #4169e1;
  --accent-hi: #2a52cc;
  --accent-bg: rgba(65, 105, 225, .08);
  --carbon-black: #0a0e1a;
  --font: 'DM Sans', sans-serif;
  --mono: 'DM Mono', monospace
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0
}

body {
  font-family: var(--font);
  background: var(--tint);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column
}

/* NAV */
.rb-nav {
  height: 56px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  flex-shrink: 0
}

.rb-nav-logo {
  font-size: .95rem;
  font-weight: 700;
  color: var(--carbon-black);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px
}

.rb-nav-badge {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--carbon-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: .5rem;
  color: #fff
}

.rb-nav-tag {
  font-family: var(--mono);
  font-size: .58rem;
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-bg);
  padding: 3px 10px;
  border-radius: 100px
}

.rb-spacer {
  flex: 1
}

.rb-btn {
  font-size: .78rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 5px
}

.rb-btn:hover {
  background: var(--accent-bg);
  color: var(--accent);
  border-color: rgba(65, 105, 225, .3)
}

.rb-btn-primary {
  background: var(--carbon-black);
  color: #fff;
  border-color: var(--carbon-black)
}

.rb-btn-primary:hover {
  background: #1a2035
}

.rb-btn-accent {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent)
}

/* LAYOUT */
.rb-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  grid-template-rows: 100%;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 56px);
  min-height: 0;
}

/* SIDEBAR */
.rb-sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.rb-panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10
}

.rb-panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px
}

.rb-panel-header p {
  font-size: .75rem;
  color: var(--text-2)
}

/* TEMPLATE SELECTOR */
.rb-tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border)
}

.rb-tpl-item {
  padding: 8px 4px;
  border: 2px solid var(--border);
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  font-size: .6rem;
  font-weight: 600;
  color: var(--text-3)
}

.rb-tpl-item:hover {
  border-color: rgba(65, 105, 225, .3);
  background: var(--accent-bg)
}

.rb-tpl-item.active {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent)
}

.rb-tpl-icon {
  font-size: 1.2rem;
  margin-bottom: 2px
}

/* SECTION MANAGER */
.rb-sections {
  flex: 1;
  padding: 0
}

.rb-add-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .2s
}

.rb-add-section:hover {
  background: var(--accent-bg)
}

/* SECTION ACCORDION */
.rb-sec {
  border-bottom: 1px solid var(--border)
}

.rb-sec-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background .15s;
  user-select: none
}

.rb-sec-head:hover {
  background: var(--tint)
}

.rb-sec-drag {
  cursor: grab;
  color: var(--text-3);
  font-size: .8rem
}

.rb-sec-label {
  flex: 1;
  font-size: .82rem;
  font-weight: 700;
  color: var(--text)
}

.rb-sec-toggle {
  font-size: .7rem;
  color: var(--text-3);
  transition: transform .2s
}

.rb-sec.open .rb-sec-toggle {
  transform: rotate(180deg)
}

.rb-sec-del {
  font-size: .7rem;
  color: #ef4444;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px
}

.rb-sec-del:hover {
  background: rgba(239, 68, 68, .1)
}

.rb-sec-btn {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rb-sec-btn:hover:not(:disabled) {
  color: var(--accent);
  background: var(--accent-bg);
}

.rb-sec-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.rb-sec-body {
  display: none;
  padding: 12px 20px 16px
}

.rb-sec.open .rb-sec-body {
  display: block
}

/* FORM */
.rb-fg {
  margin-bottom: 10px
}

.rb-fl {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 3px
}

.rb-fi {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font);
  font-size: .82rem;
  outline: none;
  transition: border-color .2s
}

.rb-fi:focus {
  border-color: var(--accent)
}

textarea.rb-fi {
  resize: vertical;
  min-height: 60px
}

.rb-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.rb-entry {
  background: var(--tint);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  position: relative
}

.rb-entry-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}

.rb-entry-btn {
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.rb-entry-btn:hover:not(:disabled) {
  color: var(--accent);
  border-color: var(--accent);
}

.rb-entry-btn:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.rb-entry-btn-del {
  color: #ef4444;
  border-color: rgba(239, 68, 68, .2);
}

.rb-entry-btn-del:hover {
  background: rgba(239, 68, 68, .1);
  color: #ef4444 !important;
  border-color: #ef4444 !important;
}

.rb-add-entry {
  font-size: .72rem;
  color: var(--accent);
  cursor: pointer;
  font-weight: 600;
  padding: 6px 0;
  display: flex;
  align-items: center;
  gap: 4px
}

/* SECTION PICKER MODAL */
.rb-picker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center
}

.rb-picker-overlay.active {
  display: flex
}

.rb-picker {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .15)
}

.rb-picker h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px
}

.rb-picker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px
}

.rb-picker-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  gap: 10px
}

.rb-picker-item:hover {
  border-color: var(--accent);
  background: var(--accent-bg)
}

.rb-picker-item.disabled {
  opacity: .4;
  pointer-events: none
}

.rb-picker-emoji {
  font-size: 1.3rem
}

.rb-picker-name {
  font-size: .8rem;
  font-weight: 600
}

/* PREVIEW */
.rb-preview {
  background: var(--tint-2);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-height: 0;
}

.rb-paper {
  width: 100%;
  max-width: 820px;
  height: 1160px;
  /* Exact A4 height at 820px width */
  background: #fff;
  box-shadow: 0 8px 40px rgba(10, 14, 26, .06);
  position: relative;
  padding: 48px;
  overflow: hidden;
  /* Prevent text from spilling out */
  margin-bottom: 24px;
  /* Space between multiple pages in preview */
  box-sizing: border-box;
  flex-shrink: 0;
  /* Prevent flexbox from shrinking A4 sheets vertically */
}

/* PREMIUM LOCK */
.rb-lock {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(65, 105, 225, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
    #050811;
  backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  text-align: center;
  padding: 40px;
  color: #fff;
}

.rb-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.rb-lock-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulse-lock 2s infinite alternate;
}

.rb-lock-title {
  font-size: 2rem;
  font-weight: 850;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: #fff;
}

.rb-lock-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 32px;
  max-width: 440px;
  line-height: 1.6;
}

.rb-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 36px;
  background: linear-gradient(135deg, #fbbf24, #f43f5e);
  color: #fff;
  font-weight: 800;
  border-radius: 16px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 20px 40px rgba(244, 63, 94, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rb-lock-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 25px 50px rgba(244, 63, 94, 0.4);
}

.rb-lock-back {
  transition: color 0.2s;
}

.rb-lock-back:hover {
  color: #fff !important;
}

@keyframes pulse-lock {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* ── TEMPLATES ── */
.rb-resume {
  line-height: 1.5;
  transition: all .3s
}

.rb-resume .r-header {
  margin-bottom: 20px
}

.rb-resume .r-name {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2px
}

.rb-resume .r-contact {
  font-size: .8rem;
  color: #555
}

.rb-resume .r-section {
  margin-bottom: 18px
}

.rb-resume .r-sec-title {
  font-size: .95rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px
}

.rb-resume .r-item {
  margin-bottom: 10px
}

.rb-resume .r-item-title {
  font-weight: 600;
  font-size: .9rem
}

.rb-resume .r-item-meta {
  font-size: .8rem;
  color: #666;
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px
}

.rb-resume .r-desc {
  font-size: .82rem;
  color: #333;
  white-space: pre-wrap
}

.rb-resume .r-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px
}

.rb-resume .r-skill-tag {
  font-size: .75rem;
  padding: 2px 8px;
  background: #f1f5f9;
  border-radius: 4px;
  color: #334155
}

.rb-resume .r-link {
  color: #4169e1;
  text-decoration: none;
  transition: all .2s
}

.rb-resume .r-link:hover {
  color: var(--accent);
}

/* Template: Minimal */
.tpl-minimal {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: #111
}

.tpl-minimal .r-header {
  text-align: center;
  border-bottom: 2px solid #111;
  padding-bottom: 14px
}

.tpl-minimal .r-name {
  text-transform: uppercase;
  letter-spacing: -1px
}

.tpl-minimal .r-sec-title {
  border-bottom: 1px solid #ccc;
  color: #111
}

/* Template: Modern */
.tpl-modern {
  font-family: 'DM Sans', sans-serif;
  color: #0f172a
}

.tpl-modern .r-header {
  border-left: 4px solid #3b82f6;
  padding-left: 16px
}

.tpl-modern .r-name {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #1e293b
}

.tpl-modern .r-sec-title {
  color: #3b82f6;
  letter-spacing: 1px;
  font-size: .9rem
}

/* Template: Executive */
.tpl-executive {
  font-family: Georgia, serif;
  color: #333
}

.tpl-executive .r-header {
  text-align: center
}

.tpl-executive .r-name {
  font-weight: normal;
  border-bottom: 1px solid #111;
  padding-bottom: 10px;
  font-size: 2rem
}

.tpl-executive .r-sec-title {
  text-align: center;
  letter-spacing: 1px;
  color: #111
}

.tpl-executive .r-item-meta {
  font-style: italic
}

/* Template: Two-Column */
.tpl-twocol {
  font-family: 'DM Sans', sans-serif;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px
}

.tpl-twocol .r-sidebar-col {
  background: #f8fafc;
  padding: 20px;
  border-radius: 8px
}

.tpl-twocol .r-main-col {
  padding: 0
}

.tpl-twocol .r-name {
  font-size: 1.6rem;
  font-weight: 800
}

.tpl-twocol .r-sec-title {
  color: #3b82f6;
  border-bottom: 1px solid #e2e8f0
}

/* Template: Creative */
.tpl-creative {
  font-family: 'DM Sans', sans-serif;
  color: #1e293b
}

.tpl-creative .r-header {
  background: linear-gradient(135deg, #1e293b, #334155);
  color: #fff;
  padding: 36px 48px 28px;
  margin: -48px -48px 24px;
  border-radius: 0
}

.tpl-creative .r-name {
  color: #fff
}

.tpl-creative .r-contact {
  color: rgba(255, 255, 255, .7)
}

.tpl-creative .r-link {
  color: rgba(255, 255, 255, .9)
}

.tpl-creative .r-sec-title {
  color: #6366f1;
  font-weight: 800
}

/* Template: ATS-Friendly */
.tpl-ats {
  font-family: Georgia, serif;
  color: #111111;
  background: #ffffff;
  padding: 0;
  line-height: 1.5;
}

.tpl-ats .r-header {
  text-align: center;
  margin-bottom: 24px;
}

.tpl-ats .r-name {
  font-size: 2.2rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #111111;
  margin-bottom: 6px;
  font-family: Georgia, serif;
}

.tpl-ats .r-contact {
  font-size: 0.85rem;
  color: #333333;
}

.tpl-ats .r-sec-title {
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #111111;
  border-bottom: 1px solid #111111;
  padding-bottom: 3px;
  margin-bottom: 12px;
  margin-top: 20px;
  letter-spacing: 0.05em;
}

.tpl-ats .r-item {
  margin-bottom: 14px;
}

.tpl-ats .r-item-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #111111;
}

.tpl-ats .r-item-meta {
  font-size: 0.85rem;
  color: #222222;
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-weight: 500;
}

.tpl-ats .r-desc {
  font-size: 0.85rem;
  color: #333333;
  margin-top: 4px;
  line-height: 1.5;
}

.tpl-ats .r-skill-tag {
  background: transparent;
  color: #111111;
  border: none;
  font-size: 0.85rem;
  padding: 0;
  margin-right: 12px;
}

.tpl-ats .r-skill-tag::after {
  content: " \2022";
  margin-left: 12px;
  color: #555555;
}

.tpl-ats .r-skill-tag:last-child::after {
  content: "";
}

/* Template: Compact */
.tpl-compact {
  font-family: Arial, sans-serif;
  color: #1f2937;
  font-size: .82rem;
  line-height: 1.4
}

.tpl-compact .r-name {
  font-size: 1.4rem
}

.tpl-compact .r-section {
  margin-bottom: 12px
}

.tpl-compact .r-sec-title {
  font-size: .8rem;
  border-bottom: 1px solid #d1d5db;
  margin-bottom: 6px
}

.tpl-compact .r-item {
  margin-bottom: 6px
}

/* Template: Professional */
.tpl-professional {
  font-family: 'Plus Jakarta Sans', 'DM Sans', sans-serif;
  color: #1e293b
}

.tpl-professional .r-header {
  border-bottom: 3px solid #1e293b;
  padding-bottom: 16px
}

.tpl-professional .r-name {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -.02em
}

.tpl-professional .r-sec-title {
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 4px;
  color: #1e293b;
  font-size: .85rem
}

/* Print */
/* Print Optimization */
@media print {
  @page {
    size: A4;
    margin: 15mm;
  }

  html,
  body {
    background: #fff !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  .toast-container,
  .toast,
  .rb-nav,
  .rb-sidebar,
  .rb-lock,
  .rb-picker-overlay,
  .rb-add-section,
  .rb-entry-del,
  .rb-sec-toggle,
  .rb-sec-del,
  .rb-sec-drag,
  .rb-add-entry,
  .rb-mobile-toggle,
  #rbExitPreview {
    display: none !important;
  }

  .rb-layout {
    display: block !important;
    height: auto !important;
    border: none !important;
    overflow: visible !important;
  }

  .rb-preview {
    padding: 0 !important;
    background: none !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
    transform: none !important;
  }

  .rb-paper {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: auto !important;
    position: static !important;
    border: none !important;
    overflow: visible !important;
    transform: none !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .rb-paper:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  .rb-resume {
    padding: 0 !important;
  }

  .rb-resume a {
    text-decoration: none !important;
    color: #4169e1 !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }

  .r-sec-title {
    margin-top: 15px !important;
  }

  .r-item {
    page-break-inside: avoid;
  }
}

/* PDF Preview Mode (Simulating Print on Screen) */
body.pdf-preview-mode {
  background: #525659;
  overflow: auto;
  height: auto;
}

body.pdf-preview-mode .rb-nav,
body.pdf-preview-mode .rb-sidebar,
body.pdf-preview-mode .rb-mobile-toggle,
body.pdf-preview-mode .rb-add-section {
  display: none !important;
}

body.pdf-preview-mode .rb-layout {
  display: block;
  padding: 40px 0;
}

body.pdf-preview-mode .rb-preview {
  display: flex;
  position: static;
  background: none;
  padding: 0;
}

body.pdf-preview-mode .rb-paper {
  width: 210mm;
  min-height: 297mm;
  padding: 20mm;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  transform: none !important;
}

body.pdf-preview-mode .rb-exit-preview {
  position: fixed;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  z-index: 2000;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.rb-mobile-toggle {
  display: none;
}

@media screen and (max-width: 800px) {
  body {
    height: auto;
    overflow: auto;
  }

  .rb-nav {
    padding: 0 12px;
  }

  .rb-nav-logo {
    font-size: 0.85rem;
  }

  .rb-nav-tag {
    display: none;
  }

  .btn-text {
    display: none;
  }

  .rb-btn {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .rb-btn i {
    font-size: 1.1rem;
    margin: 0;
  }

  .rb-nav-actions {
    display: flex;
    gap: 6px;
  }

  .rb-layout {
    display: block;
    height: auto;
    overflow: visible;
    position: relative;
  }

  .rb-sidebar {
    border-right: none;
    width: 100%;
    height: auto;
    display: block;
  }

  .rb-preview {
    display: none;
    position: fixed;
    inset: 0;
    top: 56px;
    z-index: 80;
    background: var(--tint-2);
    padding: 16px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    align-items: flex-start;
    justify-content: flex-start;
  }

  .rb-layout.preview-mode .rb-preview {
    display: block;
  }

  .rb-layout.preview-mode .rb-sidebar {
    display: none;
  }

  .rb-paper {
    width: 820px !important;
    min-width: 820px !important;
    height: 1160px !important;
    padding: 48px !important;
    margin: 0 0 calc(1160px * (var(--rb-scale, 1) - 1) + 16px) 0 !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: scale(var(--rb-scale, 1)) !important;
    transform-origin: top left !important;
  }

  .rb-mobile-toggle {
    display: flex !important;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 140px;
    height: 50px;
    border-radius: 25px;
    background: var(--accent);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(65, 105, 225, 0.4);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 700;
  }

  .rb-mobile-toggle:active {
    transform: scale(0.9);
  }

  .rb-layout.preview-mode+.rb-mobile-toggle {
    background: var(--carbon-black);
  }
}

@media screen and (max-width: 480px) {
  .rb-nav-logo span {
    display: none;
  }

  .rb-mobile-toggle {
    width: 60px;
    height: 60px;
    border-radius: 30px;
  }

  .rb-mobile-toggle span {
    display: none;
  }
}

/* Table-based simulation styles matching Word Document */
.rb-resume .r-item-table {
  width: 100%;
  margin-bottom: 4px;
  border-collapse: collapse;
}

.rb-resume .r-item-table td {
  padding: 0;
  border: none;
}

.rb-resume .r-item-title {
  font-size: 0.95rem;
  font-weight: bold;
  text-align: left;
}

.rb-resume .r-item-company {
  font-size: 0.85rem;
  color: var(--text-2);
  text-align: left;
}

.rb-resume .r-item-dates {
  font-size: 0.85rem;
  color: var(--text-3);
  text-align: right;
  vertical-align: top;
}

.rb-resume ul {
  margin-top: 4px;
  margin-bottom: 6px;
  padding-left: 20px;
}

.rb-resume li {
  margin-bottom: 2px;
  font-size: 0.82rem;
  color: var(--text-2);
}

.r-item,
.r-header,
.r-section {
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

/* ── MODALS (Website Theme) ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 14, 26, 0.4);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  opacity: 0; visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
  width: 100%; max-width: 520px;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transform: scale(0.95) translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: #f7f9ff;
}
.modal-title { font-size: 1.15rem; font-weight: 800; color: var(--carbon-black); letter-spacing: -0.01em; font-family: 'Plus Jakarta Sans', sans-serif; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: rgba(0, 0, 0, 0.05);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.2s;
  color: var(--text-3);
}
.modal-close:hover { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.modal-close svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.modal-body { padding: 24px; overflow-y: auto; max-height: 80vh; font-family: 'DM Sans', sans-serif; }

@media (max-width: 600px) {
  .modal-content { border-radius: 20px 20px 0 0; position: fixed; bottom: 0; transform: translateY(100%); }
  .modal-overlay.active .modal-content { transform: translateY(0); }
  .modal-body { padding: 20px; }
}