/* ===================== ROOT & RESET ===================== */
:root {
  --ink: #1A1A1A;
  --accent: #7A2530;
  --muted: #555555;
  --line: #CCCCCC;
  --shell: #EFECE5;
  --white: #ffffff;

  /* editor chrome (dark UI) */
  --bg-app: #0a0a12;
  --bg-panel: #11121b;
  --bg-card: #161826;
  --bg-field: #1b1d2c;
  --bg-field-hover: #20223375;
  --border-soft: rgba(255,255,255,0.08);
  --border-softer: rgba(255,255,255,0.05);
  --text-main: #e8e9f0;
  --text-dim: #9296ad;
  --text-faint: #5d6079;
  --accent-grad: linear-gradient(135deg, #a855f7 0%, #ec4899 55%, #f97316 100%);
  --accent-grad-soft: linear-gradient(135deg, rgba(168,85,247,0.16), rgba(236,72,153,0.12));
  --accent-pink: #f472b6;
  --accent-purple: #a78bfa;
  --ok-green: #22c55e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-app);
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

@media (max-width: 1024px) { body { flex-direction: column; } }

/* ===================== SIDEBAR NAV ===================== */
.app-sidebar {
  width: 210px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0d0e17 0%, #0a0a12 100%);
  border-right: 1px solid var(--border-softer);
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 14px;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  background: linear-gradient(135deg, #c084fc 0%, #f472b6 50%, #fb923c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 8px;
  margin-bottom: 22px;
}
.sidebar-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text-main); }
.nav-item.active {
  background: var(--accent-grad-soft);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(168,85,247,0.35);
}
.nav-icon { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-label { white-space: nowrap; }

.sidebar-help {
  position: relative;
  margin-top: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 14px 16px 16px;
}
.sidebar-help strong { display: block; color: var(--text-main); font-size: 13px; margin-bottom: 2px; }
.sidebar-help p { color: var(--text-dim); font-size: 12px; }
.sidebar-help-arrow {
  position: absolute; right: 12px; bottom: 12px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-grad); color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 14px; font-weight: 700;
}

@media (max-width: 1024px) {
  .app-sidebar {
    width: 100%; height: auto; position: relative; flex-direction: row;
    align-items: center; padding: 12px 14px; overflow-x: auto;
  }
  .sidebar-brand { margin: 0 14px 0 0; }
  .sidebar-nav { flex-direction: row; flex: none; gap: 4px; }
  .nav-label { display: none; }
  .nav-item { padding: 8px 10px; }
  .sidebar-help { display: none; }
}

/* ===================== FORM PANEL ===================== */
.form-panel {
  width: 400px;
  flex-shrink: 0;
  background: var(--bg-panel);
  border-right: 1px solid var(--border-softer);
  padding: 24px;
  overflow-y: auto;
  max-height: 100vh;
}

@media (max-width: 1024px) { .form-panel { width: 100%; max-height: none; border-right: none; border-bottom: 1px solid var(--border-softer); } }
@media (max-width: 640px) { .form-panel { padding: 16px; } }

.form-panel h1 { font-size: 18px; font-weight: 600; color: var(--text-main); margin: 0 0 4px; }
.brand-link { color: var(--accent-pink); text-decoration: none; font-weight: 700; }
.brand-link:hover { text-decoration: underline; }
.form-panel > p.subtitle { font-size: 14px; color: var(--text-dim); margin: 0 0 16px; }

.panel-section { scroll-margin-top: 14px; }

.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; font-weight: 500; color: var(--text-dim); margin-bottom: 4px; }
.field input[type="text"], .field select, .field textarea {
  width: 100%; border: 1px solid var(--border-soft); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; font-family: inherit;
  background: var(--bg-field); color: var(--text-main);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field textarea { resize: none; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; box-shadow: 0 0 0 2px rgba(168,85,247,0.45); border-color: rgba(168,85,247,0.6);
}
.checkbox-field { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.checkbox-field .field-label { margin: 0; }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--border-soft);
}
.panel-section > .section-title:first-child,
.form-panel > h1 + p.subtitle + section .section-title:first-child { margin-top: 0; }
.section-title span.label {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--accent-pink);
}
.section-title label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-dim); cursor: pointer; }
.section-title input[type="checkbox"] { accent-color: #ec4899; }

/* Photo uploader */
.photo-preview { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.photo-preview img { height: 64px; width: 64px; object-fit: cover; border-radius: 50%; border: 2px solid var(--border-soft); }
.photo-preview button { font-size: 12px; color: var(--text-dim); background: none; border: none; cursor: pointer; }
.photo-preview button:hover { color: #f87171; }
.logo-upload {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px dashed var(--border-soft); border-radius: 10px; padding: 14px;
  font-size: 14px; color: var(--text-dim); cursor: pointer; margin-bottom: 8px;
  background: rgba(255,255,255,0.02);
}
.logo-upload:hover { background: rgba(255,255,255,0.045); border-color: rgba(168,85,247,0.4); }
.logo-upload input { display: none; }
.logo-hint { font-size: 12px; color: var(--text-faint); margin: 0 0 12px; }

/* Style switcher — intentionally kept in its original light styling */
.style-switcher { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.style-option {
  flex: 1; min-width: 60px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  border: 1px solid #d1d5db; border-radius: 8px; padding: 8px 4px; cursor: pointer;
  font-size: 11px; color: #4b5563; text-align: center; transition: border-color 0.15s, background 0.15s;
  background: #ffffff;
}
.style-option:hover { background: #f9fafb; }
.style-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.style-option:has(input:checked) { border-color: var(--accent); background: #fdf2f3; color: var(--accent); font-weight: 600; }
.style-swatch { display: block; width: 100%; height: 30px; border-radius: 4px; border: 1px solid #e5e7eb; }
.swatch-classic { background: #fff; border: 2px solid #1A1A1A; }
.swatch-modern { background: linear-gradient(90deg, #1e3a5f 0 35%, #fff 35% 100%); }
.swatch-minimal { background: #fff; border: 2px solid #ddd; }
.swatch-academic { background: linear-gradient(to bottom, #7A2530 0 25%, #fff 25% 100%); }
.swatch-creative { background: linear-gradient(135deg, #f59e0b 0 30%, #1A1A1A 30% 100%); }

/* Dynamic items */
.dynamic-item { border: 1px solid var(--border-soft); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: var(--bg-card); }
.dynamic-item-heading { font-size: 13px; font-weight: 600; color: var(--text-main); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.dynamic-item-heading button { background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 15px; }
.dynamic-item-heading button:hover { color: #f87171; }

.add-field-btn { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--accent-purple); background: none; border: none; cursor: pointer; margin: 4px 0 16px; padding: 0; }
.add-field-btn:hover { color: #fff; }

.download-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px;
  color: #fff; font-weight: 600; font-size: 15px; border: none; border-radius: 10px;
  padding: 13px; cursor: pointer; background: var(--accent-grad); margin-top: 24px;
  transition: filter 0.15s, transform 0.1s; box-shadow: 0 8px 22px rgba(168,85,247,0.25);
}
.download-btn:hover { filter: brightness(1.08); }
.download-btn:active { transform: translateY(1px); }
.download-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.download-hint { font-size: 12px; color: var(--text-faint); margin-top: 10px; text-align: center; }
.hint-link { color: var(--accent-purple); text-decoration: none; font-weight: 600; }
.hint-link:hover { text-decoration: underline; }

/* ===================== PREVIEW WRAP / TOOLBAR ===================== */
.preview-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at 80% 0%, rgba(168,85,247,0.07), transparent 45%), var(--bg-app);
}

.preview-toolbar {
  height: 56px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-softer);
}
.toolbar-group { display: flex; align-items: center; gap: 10px; }
.toolbar-icon-btn {
  width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border-soft);
  color: var(--text-main); font-size: 16px; line-height: 1; display: flex;
  align-items: center; justify-content: center;
}
.toolbar-icon-btn:hover { background: rgba(255,255,255,0.1); }
.zoom-readout { color: var(--text-dim); font-size: 13px; min-width: 42px; text-align: center; }
.toolbar-status { gap: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-green); box-shadow: 0 0 0 4px rgba(34,197,94,0.15); }
.status-text { display: flex; flex-direction: column; line-height: 1.25; }
.status-title { color: var(--text-main); font-size: 12px; font-weight: 600; }
.status-sub { color: var(--text-faint); font-size: 11px; }

@media (max-width: 640px) {
  .preview-toolbar { padding: 0 14px; }
  .status-text { display: none; }
}

/* ===================== PREVIEW PANEL ===================== */
.preview-panel {
  flex: 1; display: flex; justify-content: center; align-items: flex-start;
  padding: 32px 24px; overflow: auto;
}
@media (max-width: 640px) { .preview-panel { padding: 16px 8px; } }

#cv-page-wrap {
  display: flex; justify-content: center; align-items: flex-start;
  width: 794px; flex-shrink: 0; transform-origin: top center;
}

#cv-page {
  width: 794px; min-height: 1123px; background: #ffffff;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45); box-sizing: border-box; flex-shrink: 0;
  font-family: "Times New Roman", Times, serif; color: var(--ink);
  overflow: hidden;
}

@media (max-width: 1300px) { #cv-page-wrap { transform: scale(0.88); margin-bottom: -130px; } }
@media (max-width: 1150px) { #cv-page-wrap { transform: scale(0.78); margin-bottom: -247px; } }
@media (max-width: 1024px) { #cv-page-wrap { transform: scale(0.72); margin-bottom: -314px; } }
@media (max-width: 860px)  { #cv-page-wrap { transform: scale(0.58); margin-bottom: -471px; } }
@media (max-width: 680px)  { #cv-page-wrap { transform: scale(0.46); margin-bottom: -605px; } }
@media (max-width: 520px)  { #cv-page-wrap { transform: scale(0.38); margin-bottom: -697px; } }
@media (max-width: 400px)  { #cv-page-wrap { transform: scale(0.32); margin-bottom: -764px; } }

/* ===================== SHARED CV ELEMENTS ===================== */
.cv-name { font-size: 30px; font-weight: 700; line-height: 1.2; }
.cv-jobtitle { font-size: 15px; color: var(--muted); margin-top: 4px; }
.cv-contacts { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 8px; }
.contact-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); font-family: sans-serif; }
.contact-item svg { flex-shrink: 0; }
.cv-divider { border: none; border-top: 2px solid var(--ink); margin: 16px 0; }
.cv-section { margin-bottom: 18px; }
.cv-section-title {
  font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1.5px solid var(--ink); padding-bottom: 4px; margin-bottom: 10px;
  font-family: sans-serif;
}
.cv-summary-text { font-size: 13px; line-height: 1.7; color: var(--ink); }
.cv-entry { margin-bottom: 12px; }
.entry-header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.entry-title { font-size: 14px; font-weight: 700; }
.entry-right { font-size: 12px; color: var(--muted); white-space: nowrap; font-family: sans-serif; }
.entry-sub { font-size: 13px; color: var(--muted); margin-top: 2px; font-style: italic; }
.entry-detail { font-size: 12px; color: #777; margin-top: 2px; font-family: sans-serif; }
.entry-desc { font-size: 12px; color: var(--ink); margin-top: 4px; line-height: 1.6; }
.entry-link { color: #1d4ed8; }
.tech-tag { font-size: 11px; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 4px; padding: 1px 6px; font-family: sans-serif; }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-pill { background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; padding: 3px 10px; font-size: 12px; font-family: sans-serif; }
.ref-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ref-card { background: #fafafa; border: 1px solid #e5e7eb; border-radius: 6px; padding: 10px 14px; }
.ref-name { font-size: 13px; font-weight: 700; }
.ref-des { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ref-contact { font-size: 11px; color: #777; margin-top: 2px; font-family: sans-serif; }
.people-table { width: 100%; border-collapse: collapse; font-size: 13px; font-family: sans-serif; }
.people-table th, .people-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.people-table th { background: #f3f4f6; font-weight: 600; }
.cv-photo { object-fit: cover; }

/* ===================== CLASSIC STYLE ===================== */
.cv-classic { padding: 48px 52px; font-family: "Times New Roman", Times, serif; }
.cv-classic-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 6px; }
.cv-photo-classic { width: 88px; height: 88px; border-radius: 50%; border: 3px solid var(--ink); flex-shrink: 0; }
.classic-header-text { flex: 1; }
.cv-classic .cv-name { color: var(--ink); }
.cv-classic .cv-section-title { color: var(--ink); }

/* ===================== MODERN STYLE ===================== */
.cv-modern { font-family: Arial, Helvetica, sans-serif; color: #1A1A1A; }
.modern-layout { display: flex; min-height: 1123px; }
.modern-sidebar {
  width: 240px; flex-shrink: 0; background: #1e3a5f; color: #fff;
  padding: 36px 22px; display: flex; flex-direction: column; gap: 0;
}
.modern-main { flex: 1; padding: 36px 28px; }
.cv-photo-sidebar { width: 90px; height: 90px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.4); margin: 0 auto 14px; display: block; }
.sidebar-name { font-size: 18px; font-weight: 700; color: #fff; text-align: center; line-height: 1.3; }
.sidebar-jobtitle { font-size: 12px; color: #93c5fd; text-align: center; margin-top: 4px; margin-bottom: 16px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-contacts { display: flex; flex-direction: column; gap: 8px; }
.sidebar-contact { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #cbd5e1; }
.sidebar-contact svg { flex-shrink: 0; color: #93c5fd; }
.sidebar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #93c5fd; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 4px; }
.sidebar-skill { margin-bottom: 6px; }
.skill-bar-label { font-size: 12px; color: #e2e8f0; }
.cv-modern .cv-section-title { color: #1e3a5f; border-bottom-color: #1e3a5f; }
.cv-modern .cv-name { display: none; }
.cv-modern .ref-card { background: transparent; border-color: rgba(255,255,255,0.2); }
.cv-modern .ref-name { color: #fff; }
.cv-modern .ref-des { color: #cbd5e1; }
.cv-modern .ref-contact { color: #93c5fd; }
.cv-modern .cv-section { margin-bottom: 20px; }

/* ===================== MINIMAL STYLE ===================== */
.cv-minimal { padding: 52px 60px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.minimal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #e5e7eb; }
.minimal-left { flex: 1; }
.cv-photo-minimal { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; margin-left: 24px; flex-shrink: 0; }
.minimal-name { font-size: 34px; font-weight: 300; letter-spacing: -0.5px; color: #111; }
.minimal-title { font-size: 14px; color: #666; margin-top: 6px; font-weight: 400; }
.minimal-contacts { font-size: 12px; color: #888; margin-top: 10px; letter-spacing: 0.02em; }
.minimal-section { margin-bottom: 24px; }
.minimal-section-title {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em;
  color: #999; margin-bottom: 12px;
}
.cv-minimal .cv-section-title { display: none; }
.cv-minimal .cv-section { margin-bottom: 24px; }
.cv-minimal .cv-section:has(.minimal-section-title) .cv-section-title { display: none; }
.cv-minimal .entry-title { font-size: 14px; font-weight: 600; }
.cv-minimal .entry-sub { font-style: normal; color: #888; }
.minimal-skills { display: flex; flex-wrap: wrap; gap: 8px; }
.minimal-skill-tag { font-size: 12px; color: #555; border-bottom: 1px solid #ccc; padding-bottom: 1px; }
.cv-minimal .ref-card { background: transparent; border: none; border-left: 2px solid #e5e7eb; border-radius: 0; padding: 4px 12px; }
.cv-minimal .cv-divider { display: none; }
.cv-minimal .people-table th { background: transparent; }

/* ===================== ACADEMIC STYLE ===================== */
.cv-academic { padding: 0; font-family: "Times New Roman", Times, serif; }
.academic-header { background: #7A2530; color: #fff; padding: 36px 52px 28px; }
.cv-photo-academic { width: 90px; height: 90px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.5); float: right; margin-left: 20px; }
.academic-name { color: #fff; font-size: 30px; }
.academic-position { color: rgba(255,255,255,0.85); font-size: 16px; margin-top: 6px; font-style: italic; }
.academic-contacts { margin-top: 10px; }
.academic-contacts .contact-item { color: rgba(255,255,255,0.8); }
.academic-rule { height: 4px; background: #f59e0b; }
.cv-academic > .cv-section, .cv-academic > div > .cv-section { padding: 0 52px; }
.cv-academic .cv-section { padding: 0 52px; margin-top: 20px; }
.academic-section-title {
  font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #7A2530; border-bottom: 2px solid #7A2530; padding-bottom: 4px; margin-bottom: 10px;
}
.cv-academic .cv-section-title { color: #7A2530; border-bottom-color: #7A2530; }
.cv-academic .skill-pill { background: #fdf2f3; border-color: #f8c4c7; color: #7A2530; }

/* ===================== CREATIVE STYLE ===================== */
.cv-creative { font-family: Arial, Helvetica, sans-serif; background: #fff; }
.creative-header { background: #1A1A1A; position: relative; overflow: hidden; }
.creative-accent-bar { position: absolute; top: 0; left: 0; width: 8px; height: 100%; background: #f59e0b; }
.creative-header-inner { display: flex; align-items: center; gap: 22px; padding: 30px 36px 30px 44px; }
.cv-photo-creative { width: 90px; height: 90px; border-radius: 8px; border: 3px solid #f59e0b; flex-shrink: 0; }
.creative-name { color: #fff; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.creative-jobtitle { color: #f59e0b; font-size: 14px; margin-top: 4px; }
.creative-contacts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
.creative-contact { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #ccc; }
.creative-contact svg { color: #f59e0b; }
.creative-body { display: flex; min-height: calc(1123px - 140px); }
.creative-left { width: 210px; flex-shrink: 0; background: #f8f8f8; padding: 24px 18px; border-right: 3px solid #f59e0b; }
.creative-right { flex: 1; padding: 24px 28px; }
.creative-section-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em;
  color: #f59e0b; margin-bottom: 10px; padding-bottom: 4px; border-bottom: 2px solid #f59e0b;
}
.cv-creative .cv-section-title { color: #1A1A1A; border-bottom-color: #f59e0b; }
.creative-sidebar-section { margin-bottom: 20px; }
.creative-skill-item { font-size: 12px; color: #333; padding: 4px 0; border-bottom: 1px solid #eee; }
.cv-creative .ref-card { background: #fff; border-color: #f59e0b; }
.cv-creative .skill-pill { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ===================== PRINT ===================== */
@media print {
  body * { visibility: hidden; }
  #cv-page, #cv-page * { visibility: visible; }
  #cv-page-wrap { position: fixed; inset: 0; transform: none !important; margin: 0 !important; width: 210mm !important; }
  #cv-page { box-shadow: none !important; width: 210mm !important; min-height: 297mm !important; }
  .preview-panel { padding: 0; }
  @page { size: A4; margin: 0; }
}

.hidden { display: none !important; }
/* ===================== SKILL DISPLAY OPTIONS ===================== */
.skill-display-opts {
  display: flex; gap: 16px; margin-bottom: 4px;
}
.skill-display-opts label {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--text-dim); cursor: pointer;
}

.skills-group { margin-bottom: 10px; }
.skills-group-label {
  display: block; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: #9ca3af; margin-bottom: 6px;
}

/* Skill bar rows */
.skill-bar-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
}
.skill-bar-label-text { font-size: 12px; width: 130px; flex-shrink: 0; }
.skill-bar-track {
  flex: 1; height: 5px; background: #e5e7eb; border-radius: 3px; overflow: hidden;
}
.skill-bar-fill {
  width: 75%; height: 100%; background: var(--accent); border-radius: 3px;
}

/* Skill list */
.skills-list {
  padding-left: 18px; font-size: 12px;
  columns: 2; column-gap: 20px;
}
.skills-list li { margin-bottom: 3px; break-inside: avoid; }

/* ===================== LANGUAGES ===================== */
.lang-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-family: sans-serif;
}
.lang-name { font-weight: 600; color: var(--ink); }
.lang-level {
  background: #f3f4f6; border: 1px solid #e5e7eb;
  border-radius: 10px; padding: 1px 8px;
  font-size: 11px; color: #6b7280;
}

/* ===================== ACHIEVEMENTS LIST ===================== */
.achievements-list {
  padding-left: 18px; font-size: 13px;
  line-height: 1.7; color: var(--ink);
}
.achievements-list li { margin-bottom: 3px; }

/* ===================== PROJECT LINKS ===================== */
.entry-links {
  display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap;
}
.entry-link-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #1d4ed8; font-family: sans-serif;
  text-decoration: none; border: 1px solid #bfdbfe; border-radius: 4px;
  padding: 1px 7px; background: #eff6ff;
}

/* ===================== ENTRY ACHIEVEMENTS ===================== */
.entry-achievements { color: #4b5563; margin-top: 3px; }

/* ===================== SELECT IN DYNAMIC ITEMS ===================== */
.dynamic-item select {
  width: 100%; border: 1px solid var(--border-soft); border-radius: 8px;
  padding: 8px 10px; font-size: 14px; font-family: inherit;
  background: var(--bg-field); color: var(--text-main);
}
.dynamic-item select:focus { outline: none; box-shadow: 0 0 0 2px rgba(168,85,247,0.45); }

/* ===================== ACADEMIC / MODERN LANGUAGES ===================== */
.cv-academic .lang-item .lang-level { background: #fdf2f3; border-color: #f8c4c7; color: #7A2530; }
.cv-modern .lang-item .lang-level { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); color: #cbd5e1; }
.cv-modern .lang-item .lang-name { color: #fff; }
.cv-modern .skills-group-label { color: #93c5fd; }
.cv-modern .skill-bar-track { background: rgba(255,255,255,0.15); }
.cv-modern .skill-bar-fill { background: #93c5fd; }
.cv-modern .skill-bar-label-text { color: #e2e8f0; }
.cv-modern .skills-list li { color: #e2e8f0; }
.cv-modern .lang-wrap { padding: 0 4px; }
.cv-creative .lang-item .lang-level { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* ===================== TRUNCATED MEDIA ===================== */
@media (max-width: 480px) {
  #cv-page-wrap { transform: scale(0.38); margin-bottom: -700px; }
}