/* ---------------------------------------------------
   Resume Page Layout
----------------------------------------------------- */
.resume-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background-color: var(--bg-surface, #121212);
  border: 1px solid var(--border-ghost, #37373a);
  border-radius: 8px;
  padding: 1.35rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 992px) {
  .resume-page {
    grid-template-columns: 38% 62%;
    gap: 0;
    padding: 0;
    align-items: stretch;
  }
}

/* ---------------------------------------------------
   Sidebar
----------------------------------------------------- */
.resume-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.5rem 1.35rem;
  background-color: rgba(0, 255, 102, 0.04);
  border-radius: 8px;
}

@media (min-width: 992px) {
  .resume-sidebar {
    border-radius: 8px 0 0 8px;
    border-right: 1px solid var(--border-ghost, #37373a);
  }
}

/* Avatar Row (Horizontal 3-Icon Line) */
.resume-avatar-row,
.resume-avatar-wrapper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.85rem !important;
  width: 100% !important;
  margin: 0 auto 0.65rem auto !important;
}

.resume-avatar {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  min-height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  flex: 0 0 70px !important;
  margin: 0 !important;
  border-radius: 50% !important;
  border: 2px solid var(--accent-green, #00ff66) !important;
  background-color: rgba(0, 255, 102, 0.08) !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.resume-avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
}

.resume-avatar-icon,
.resume-hero-icon,
.avatar-flank-icon {
  width: 70px !important;
  height: 70px !important;
  min-width: 70px !important;
  min-height: 70px !important;
  max-width: 70px !important;
  max-height: 70px !important;
  flex: 0 0 70px !important;
  object-fit: contain !important;
  display: block !important;
  filter: drop-shadow(0 0 4px rgba(0, 255, 102, 0.25));
}

/* Sidebar Headings */
.resume-side-section h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-green, #00ff66) !important;
  border-bottom: 1px solid var(--border-ghost, #37373a);
  padding-bottom: 0.25rem;
  margin-bottom: 0.55rem;
}

/* Sidebar Progress Bar Skills (Right Aligned) */
.sidebar-skills-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  margin-bottom: 0.25rem;
}

.sidebar-skill-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end; /* Right aligns the text and bar */
  gap: 0.75rem;
}

.sidebar-skill-label {
  font-size: 0.95rem;
  color: var(--text-main, #f4f4f5);
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  text-align: right;
}

.skill-progress-bar {
  width: 115px !important;       /* Increased from 75px */
  flex: 0 0 115px !important;    /* Increased from 75px */
  height: 6px;
  background-color: rgba(255, 255, 255, 0.12) !important; /* Use your light-theme rgba in resume-light.css */
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08); /* Use your light-theme rgba in resume-light.css */
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.skill-progress-fill {
  height: 100%;
  background-color: var(--accent-green, #00ff66) !important;
  border-radius: 999px;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* External Profiles */
.resume-profiles .resume-platform + .resume-platform {
  margin-top: 0.75rem;
}

.resume-platform h3 {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  font-size: 1rem;
  color: var(--text-main, #f4f4f5) !important;
  margin: 0 0 0.25rem 0 !important;
  padding: 0 !important;
}

.resume-platform-logo,
.resume-sidebar .brand-logo {
  height: 18px !important;
  width: auto !important;
  max-width: 110px !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.resume-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.35rem;
}

.resume-badge {
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--accent-cyan, #00ffff);
  color: var(--accent-cyan, #00ffff);
  background-color: rgba(0, 255, 255, 0.06);
}

.resume-stars {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.resume-star-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  gap: 0.4rem;
}

.resume-star-rating {
  color: var(--accent-yellow, #ffff00);
  font-size: 0.76rem;
}

.resume-profile-stat {
  font-size: 0.78rem;
  margin-bottom: 0;
  line-height: 1.25;
}

/* Single-Line Links & Contact */
.resume-links-list,
.resume-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
  overflow: hidden;
}

.resume-links-list a,
.resume-contact-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem !important;
  line-height: 1.25;
  color: var(--text-main, #f4f4f5);
  text-decoration: none;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  width: 100%;
}

.resume-contact-item span {
  font-size: 0.78rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.resume-links-list a i,
.resume-contact-item i {
  color: var(--accent-green, #00ff66);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ---------------------------------------------------
   Main Column
----------------------------------------------------- */
.resume-main {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.5rem 1.65rem;
}

.resume-header {
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-ghost, #37373a);
}

.resume-kicker {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--accent-cyan, #00ffff) !important;
  margin-bottom: 0.2rem;
}

.resume-header h1 {
  font-size: 1.7rem;
  margin-bottom: 0.15rem;
  padding-top: 0 !important;
}

.resume-subtitle {
  font-size: 1rem;
  color: var(--text-muted, #b1b1ba) !important;
  margin-bottom: 0;
}

.resume-section h2 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.05rem;
  color: var(--accent-green, #00ff66) !important;
  margin-bottom: 0.55rem;
}

.resume-main p {
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.resume-main p:last-child {
  margin-bottom: 0;
}

.resume-entry + .resume-entry {
  margin-top: 0.75rem;
}

.resume-entry h3 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 1rem;
  color: var(--text-main, #f4f4f5) !important;
  margin-bottom: 0.2rem;
}

.resume-entry h3 span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted, #b1b1ba);
  white-space: nowrap;
}

/* Projects Grid */
.resume-project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 576px) {
  .resume-project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.resume-project {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-ghost, #37373a);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.02);
}

.resume-project h3 {
  font-size: 1rem;
  color: var(--text-main, #f4f4f5) !important;
  margin-bottom: 0.25rem;
}

.resume-project p {
  font-size: 1rem !important;
  line-height: 1.4;
  margin-bottom: 0.35rem;
}

.resume-tech {
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
}

.resume-tech strong {
  color: var(--accent-cyan, #00ffff);
  margin-right: 0.25rem;
}

.resume-placeholder {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.82rem !important;
  line-height: 1.35 !important;
  font-style: italic;
  color: var(--text-muted, #b1b1ba);
}

.resume-education-meta span {
  margin: 0 0.3rem;
  color: var(--text-muted, #b1b1ba);
}

/* ---------------------------------------------------
   Print Styles
----------------------------------------------------- */
@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html,
  body.resume-document {
    background: var(--bg-surface, #121212) !important;
    font-size: 95%; /* Global font scale increased */
    height: 100% !important;
  }

  .navbar,
  footer,
  .skip-link {
    display: none !important;
  }

  main#main-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* Page 1 Split */
  .resume-page {
    grid-template-columns: 38% 62% !important;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    height: auto !important;
    min-height: 100vh;
    break-after: page;
    page-break-after: always;
  }

  /* Page 2 Full-Width Un-squeeze */
  .resume-page.resume-extra-page {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    background-color: var(--bg-surface, #121212) !important;
    break-before: page !important;
    page-break-before: always !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .resume-sidebar {
    height: 100%;
    padding: 1.45rem 1.15rem !important;
    gap: 0.85rem !important;
    border-radius: 0;
    border-right: 1px solid var(--border-ghost, #37373a);
  }

  .resume-main {
    padding: 1.45rem 1.35rem !important;
    gap: 0.85rem !important;
  }

  .resume-secondary-main {
    width: 100% !important;
    padding: 1.75rem 1.5rem !important;
  }

  .resume-header {
    padding-bottom: 0.4rem;
  }

  .resume-section h2,
  .resume-side-section h2 {
    margin-bottom: 0.35rem !important;
    padding-bottom: 0.2rem !important;
  }

  .resume-profiles .resume-platform + .resume-platform {
    margin-top: 0.5rem;
  }

  .resume-entry + .resume-entry {
    margin-top: 0.45rem !important;
  }

  .resume-project-grid {
    gap: 0.65rem !important;
  }

  .resume-project {
    padding: 0.65rem 0.75rem !important;
  }

  .resume-side-section,
  .resume-section,
  .resume-entry,
  .resume-project,
  .resume-header {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}