/*
 * CV Page Styles - portfolio.css (used as cv.css)
 * Loads ONLY on CV pages
 * Dependencies: common.css for global styles
 */

/* ===============================
   CV Container & Layout
   =============================== */
.cv-page-container {
  background: #fff !important;
  color: #111 !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
  border-radius: 8px;
  padding: 32px 24px;
  margin: 32px auto;
  max-width: 900px;
}

.cv-page-container h1,
.cv-page-container h2,
.cv-page-container h3,
.cv-page-container h4,
.cv-page-container h5,
.cv-page-container h6 {
  color: #151515 !important;
}

.cv-page-container p,
.cv-page-container li,
.cv-page-container .citation {
  color: #222 !important;
}

/* ===============================
   CV Page PDF-style
   =============================== */
.cv-page {
  font-family: 'Garamond', 'Times New Roman', serif;
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 32px;
  color: #333;
  background: #fff;
}

/* ===============================
   CV Header Buttons
   =============================== */
.profile-doc-header-buttons {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.profile-doc-header-buttons a,
.profile-doc-header-buttons button {
  background: #002856;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  font-family: 'Helvetica', 'Arial', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  margin: 0;
  display: inline-block;
}

.profile-doc-header-buttons a:hover,
.profile-doc-header-buttons button:hover {
  background: #0056b3;
}

/* ===============================
   CV Typography
   =============================== */
.cv-page h1,
.cv-page h2,
.cv-page h3,
.cv-page h4 {
  font-family: 'Helvetica', 'Arial', sans-serif;
  color: #002856;
  margin-top: 10px;
  margin-bottom: 4px;
  page-break-after: avoid;
}

.cv-page h1 {
  text-align: center;
  font-size: 22px;
  border-bottom: 1px solid #002856;
  padding-bottom: 5px;
  margin-top: 24px;
  margin-bottom: 20px;
}

.cv-page h2 {
  font-size: 16px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
  margin-top: 32px;
  margin-bottom: 16px;
}

.cv-page h3 {
  font-size: 15px;
  margin-top: 18px;
  margin-bottom: 8px;
}

/* ===============================
   CV Contact Section
   =============================== */
.cv-page .contact {
  text-align: center;
  margin-bottom: 10px;
}

.cv-page .contact a {
  color: #0056b3;
  text-decoration: none;
}

/* ===============================
   CV Sections
   =============================== */
.cv-page .section {
  margin-bottom: 32px;
}

.cv-page ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 28px;
}

.cv-page li {
  margin-bottom: 8px;
}

/* ===============================
   CV Experience
   =============================== */
.cv-page .experience {
  margin-bottom: 18px;
}

.cv-page .experience h3 {
  margin-bottom: 0;
}

.cv-page .experience-details {
  margin-left: 20px;
  margin-top: 8px;
}

.cv-page .institution {
  font-style: italic;
  font-weight: normal;
  margin-bottom: 8px;
  margin-top: 8px;
}

.cv-page .date {
  float: right;
  font-weight: normal;
  color: #666;
}

/* ===============================
   CV Tables
   =============================== */
.cv-page table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  margin-bottom: 4px;
}

.cv-page table th {
  text-align: left;
  background-color: #f5f5f5;
  padding: 3px;
}

.cv-page table td {
  padding: 3px;
  vertical-align: top;
}

.cv-page table th,
.cv-page table td {
  border-bottom: 1px solid #ddd;
}

/* ===============================
   CV Citations
   =============================== */
.cv-page .citation {
  margin-bottom: 12px;
  padding-left: 15px;
  text-indent: -15px;
}

.cv-page p {
  margin-top: 2px;
  margin-bottom: 2px;
}

/* ===============================
   CV Dark Mode
   =============================== */
.cv-page.cv-dark-mode {
  background: #181c24 !important;
  color: #e0e0e0 !important;
}

.cv-page.cv-dark-mode h1,
.cv-page.cv-dark-mode h2,
.cv-page.cv-dark-mode h3,
.cv-page.cv-dark-mode h4 {
  color: #7ecfff !important;
  border-color: #7ecfff !important;
}

.cv-page.cv-dark-mode .profile-doc-header-buttons a,
.cv-page.cv-dark-mode .profile-doc-header-buttons button {
  background: #0056b3;
  color: #fff;
}

.cv-page.cv-dark-mode .profile-doc-header-buttons a:hover,
.cv-page.cv-dark-mode .profile-doc-header-buttons button:hover {
  background: #002856;
}

.cv-page.cv-dark-mode .contact a {
  color: #7ecfff;
}

/* ===============================
   Responsive Styles
   =============================== */
@media (max-width: 781px) {
  .cv-page-container {
    padding: 16px 4px;
    margin: 8px auto;
  }
  .cv-page {
    padding: 16px 4px;
  }
}

/* ===============================
   Print Styles
   =============================== */
@media print {
  .cv-page,
  .cv-page.cv-dark-mode {
    padding: 0;
    line-height: 1.3;
    font-size: 10.5pt;
    background: #fff !important;
    color: #333 !important;
  }
  .cv-page .section {
    margin-bottom: 0.25in;
  }
  .cv-page h2 {
    margin-top: 0.2in;
    margin-bottom: 0.1in;
    padding-bottom: 0.05in;
  }
  .cv-page ul {
    margin-top: 0.05in;
    margin-bottom: 0.05in;
  }
  .cv-page li {
    margin-bottom: 0.07in;
    line-height: 1.4;
  }
  .cv-page .experience {
    margin-bottom: 0.15in;
  }
  .cv-page .citation {
    margin-bottom: 0.1in;
    line-height: 1.4;
  }
  .cv-page .experience-details {
    margin-top: 0.05in;
  }
  .cv-page .institution {
    margin-bottom: 0.05in;
  }
  #page1-end,
  #page2-end,
  #page3-end {
    page-break-after: always;
  }
  .cv-page .keep-together {
    page-break-inside: avoid;
  }
  .profile-doc-header-buttons {
    display: none !important;
  }
}

/* Core competencies section improvements */
.wp-block-column {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--wp--preset--color--base);
}

.wp-block-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wp-block-column h3 {
  color: var(--wp--preset--color--primary);
  border-bottom: 2px solid var(--wp--preset--color--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.wp-block-column p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--wp--preset--color--contrast);
}

/* Portfolio section */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--grid-gap, 20px);
  padding: var(--spacing-medium, 20px) 0;
}

.portfolio-item {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition-base, all 0.3s ease);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wp-block-cover {
  position: relative;
  overflow: hidden;
}

.wp-block-cover .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
}

#network-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Core competencies section improvements */
.wp-block-column {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-column:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wp-block-column h3 {
  border-bottom: 2px solid var(--wp--preset--color--primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.wp-block-column p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Specific competency card styling */
.competency-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--wp--preset--color--base);
}

.competency-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Make sure portfolio grid works well */
.portfolio-grid {
  gap: var(--grid-gap, 24px);
}

/* Network background specific improvements */
.network-bg-cover {
  position: relative;
  overflow: hidden;
}

/* Fix potential z-index issues with cover block */
.wp-block-cover {
  z-index: 1;
}

.wp-block-cover .wp-block-cover__inner-container {
  z-index: 2;
  position: relative;
}

/* Ensure consistent styles in light/dark modes */
.wp-block-columns .wp-block-column {
  border-radius: 8px;
  overflow: hidden;
}
