/* ===================================================
   RESET & BASE
   =================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ===================================================
   HEADER
   =================================================== */
header {
  height: 56px;
  background: #16213e;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 0 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  z-index: 100;
}

.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.export-actions { display: flex; gap: 8px; }

.btn-export {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  letter-spacing: 0.3px;
}

.btn-pdf {
  background: #e94560;
  color: white;
}
.btn-pdf:hover { background: #cc3b54; transform: translateY(-1px); }

.btn-word {
  background: rgba(255,255,255,0.12);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn-word:hover { background: rgba(255,255,255,0.2); transform: translateY(-1px); }

.btn-export:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ===================================================
   APP BODY — THREE COLUMN
   =================================================== */
#main-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.app-body {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 340px 1fr;
  overflow: hidden;
  min-height: 0;
  transition: grid-template-columns 0.22s ease;
}
.app-body.ver-collapsed {
  grid-template-columns: 44px 340px 1fr;
}

/* ===================================================
   VERSIONS / PROFILE PANEL
   =================================================== */
.versions-panel {
  background: #0d1b2e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
  color: white;
  flex-shrink: 0;
}

/* expanded vs collapsed content */
.ver-expanded-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}
.ver-collapsed-content {
  display: none;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 10px;
  gap: 10px;
}
.app-body.ver-collapsed .ver-expanded-content { display: none; }
.app-body.ver-collapsed .ver-collapsed-content { display: flex; }

/* Profile card */
.ver-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.ver-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f7ef8 0%, #7c5ce8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}

.ver-profile-info { flex: 1; min-width: 0; }

.ver-profile-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ver-profile-role {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Panel header row */
.ver-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 8px 14px;
  flex-shrink: 0;
}

.ver-header-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
}

.ver-toggle-btn {
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 4px;
  color: rgba(255,255,255,0.45);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  padding: 0;
}
.ver-toggle-btn:hover { background: rgba(255,255,255,0.12); color: white; }

/* Auto-save indicator row */
.ver-save-row {
  padding: 0 14px 8px;
  flex-shrink: 0;
}

#draft-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #2e9e6b;
  background: rgba(46,158,107,0.12);
  border: 1px solid rgba(46,158,107,0.2);
  border-radius: 20px;
  padding: 2px 8px;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
#draft-status.visible { opacity: 1; transform: translateY(0); }

/* Versions list */
.ver-list-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 2px 0;
}
.ver-list-wrap::-webkit-scrollbar { width: 3px; }
.ver-list-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.ver-empty {
  padding: 18px 14px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.25);
  line-height: 1.7;
  text-align: center;
}

/* Individual version item */
.ver-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 14px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.ver-item:hover { background: rgba(255,255,255,0.04); }
.ver-item.ver-active {
  background: rgba(79,126,248,0.14);
  border-left-color: #4f7ef8;
}

.ver-badge {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.ver-item.ver-active .ver-badge { background: #4f7ef8; color: white; }

.ver-info { flex: 1; min-width: 0; }
.ver-name {
  font-size: 0.73rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ver-time {
  font-size: 0.62rem;
  color: rgba(255,255,255,0.3);
  margin-top: 1px;
}

.ver-del-btn {
  display: none;
  background: none;
  border: none;
  color: rgba(255,90,90,0.5);
  cursor: pointer;
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.12s;
  flex-shrink: 0;
  padding: 0;
}
.ver-item:hover .ver-del-btn { display: flex; }
.ver-del-btn:hover { color: #ff6464; background: rgba(255,100,100,0.1); }

/* Footer */
.ver-footer {
  padding: 10px 12px;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.ver-clear-btn {
  width: 100%;
  padding: 7px;
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: rgba(255,255,255,0.28);
  font-size: 0.68rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.ver-clear-btn:hover {
  border-color: rgba(255,90,90,0.35);
  color: rgba(255,110,110,0.8);
  background: rgba(255,90,90,0.05);
}

/* Collapsed strip */
.ver-expand-btn {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.07);
  border: none;
  border-radius: 7px;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.ver-expand-btn:hover { background: rgba(255,255,255,0.14); color: white; }

.ver-count-badge {
  background: #4f7ef8;
  color: white;
  font-size: 0.58rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 5px;
  min-width: 18px;
  text-align: center;
  line-height: 1.4;
}

/* ===================================================
   FORM PANEL
   =================================================== */
.form-panel {
  background: white;
  overflow-y: auto;
  border-right: 1px solid #e4e6ea;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.form-panel::-webkit-scrollbar { width: 4px; }
.form-panel::-webkit-scrollbar-track { background: transparent; }
.form-panel::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.form-section {
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}
.form-section:last-child { border-bottom: none; }

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #9aa0a6;
  margin-bottom: 12px;
}

/* ===================================================
   TEMPLATE PICKER
   =================================================== */
.tpl-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.tpl-card {
  cursor: pointer;
  text-align: center;
}
.tpl-card input[type="radio"] { display: none; }

.tpl-thumb {
  border: 2px solid #e4e6ea;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
  aspect-ratio: 0.707;
  display: flex;
  align-items: stretch;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: white;
}
.tpl-card:hover .tpl-thumb { border-color: #a8c4ff; }
.tpl-card.selected .tpl-thumb {
  border-color: #4f7ef8;
  box-shadow: 0 0 0 3px rgba(79, 126, 248, 0.2);
}

.tpl-card span {
  font-size: 0.72rem;
  font-weight: 600;
  color: #555;
}
.tpl-card.selected span { color: #4f7ef8; }

/* Template preview shapes */
.tp-classic, .tp-minimal { padding: 8px; width: 100%; }
.tp-modern { display: flex; width: 100%; }
.tp-m-sidebar { width: 35%; background: #1e4d6b; padding: 8px 6px; }
.tp-m-main { flex: 1; padding: 8px; }

.tp-bar {
  height: 3px;
  background: #c8cdd5;
  border-radius: 2px;
  margin-bottom: 2px;
}
.tp-bar-lg { height: 5px; width: 70%; margin: 0 auto 3px; }
.tp-bar-xl { height: 6px; width: 55%; }
.tp-bar-sm { height: 3px; }
.tp-bar-full { width: 100% !important; }
.tp-bar-w { background: rgba(255,255,255,0.5); height: 3px; }
.tp-hr {
  height: 1px;
  background: #aaa;
  margin: 5px 0;
}

/* ===================================================
   FORM FIELDS
   =================================================== */
.field { margin-bottom: 10px; }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.field-row-3col {
  grid-template-columns: 1fr 1fr 1fr;
}

label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: #5f6368;
  margin-bottom: 4px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid #e4e6ea;
  border-radius: 6px;
  font-size: 0.82rem;
  font-family: inherit;
  color: #1a1a1a;
  background: #fafafa;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  resize: vertical;
  line-height: 1.4;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4f7ef8;
  background: white;
  box-shadow: 0 0 0 3px rgba(79,126,248,0.1);
}

input::placeholder,
textarea::placeholder { color: #bbb; }

.field-hint {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 4px;
}

/* ===================================================
   ENTRY CARDS (EXP / EDU)
   =================================================== */
.entry-card {
  background: #f8f9fb;
  border: 1.5px solid #e8ebef;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}

.entry-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.entry-card-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.entry-card-header span {
  font-size: 0.75rem;
  font-weight: 700;
  color: #4f7ef8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drag-handle {
  cursor: grab;
  color: #d0d4dd;
  display: flex;
  align-items: center;
  padding: 2px 3px;
  border-radius: 3px;
  transition: color 0.15s;
  flex-shrink: 0;
  user-select: none;
}
.drag-handle:hover  { color: #4f7ef8; }
.drag-handle:active { cursor: grabbing; }

.entry-card.is-dragging { opacity: 0.35; }

.drag-placeholder {
  border: 2px dashed #4f7ef8;
  border-radius: 8px;
  background: rgba(79,126,248,0.05);
  margin-bottom: 10px;
  box-sizing: border-box;
}

.remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: inherit;
}
.remove-btn:hover { color: #e94560; background: rgba(233,69,96,0.08); }

.add-entry-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  background: none;
  border: 1.5px dashed #d0d5dd;
  border-radius: 6px;
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  margin-top: 4px;
}
.add-entry-btn:hover {
  border-color: #4f7ef8;
  color: #4f7ef8;
  background: rgba(79,126,248,0.04);
}

/* ===================================================
   PREVIEW PANEL
   =================================================== */
.preview-panel {
  display: flex;
  flex-direction: column;
  background: #e8eaed;
  overflow: hidden;
}

.preview-topbar {
  height: 38px;
  background: #dde0e5;
  border-bottom: 1px solid #cdd0d6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  flex-shrink: 0;
}

.preview-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.zoom-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zoom-btn {
  width: 24px;
  height: 24px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-family: inherit;
  transition: all 0.15s;
}
.zoom-btn:hover { background: #f0f0f0; border-color: #999; }

.zoom-val {
  font-size: 0.75rem;
  color: #666;
  font-weight: 600;
  min-width: 36px;
  text-align: center;
}

.preview-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  display: flex;
  justify-content: center;
  padding: 30px 24px;
}

.preview-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.preview-scroll::-webkit-scrollbar-track { background: transparent; }
.preview-scroll::-webkit-scrollbar-thumb { background: #c0c4cc; border-radius: 6px; }

.preview-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#resume-preview {
  transform-origin: top center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15), 0 1px 4px rgba(0,0,0,0.1);
}

/* ===================================================
   RESUME BASE — shared across all templates
   =================================================== */
.resume {
  width: 794px;
  min-height: 1123px;
  background: white;
  position: relative;
}

/* ===================================================
   TEMPLATE: CLASSIC
   =================================================== */
.resume.classic {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  color: #1e1e1e;
  padding: 52px 64px 52px;
  font-size: 11px;
  line-height: 1.5;
}

.resume.classic .r-header {
  text-align: center;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid #1e1e1e;
}

.resume.classic .r-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 5px;
  line-height: 1.2;
}

.resume.classic .r-jobtitle {
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  color: #555;
  margin-bottom: 8px;
}

.resume.classic .r-contact {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10px;
  color: #555;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.resume.classic .r-contact-sep { color: #ccc; }

.resume.classic .r-section { margin-bottom: 16px; }

.resume.classic .r-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
  padding-bottom: 4px;
  margin-bottom: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.resume.classic .r-item { margin-bottom: 12px; }

.resume.classic .r-item-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.resume.classic .r-item-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #1e1e1e;
}

.resume.classic .r-item-date {
  font-size: 10px;
  color: #777;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.resume.classic .r-item-subtitle {
  font-size: 11px;
  font-style: italic;
  color: #555;
  margin-bottom: 3px;
}

.resume.classic .r-item-desc {
  font-size: 10.5px;
  color: #333;
  line-height: 1.6;
  margin-top: 3px;
}

.resume.classic .r-summary {
  font-size: 10.5px;
  color: #333;
  line-height: 1.7;
}

.resume.classic .r-skills-text {
  font-size: 10.5px;
  color: #333;
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===================================================
   TEMPLATE: MODERN
   =================================================== */
.resume.modern {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  min-height: 1123px;
}

.resume.modern .r-sidebar {
  width: 245px;
  min-width: 245px;
  background: #1e4d6b;
  color: white;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
}

.resume.modern .r-main {
  flex: 1;
  padding: 40px 36px;
  background: white;
}

.resume.modern .r-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.resume.modern .r-jobtitle {
  font-size: 11px;
  font-weight: 300;
  opacity: 0.75;
  letter-spacing: 0.5px;
  margin-bottom: 28px;
}

.resume.modern .r-sb-section { margin-bottom: 22px; }

.resume.modern .r-sb-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.55;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.resume.modern .r-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 10px;
  opacity: 0.85;
  margin-bottom: 7px;
  line-height: 1.4;
  word-break: break-all;
}

.resume.modern .r-social-icons { margin-top: 10px; }
.resume.modern a.r-social-icon  { color: rgba(255,255,255,0.9) !important; }
.resume.modern .r-social-grey   { color: rgba(255,255,255,0.25); }

.resume.modern .r-contact-icon {
  opacity: 0.6;
  flex-shrink: 0;
  margin-top: 1px;
}

.resume.modern .r-skill-tag {
  display: inline-block;
  font-size: 9.5px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  padding: 3px 7px;
  margin: 0 4px 5px 0;
  line-height: 1.3;
}

.resume.modern .r-edu-item { margin-bottom: 12px; }

.resume.modern .r-edu-degree {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
}

.resume.modern .r-edu-school {
  font-size: 9.5px;
  opacity: 0.7;
  margin-bottom: 1px;
}

.resume.modern .r-edu-year {
  font-size: 9px;
  opacity: 0.5;
}

/* Modern main content */
.resume.modern .r-section { margin-bottom: 22px; }

.resume.modern .r-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #1e4d6b;
  border-bottom: 2px solid #1e4d6b;
  padding-bottom: 5px;
  margin-bottom: 12px;
}

.resume.modern .r-item { margin-bottom: 13px; }

.resume.modern .r-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}

.resume.modern .r-item-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #1a1a1a;
}

.resume.modern .r-item-date {
  font-size: 9.5px;
  background: #edf2f7;
  color: #555;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
}

.resume.modern .r-item-subtitle {
  font-size: 10.5px;
  color: #666;
  margin-bottom: 3px;
}

.resume.modern .r-item-desc {
  font-size: 10.5px;
  color: #444;
  line-height: 1.55;
}

.resume.modern .r-summary {
  font-size: 10.5px;
  color: #444;
  line-height: 1.65;
}

/* ===================================================
   TEMPLATE: MINIMAL
   =================================================== */
.resume.minimal {
  font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  color: #111;
  padding: 64px 72px;
  font-size: 11px;
  line-height: 1.5;
}

.resume.minimal .r-header {
  margin-bottom: 28px;
}

.resume.minimal .r-name {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 6px;
}

.resume.minimal .r-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-size: 10.5px;
  color: #666;
}

.resume.minimal .r-contact-sep {
  margin: 0 8px;
  color: #ccc;
}

.resume.minimal .r-jobtitle-inline {
  font-size: 13px;
  color: #555;
  font-weight: 400;
  margin-bottom: 10px;
}

.resume.minimal .r-section {
  margin-bottom: 22px;
  padding-top: 18px;
  border-top: 1px solid #e0e0e0;
}

.resume.minimal .r-section:first-of-type { border-top: none; padding-top: 0; }

.resume.minimal .r-section-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: #aaa;
  margin-bottom: 12px;
}

.resume.minimal .r-item { margin-bottom: 14px; }

.resume.minimal .r-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1px;
}

.resume.minimal .r-item-title {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

.resume.minimal .r-item-date {
  font-size: 10px;
  color: #aaa;
  white-space: nowrap;
}

.resume.minimal .r-item-subtitle {
  font-size: 11px;
  color: #666;
  margin-bottom: 3px;
}

.resume.minimal .r-item-desc {
  font-size: 10.5px;
  color: #444;
  line-height: 1.6;
  margin-top: 4px;
}

.resume.minimal .r-summary {
  font-size: 11px;
  color: #333;
  line-height: 1.7;
}

.resume.minimal .r-skills-text {
  font-size: 11px;
  color: #333;
  line-height: 1.7;
}


/* ===================================================
   DRAFT MODAL
   =================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(3px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-card {
  background: white;
  border-radius: 14px;
  padding: 36px 32px 28px;
  max-width: 420px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
  text-align: center;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s ease;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: #eef3ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: #4f7ef8;
}

.modal-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 10px;
}

.modal-card p {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.6;
  margin-bottom: 26px;
}

.modal-card p strong {
  color: #1a1a1a;
  font-weight: 600;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.modal-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  flex: 1;
}

.modal-btn-secondary {
  background: #f3f4f6;
  color: #555;
  border: 1.5px solid #e4e6ea;
}
.modal-btn-secondary:hover { background: #e8eaee; color: #333; }

.modal-btn-primary {
  background: #4f7ef8;
  color: white;
}
.modal-btn-primary:hover { background: #3d6de0; transform: translateY(-1px); }

/* ===================================================
   EMPTY STATE
   =================================================== */
.empty-state {
  width: 100%;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #bbb;
  padding: 60px 40px;
  text-align: center;
}

.empty-state svg { margin-bottom: 16px; opacity: 0.3; }
.empty-state p { font-size: 0.85rem; line-height: 1.6; }

/* ===================================================
   PROJECTS SUBSECTION (within Experience entries)
   =================================================== */
.proj-section {
  margin-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.1);
  padding-top: 10px;
}

.proj-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.proj-section-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #6c7893;
}

.add-proj-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #4f7ef8;
  background: rgba(79,126,248,0.08);
  border: 1px solid rgba(79,126,248,0.2);
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.add-proj-btn:hover { background: rgba(79,126,248,0.15); border-color: rgba(79,126,248,0.4); }

.proj-entry {
  background: rgba(248,249,252,0.8);
  border: 1px solid #e4e8f0;
  border-radius: 7px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.proj-entry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.proj-name {
  flex: 1;
  padding: 5px 9px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid #d8dde8;
  border-radius: 5px;
  font-family: inherit;
  color: #1a1a1a;
  background: white;
  transition: border-color 0.15s;
}
.proj-name:focus { outline: none; border-color: #4f7ef8; }

.remove-proj-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #f87171;
  background: #fff5f5;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 5px;
  transition: all 0.15s;
}
.remove-proj-btn:hover { background: #fee2e2; border-color: #ef4444; color: #b91c1c; }

/* Formatting toolbar */
.proj-fmt-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 6px;
  padding: 3px 4px;
  background: #f1f3f8;
  border: 1px solid #e0e4ee;
  border-radius: 5px;
  width: fit-content;
}

.proj-fmt-btn {
  width: 26px;
  height: 24px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  transition: all 0.12s;
}
.proj-fmt-btn:hover  { background: #dde2f0; color: #1a1a1a; }
.proj-fmt-btn:active { background: #4f7ef8; color: white; }
.proj-fmt-btn[data-marker="bullet"] { font-size: 1rem; font-weight: 700; }

.proj-fmt-hint {
  font-size: 0.62rem;
  color: #aab0c0;
  margin-left: 4px;
  white-space: nowrap;
}

/* Textarea project description */
.proj-desc {
  width: 100%;
  min-height: 72px;
  padding: 7px 10px;
  font-size: 0.8rem;
  line-height: 1.6;
  border: 1px solid #d8dde8;
  border-radius: 5px;
  background: white;
  color: #1a1a1a;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.proj-desc:focus { outline: none; border-color: #4f7ef8; }

/* ===================================================
   RESUME PREVIEW — PROJECT ITEMS
   =================================================== */
.r-projects {
  margin-top: 6px;
}

.r-proj-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: #888;
  margin-bottom: 4px;
}

.r-proj-item {
  padding-left: 10px;
  border-left: 2px solid #e0e4ee;
  margin-bottom: 6px;
}

.r-proj-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 2px;
}

.r-proj-desc {
  font-size: 0.75rem;
  line-height: 1.55;
  color: #444;
}
.r-proj-desc strong, .r-proj-desc b { font-weight: 700; }
.r-proj-desc em, .r-proj-desc i     { font-style: italic; }
.r-proj-desc u                       { text-decoration: underline; }

/* ===================================================
   PROJECT SECTION — resume preview
   =================================================== */
.r-proj-item-standalone { margin-bottom: 10px; }

.r-proj-standalone-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: #1a1a2e;
  display: block;
  margin-bottom: 3px;
}

.r-proj-body {
  font-size: 0.75rem;
  color: #444;
  line-height: 1.55;
}

.r-desc-line {
  display: block;
  margin-bottom: 2px;
}

.r-desc-list {
  margin: 2px 0 4px 14px;
  padding: 0;
  list-style: disc;
}

.r-desc-list li {
  margin-bottom: 2px;
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ===================================================
   SOCIAL ICONS — resume preview
   =================================================== */
.r-social-icons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.r-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.r-social-icon svg {
  width: 14px;
  height: 14px;
}

a.r-social-icon:hover { opacity: 0.7; }

.r-social-grey {
  color: #c4c9d4;
  cursor: default;
}

/* ===================================================
   FORM — social field label icons
   =================================================== */
.field-label-icon {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===================================================
   GRAMMAR CHECK — header button
   =================================================== */
.btn-grammar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 7px;
  background: #f0fdf4;
  color: #16a34a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-grammar:hover  { background: #dcfce7; }
.btn-grammar:active { background: #bbf7d0; }
.btn-grammar:disabled { opacity: 0.6; cursor: default; }

.gc-btn-spinner {
  display: inline-block;
  width: 11px;
  height: 11px;
  border: 2px solid #16a34a;
  border-top-color: transparent;
  border-radius: 50%;
  animation: gc-spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes gc-spin { to { transform: rotate(360deg); } }

/* ===================================================
   GRAMMAR CHECK — modal overlay
   =================================================== */
.gc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.gc-overlay[hidden] { display: none; }

.gc-modal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header */
.gc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 16px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}
.gc-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}
.gc-title svg { color: #16a34a; }
.gc-close-btn {
  background: none;
  border: none;
  font-size: 18px;
  color: #94a3b8;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.gc-close-btn:hover { color: #475569; background: #f1f5f9; }

/* ── Scrollable body */
.gc-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
}

/* ── Count badge */
.gc-count {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  margin-bottom: 14px;
}

/* ── Section group */
.gc-section { margin-bottom: 20px; }
.gc-section-name {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #94a3b8;
  margin-bottom: 8px;
}

/* ── Individual issue card */
.gc-issue-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  transition: opacity 0.2s;
}
.gc-issue-card.gc-issue-applied {
  opacity: 0.45;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.gc-issue-card.gc-issue-notfound {
  opacity: 0.45;
  border-color: #fecaca;
  background: #fef2f2;
}

.gc-diff {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.gc-original {
  color: #dc2626;
  text-decoration: line-through;
  font-size: 13.5px;
  background: #fef2f2;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.gc-corrected {
  color: #16a34a;
  font-size: 13.5px;
  background: #f0fdf4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 500;
}
.gc-diff svg { flex-shrink: 0; margin-top: 4px; }

.gc-explanation {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
  font-style: italic;
}

.gc-apply-btn {
  background: #fff;
  border: 1.5px solid #16a34a;
  color: #16a34a;
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.gc-apply-btn:hover:not(:disabled) { background: #16a34a; color: #fff; }
.gc-apply-btn:disabled { opacity: 0.5; cursor: default; }

/* ── Loading state */
.gc-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  gap: 14px;
  color: #64748b;
  font-size: 14px;
}
.gc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: #16a34a;
  border-radius: 50%;
  animation: gc-spin 0.7s linear infinite;
}

/* ── Empty / error states */
.gc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  gap: 14px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}
.gc-error {
  padding: 20px;
  color: #dc2626;
  font-size: 14px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

/* ── Footer */
.gc-footer {
  display: flex;
  gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid #f1f5f9;
  flex-shrink: 0;
  justify-content: flex-end;
}
.gc-footer[hidden] { display: none; }

.gc-btn-primary {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.gc-btn-primary:hover:not(:disabled) { background: #15803d; }
.gc-btn-primary:disabled { opacity: 0.5; cursor: default; }

.gc-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.gc-btn-secondary:hover { background: #e2e8f0; }

/* ===================================================
   LANDING SCREEN
   =================================================== */
#landing-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0c14;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#landing-screen[hidden] { display: none; }

.landing-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  width: 100%;
  max-width: 640px;
}

.landing-title-box {
  background: #161b28;
  border: 1px solid #2e3650;
  border-radius: 10px;
  padding: 16px 32px;
  width: 100%;
  text-align: center;
}
.landing-title {
  color: #d1d9f0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.1px;
  font-family: 'Inter', sans-serif;
}

.landing-btns {
  display: flex;
  gap: 24px;
  width: 100%;
}

.landing-btn {
  flex: 1;
  background: #0d1017;
  border: 1.5px solid #2e3650;
  border-radius: 14px;
  padding: 28px 22px 26px;
  color: #c9d1ef;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.landing-btn:hover {
  border-color: #4f7ef8;
  background: #141a2e;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(79,126,248,0.15);
}
.landing-btn:active { transform: translateY(0); }

.landing-btn-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #f0f4ff;
}
.landing-btn-sub {
  font-size: 12.5px;
  color: #4a5580;
  line-height: 1.5;
}
.landing-btn:hover .landing-btn-sub { color: #7b88b8; }

/* Home button in resume header */
.btn-home {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-home:hover { background: rgba(255,255,255,0.16); }

/* ===================================================
   LEARN HUB SECTION
   =================================================== */
#learn-section {
  min-height: 100vh;
  background: #0a0c14;
  display: flex;
  flex-direction: column;
}
#learn-section[hidden] { display: none; }

.lh-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px 60px;
  width: 100%;
}

.lh-topbar {
  display: flex;
  align-items: center;
  padding: 18px 0;
  gap: 16px;
  border-bottom: 1px solid #1c2236;
  margin-bottom: 0;
}
.lh-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid #2e3650;
  border-radius: 8px;
  padding: 7px 14px;
  color: #7b88b8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: color 0.15s, border-color 0.15s;
}
.lh-back-btn:hover { color: #c9d1ef; border-color: #4a5580; }

.lh-topbar-title {
  flex: 1;
  text-align: center;
  color: #7b88b8;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.lh-auth-slot { margin-left: auto; }

.lh-hero {
  padding: 52px 0 36px;
  text-align: center;
}
.lh-hero-title {
  font-size: 28px;
  font-weight: 700;
  color: #d1d9f0;
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}
.lh-hero-sub {
  font-size: 15px;
  color: #4a5580;
}

.lh-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lh-card {
  width: 100%;
  background: #0d1017;
  border: 1.5px solid #1c2236;
  border-radius: 16px;
  padding: 28px 28px 28px 24px;
  display: flex;
  align-items: flex-start;
  gap: 22px;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.lh-card:hover {
  border-color: #4f7ef8;
  background: #10152a;
  transform: translateX(4px);
}

.lh-card-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #1c2236;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lh-card-icon-teal { background: #0d2424; }
.lh-card:hover .lh-card-icon     { background: #1e2d5a; }
.lh-card:hover .lh-card-icon-teal { background: #0f3030; }

.lh-card-body { flex: 1; }

.lh-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #d1d9f0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lh-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: #0d2424;
  color: #2dd4bf;
  border: 1px solid #1a4040;
  padding: 2px 7px;
  border-radius: 4px;
}

.lh-card-desc {
  font-size: 13.5px;
  color: #4a5580;
  line-height: 1.55;
  margin-bottom: 14px;
}
.lh-card:hover .lh-card-desc { color: #7b88b8; }

.lh-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.lh-card-bullets li {
  font-size: 11.5px;
  font-weight: 600;
  color: #4a5580;
  background: #161b28;
  border: 1px solid #2e3650;
  padding: 3px 10px;
  border-radius: 20px;
}
.lh-card:hover .lh-card-bullets li { color: #7b88b8; border-color: #3a4870; }

.lh-card-arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: #2e3650;
  align-self: center;
  transition: color 0.2s, transform 0.2s;
}
.lh-card:hover .lh-card-arrow { color: #4f7ef8; transform: translateX(4px); }

@media (max-width: 540px) {
  .landing-btns { flex-direction: column; }
  .lh-card { padding: 20px 16px; }
}

.lh-card-icon-violet { background: #1a1030; }
.lh-card:hover .lh-card-icon-violet { background: #261848; }

.lh-badge-violet {
  background: #1a1030;
  color: #a78bfa;
  border-color: #3d2a6e;
}

/* ===================================================
   ROLE SELECTOR SCREEN
   =================================================== */
#role-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0c14;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#role-screen[hidden] { display: none; }

.rs-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
  width: 100%;
  max-width: 640px;
}

.rs-title-box {
  background: #161b28;
  border: 1px solid #2e3650;
  border-radius: 10px;
  padding: 16px 32px;
  width: 100%;
  text-align: center;
}

.rs-title {
  color: #d1d9f0;
  font-size: 20px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1px;
}

.rs-choices {
  display: flex;
  gap: 24px;
  width: 100%;
}

.rs-choice-btn {
  flex: 1;
  background: #0d1017;
  border: 1.5px solid #2e3650;
  border-radius: 14px;
  padding: 28px 22px 26px;
  color: #f0f4ff;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.rs-choice-btn:hover {
  border-color: #4f7ef8;
  background: #141a2e;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(79,126,248,0.15);
}
.rs-choice-btn:active { transform: translateY(0); }

/* ===================================================
   LANDING SCREEN — Change Role button
   =================================================== */
.landing-back-row {
  position: fixed;
  top: 18px;
  left: 20px;
  z-index: 201;
}

.landing-back-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #6b7499;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.landing-back-btn:hover {
  color: #a0aacc;
  border-color: rgba(255,255,255,0.22);
}

/* ===================================================
   TEACHERS SECTION
   =================================================== */
#teachers-section {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #0a0c14;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}
#teachers-section[hidden] { display: none; }

.ts-page {
  width: 100%;
  max-width: 860px;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.ts-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}
.ts-topbar .ts-header { flex: 1; }
.ts-auth-slot { margin-left: auto; }

.ts-back-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  color: #6b7499;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  padding: 6px 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.ts-back-btn:hover {
  color: #a0aacc;
  border-color: rgba(255,255,255,0.22);
}

.ts-header {
  background: #161b28;
  border: 1px solid #2e3650;
  border-radius: 10px;
  padding: 16px 32px;
  width: 100%;
  text-align: center;
}

.ts-title {
  color: #d1d9f0;
  font-size: 20px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.1px;
}

.ts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  width: 100%;
  justify-items: stretch;
}

.ts-card {
  background: #0d1017;
  border: 1.5px solid #2e3650;
  border-radius: 14px;
  padding: 28px 22px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: default;
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.ts-card-icon {
  color: rgba(255,255,255,0.35);
}

.ts-card-name {
  color: #f0f4ff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

.ts-coming-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #4a5580;
  font-family: 'Inter', sans-serif;
}

.ts-card.ts-coming:hover {
  border-color: #4f7ef8;
  background: #141a2e;
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(79,126,248,0.15);
}

@media (max-width: 620px) {
  .ts-grid { grid-template-columns: repeat(2, 1fr); }
  .rs-choices { gap: 40px; }
  .rs-choice-btn { padding: 16px 32px; }
}

/* ── TOKEN GATE MODAL ─────────────────────────────────────────────────────── */
.tg-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.72);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.tg-overlay[hidden] { display: none; }

.tg-modal {
  position: relative;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 100%; max-width: 420px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
}

.tg-icon { font-size: 36px; margin-bottom: 12px; }

.tg-title {
  font-size: 20px; font-weight: 700;
  color: #f0f0f0; margin-bottom: 6px;
}

.tg-sub {
  font-size: 13px; color: #64b5f6; font-weight: 600;
  margin-bottom: 12px; min-height: 18px;
}

.tg-body {
  font-size: 13px; color: #888; line-height: 1.6;
  margin-bottom: 22px;
}

.tg-hint {
  font-size: 12.5px; color: #666;
  background: #161920; border: 1px solid #2a2d3a;
  border-radius: 8px; padding: 10px 14px;
  margin-bottom: 8px;
}

.tg-input {
  width: 100%; box-sizing: border-box;
  background: #161920; border: 1px solid #2a2d3a;
  border-radius: 8px; padding: 11px 14px;
  color: #f0f0f0; font-size: 14px; font-family: monospace;
  letter-spacing: .06em; outline: none;
  transition: border-color .15s;
  margin-bottom: 10px;
}
.tg-input:focus { border-color: #64b5f6; }

.tg-error {
  font-size: 12px; color: #f87171;
  margin-bottom: 10px; text-align: left;
}
.tg-error[hidden] { display: none; }

.tg-btn {
  width: 100%; padding: 12px;
  background: #1a4fa8; color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .15s;
  margin-bottom: 14px;
}
.tg-btn:hover { background: #2563eb; }
.tg-btn:disabled { opacity: .5; cursor: default; }

.tg-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border: 1px solid #2a2d3a; border-radius: 8px; overflow: hidden;
}
.tg-tab {
  flex: 1; padding: 9px; background: none; border: none;
  color: #666; font-size: 13px; cursor: pointer; transition: all .15s;
}
.tg-tab.active { background: #1a4fa8; color: #fff; font-weight: 600; }
.tg-tab:hover:not(.active) { background: #1e2130; color: #aaa; }

.tg-textarea {
  resize: vertical; min-height: 60px; font-family: inherit;
  margin-bottom: 10px !important;
}

.tg-success {
  font-size: 13px; color: #5fe0a0;
  background: rgba(95,224,160,.08); border: 1px solid rgba(95,224,160,.2);
  border-radius: 8px; padding: 14px; text-align: center; line-height: 1.5;
}
.tg-success[hidden] { display: none; }

.tg-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none;
  color: #555; font-size: 16px; cursor: pointer;
  line-height: 1; padding: 4px 6px;
  border-radius: 4px;
}
.tg-close:hover { color: #aaa; background: #1e2130; }

/* Teacher cards — remove coming-soon dim, add pointer */
.ts-card { cursor: pointer; }
.ts-card:hover { border-color: #3a3f52; background: #12151f; }

/* ===================================================
   IMPORT RESUME UPLOAD ZONE
   =================================================== */
.import-resume-section { padding-bottom: 14px; }

.import-drop-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px dashed #c8d0dc;
  border-radius: 8px;
  background: #f8f9fb;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: #6b7280;
}
.import-drop-zone:hover,
.import-drop-zone.drag-over {
  border-color: #4f7ef8;
  background: #eef2ff;
  color: #3a5bd9;
}
.import-drop-zone svg { flex-shrink: 0; }

.import-drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}
.import-drop-main { color: #374151; font-weight: 500; }
.import-drop-hint { font-size: 0.72rem; color: #9ca3af; }

.import-browse-btn {
  background: none;
  border: none;
  padding: 0;
  color: #4f7ef8;
  font-weight: 600;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.import-browse-btn:hover { color: #3a5bd9; }

.import-status {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.import-status[hidden] { display: none; }
.import-status.loading {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.import-status.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}
.import-status.error {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}
.import-spinner {
  width: 13px; height: 13px;
  border: 2px solid #93c5fd;
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================================================
   BUILT WITH SARVAM — partner badge
   Shares the purple Sarvam identity already used by
   .iw-lang-badge in interview.css
   =================================================== */
.sarvam-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,92,232,0.14);
  border: 1px solid rgba(124,92,232,0.38);
  color: #b9a6f5;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1;
  padding: 5px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.sarvam-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8b5cf6;
  box-shadow: 0 0 7px rgba(139,92,246,0.85);
  flex-shrink: 0;
}
.sarvam-badge strong {
  color: #ddd0ff;
  font-weight: 700;
}

/* centred badge line under a screen title */
.sarvam-badge-row {
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

/* compact variant for the 56px resume-builder header */
.logo .sarvam-badge {
  font-size: 10px;
  padding: 4px 9px;
  letter-spacing: 0.3px;
}

@media (max-width: 600px) {
  .sarvam-badge { font-size: 10px; padding: 4px 9px; }
  .logo .sarvam-badge { display: none; }
}
