/* filepath: /home/edgeai/website/assets/css/person-profiles.css */
/* Person Profile Individual Page Styles */
/* Based on CV layout and professional academic styling */

/* ==================== LAYOUT FIXES ==================== */

/* Remove gap between sidebar and content */
#main {
  animation: intro 0.3s both;
  animation-delay: 0.35s;
}

@media (max-width: 1023px) {
  #main {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 1em;
  }
  
  #main .archive {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (min-width: 1024px) {
  #main {
    display: block;
    margin-left: 280px;
    padding: 2em 2rem;
    max-width: calc(100% - 280px);
  }
  
  #main .archive {
    width: 100% !important;
    max-width: 1200px !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
}

@media (min-width: 1400px) {
  #main {
    margin-left: 280px;
    padding: 2em 3rem;
    max-width: calc(100% - 280px);
  }
  
  #main .archive {
    max-width: 1400px !important;
  }
}

/* Main person page container */
.person-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: #333;
}

@media (max-width: 1023px) {
  .person-page {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .person-page {
    padding: 0 1rem;
  }
}

html[data-theme="dark"] .person-page {
  color: #e0e0e0;
}

/* ==================== PERSON HEADER ==================== */

.person-header {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html[data-theme="dark"] .person-header {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.person-image-container {
  flex-shrink: 0;
}

.person-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.person-image:hover {
  transform: scale(1.05);
}

html[data-theme="dark"] .person-image {
  border: 4px solid #444;
}

.person-image-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #adb5bd;
  border: 4px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

html[data-theme="dark"] .person-image-placeholder {
  background-color: #343a40;
  color: #6c757d;
  border: 4px solid #444;
}

.person-info {
  flex: 1;
  padding-left: 1rem;
}

.person-info h1 {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: #2c5aa0;
  line-height: 1.2;
}

html[data-theme="dark"] .person-info h1 {
  color: #66b3ff;
}

.person-position {
  font-size: 1.3rem;
  color: #555;
  font-weight: 500;
  margin-bottom: 1.5rem;
  font-style: italic;
}

html[data-theme="dark"] .person-position {
  color: #bbb;
}

/* ==================== CONTACT INFORMATION ==================== */

.person-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1rem;
  color: #333;
}

html[data-theme="dark"] .contact-item {
  color: #e0e0e0;
}

.contact-item span:first-child {
  width: 1.5rem;
  text-align: center;
}

.contact-item a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
  color: #1e3a8a;
}

html[data-theme="dark"] .contact-item a {
  color: #66b3ff;
}

html[data-theme="dark"] .contact-item a:hover {
  color: #99ccff;
}

/* ==================== OFFICE HOURS ==================== */

.office-hours {
  margin: 1rem 0;
  background: transparent;
  border: none;
  padding: 0;
}

.office-hours-table {
  display: table;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: #333;
}

html[data-theme="dark"] .office-hours-table {
  color: #e0e0e0;
}

.office-hours-row {
  display: table-row;
}

.office-hours-label,
.office-hours-schedule {
  display: table-cell;
  padding: 0.4rem 0;
  vertical-align: top;
}

.office-hours-label {
  font-weight: 600;
  color: #555;
  width: 120px;
  padding-right: 1.5rem;
}

html[data-theme="dark"] .office-hours-label {
  color: #bbb;
}

.office-hours-schedule {
  color: #333;
}

html[data-theme="dark"] .office-hours-schedule {
  color: #e0e0e0;
}

.schedule-day-row {
  display: block;
  margin-bottom: 0.2rem;
}

.schedule-day-row:last-child {
  margin-bottom: 0;
}

.day-name {
  display: inline-block;
  min-width: 45px;
  font-weight: 500;
  color: #444;
  margin-right: 1rem;
}

html[data-theme="dark"] .day-name {
  color: #ccc;
}

.day-time {
  color: #333;
}

html[data-theme="dark"] .day-time {
  color: #e0e0e0;
}

/* Compact inline version */
.office-hours-inline {
  margin: 1rem 0;
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  font-size: 0.95rem;
}

.office-hours-inline .office-hours-label {
  flex-shrink: 0;
  min-width: 100px;
  font-weight: 600;
  color: #555;
  padding: 0;
}

html[data-theme="dark"] .office-hours-inline .office-hours-label {
  color: #bbb;
}

.office-hours-inline .schedule-days {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.office-hours-inline .schedule-day-row {
  margin: 0;
  line-height: 1.4;
}

/* ==================== SECTION STYLING ==================== */

.person-section {
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: #333;
}

html[data-theme="dark"] .person-section {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  color: #e0e0e0;
}

.person-section h2 {
  color: #2c5aa0;
  border-bottom: 3px solid #f4a261;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  font-weight: 600;
}

html[data-theme="dark"] .person-section h2 {
  color: #66b3ff;
  border-bottom-color: #ff8c42;
}

/* ==================== RESEARCH INTERESTS ==================== */

.research-interests ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.research-interests li {
  background: #6c757d;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.research-interests li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #5a6268;
}

html[data-theme="dark"] .research-interests li {
  background: rgba(255, 255, 255, 0.15);
  color: #e0e0e0;
}

html[data-theme="dark"] .research-interests li:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ==================== POSITIONS AND EDUCATION ==================== */

.position-entry,
.education-entry {
  margin-bottom: 3rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

.position-entry:last-child,
.education-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

html[data-theme="dark"] .position-entry,
html[data-theme="dark"] .education-entry {
  border-bottom: 1px solid #444;
}

.year-range {
  color: #2c5aa0;
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

html[data-theme="dark"] .year-range {
  color: #66b3ff;
}

.position-title,
.degree-title,
.education-title {
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

html[data-theme="dark"] .position-title,
html[data-theme="dark"] .degree-title,
html[data-theme="dark"] .education-title {
  color: #f0f0f0;
}

.organization,
.institution {
  color: #555;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

html[data-theme="dark"] .organization,
html[data-theme="dark"] .institution {
  color: #b0b0b0;
}

.organization a,
.institution a {
  color: #2c5aa0;
  text-decoration: none;
  font-weight: 500;
}

.organization a:hover,
.institution a:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .organization a,
html[data-theme="dark"] .institution a {
  color: #66b3ff;
}

.location {
  color: #777;
  font-style: italic;
  font-size: 0.95rem;
}

html[data-theme="dark"] .location {
  color: #999;
}

/* ==================== POSITION/EDUCATION NOTES ==================== */

.position-notes,
.education-notes {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-left: 4px solid #007bff;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
}

html[data-theme="dark"] .position-notes,
html[data-theme="dark"] .education-notes {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #66b3ff;
  color: #e0e0e0;
}

.position-notes ul,
.education-notes ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #333;
}

html[data-theme="dark"] .position-notes ul,
html[data-theme="dark"] .education-notes ul {
  color: #e0e0e0;
}

.position-notes li,
.education-notes li {
  margin-bottom: 0.25rem;
  color: #333;
}

html[data-theme="dark"] .position-notes li,
html[data-theme="dark"] .education-notes li {
  color: #e0e0e0;
}

.position-notes h3,
.education-notes h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: #495057;
}

html[data-theme="dark"] .position-notes h3,
html[data-theme="dark"] .education-notes h3 {
  color: #f0f0f0;
}

/* ==================== PUBLICATIONS ==================== */

.publications-list {
  list-style: none;
  padding: 0;
}

.publication-item {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-left: 4px solid #28a745;
  border-radius: 4px;
  color: #333;
}

html[data-theme="dark"] .publication-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #40d882;
  color: #e0e0e0;
}

.publication-item a {
  color: #2c5aa0;
  text-decoration: none;
}

.publication-item a:hover {
  text-decoration: underline;
}

html[data-theme="dark"] .publication-item a {
  color: #66b3ff;
}

/* ==================== JOURNAL REVIEWS & COMMITTEES ==================== */

.journal-reviews-list ul,
.program-committees-list ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
}

.journal-item,
.committee-item {
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  background-color: #f8f9fa;
  border-left: 4px solid #17a2b8;
  border-radius: 0 4px 4px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #333;
}

html[data-theme="dark"] .journal-item,
html[data-theme="dark"] .committee-item {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #20c997;
  color: #e0e0e0;
}

/* ==================== GRANTS & AWARDS ==================== */

.grant-entry {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e9ecef;
}

html[data-theme="dark"] .grant-entry {
  border-bottom: 1px solid #444;
}

.grant-entry:last-child {
  border-bottom: none;
}

.grant-title {
  font-weight: bold;
  font-size: 1.1rem;
  color: #212529;
}

html[data-theme="dark"] .grant-title {
  color: #f0f0f0;
}

.grant-location {
  color: #6c757d;
  font-size: 0.95rem;
  font-style: italic;
}

html[data-theme="dark"] .grant-location {
  color: #adb5bd;
}

.grant-notes {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border-left: 4px solid #28a745;
  border-radius: 0 4px 4px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #333;
}

html[data-theme="dark"] .grant-notes {
  background-color: rgba(255, 255, 255, 0.05);
  border-left: 4px solid #20c997;
  color: #e0e0e0;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 768px) {
  .person-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
  }
  
  .person-image,
  .person-image-placeholder {
    width: 150px;
    height: 150px;
  }
  
  .person-image-placeholder {
    font-size: 3.5rem;
  }
  
  .person-info {
    padding-left: 0;
  }
  
  .person-info h1 {
    font-size: 2rem;
  }
  
  .person-section {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }
  
  .office-hours-table {
    display: block;
  }
  
  .office-hours-row {
    display: block;
    margin-bottom: 1rem;
  }
  
  .office-hours-label,
  .office-hours-schedule {
    display: block;
    padding: 0;
    width: auto;
  }
  
  .office-hours-label {
    margin-bottom: 0.5rem;
    padding-right: 0;
  }
  
  .office-hours-inline {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .office-hours-inline .office-hours-label {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .person-header {
    padding: 1.5rem;
  }
  
  .person-section {
    padding: 1rem;
  }
  
  .person-info h1 {
    font-size: 1.75rem;
  }
  
  .person-position {
    font-size: 1.1rem;
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .person-page {
    max-width: 100%;
  }
  
  .person-header,
  .person-section {
    background: white !important;
    box-shadow: none;
    border: 1px solid #ccc;
    color: #000 !important;
  }
  
  .person-section h2 {
    color: #000 !important;
    border-bottom-color: #ccc;
  }
}