/* Font Setup & General Styling */
body {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

body, p, span, div, li, a, .project-meta, .project-role, .project-year, .project-description {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Main Container Layout */
.container {
  max-width: 860px;
  margin: 25px auto;
  padding: 0 15px;
  box-sizing: border-box;
}

/* Headings with Instrument Serif */
h1, h2, .project-title, .navbar a {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  color: #111111;
}

/* Header Container (Top spacing matching bottom spacing) */
.header-container {
  width: 100%;
  margin-top: 25px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Side-by-Side Profile Header */
.profile-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 30px;
  margin-top: 0;
  margin-bottom: 25px;
  max-width: 860px;
  width: 100%;
  padding: 0 15px;
  box-sizing: border-box;
}

.profile-photo {
  display: flex;
  align-items: center;
}

.profile-photo img {
  width: 135px;
  height: 135px;
  object-fit: cover;
  border-radius: 50%;
  background-color: #f0f0f0;
  display: block;
}

.profile-info {
  text-align: left;
}

.profile-info h1 {
  margin: 0 0 2px 0;
  font-size: 2.6rem;
  line-height: 1.05;
}

.contact-info {
  margin: 0;
  color: #555555;
  font-size: 0.92rem;
  line-height: 1.35;
}

/* Social Icons Row (Aligned directly under text) */
.social-icons {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  padding-left: 0;
  justify-content: flex-start;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icons a:hover {
  transform: translateY(-2px);
  opacity: 0.8;
}

.header-social-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

/* Global Link Styles */
a {
  color: #0066cc;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:active {
  color: #a0a4f9 !important;
  text-decoration: underline;
}

/* Full-Width Navigation Bar */
.navbar {
  width: 100%;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
  background-color: #fafafa;
  margin-top: 0;
  margin-bottom: 25px;
}

.nav-content {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 8px 15px;
  box-sizing: border-box;
}

.navbar a {
  font-size: 1.35rem;
  color: #333333;
  text-decoration: none;
  padding: 2px 0;
}

.navbar a:hover,
.navbar a:active,
.navbar a.active {
  color: #a0a4f9 !important;
  border-bottom: 2px solid #a0a4f9;
}

/* Sections */
.section {
  margin-bottom: 40px;
}

.section h2 {
  font-size: 1.8rem;
  border-bottom: 1px solid #e5e5e5;
  padding-bottom: 6px;
  margin-bottom: 18px;
}
/* Section Subtext Placement (Above the horizontal line, smaller & italicized) */
.section-subtext {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: italic;
  font-size: 0.82rem;
  color: #666666;
  margin-top: 2px;
  margin-bottom: 8px;
}

/* Adjust Section Heading Margin for Subtext Placement */
/* Section Heading & Subtext Group (Horizontal line sits under the subtext) */
.section h2 {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 2px;
  border-bottom: none; /* Removed border from h2 */
  padding-bottom: 0;
}

.section-subtext {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-style: italic;
  font-size: 0.82rem;
  color: #666666;
  margin-top: 2px;
  margin-bottom: 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e5e5; /* Border now sits below the subtext */
}

/* Sori Demo Video Modal Matching White Project Modal Style */
.modal-content.video-modal-content {
  position: relative;
  max-width: 580px; /* Same max-width as project modals */
  max-height: 75vh;  /* Same max-height as project modals */
  width: 90%;
  background-color: #ffffff; /* White background matching rest of projects */
  border-radius: 12px;
  padding: 2rem 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  box-sizing: border-box;
}

.modal-content.video-modal-content h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: #111111;
  line-height: 1.25;
}

.modal-content.video-modal-content video {
  width: 100%;
  border-radius: 6px;
  margin-top: 0.5rem;
  display: block;
  outline: none;
}

/* Research Interests Grid Layout */
.research-grid {
  display: flex;
  gap: 25px;
  align-items: flex-start;
}

.research-text {
  flex: 1;
}

.research-text p {
  margin-top: 0;
}

.research-graphic {
  width: 210px;
  flex-shrink: 0;
}

.research-graphic img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Selected Projects Layout */
.project-card {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  align-items: flex-start;
}

.project-image-placeholder {
  width: 130px;
  height: 90px;
  flex-shrink: 0;
  background-color: #f8f8f8;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.project-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-details {
  flex-grow: 1;
}

.project-title-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
}

.project-title {
  font-size: 1.35rem;
  margin: 0;
  line-height: 1.2;
}

.project-year {
  color: #888888;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
}

.project-meta {
  color: #888888;
  font-size: 0.92rem;
  margin-top: 3px;
}

.project-role {
  color: #888888;
  font-size: 0.92rem;
  font-style: italic;
  margin-bottom: 6px;
}

.project-description {
  margin: 0;
  font-size: 0.92rem;
  color: #555555;
}

/* Interactive Clickable Elements & Hover Animation */
.clickable {
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.clickable:hover {
  transform: scale(1.025);
  opacity: 0.9;
}

/* News Section Layout */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.news-list li {
  display: flex;
  gap: 25px;
  margin-bottom: 14px;
  font-size: 0.95rem;
  align-items: baseline;
}

.news-date {
  width: 85px;
  flex-shrink: 0;
  color: #777777;
  font-weight: 500;
}

.news-content {
  color: #333333;
}

/* Pop-Up Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content.project-modal-content {
  position: relative;
  max-width: 580px;
  max-height: 75vh;
  width: 90%;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 2rem 1.8rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  color: #222222;
  text-align: left;
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
}

.project-modal-content h2 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 0.4rem;
  color: #111111;
  line-height: 1.25;
}

.modal-meta-bar {
  font-size: 0.82rem;
  color: #666666;
  border-bottom: 1px solid #eeeeee;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
}

.modal-body h3 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.3rem;
  margin-top: 1.3rem;
  margin-bottom: 0.4rem;
  color: #222222;
}

.modal-body p, .modal-body li {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #444444;
  margin-bottom: 0.8rem;
}

.modal-body ul, .modal-body ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.modal-body li {
  margin-bottom: 0.4rem;
}

.modal-prompt-quote {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.3;
  background-color: #f8f9fa;
  border-left: 3px solid #a0a4f9;
  margin: 1.2rem 0;
  padding: 0.8rem 1.1rem;
  color: #222222;
}

.close-btn {
  position: absolute;
  top: 0.8rem;
  right: 1.2rem;
  font-size: 1.8rem;
  font-weight: bold;
  color: #666666;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #000000;
}

/* Responsive Adjustments */
@media (max-width: 650px) {
  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .container {
    padding: 0 15px;
  }

  .profile-info {
    text-align: center;
  }

  .social-icons {
    justify-content: center;
  }

  .research-grid {
    flex-direction: column;
  }

  .research-graphic {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
  }

  .nav-content {
    gap: 20px;
    padding: 8px 15px;
  }

  .navbar a {
    font-size: 1.15rem;
  }

  .project-card {
    flex-direction: column;
  }

  .project-image-placeholder {
    width: 100%;
    height: 160px;
  }

  .project-title-row {
    flex-direction: column;
    gap: 2px;
  }

  .news-list li {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
  }
}