/* Custom styles for Hezbullah Shah Resume */

.profile-photo {
  border-radius: 50%;
  border: 4px solid var(--md-primary-fg-color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 220px;
  margin: 0 auto 2rem auto;
  display: block;
  transition: transform 0.3s ease;
}

.profile-photo:hover {
  transform: scale(1.05);
}

.hero-section {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
}

.hero-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--md-primary-fg-color);
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: 1.5rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  padding: 0.5rem;
  background: var(--md-code-bg-color);
  border-radius: 4px;
}

.contact-item .md-icon {
  color: var(--md-primary-fg-color);
}

.two-branches-badge {
  display: inline-block;
  background: #28a745;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.5rem;
  vertical-align: middle;
}

.experience-card {
  border-left: 4px solid var(--md-primary-fg-color);
  padding-left: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
}

.experience-card::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--md-primary-fg-color);
}

.company-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--md-primary-fg-color);
  margin-bottom: 0.25rem;
}

.job-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--md-default-fg-color);
  margin-bottom: 0.25rem;
}

.date-location {
  color: var(--md-default-fg-color--light);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 1rem;
}

.achievement-list {
  list-style: none;
  padding-left: 0;
}

.achievement-list li {
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.achievement-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--md-primary-fg-color);
  font-weight: bold;
  font-size: 1.2rem;
  line-height: 1.2rem;
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.skill-card {
  background: var(--md-code-bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  border-top: 3px solid var(--md-primary-fg-color);
}

.skill-card h3 {
  margin-top: 0;
  color: var(--md-primary-fg-color);
  font-size: 1.1rem;
}

.publication-card {
  background: var(--md-code-bg-color);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--md-primary-fg-color);
}

.publication-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--md-default-fg-color);
}

.publication-meta {
  color: var(--md-default-fg-color--light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-style: italic;
}

.project-highlight {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-accent-fg-color) 100%);
  color: white;
  padding: 2rem;
  border-radius: 8px;
  margin: 2rem 0;
}

.project-highlight h3 {
  margin-top: 0;
  color: white;
}

.download-section {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--md-code-bg-color);
  border-radius: 8px;
  margin: 2rem 0;
  border: 2px dashed var(--md-primary-fg-color);
}

.md-typeset .md-button {
  margin: 0.5rem;
}

.resume-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--md-primary-fg-color);
}

@media print {
  .md-header,
  .md-footer,
  .md-nav,
  .download-section {
    display: none !important;
  }
  
  .resume-header img {
    max-width: 120px;
  }
}

/**** Sidebar Customizations ****/

/* Hide the duplicate page name that appears below */
.md-nav__title {
    display: none !important;
}

/* Make current page bold in sidebar */
.md-nav__link--active {
    font-weight: bold !important;
    color: var(--md-primary-fg-color) !important;
    background: rgba(63, 81, 181, 0.1);
    padding-left: 0.5rem;
    border-radius: 4px;
}


/**** Print-specific styles ****/
body.printing {
  /* Force browser to use our page settings */
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* PDF Print Styles - Remove headers, keep page numbers */
@media print {
  /* Remove browser default headers (filename/date) */
  @page {
    margin: 2cm;
    @top-left { content: none; }
    @top-right { content: none; }
    @bottom-left { content: none; }
    @top-center { content: none !important; }
    @bottom-right { content: "Page: " counter(page) " / " counter(pages) !important; }
    @bottom-center { content: "" !important; }
    
  }
  
  /* Prevent headings from breaking across pages */
  h1, h2, h3 {
    page-break-after: avoid;
    break-after: avoid;
    orphans: 3;
    widows: 3;
  }
  
  /* Keep content with headings */
  h1 + *, h2 + *, h3 + * {
    page-break-before: avoid;
  }
  
  /* Force page break before major sections */
  h1 {
    page-break-before: always;
  }
  
  /* Don't break before first heading */
  h1:first-of-type {
    page-break-before: avoid;
  }
  
  /* Prevent images from breaking */
  img {
    page-break-inside: avoid;
    max-width: 100%;
  }
  
  /* Prevent tables from breaking */
  table {
    page-break-inside: avoid;
  }
  
  /* Hide website navigation when printing */
  .md-header, .md-tabs, .md-sidebar, .md-footer, .download-box {
    display: none !important;
  }
  
  /* Ensure content is visible */
  .md-content {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}