:root {
  --primary-color: #2563eb;
  --primary-light: #60a5fa;
  --secondary-color: #1e293b;
  --accent-color: #3b82f6;
  --bg-color: #f8fafc;
  --text-main: #334155;
  --text-muted: #64748b;
  --sidebar-bg: #1e293b;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); /* Softer, deeper shadow */
  --card-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
}

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

body {
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5; /* Improved readability */
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.cv-container {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-width: 1000px;
  margin: 1rem auto;
  background: #fff;
  box-shadow: var(--shadow);
  min-height: 29.7cm;
  border-radius: 12px;
  overflow: hidden;
}

/* Sidebar Styles */
.sidebar {
  background-color: var(--sidebar-bg);
  color: #f1f5f9;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.profile-section {
  text-align: center;
}

.profile-img {
  width: 160px;
  height: 160px;
  border-radius: 20px;
  border: 4px solid var(--primary-light);
  object-fit: cover;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.profile-img:hover {
  transform: scale(1.05);
}

.sidebar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-light);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.sidebar section ul {
  list-style: none;
}

.contact-info li {
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
}

.contact-info a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--primary-light);
}

.skills-list > li {
  margin-bottom: 1.5rem;
}

.skills-list > li > strong {
  display: block;
  margin-bottom: 0.5rem;
  color: #fff;
}

.skills-list ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skills-list ul li {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--border-light);
  transition: all 0.2s ease;
}

.skills-list ul li:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  cursor: default;
}

.publications-list li {
  margin-bottom: 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.publications-list a {
  color: var(--primary-light);
  text-decoration: none;
}

.publications-list a:hover {
  text-decoration: underline;
}

/* Main Content Styles */
.main-content {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #fff 0%, #f1f5f9 100%);
}

header {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.header-specialties {
  color: var(--text-muted);
  font-size: 11pt;
  margin-top: 0.3rem;
  font-weight: 500;
}

header h1 {
  font-size: 26pt;
  font-weight: 800;
  color: var(--secondary-color);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

header h2 {
  font-size: 14pt;
  font-weight: 500;
  color: var(--primary-color);
  margin-top: 0.5rem;
}

.qr-code-section {
  margin-top: 0.5rem;
  text-align: center;
}

.qr-link {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s;
}

.qr-link:hover {
  transform: scale(1.05);
}

.qr-container {
  background: white;
  padding: 0.5rem;
  border-radius: 8px;
  display: inline-block;
  margin-top: 0.2rem;
}

.qr-container img {
  width: 80px;
  height: 80px;
}

.qr-container p {
  font-size: 0.65rem;
  color: var(--secondary-color);
  margin-top: 0.5rem;
  line-height: 1.2;
}

section {
  margin-bottom: 1rem; /* Reduced from 1.2rem */
  break-inside: avoid;
}

section h3 {
  font-size: 1.15rem; /* Coherent size */
  font-weight: 700;
  color: var(--secondary-color);
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid #f1f5f9; /* Lighter, thicker underline */
  padding-bottom: 0.5rem;
  color: var(--secondary-color);
  position: relative;
  padding-left: 0.5rem; /* Space for accent */
}

section h3::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, var(--primary-light), transparent);
}

.job-header i {
  color: var(--primary-color);
  margin-right: 0.5rem;
  width: 20px;
  text-align: center;
}

.about-text {
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
  border: 1px solid var(--glass-border);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  text-align: justify;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.about-text:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
  background: #fff;
}

.about-text::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary-color);
  transform: scaleY(0);
  transition: transform 0.4s ease;
  transform-origin: bottom;
}

.about-text:hover::before {
  transform: scaleY(1);
}

/* Timeline/Job Styles */
.job,
.education-item {
  position: relative;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem; /* Compact aerial vertical spacing */
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); /* Lighter 'aerial' shadow */
  transition: all 0.3s ease;
  page-break-inside: avoid;
}

.education-item.compact {
  background: transparent;
  padding: 0.5rem 0 0.5rem 1.2rem;
  box-shadow: none;
  margin-bottom: 0.5rem;
}

.job:hover,
.education-item:hover {
  transform: none; /* No movement to keep it professional/static */
  border-left-color: var(--primary-color); /* Highlight on hover */
  background: transparent;
}

/* Remove old timeline lines as we are moving to discrete boxes */
.job::after,
.education-item::after {
  display: none;
}

.job:last-child::after,
.education-item:last-child::after {
  bottom: 0; /* Terminates strictly at the end of the last item's content */
  height: 0; /* Or actually just hidden for the very last one? No, it should stop at the dot. */
}

/* More precise last-item termination: stop at the dot center */
.job:last-child::after,
.education-item:last-child::after {
  display: none;
}

/* Professional Timeline Dot */
.job::before,
.education-item::before {
  content: "";
  position: absolute;
  left: -8px;
  top: -0.2rem;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--border-medium);
  border-radius: 50%;
  z-index: 10;
  transition: all 0.3s ease;
}

.job:hover::before,
.education-item:hover::before {
  border-color: var(--primary-light);
  background: var(--primary-light);
  transform: scale(1.2);
}

.job:hover::after,
.education-item:hover::after {
  background: var(--primary-light);
}

.job-company {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.4rem;
}

.job-company strong {
  font-size: 0.95rem;
}

.experience-context {
  padding: 0.4rem 0.8rem;
  background: #f8fafc;
  border-left: 3px solid var(--primary-light);
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0.8rem 0;
  font-style: italic;
  line-height: 1.4;
}

.job-header h4.tooltip {
  border-bottom: 1px dotted rgba(37, 99, 235, 0.3);
  cursor: help;
  display: inline-block;
}

.job-header h4.tooltip:hover {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.job-company {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.5rem;
}

.company-link,
.tooltip {
  position: relative;
  transition: all 0.3s ease;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: #1e293b;
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 400;
  width: 350px;
  line-height: 1.5;
  text-align: justify;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Sidebar specific tooltip adjustment */
.sidebar [data-tooltip]::after {
  left: 100%;
  bottom: auto;
  top: 50%;
  transform: translateX(10px) translateY(-50%);
  width: 300px; /* Slightly narrower to fit screen */
  text-align: left;
}

.sidebar [data-tooltip]:hover::after {
  transform: translateX(15px) translateY(-50%);
}

.company-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: inherit;
  padding: 0.2rem 0.5rem;
  margin-left: -0.5rem;
  border-radius: 8px;
}

.company-link:hover {
  background: rgba(37, 99, 235, 0.05); /* Very subtle highlight */
}

.company-link strong {
  color: var(--secondary-color);
  position: relative;
}

.company-link strong::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width 0.3s ease;
}

.company-link:hover strong::after {
  width: 100%;
}

.company-link:hover strong {
  border-bottom: none; /* Remove old border */
}

.company-link img {
  height: 24px;
  width: auto;
  filter: grayscale(0.2);
  transition: all 0.3s ease;
  opacity: 0.7;
}

.company-link:hover img {
  filter: grayscale(0);
  opacity: 1;
  transform: scale(1.1);
}

.job-header {
  margin-bottom: 0.8rem;
}

.job-header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
}

/* Single Role Inline Styles - Specificity Boost */
.job.single-role .job-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.company-role-group {
  display: inline-flex; /* Changed to inline-flex */
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap; /* Force single line */
  flex: 1;
  min-width: 0; /* Allow flex shrinking */
  overflow: hidden; /* Handle overflow if needed */
  text-overflow: ellipsis;
}

.company-role-group strong {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Ensure company link behaves as flex item */
.job.single-role .company-link {
  display: inline-flex;
  margin-bottom: 0;
  margin-left: -0.5rem;
}

.job.single-role .separator {
  color: var(--text-muted);
  font-weight: 300;
  font-size: 0.9rem;
  margin: 0 0.2rem;
}

.job.single-role .role-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job.single-role .date {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: auto;
}

/* Standard Header Date */
.job-header .date {
  display: inline-block;
  background: transparent; /* Remove heavy background */
  border: 1px solid var(--border-light); /* Subtle border */
  padding: 0.1rem 0.6rem;
  border-radius: 4px; /* Less rounded, matches jobs */
  font-size: 0.75rem; /* Slightly smaller */
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.job ul {
  list-style: none;
}

.job ul li {
  position: relative;
  margin-bottom: 0.4rem;
  padding-left: 1rem;
}

.job ul li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--primary-color);
}

.education-item {
  display: flex;
  flex-direction: column; /* Stack children vertically */
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 0.8rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: all 0.3s ease;
}

.education-item.compact {
  padding: 0.6rem 0.8rem;
  gap: 0.2rem;
}

/* Remove old wrapper styles causing conflict */
.education-item .education-content {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
}

.actions {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.print-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
  transition: all 0.3s ease;
}

.print-btn:hover {
  background-color: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.print-btn:active {
  transform: translateY(0);
}

/* Full Version Interactive Elements & Ultra-Modern UI */
.full-version {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
}

.full-version .cv-container {
  max-width: 1100px;
  margin: 4rem auto;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  border-radius: 24px;
  overflow: hidden;
  animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-version .sidebar {
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.8) 0%,
    rgba(15, 23, 42, 0.9) 100%
  );
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.full-version .main-content {
  background: transparent;
  color: #f8fafc;
}

.full-version header h1 {
  background: linear-gradient(90deg, #60a5fa, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.full-version header h2 {
  color: var(--primary-light);
}

.full-version section h3 {
  color: #f1f5f9;
}

.full-version section h3 i {
  color: var(--primary-light);
}

.full-version .about-text {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.full-version .about-text:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  border-color: var(--primary-light);
}

.full-version .job,
.full-version .education-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.5rem;
  border-radius: 16px;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 4px solid var(--primary-light);
}

.full-version .education-item .education-content {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.full-version .education-content p {
  color: #94a3b8; /* Slightly more muted university name */
  margin-top: 0.5rem;
  font-weight: 500;
}

.full-version .job-header h4,
.full-version .education-content h4 {
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.full-version .profile-img {
  border-color: var(--primary-light);
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.2);
}

.full-version .profile-img:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: 0 0 50px rgba(96, 165, 250, 0.4);
}

.full-version .main-content ul li,
.full-version .education-content p {
  color: #cbd5e1;
}

.full-version .section-experience .job,
.full-version .section-formation .education-item {
  border-left: none;
  position: relative;
}

.full-version .job::after,
.full-version .education-item::after {
  left: -2px;
  background: rgba(255, 255, 255, 0.1);
}

.full-version .job:hover::after,
.full-version .education-item:hover::after {
  background: var(--primary-light);
}

.full-version .job:last-child::after,
.full-version .education-item:last-child::after {
  display: none;
}

.full-version .experience-context {
  background: rgba(96, 165, 250, 0.08);
  border-left-color: var(--primary-light);
  color: #94a3b8;
}

.full-version .sidebar section ul li {
  color: #e2e8f0;
}

.full-version .sidebar h3 {
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.full-version .company-link strong {
  color: #f8fafc;
}

.full-version .job-header .date {
  background: rgba(30, 41, 59, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--primary-light);
}

/* Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.98) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.full-version section {
  animation: slideUp 0.6s ease-out both;
}

.full-version section:nth-child(1) {
  animation-delay: 0.1s;
}
.full-version section:nth-child(2) {
  animation-delay: 0.2s;
}
.full-version section:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Professional A4 Print Optimization */
@page {
  size: A4;
  margin: 0mm; /* Balanced professional margins */
}

@media print {
  :root {
    --sidebar-bg: #1e293b;
    --text-main: #1a202c;
    --text-muted: #4a5568;
    --primary-color: #1a56db;
    --primary-light: #60a5fa;
    --secondary-color: #1e293b;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    background: #fff;
    font-size: 9pt; /* Robust professional font size */
    color: var(--text-main);
    line-height: 1.35; /* Elegant readability */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  .cv-container {
    display: grid;
    grid-template-columns: 260px 1fr; /* Better balanced sidebar */
    width: 210mm; /* Full width for Standard A4 printable area */
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    min-height: 29.7cm; /* Force full A4 height */
    height: auto;
    overflow: visible;
  }

  .sidebar {
    background-color: var(--sidebar-bg) !important;
    padding: 0.8rem;
    gap: 1rem;
  }

  .sidebar h3 {
    font-size: 10pt;
    color: var(--primary-light);
    border-bottom: 2px solid rgba(255, 255, 255, 0.15);
    margin-top: 0.6rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.2rem;
  }

  .contact-info li {
    margin-bottom: 0.4rem;
    font-size: 9pt;
  }

  .sidebar .skills-list > li {
    margin-bottom: 0.4rem;
  }

  .sidebar .skills-list ul li {
    padding: 0.15rem 0.4rem;
    font-size: 9pt;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .publications-list {
    padding-left: 14px;
    margin-top: 0.3rem;
  }

  .publications-list li {
    margin-bottom: 0.4rem !important;
    font-size: 9pt;
    line-height: 1.25;
  }

  .profile-img {
    width: 160px; /* Balanced size */
    height: 160px;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border: 4px solid var(--primary-light);
  }

  .main-content {
    padding: 1.2rem 1.8rem;
    background: #fff;
    color: #000 !important;
  }

  header {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.5rem;
  }

  .header-specialties {
    color: var(--text-muted);
    font-size: 10pt;
    margin-top: 0.3rem;
    font-weight: 500;
  }

  header h1 {
    font-size: 26pt;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
  }

  header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
  }

  section {
    margin-bottom: 0.2rem;
    break-inside: auto; /* Allow sections to split across pages */
  }

  section h3 {
    font-size: 1.2rem;
    margin-top: 0.6rem;
    margin-bottom: 0.8rem;
    border-bottom: 1.5px solid #edf2f7;
    padding-bottom: 0.2rem;
    color: var(--secondary-color);
  }

  section h3::after {
    background: linear-gradient(to right, var(--primary-light), transparent);
  }

  .about-text {
    display: block !important;
    padding: 0 !important;
    margin-bottom: 1rem !important;
    font-size: 9pt !important;
    border: none !important;
    background: transparent !important;
    color: #000 !important;
    overflow: visible !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .about-text p {
    color: #000 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .job,
  .education-item,
  .education-item.compact {
    margin-bottom: 0.4rem;
    padding: 0.5rem 0.8rem; /* Tighter padding for print */
    border: 1px solid var(--border-light);
    break-inside: avoid;
    box-shadow: none;
    background: #fff; /* Ensure white background for contrast */
  }

  /* Target the specific education compact items */
  .education-item.compact {
    display: block; /* Ensure stacking */
    border: 1px solid var(--border-light); /* Distinctive simple border */
    padding-left: 0.8rem;
    border-radius: 0;
  }

  .job-company {
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
  }

  .job-header {
    margin-bottom: 0.1rem;
  }

  .job-header h4 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .job-header .date {
    font-size: 0.75rem;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0;
    padding: 0 0.4rem;
    height: auto;
    line-height: 1.4;
  }

  .job ul li {
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  /* Remove interactive elements in print */
  .actions {
    display: none !important;
  }

  .job ul li {
    margin-bottom: 0.3rem;
    font-size: 0.88rem;
  }

  .education-item .education-content {
    padding: 0.6rem 0.8rem;
  }

  footer {
    margin-top: 1rem;
    font-size: 0.75rem;
    opacity: 0.8;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.5rem;
  }
}

/* Dark Theme for A4 (Screen only) */
@media screen {
  body.dark-theme {
    background-color: #0f172a;
    color: #e2e8f0;
  }

  body.dark-theme .cv-container {
    background: #1e293b;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  }

  body.dark-theme .main-content {
    background: #1e293b;
  }

  body.dark-theme h1,
  body.dark-theme h3 {
    color: #f8fafc;
  }

  body.dark-theme .about-text {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
  }

  body.dark-theme .job-company strong {
    color: #f8fafc;
  }

  body.dark-theme .experience-context {
    background: rgba(0, 0, 0, 0.2);
    color: #94a3b8;
  }

  body.dark-theme .qr-container {
    background: #f8fafc; /* Keep QR background light for contrast */
    padding: 8px;
    border-radius: 8px;
  }

  body.dark-theme .qr-container img {
    display: block;
    margin: 0 auto;
  }
}
