@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- DESIGN SYSTEM & CSS VARIABLES --- */
:root {
  --primary-color: #0f172a; /* Deep Slate Navy */
  --secondary-color: #334155; /* Slate Gray */
  --muted-color: #64748b; /* Cool Gray */
  --orange-accent: #ff7300; /* Custom Orange Accent */
  --orange-accent-light: #fff7ed; /* Light Orange Tint */
  --bg-page: #ffffff;
  --border-color: #e2e8f0;
  --light-gray: #f8fafc;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- BASE SETUP & PAGE SHADOWS --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

body {
  background-color: #f1f5f9;
  color: var(--primary-color);
  font-family: var(--font-body);
  font-size: 7.8pt; /* Optimized for high-density 1-page */
  line-height: 1.35;
  padding: 1.5rem 0;
  -webkit-font-smoothing: antialiased;
}

/* --- THE SINGLE A4 PAGE CONTAINER --- */
.page {
  background: var(--bg-page);
  width: 210mm;
  height: 297mm;
  padding: 6mm 8mm 6mm 8mm; /* Tight margins to prevent overflow and maximize printable area */
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- HEADER SECTION (COMPACT) --- */
.header-container {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 1rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 0.6rem;
  align-items: center;
}

.header-left {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 20pt;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  letter-spacing: -0.02em;
}

.profile-title {
  font-family: var(--font-heading);
  font-size: 11pt;
  font-weight: 700;
  color: var(--orange-accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

/* Contact Info Grid */
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 7.2pt;
  color: var(--secondary-color);
  text-decoration: none;
}

.contact-item svg {
  width: 11px;
  height: 11px;
  stroke: var(--orange-accent);
  stroke-width: 2;
  fill: none;
  flex-shrink: 0;
}

/* Profile Photo */
.avatar-container {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  justify-self: end;
  background: var(--bg-page);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* --- TWO COLUMN MAIN LAYOUT (HIGH DENSITY) --- */
.main-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  flex-grow: 1;
}

/* Left Column (Metadata/Skills/i18n) */
.left-col {
  border-right: 1px solid var(--border-color);
  padding-right: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Right Column (Experiences/Projects/Education) */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* --- SECTION HEADER --- */
.section-title {
  font-family: var(--font-heading);
  font-size: 9.5pt;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-color);
  border-bottom: 1.5px solid var(--orange-accent);
  padding-bottom: 1px;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.section-title svg {
  width: 11px;
  height: 11px;
  stroke: var(--orange-accent);
  stroke-width: 2.5;
  fill: none;
}

/* --- LEFT COLUMN COMPONENT STYLES --- */
.meta-box {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.citizenship-badge {
  background: var(--orange-accent-light);
  border: 1px solid rgba(255, 115, 0, 0.15);
  color: var(--orange-accent);
  font-size: 7pt;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  text-align: center;
}

.availability-badge {
  background: var(--primary-color);
  color: var(--bg-page);
  font-size: 7pt;
  font-weight: 700;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  text-align: center;
}

/* Languages */
.lang-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lang-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 7.2pt;
}

.lang-name {
  font-weight: 600;
  color: var(--primary-color);
}

.lang-level {
  font-weight: 700;
  font-size: 7.2pt;
  color: var(--orange-accent);
}

/* Skills Categories */
.skills-sec {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.skills-cat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.skills-cat-title {
  font-family: var(--font-heading);
  font-size: 7.5pt;
  font-weight: 700;
  color: var(--primary-color);
  border-left: 2px solid var(--orange-accent);
  padding-left: 0.25rem;
}

.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  padding-left: 0.25rem;
}

.skill-tag {
  background: var(--light-gray);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  font-size: 6.5pt;
  font-weight: 500;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}

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

/* QR Code (Extremely Compact) */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.25rem;
  background: var(--light-gray);
  border: 1px dashed var(--border-color);
  padding: 0.4rem;
  border-radius: 4px;
  margin-top: auto; /* Push to bottom of sidebar */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.qr-container:hover {
  background-color: var(--orange-accent-light);
  border-color: var(--orange-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 115, 0, 0.08);
}

.qr-code-img {
  width: 55px;
  height: 55px;
  background: #fff;
  padding: 0.1rem;
  border: 1px solid var(--border-color);
  border-radius: 3px;
}

.qr-text {
  font-size: 6pt;
  color: var(--secondary-color);
  line-height: 1.15;
}

.qr-link {
  font-size: 6.5pt;
  color: var(--orange-accent);
  font-weight: 700;
  text-decoration: none;
}

/* --- RIGHT COLUMN / TIMELINE COMPONENT STYLES --- */
.summary-text {
  font-size: 7.6pt;
  line-height: 1.35;
  color: var(--secondary-color);
  text-align: justify;
}

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

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.exp-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.exp-title-area {
  display: flex;
  flex-direction: column;
}

.exp-role {
  font-family: var(--font-heading);
  font-size: 8.8pt;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
}

.exp-company {
  font-size: 7.6pt;
  font-weight: 600;
  color: var(--orange-accent);
}

.experience-item.clickable-card,
.project-item.clickable-card {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.experience-item.clickable-card {
  padding: 0.35rem;
  margin: -0.35rem;
}

.experience-item.clickable-card:hover {
  background-color: var(--light-gray);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.project-item.clickable-card:hover {
  background-color: #f1f5f9;
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.demo-badge {
  font-family: var(--font-heading);
  font-size: 5.5pt;
  font-weight: 800;
  background: var(--orange-accent);
  color: var(--bg-page);
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0.3rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  line-height: 1;
}

.exp-company span.location {
  color: var(--muted-color);
  font-weight: 400;
}

.exp-date {
  font-family: var(--font-heading);
  font-size: 7pt;
  font-weight: 700;
  background: var(--light-gray);
  border: 1px solid var(--border-color);
  color: var(--primary-color);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.exp-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.15rem;
}

.exp-bullets li {
  font-size: 7.4pt;
  color: var(--secondary-color);
  position: relative;
  padding-left: 0.6rem;
}

.exp-bullets li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--orange-accent);
  font-size: 5pt;
  top: 1px;
}

.exp-bullets li strong {
  color: var(--primary-color);
}

/* Schumacher Custom Badges */
.lux-badges {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.05rem;
}

.lux-badge {
  font-size: 6pt;
  font-weight: 700;
  padding: 0.02rem 0.25rem;
  border-radius: 2px;
}

.lux-badge.legal {
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.15);
  color: #047857;
}

.lux-badge.lang {
  background: #ecfeff;
  border: 1px solid rgba(6, 182, 212, 0.15);
  color: #0891b2;
}

/* --- PROJECTS COMPONENT STYLES (COMPACT) --- */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.project-item {
  border: 1px solid var(--border-color);
  background: var(--light-gray);
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.proj-title-area {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
}

.proj-name {
  font-family: var(--font-heading);
  font-size: 8.8pt;
  font-weight: 800;
  color: var(--primary-color);
}

.proj-role {
  font-size: 7pt;
  font-family: var(--font-heading);
  color: var(--muted-color);
  font-style: italic;
  text-align: right;
  flex-shrink: 1;
  white-space: normal;
  max-width: 140px;
}

.proj-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
  margin-bottom: 0.15rem;
}

.tech-tag {
  font-size: 6pt;
  font-weight: 600;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--secondary-color);
  padding: 0 0.25rem;
  border-radius: 2px;
}

.proj-desc {
  font-size: 7.4pt;
  color: var(--secondary-color);
  line-height: 1.25;
}

/* STAR Methodology display */
.star-box {
  border-top: 1px dashed var(--border-color);
  padding-top: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.star-line {
  font-size: 7pt;
  line-height: 1.2;
}

.star-label {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 6pt;
  display: inline-block;
  width: 12px;
}

.star-label.s { color: #8b5cf6; }
.star-label.a { color: #06b6d4; }
.star-label.r { color: #10b981; }

.star-line p {
  display: inline;
  color: var(--secondary-color);
}

.star-line p strong {
  color: var(--primary-color);
}

/* Education List */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.edu-title-area {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.edu-degree {
  font-family: var(--font-heading);
  font-size: 8pt;
  font-weight: 700;
  color: var(--primary-color);
}

.edu-institution {
  font-size: 7.2pt;
  font-weight: 500;
  color: var(--secondary-color);
}

/* Floating Action Button (Clean download to PDF) */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 100;
}

.action-btn {
  background: var(--orange-accent);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 8.5pt;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(255, 115, 0, 0.2);
  transition: all 0.3s ease;
}

.action-btn:hover {
  transform: translateY(-2px);
  background: #e06600;
  box-shadow: 0 10px 25px rgba(255, 115, 0, 0.3);
}

.action-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.5;
}


/* ==========================================
   --- MOBILE RESPONSIVE STYLES (@media screen and (max-width: 768px)) ---
   ========================================== */
@media screen and (max-width: 768px) {
  body {
    padding: 0.5rem !important;
    background-color: #f1f5f9;
  }
  
  .page {
    width: 100% !important;
    height: auto !important;
    padding: 20px 16px !important;
    overflow: visible !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04) !important;
    border-radius: 8px !important;
  }
  
  .header-container {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    text-align: center;
    border-bottom: 1.5px solid var(--primary-color) !important;
    padding-bottom: 0.8rem !important;
  }
  
  .avatar-container {
    justify-self: center !important;
    width: 80px !important;
    height: 80px !important;
    order: -1 !important; /* Move photo to top on mobile for balanced aesthetics */
  }
  
  .contact-grid {
    justify-content: center !important;
    gap: 0.5rem 0.8rem !important;
  }
  
  .contact-item {
    font-size: 7.8pt !important;
  }
  
  .main-layout {
    grid-template-columns: 1fr !important;
    gap: 1.2rem !important;
  }
  
  .left-col {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
    padding-right: 0 !important;
    padding-bottom: 1rem !important;
    gap: 0.8rem !important;
  }
  
  .right-col {
    gap: 0.8rem !important;
  }
  
  .skills-list {
    gap: 0.25rem !important;
  }
  
  .skill-tag {
    font-size: 7pt !important;
    padding: 0.1rem 0.35rem !important;
  }
  
  .summary-text {
    font-size: 8pt !important;
    text-align: left !important;
  }
  
  .exp-role {
    font-size: 9.5pt !important;
  }
  
  .exp-company {
    font-size: 8pt !important;
  }
  
  .exp-bullets li {
    font-size: 8pt !important;
  }
  
  .proj-name {
    font-size: 9.5pt !important;
  }
  
  .proj-desc {
    font-size: 8pt !important;
  }
  
  .star-line {
    font-size: 7.6pt !important;
  }
  
  .edu-degree {
    font-size: 8.5pt !important;
  }
  
  .edu-institution {
    font-size: 7.8pt !important;
  }
  
  .qr-container {
    margin-top: 1rem !important;
    padding: 0.6rem !important;
  }
  
  .floating-actions {
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    gap: 0.5rem !important;
  }
  
  .action-btn {
    padding: 0.4rem 0.8rem !important;
    font-size: 8pt !important;
  }
}

/* ==========================================
   --- PRINT OPTIMIZED RULES (@MEDIA PRINT) ---
   ========================================== */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .floating-actions {
    display: none !important;
  }

  .page {
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    overflow: hidden !important;
  }

  .demo-badge {
    display: none !important;
  }

  .experience-item.clickable-card {
    transform: none !important;
    background-color: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  .project-item.clickable-card {
    transform: none !important;
    background-color: var(--light-gray) !important;
    box-shadow: none !important;
  }

  .qr-container {
    transform: none !important;
    background-color: var(--light-gray) !important;
    box-shadow: none !important;
    border: 1px dashed var(--border-color) !important;
  }

  .avatar-container {
    box-shadow: none !important;
    background: transparent !important;
  }
}
