/* ===================================================================
   CV LƯỜNG HẠNH - MASTER STYLESHEET
   Fullstack Engineer CV - Modern, Responsive & Print-Optimized
   =================================================================== */

/* ---------- CSS VARIABLES & DESIGN TOKENS ---------- */
:root {
  /* Light Mode Palette */
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --bg-sidebar: #f8fafc;
  --bg-subtle: #f1f5f9;
  --bg-hover: #e2e8f0;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-inverse: #ffffff;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-subtle: #eff6ff;
  --primary-border: #bfdbfe;
  
  --accent: #0ea5e9;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --accent-glow: rgba(37, 99, 235, 0.25);
  
  --border-color: #e2e8f0;
  --border-card: #e2e8f0;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-paper: 0 20px 40px -15px rgba(15, 23, 42, 0.12);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Palette */
body.theme-dark {
  --bg-page: #0b1120;
  --bg-card: #111827;
  --bg-sidebar: #0f172a;
  --bg-subtle: #1e293b;
  --bg-hover: #334155;
  
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-subtle: #94a3b8;
  --text-inverse: #0f172a;
  
  --primary: #38bdf8;
  --primary-hover: #7dd3fc;
  --primary-subtle: rgba(56, 189, 248, 0.12);
  --primary-border: rgba(56, 189, 248, 0.3);
  
  --accent: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #34d399 100%);
  --accent-glow: rgba(56, 189, 248, 0.3);
  
  --border-color: #1e293b;
  --border-card: #1f293d;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  --shadow-paper: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.07);
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button {
  font-family: inherit;
  border: none;
  outline: none;
  cursor: pointer;
  background: none;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- ACTION BAR (FLOATING CONTROLS) ---------- */
.action-bar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 1.5rem;
}

body:not(.theme-dark) .action-bar {
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--shadow-sm);
}

.action-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.action-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-badge {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-badge i {
  -webkit-text-fill-color: initial;
  color: #38bdf8;
}

.user-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: pulse-dot 1.8s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.action-tools {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius-md);
  line-height: 1;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 4px 15px var(--accent-glow);
  filter: brightness(1.08);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  font-size: 1rem;
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateY(-1px);
}

/* ---------- TOAST NOTIFICATION ---------- */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 2000;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #38bdf8;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.toast-icon {
  color: #22c55e;
  font-size: 1.1rem;
}

/* ---------- MAIN CV WRAPPER & PAPER ---------- */
.cv-wrapper {
  padding: 2.2rem 1.2rem;
  display: flex;
  justify-content: center;
}

.cv-paper {
  width: 100%;
  max-width: 1050px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-paper);
  border: 1px solid var(--border-card);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Top Accent Glow Stripe */
.cv-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

/* ---------- CV HEADER SECTION ---------- */
.cv-header {
  padding: 2.5rem 2.8rem 2rem 2.8rem;
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-card) 100%);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  align-items: flex-start;
  width: 100%;
}

/* Header Intro Details */
.header-intro {
  flex: 1;
}

.name-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.35rem;
}

.candidate-name {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.15;
}

.role-chip {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--primary-subtle);
  color: var(--primary);
  border: 1px solid var(--primary-border);
}

.candidate-tagline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.highlight-icon {
  color: var(--primary);
}

.candidate-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.35rem;
}

.candidate-summary strong {
  color: var(--text-main);
}

/* Contact Grid */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.55rem 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  transition: var(--transition);
  padding: 0.2rem 0.3rem;
  border-radius: var(--radius-sm);
}

.contact-item:hover {
  color: var(--primary);
  transform: translateX(2px);
}

.contact-icon {
  color: var(--primary);
  font-size: 0.92rem;
  width: 16px;
  text-align: center;
}

/* ---------- 2-COLUMN BODY LAYOUT ---------- */
.cv-body-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  min-height: 800px;
}

/* Left Sidebar */
.cv-sidebar {
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 2.2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Right Main Column */
.cv-main {
  padding: 2.2rem 2.4rem;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

/* ---------- SECTION TITLES ---------- */
.section-block {
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 32px;
  height: 2px;
  background: var(--accent-gradient);
}

.title-icon {
  color: var(--primary);
  font-size: 0.95rem;
}

/* Section Header Flex (e.g., Projects + Filters) */
.section-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

.section-header-flex .section-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.section-header-flex .section-title::after {
  display: none;
}

/* Filter Buttons */
.project-filter {
  display: flex;
  gap: 0.35rem;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.filter-btn {
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-subtle);
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 1px 4px var(--accent-glow);
}

/* ---------- TIMELINE & EDUCATION (SIDEBAR) ---------- */
.timeline-item {
  position: relative;
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 0.35rem;
}

.timeline-role {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.2rem;
}

.timeline-org {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

/* Detail Lists (Shared) */
.detail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.detail-list li {
  position: relative;
  padding-left: 1rem;
  line-height: 1.55;
}

.detail-list li::before {
  content: '▪';
  position: absolute;
  left: 0;
  top: -1px;
  color: var(--primary);
  font-size: 0.95rem;
}

.detail-list strong {
  color: var(--text-main);
}

/* ---------- TECHNICAL SKILLS (SIDEBAR) ---------- */
.skill-group {
  margin-bottom: 1.15rem;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-category-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.skill-category-title i {
  color: var(--primary);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-tag {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.22rem 0.55rem;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill-tag:hover {
  border-color: var(--primary);
  color: var(--text-main);
  transform: translateY(-1px);
}

.skill-tag.highlight {
  font-weight: 600;
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-border);
}

/* ---------- CERTIFICATIONS & AWARDS ---------- */
.cert-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.cert-item:hover {
  border-color: var(--primary-border);
  transform: translateX(2px);
}

.cert-icon {
  color: var(--primary);
  font-size: 1.05rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.cert-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cert-info strong {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.3;
}

.cert-info span {
  font-size: 0.74rem;
  color: var(--text-subtle);
}

/* Soft skills list icon style */
.soft-skills li {
  padding-left: 1.3rem;
}

.soft-skills li::before {
  display: none;
}

.soft-skills li i {
  position: absolute;
  left: 0;
  top: 3px;
  color: #22c55e;
  font-size: 0.75rem;
}

/* ---------- WORK EXPERIENCE (MAIN) ---------- */
.experience-card {
  position: relative;
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
  border-bottom: 1px dashed var(--border-color);
}

.experience-card:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}

.exp-role {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.exp-company {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.exp-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.exp-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.exp-type {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-subtle);
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.exp-description {
  margin-bottom: 0.85rem;
}

.exp-description p {
  font-size: 0.89rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.6rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tech-pill {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-subtle);
  border: 1px solid var(--border-color);
}

/* ---------- PROJECTS GRID ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.project-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-md);
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.project-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.project-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.project-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.project-timeline {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-subtle);
}

.project-links {
  display: flex;
  gap: 0.4rem;
}

.link-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.link-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

.project-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.65rem;
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-color);
}

.tech-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border-color);
}

/* ---------- CAREER GOALS ---------- */
.career-goals {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.goal-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-sidebar);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.goal-icon {
  color: var(--primary);
  font-size: 1rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.goal-item strong {
  color: var(--text-main);
}

/* ---------- FOOTER ---------- */
.cv-footer {
  padding: 1.4rem 2.8rem;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-text {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.footer-watermark {
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-style: italic;
}

/* ---------- BACK TO TOP BUTTON ---------- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  z-index: 900;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: var(--transition);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* ===================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   =================================================================== */
@media screen and (max-width: 900px) {
  .cv-body-grid {
    grid-template-columns: 1fr;
  }
  
  .cv-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1.8rem 1.6rem;
  }
  
  .cv-main {
    padding: 1.8rem 1.6rem;
  }
  
  .cv-header {
    padding: 2rem 1.6rem 1.6rem 1.6rem;
  }
  
  .header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  .candidate-tagline {
    justify-content: center;
  }
  
  .name-row {
    justify-content: center;
  }
  
  .contact-grid {
    justify-items: center;
  }
}

@media screen and (max-width: 640px) {
  html {
    font-size: 14px;
  }
  
  .cv-wrapper {
    padding: 0.8rem 0.5rem;
  }
  
  .action-bar {
    padding: 0.5rem 0.75rem;
  }
  
  .action-container {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .action-tools {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .btn-text {
    display: none;
  }
  
  .btn {
    padding: 0.45rem 0.65rem;
  }
  
  .candidate-name {
    font-size: 1.8rem;
  }
  
  .exp-badge {
    align-items: flex-start;
  }
}

/* ===================================================================
   PRINT OPTIMIZATION (A4 PDF & PAPER RESUME)
   Ensures crystal-clear, elegant black/navy print without bloat.
   =================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm 12mm 12mm 12mm;
  }

  /* Force Light / Crisp Print Theme */
  :root, body, body.theme-dark {
    --bg-page: #ffffff !important;
    --bg-card: #ffffff !important;
    --bg-sidebar: #f8fafc !important;
    --bg-subtle: #f1f5f9 !important;
    --text-main: #0f172a !important;
    --text-muted: #334155 !important;
    --text-subtle: #475569 !important;
    --primary: #1d4ed8 !important;
    --border-color: #cbd5e1 !important;
    --border-card: #cbd5e1 !important;
    --shadow-paper: none !important;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
  }

  /* Hide Web-only controls */
  .no-print,
  .action-bar,
  .back-to-top,
  .toast,
  .project-filter,
  .project-links {
    display: none !important;
  }

  .cv-wrapper {
    padding: 0 !important;
    margin: 0 !important;
  }

  .cv-paper {
    width: 100% !important;
    max-width: 100% !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .cv-paper::before {
    display: none !important;
  }

  .cv-header {
    padding: 0.5rem 0 1.2rem 0 !important;
    background: transparent !important;
    border-bottom: 2px solid #0f172a !important;
  }

  .candidate-name {
    font-size: 20pt !important;
    color: #0f172a !important;
  }

  .role-chip {
    border: 1px solid #1d4ed8 !important;
    color: #1d4ed8 !important;
    background: transparent !important;
    font-size: 9pt !important;
  }

  .cv-body-grid {
    grid-template-columns: 260px 1fr !important;
  }

  .cv-sidebar {
    background: transparent !important;
    border-right: 1.5px solid #cbd5e1 !important;
    padding: 1.2rem 1.2rem 1rem 0 !important;
    gap: 1.4rem !important;
  }

  .cv-main {
    padding: 1.2rem 0 1rem 1.4rem !important;
    gap: 1.4rem !important;
  }

  .section-title {
    font-size: 11pt !important;
    border-bottom: 1.5px solid #0f172a !important;
    margin-bottom: 0.8rem !important;
    color: #0f172a !important;
  }

  .section-title::after {
    display: none !important;
  }

  .experience-card, 
  .project-card, 
  .section-block {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .project-card {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: none !important;
    padding: 0.8rem !important;
  }

  .skill-tag, .tech-pill, .tech-tag {
    border: 1px solid #94a3b8 !important;
    color: #0f172a !important;
    background: transparent !important;
  }

  .cert-item {
    background: transparent !important;
    border: 1px solid #e2e8f0 !important;
  }

  .cv-footer {
    display: none !important;
  }
}
