/* ===== RESUME PREVIEW PAGE ===== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s;
}
.nav-link:hover { color: var(--text); }

/* User dropdown */
.user-dropdown { position: relative; }
.user-dropdown-trigger {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; background: none; border: none;
  font-family: inherit; padding: 4px 8px; border-radius: 8px;
  transition: background 0.18s;
}
.user-dropdown-trigger:hover { background: #f5f5f5; }
.user-avatar-sm {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6b5b);
  color: #fff; font-weight: 800; font-size: 0.78rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.user-name-sm { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.user-dropdown-trigger svg { color: var(--text-2); transition: transform 0.2s; }
.user-dropdown.open .user-dropdown-trigger svg { transform: rotate(180deg); }
.user-dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 210px; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  padding: 6px; z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}
.user-dropdown.open .user-dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px; font-size: 0.88rem;
  font-weight: 500; color: var(--text); text-decoration: none; transition: background 0.15s;
}
.user-dropdown-item:hover { background: #f5f5f5; }
.user-dropdown-item.active { background: rgba(232,68,58,0.06); color: var(--accent); font-weight: 600; }
.user-dropdown-item svg { color: var(--text-2); flex-shrink: 0; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }
.user-dropdown-logout { color: var(--accent) !important; }
.user-dropdown-logout svg { color: var(--accent) !important; }
.mob-divider { height: 1px; background: var(--border); margin: 8px 16px; }

/* ===== ACTION BAR ===== */
.rp-bar {
  background: var(--bg);
  border-bottom: 1.5px solid var(--border);
  padding: 14px 0;
}

.rp-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rp-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.rp-back {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.18s;
}
.rp-back:hover { color: var(--accent); }

.rp-bar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.rp-badge-view {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.rp-badge-view::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
}

.rp-bar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rp-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}
.rp-action-btn:hover { border-color: var(--text); color: var(--text); }
.rp-action-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.rp-action-btn.primary:hover { background: #c0392b; border-color: #c0392b; color: #fff; }

/* Visibility toggle inline */
.rp-visibility {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-2);
}

.rp-toggle {
  position: relative;
  width: 38px;
  height: 20px;
  flex-shrink: 0;
}
.rp-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.rp-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.rp-toggle-slider::before {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #fff;
  left: 3px; top: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.rp-toggle input:checked + .rp-toggle-slider { background: #10b981; }
.rp-toggle input:checked + .rp-toggle-slider::before { transform: translateX(18px); }

/* ===== PAGE LAYOUT ===== */
.rp-page {
  background: var(--bg-2);
  padding: 28px 0 60px;
  min-height: calc(100vh - 120px);
}

/* ===== RESUME CARD ===== */
.rp-resume {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  max-width: 860px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.05);
}

/* Header section */
.rp-head {
  padding: 36px 40px 28px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.rp-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -0.04em;
}

.rp-head-body { flex: 1; min-width: 0; }

.rp-name {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
  margin: 0 0 6px;
  line-height: 1.15;
}

.rp-position {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}

.rp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}

.rp-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.87rem;
  color: var(--text-2);
}
.rp-meta-item svg { flex-shrink: 0; opacity: 0.7; }
.rp-meta-item strong { color: var(--text); font-weight: 600; }

.rp-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rp-tag {
  padding: 4px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
}

/* Contacts strip */
.rp-contacts {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--border);
  background: var(--bg-2);
}

.rp-contact-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.85rem;
  border-right: 1px solid var(--border);
  flex: 1;
}
.rp-contact-cell:last-child { border-right: none; }
.rp-contact-cell svg { color: var(--accent); flex-shrink: 0; }
.rp-contact-label { font-size: 0.72rem; color: var(--text-2); margin-bottom: 1px; }
.rp-contact-val   { font-weight: 600; color: var(--text); }

/* Hidden contacts notice */
.rp-contacts-hidden {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: #fef3c7;
  border-bottom: 1.5px solid #fde68a;
  font-size: 0.84rem;
  color: #92400e;
}
.rp-contacts-hidden svg { color: #d97706; flex-shrink: 0; }

/* Body sections */
.rp-body { padding: 0 40px; }

.rp-section {
  padding: 24px 0;
  border-bottom: 1.5px solid var(--border);
}
.rp-section:last-child { border-bottom: none; }

.rp-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-2);
  margin-bottom: 16px;
}

/* About */
.rp-about-text {
  font-size: 0.92rem;
  line-height: 1.72;
  color: var(--text);
}

/* Experience timeline */
.rp-timeline { display: flex; flex-direction: column; gap: 0; }

.rp-tl-item {
  display: grid;
  grid-template-columns: 110px 20px 1fr;
  gap: 0;
  padding-bottom: 24px;
  position: relative;
}
.rp-tl-item:last-child { padding-bottom: 0; }

.rp-tl-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: calc(110px + 10px);
  top: 18px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.rp-tl-date {
  text-align: right;
  padding-right: 0;
  padding-top: 2px;
}
.rp-tl-period {
  font-size: 0.78rem;
  color: var(--text-2);
  font-weight: 500;
  line-height: 1.4;
}
.rp-tl-dur {
  font-size: 0.73rem;
  color: var(--text-2);
  opacity: 0.7;
  margin-top: 2px;
}

.rp-tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 1.5px var(--accent);
  margin: 4px 0 0;
  justify-self: center;
  flex-shrink: 0;
  z-index: 1;
  position: relative;
}

.rp-tl-body { padding-left: 14px; }

.rp-tl-company {
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-2);
  margin-bottom: 2px;
}
.rp-tl-pos {
  font-size: 0.97rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.rp-tl-desc {
  font-size: 0.86rem;
  line-height: 1.65;
  color: var(--text-2);
}

/* Education */
.rp-edu-list { display: flex; flex-direction: column; gap: 14px; }
.rp-edu-item { display: flex; gap: 14px; align-items: flex-start; }
.rp-edu-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: #eff6ff; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.rp-edu-icon svg { color: #2563eb; }
.rp-edu-name { font-size: 0.93rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.rp-edu-spec { font-size: 0.84rem; color: var(--text-2); }
.rp-edu-year { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; }

/* Skills */
.rp-skills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rp-skill {
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text);
}

/* Certs */
.rp-certs { display: flex; flex-direction: column; gap: 8px; }
.rp-cert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-2);
  border-radius: 10px;
}
.rp-cert-icon {
  width: 32px; height: 32px; border-radius: 7px;
  background: #fef3c7; display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.rp-cert-icon svg { color: #d97706; }
.rp-cert-name { font-size: 0.88rem; font-weight: 600; color: var(--text); flex: 1; }
.rp-cert-org  { font-size: 0.78rem; color: var(--text-2); }
.rp-cert-year { font-size: 0.8rem; color: var(--text-2); flex-shrink: 0; }

/* Languages */
.rp-langs { display: flex; gap: 10px; flex-wrap: wrap; }
.rp-lang {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: var(--bg-2);
  border-radius: 10px;
}
.rp-lang-name  { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.rp-lang-level { font-size: 0.78rem; color: var(--text-2); margin-left: 4px; }

/* Portfolio */
.rp-links { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.18s;
}
.rp-link:hover { border-color: var(--accent); color: var(--accent); }
.rp-link-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
}
.rp-link-icon.vk        { background: #e8f0fd; color: #2563eb; }
.rp-link-icon.instagram { background: #fce7f3; color: #db2777; }
.rp-link-icon.youtube   { background: #fef2f2; color: var(--accent); }

/* Notice block */
.rp-notice {
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 40px 24px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-2);
  line-height: 1.5;
}
.rp-notice svg { flex-shrink: 0; color: var(--text-2); margin-top: 1px; }

/* Completeness banner */
.rp-completeness {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 40px;
  border-top: 1.5px solid var(--border);
  background: var(--bg-2);
}
.rp-completeness-pct {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.rp-completeness-label {
  font-size: 0.82rem;
  color: var(--text-2);
  flex: 1;
}
.rp-completeness-label strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; font-size: 0.88rem; }
.rp-completeness-bar {
  height: 5px;
  background: var(--bg-3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 5px;
}
.rp-completeness-fill {
  height: 100%;
  width: 65%;
  background: linear-gradient(90deg, var(--accent), #ff6b5b);
  border-radius: 3px;
}

/* Share modal */
.rp-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}
.rp-modal-overlay.open { opacity: 1; visibility: visible; }
.rp-modal {
  background: var(--bg);
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
  transform: translateY(14px);
  transition: transform 0.22s;
}
.rp-modal-overlay.open .rp-modal { transform: translateY(0); }
.rp-modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.rp-modal-close {
  width: 30px; height: 30px; border: none; background: var(--bg-2);
  border-radius: 8px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; color: var(--text-2);
}
.rp-modal-close:hover { background: var(--bg-3); }
.rp-link-copy {
  display: flex;
  gap: 8px;
}
.rp-link-copy input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-2);
  background: var(--bg-2);
  outline: none;
}
.rp-copy-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  white-space: nowrap;
}
.rp-copy-btn:hover { background: #c0392b; }
.rp-modal-sub {
  font-size: 0.8rem;
  color: var(--text-2);
  margin-top: 10px;
  line-height: 1.5;
}

/* Toast */
.rp-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: #1a1a1a;
  color: #fff;
  padding: 11px 20px;
  border-radius: 30px;
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.rp-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.rp-toast svg { color: #4ade80; }

/* Print styles */
@media print {
  .navbar, .rp-bar, .rp-notice, .rp-completeness, footer { display: none !important; }
  .rp-page { background: #fff; padding: 0; }
  .rp-resume { border: none; box-shadow: none; border-radius: 0; max-width: 100%; }
}

@media (max-width: 680px) {
  .rp-head { flex-direction: column; padding: 24px; }
  .rp-body { padding: 0 20px; }
  .rp-notice { margin: 0 20px 20px; }
  .rp-completeness { padding: 14px 20px; }
  .rp-bar-actions { flex-wrap: wrap; gap: 6px; }
  .rp-contacts { flex-direction: column; }
  .rp-contact-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .rp-contact-cell:last-child { border-bottom: none; }
}
