/* ═══════════════════════════════════════════════════════════════
   style.css — Main Stylesheet
   Project: 5 Minutes for a Professional CV
   Covers: Landing, Builder, Themes Gallery, Drawer, Modal, Toast
   ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════
   ১. RESET & BASE
   ═══════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --transition-speed: 0.35s;
  --font-main: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Base palette (landing + UI chrome) */
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --bg-soft: #f1f5f9;

  /* Accent */
  --brand-1: #2563eb;
  --brand-2: #7c3aed;
  --brand-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --success: #10b981;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 15px 40px rgba(15, 23, 42, 0.12);
  --shadow-brand: 0 8px 25px rgba(37, 99, 235, 0.4);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-soft);
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ═══════════════════════════════════════════
   ২. BUTTONS
   ═══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 12px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.45);
  padding: 10px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-outline:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ffffff;
  color: var(--ink-soft);
  border: 2px solid var(--line);
  padding: 9px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn-outline-dark:hover {
  border-color: var(--brand-2);
  color: var(--brand-2);
  background: #f5f3ff;
}

.btn-donate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-donate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(244, 63, 94, 0.4);
}

.btn-theme {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-gradient);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-theme:hover { transform: translateY(-2px); }

.btn-lg { padding: 16px 36px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }
.btn-full { width: 100%; }

.btn-add {
  width: 100%;
  padding: 11px;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  margin-top: 6px;
  transition: all 0.2s ease;
}
.btn-add:hover {
  border-color: var(--brand-1);
  color: var(--brand-1);
  background: #eff6ff;
}

.btn-remove {
  background: var(--danger-soft);
  color: var(--danger);
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  flex-shrink: 0;
}
.btn-remove:hover {
  background: var(--danger);
  color: #ffffff;
  transform: scale(1.1) rotate(90deg);
}

.btn-remove-photo {
  display: inline-block;
  margin-top: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  border: none;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-remove-photo:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-copy {
  background: #16a34a;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-copy:hover {
  background: #15803d;
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   ৩. LANDING PAGE (index.html)
   ═══════════════════════════════════════════ */

/* ─── Hero ─── */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #2563eb 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(96, 165, 250, 0.25), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(124, 58, 237, 0.25), transparent 45%);
  pointer-events: none;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 60px;
  position: relative;
  z-index: 2;
}
.navbar .logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 24px 80px;
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 22px;
  letter-spacing: -1px;
}
.gradient-text {
  background: linear-gradient(90deg, #60a5fa 0%, #34d399 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero-content > p {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin-bottom: 10px;
}
.hero-buttons {
  display: flex;
  gap: 16px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ─── Features ─── */
.features {
  padding: 90px 24px;
  background: #ffffff;
  text-align: center;
}
.features h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 12px;
}
.features > p {
  color: var(--muted);
  margin-bottom: 50px;
  font-size: 1.05rem;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.feature-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: left;
  transition: all 0.25s ease;
}
.feature-card:hover {
  transform: translateY(-6px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.feature-card .icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
  display: inline-block;
  width: 60px;
  height: 60px;
  line-height: 60px;
  text-align: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #f5f3ff);
}
.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* ─── CTA ─── */
.cta {
  padding: 80px 24px;
  text-align: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #ffffff;
}
.cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 12px;
}
.cta p {
  font-size: 1.05rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

/* ─── Footer ─── */
footer {
  padding: 32px 24px;
  text-align: center;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.9rem;
}

/* ═══════════════════════════════════════════
   ৪. TOP BAR (builder.html)
   ═══════════════════════════════════════════ */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 16px;
}
.top-bar .logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink-soft);
  letter-spacing: -0.5px;
}
.top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* ═══════════════════════════════════════════
   ৫. BUILDER LAYOUT
   ═══════════════════════════════════════════ */
.builder-layout {
  display: grid;
  grid-template-columns: 440px 1fr;
  gap: 24px;
  padding: 24px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}

/* ─── Form Panel ─── */
.form-panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  position: sticky;
  top: 84px;
}
.form-panel::-webkit-scrollbar { width: 8px; }
.form-panel::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.form-panel::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.form-panel::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.panel-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 22px;
}

/* ─── Form Sections ─── */
.form-section {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--line);
}
.form-section:last-of-type { border-bottom: none; }
.form-section h3 {
  font-size: 0.82rem;
  color: var(--brand-1);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 800;
}

.form-section input,
.form-section textarea,
.form-section select {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 0.94rem;
  color: var(--ink-soft);
  background: #ffffff;
  transition: all 0.2s ease;
}
.form-section input:focus,
.form-section textarea:focus,
.form-section select:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.form-section input::placeholder,
.form-section textarea::placeholder {
  color: #94a3b8;
}
.form-section textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}
.form-section input[type="file"] {
  padding: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}
.form-section select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.char-count {
  text-align: right;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: -6px;
  margin-bottom: 6px;
}
.hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 6px;
}

/* ─── Dynamic Items (Experience/Education/Lang/Cert) ─── */
.dynamic-item {
  background: #f8fafc;
  padding: 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  border-left: 3px solid var(--brand-1);
  animation: fadeSlideIn 0.25s ease;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dynamic-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.82rem;
  color: #475569;
  font-weight: 700;
}

/* ─── Photo & Signature previews ─── */
#photoPreview img {
  display: block;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--line);
  margin-top: 10px;
}
#signaturePreview img {
  display: block;
  max-width: 160px;
  max-height: 80px;
  border: 1px solid var(--line);
  padding: 6px;
  background: #ffffff;
  margin-top: 10px;
  border-radius: 6px;
  object-fit: contain;
}

/* ─── Form actions + privacy note ─── */
.form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.form-actions button { flex: 1; min-width: 110px; }

.privacy-note {
  margin-top: 16px;
  padding: 12px 14px;
  background: #ecfdf5;
  border-left: 4px solid var(--success);
  border-radius: 6px;
  font-size: 0.82rem;
  color: #065f46;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════
   ৬. PREVIEW PANEL
   ═══════════════════════════════════════════ */
.preview-panel {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 100px);
  position: sticky;
  top: 84px;
}
.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
  font-size: 0.9rem;
  color: #475569;
}
.theme-badge {
  background: var(--brand-1);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  transition: background 0.3s ease;
}

.preview-scroll {
  flex: 1;
  overflow-y: auto;
  background: var(--bg-soft);
  padding: 20px;
}
.preview-scroll::-webkit-scrollbar { width: 8px; }
.preview-scroll::-webkit-scrollbar-track { background: transparent; }
.preview-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.preview-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}
.preview-actions > button {
  flex: 1;
  min-width: 130px;
}

/* ─── CV Preview Card ─── */
.cv-preview {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-main);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
  max-width: 800px;
  margin: 0 auto;
  transition: background 0.35s ease, color 0.35s ease;
}

.cv-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 36px 40px;
  transition: background 0.35s ease;
}
.cv-photo {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255, 255, 255, 0.35);
  margin-bottom: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.cv-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
  line-height: 1.15;
}
.cv-jobtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 500;
  margin-bottom: 10px;
}
.cv-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 14px;
  font-size: 0.88rem;
  opacity: 0.95;
}
.cv-contact span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  word-break: break-word;
}

.cv-body {
  padding: 30px 40px 40px;
}
.cv-section {
  background: var(--card-bg);
  border-left: 4px solid var(--secondary);
  padding: 16px 20px;
  margin-bottom: 18px;
  border-radius: 0 10px 10px 0;
  transition: all 0.35s ease;
}
.section-title {
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 0.78rem;
  margin-bottom: 10px;
  transition: color 0.35s ease;
}

.cv-item {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cv-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.cv-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.cv-item-head strong {
  font-size: 0.98rem;
  color: var(--text);
}
.cv-item .date {
  color: var(--text-light);
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
}
.cv-item-sub {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 2px 0 6px;
}
.cv-item p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
}

/* Skills */
.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.skill-tag {
  background: var(--tag-bg);
  color: #ffffff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.35s ease;
}

/* Languages */
.cv-item-lang {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
}
.cv-item-lang:last-child { border-bottom: none; }
.lang-level {
  color: var(--secondary);
  font-weight: 700;
  font-size: 0.82rem;
  transition: color 0.35s ease;
}

/* Signature */
.cv-signature {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: right;
}
.cv-signature img {
  max-height: 60px;
  max-width: 180px;
  object-fit: contain;
  display: inline-block;
}
.signature-label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* ═══════════════════════════════════════════
   ৭. FLOATING THEME BUTTON
   ═══════════════════════════════════════════ */
.floating-theme-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #ffffff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.5);
  z-index: 500;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.floating-theme-btn:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 12px 35px rgba(124, 58, 237, 0.7);
}
.floating-theme-btn .pulse-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--brand-2);
  animation: pulseRing 2s infinite;
  pointer-events: none;
}
@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* ═══════════════════════════════════════════
   ৮. THEME DRAWER
   ═══════════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 998;
}
.drawer-overlay.show {
  opacity: 1;
  visibility: visible;
}

.theme-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: #ffffff;
  box-shadow: -8px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 999;
  display: flex;
  flex-direction: column;
}
.theme-drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}
.drawer-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.drawer-header p {
  font-size: 0.8rem;
  color: var(--muted);
}
.drawer-close {
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drawer-close:hover {
  background: var(--line);
  color: var(--ink);
  transform: rotate(90deg);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.drawer-body::-webkit-scrollbar { width: 6px; }
.drawer-body::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

/* ─── Compact theme cards (drawer) ─── */
.theme-grid-compact {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.theme-card-compact {
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.22s ease;
}
.theme-card-compact:hover {
  border-color: var(--brand-2);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(124, 58, 237, 0.15);
}
.theme-card-compact.active {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.theme-swatch {
  height: 74px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.swatch-line {
  height: 6px;
  border-radius: 3px;
  width: 80%;
}
.swatch-line.short { width: 60%; }
.swatch-line.shorter { width: 40%; }

.theme-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.theme-label .check { color: var(--brand-1); font-weight: 800; }

/* ═══════════════════════════════════════════
   ৯. THEMES PAGE (themes.html)
   ═══════════════════════════════════════════ */
.themes-page-body {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  min-height: 100vh;
}
.themes-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.themes-hero {
  text-align: center;
  margin-bottom: 40px;
}
.themes-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--ink);
  letter-spacing: -0.5px;
}
.themes-hero p {
  color: var(--muted);
  font-size: 1.05rem;
}

.theme-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.theme-card-large {
  background: #ffffff;
  border: 3px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}
.theme-card-large:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-2);
}
.theme-card-large.active {
  border-color: var(--brand-1);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15), var(--shadow-lg);
}

.theme-large-preview {
  height: 200px;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-cv {
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.mini-header {
  height: 28%;
  background: rgba(255, 255, 255, 0.28);
  border-bottom: 3px solid rgba(255, 255, 255, 0.35);
}
.mini-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mini-line {
  height: 8px;
  border-radius: 4px;
}

.theme-large-info {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.theme-large-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
}
.theme-dots { display: flex; gap: 5px; }
.theme-dots span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.active-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--brand-1);
  color: #ffffff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.themes-footer {
  text-align: center;
  margin-top: 50px;
}

/* ═══════════════════════════════════════════
   ১০. DONATE MODAL
   ═══════════════════════════════════════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[style*="display: flex"],
.modal.show { display: flex; }

.modal-content {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  text-align: center;
  animation: modalIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content .close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #94a3b8;
  background: none;
  border: none;
  transition: color 0.2s, transform 0.2s;
}
.modal-content .close:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.modal-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.modal-content h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}
.modal-text {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 22px;
  line-height: 1.6;
}

.donate-info {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border: 2px solid #86efac;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
.donate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.donate-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.brand-name {
  font-weight: 800;
  color: #166534;
  font-size: 1.05rem;
}
.brand-type {
  font-size: 0.75rem;
  color: #15803d;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}
.donate-number {
  font-size: 1.35rem;
  font-weight: 800;
  color: #15803d;
  letter-spacing: 1px;
  font-family: 'SF Mono', 'Courier New', monospace;
}
.donate-note {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 22px;
}
.donate-note strong { color: #16a34a; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.modal-actions button {
  flex: 1;
  min-width: 130px;
}

/* ═══════════════════════════════════════════
   ১১. TOAST NOTIFICATION
   ═══════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink-soft);
  color: #ffffff;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  z-index: 2000;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 90vw;
  text-align: center;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════
   ১২. RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .builder-layout { grid-template-columns: 1fr; }
  .form-panel,
  .preview-panel {
    position: static;
    max-height: none;
  }
  .preview-scroll { max-height: 620px; }
}

@media (max-width: 900px) {
  .navbar { padding: 16px 24px; }
  .hero-content h1 { font-size: 2rem; }
  .feature-grid { grid-template-columns: 1fr; }
  .top-actions .btn-sm { padding: 7px 10px; font-size: 0.8rem; }
}

@media (max-width: 768px) {
  .theme-drawer { width: 100vw; max-width: 100vw; }
  .theme-grid-compact { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .floating-theme-btn {
    width: 54px;
    height: 54px;
    bottom: 20px;
    right: 20px;
    font-size: 1.3rem;
  }
  .theme-gallery-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .theme-large-preview { height: 150px; padding: 12px; }
  .modal-content { padding: 26px 20px; }
  .donate-number { font-size: 1.15rem; }
  .donate-item { flex-direction: column; align-items: stretch; text-align: center; }
  .donate-brand { align-items: center; }
}

@media (max-width: 640px) {
  .top-bar {
    padding: 10px 14px;
    flex-wrap: wrap;
  }
  .top-actions {
    width: 100%;
    justify-content: space-between;
  }
  .top-actions button,
  .top-actions .btn-sm {
    flex: 1;
    padding: 8px 10px;
    font-size: 0.78rem;
  }
  .builder-layout { padding: 14px; gap: 16px; }
  .form-panel { padding: 18px; }
  .cv-header { padding: 26px 22px; }
  .cv-header h1 { font-size: 1.5rem; }
  .cv-body { padding: 20px 22px 26px; }
  .preview-scroll { padding: 12px; }
  .preview-actions { padding: 12px; }
  .preview-actions > button { min-width: 100px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .theme-gallery-grid { grid-template-columns: 1fr; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn-primary,
  .hero-buttons .btn-outline { width: 100%; }
  .modal-actions { flex-direction: column; }
  .modal-actions button { width: 100%; }
}

/* ═══════════════════════════════════════════
   ১৩. UTILITY & ACCESSIBILITY
   ═══════════════════════════════════════════ */
.hidden { display: none !important; }
.text-center { text-align: center; }

/* Focus outline (accessibility) */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Selection color */
::selection {
  background: var(--brand-1);
  color: #ffffff;
}