/* --- Fonts --- */
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAUi-qNiXg7eU0.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  src: local('Lato Italic'), local('Lato-Italic'), url(https://fonts.gstatic.com/s/lato/v15/S6u8w4BMUTPHjxsAXC-qNiXg7Q.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_FQftx9897sxZ.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 700;
  src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(https://fonts.gstatic.com/s/lato/v15/S6u_w4BMUTPHjxsI5wq_Gwftx9897g.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjxAwXiWtFCfQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  src: local('Lato Regular'), local('Lato-Regular'), url(https://fonts.gstatic.com/s/lato/v15/S6uyw4BMUTPHjx4wXiWtFCc.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwaPGQ3q5d0N7w.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  src: local('Lato Bold'), local('Lato-Bold'), url(https://fonts.gstatic.com/s/lato/v15/S6u9w4BMUTPHh6UVSwiPGQ3q5d0.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Lato', Verdana, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* --- Page fade-in --- */
@keyframes fadeInPage {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-wrap {
  max-width: 984px;
  margin: 0 auto;
  padding: 40px 24px 20px;
  animation: fadeInPage 0.5s ease-out;
}

/* --- Links --- */
a {
  color: #1772d0;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:focus,
a:hover {
  color: #f09228;
}

/* --- Typography --- */
.name {
  font-size: 34px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 16px;
}

.section-heading {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8e8e8;
  margin-bottom: 16px;
}

.paper-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

strong {
  font-weight: 700;
}

sup {
  line-height: 0;
}

p {
  margin: 0 0 12px;
}

/* --- Hero / Bio Section --- */
.hero {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-bottom: 32px;
}

.hero-text {
  flex: 1;
}

.hero-photo {
  flex: 0 0 240px;
  width: 240px;
}

/* --- Nav links --- */
.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.nav-links a {
  display: inline-block;
  padding: 6px 14px;
  border: 1.5px solid #1772d0;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background-color: #1772d0;
  color: #fff;
}

/* --- Sections --- */
.section {
  padding: 28px 0;
  border-top: 1px solid #eee;
}

.section:first-of-type {
  border-top: none;
}

/* --- Publication entries --- */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pub-entry {
  display: flex;
  gap: 20px;
  padding: 20px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  align-items: center;
}

.pub-entry:hover {
  background-color: #f8f9fa;
}

.pub-entry + .pub-entry {
  border-top: 1px solid #f0f0f0;
}

/* Figures are shown whole (scaled to width, never cropped or stretched) */
.pub-img {
  flex: 0 0 384px;
  width: 384px;
}

.pub-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

/* Add class="img-small" to an <img> to show it at 70% of the column, centered */
.pub-img img.img-small {
  width: 70%;
  margin: 0 auto;
}

/* --- Collapsible "Other Publications" --- */
.pub-more {
  margin-top: 16px;
}

.pub-more > summary {
  display: inline-block;
  list-style: none;
  cursor: pointer;
  padding: 6px 14px;
  border: 1.5px solid #1772d0;
  border-radius: 20px;
  color: #1772d0;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  transition: all 0.2s ease;
}

.pub-more > summary::-webkit-details-marker {
  display: none;
}

.pub-more > summary::before {
  content: '\25B8\00a0';
}

.pub-more[open] > summary::before {
  content: '\25BE\00a0';
}

.pub-more > summary:hover {
  background-color: #1772d0;
  color: #fff;
}

.pub-more > .pub-list {
  margin-top: 8px;
}

.pub-info {
  flex: 1;
  min-width: 0;
}

.pub-info p {
  font-size: 14px;
  color: #555;
  margin: 6px 0 0;
}

.pub-info .authors {
  font-size: 14px;
  margin: 4px 0;
  color: #444;
}

.pub-info .venue {
  font-size: 14px;
  margin: 2px 0;
}

.pub-links {
  margin-top: 6px;
  font-size: 14px;
}

.pub-links a {
  margin-right: 4px;
}

/* --- Research Projects list --- */
.research-list {
  padding-left: 20px;
}

.research-list li {
  margin-bottom: 8px;
}

.subsection-heading {
  font-size: 18px;
  margin: 20px 0 10px;
}

/* --- Timeline (experience, education, talks) --- */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-entry {
  display: flex;
  gap: 16px;
  padding: 14px 0;
}

.timeline-entry + .timeline-entry {
  border-top: 1px solid #f0f0f0;
}

.timeline-date {
  flex: 0 0 150px;
  font-weight: 700;
  font-size: 14px;
  color: #444;
  padding-top: 2px;
}

.timeline-info {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  font-weight: 600;
  margin-bottom: 2px;
}

.timeline-meta {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.timeline-points {
  font-size: 14px;
  color: #555;
  margin: 6px 0 0;
  padding-left: 18px;
}

.timeline-points li {
  margin-bottom: 2px;
}

/* --- Keyword tags --- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tag {
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 10px;
  background-color: #eef4fb;
  color: #1772d0;
}

/* --- Awards --- */
.awards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.award {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff8e1, #fdecc8);
  border: 1px solid #f3dca4;
}

.award-place {
  font-weight: 700;
  font-size: 15px;
  color: #7a5200;
}

.award-detail {
  font-size: 12px;
  color: #8a6d2f;
}

/* --- Photo Slideshow (same format as the template's Film Photography section) --- */
/* Box height = 1/3 of its width; every photo fills that height and keeps its aspect ratio */
.photo-slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  margin-top: 18px;
}

.photo-slide {
  display: none;
  height: 100%;
  animation: fadeIn 0.5s ease;
  position: relative;
}

.photo-slide.active {
  display: flex;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.photo-slide img {
  height: 100%;
  width: auto;
  display: block;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 16px 14px;
  background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,0.9));
  color: #333;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.photo-caption .photo-location {
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 2px;
}

.photo-dots {
  text-align: center;
  padding: 14px 0 4px;
}

.dot {
  cursor: pointer;
  height: 9px;
  width: 9px;
  margin: 0 3px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot:hover {
  background-color: #999;
}

.dot.active {
  background-color: #555;
  transform: scale(1.25);
}

.photo-nav {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  padding: 12px 14px;
  background-color: rgba(0,0,0,0.3);
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 4px;
  user-select: none;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.photo-nav:hover {
  background-color: rgba(0,0,0,0.6);
  color: white;
}

.photo-nav.prev { left: 8px; }
.photo-nav.next { right: 8px; }

/* --- Profile Slideshow --- */
.profile-slideshow {
  position: relative;
  width: 100%;
}

.slide {
  display: none;
  width: 100%;
  text-align: center;
}

.slide.active {
  display: block;
}

.slide img {
  width: 100%;
  border-radius: 10px;
}

.slide-caption {
  text-align: center;
  font-size: 13px;
  color: #888;
  margin-top: 8px;
}

.profile-nav {
  cursor: pointer;
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  padding: 8px 12px;
  background-color: rgba(0,0,0,0.3);
  color: white;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  user-select: none;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.profile-nav:hover {
  background-color: rgba(0,0,0,0.6);
}

.profile-nav.prev { left: 4px; }
.profile-nav.next { right: 4px; }

.profile-dots {
  text-align: center;
  margin-top: 8px;
}

.profile-dot {
  cursor: pointer;
  height: 8px;
  width: 8px;
  margin: 0 3px;
  background-color: #ccc;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.profile-dot.active { background-color: #555; }

/* --- Highlight --- */
span.highlight {
  background-color: #ffffd0;
  padding: 1px 4px;
  border-radius: 3px;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 24px 0 16px;
  border-top: 1px solid #eee;
  margin-top: 12px;
  font-size: 13px;
  color: #aaa;
}

.footer a {
  color: #aaa;
}

.footer a:hover {
  color: #f09228;
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* --- Dark Mode --- */
body.dark {
  background-color: #1a1a2e;
  color: #e0e0e0;
}

body.dark .page-wrap {
  color: #e0e0e0;
}

body.dark .theme-toggle {
  background: #2a2a4a;
  border-color: #3a3a5a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

body.dark .name {
  color: #f0f0f0;
}

body.dark .section-heading {
  color: #e8e8e8;
  border-bottom-color: #333;
}

body.dark .section {
  border-top-color: #2a2a4a;
}

body.dark a {
  color: #5da4e6;
}

body.dark a:hover {
  color: #f0a848;
}

body.dark .nav-links a {
  border-color: #5da4e6;
  color: #5da4e6;
}

body.dark .nav-links a:hover {
  background-color: #5da4e6;
  color: #1a1a2e;
}

body.dark .pub-entry:hover {
  background-color: #222244;
}

body.dark .pub-entry + .pub-entry {
  border-top-color: #2a2a4a;
}

body.dark .pub-more > summary {
  border-color: #5da4e6;
  color: #5da4e6;
}

body.dark .pub-more > summary:hover {
  background-color: #5da4e6;
  color: #1a1a2e;
}

body.dark .pub-info p {
  color: #aaa;
}

body.dark .pub-info .authors {
  color: #bbb;
}

body.dark .timeline-entry + .timeline-entry {
  border-top-color: #2a2a4a;
}

body.dark .timeline-date {
  color: #ccc;
}

body.dark .timeline-meta {
  color: #999;
}

body.dark .timeline-points {
  color: #aaa;
}

body.dark .tag {
  background-color: #222244;
  color: #5da4e6;
}

body.dark .award {
  background: linear-gradient(135deg, #2e2a1a, #3a321c);
  border-color: #5a4a22;
}

body.dark .award-place {
  color: #f3cf7a;
}

body.dark .award-detail {
  color: #c9ae6e;
}

body.dark .photo-slideshow {
  background: #1a1a2e;
}

body.dark .photo-caption {
  background: linear-gradient(rgba(26,26,46,0), rgba(26,26,46,0.9));
  color: #e0e0e0;
}

body.dark .photo-nav,
body.dark .photo-nav:hover {
  color: #fff;
}

body.dark .dot {
  background-color: #555;
}

body.dark .dot.active {
  background-color: #ccc;
}

body.dark .slide-caption {
  color: #999;
}

body.dark span.highlight {
  background-color: #3a3a1a;
  color: #e0e0a0;
}

body.dark .footer {
  border-top-color: #2a2a4a;
  color: #666;
}

body.dark .footer a {
  color: #666;
}

body.dark .profile-dot {
  background-color: #555;
}

body.dark .profile-dot.active {
  background-color: #ccc;
}

/* --- Mobile --- */
@media (max-width: 600px) {
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 20px;
  }

  .hero-photo {
    flex: 0 0 200px;
    width: 200px;
    margin: 0 auto;
  }

  .pub-entry {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 8px;
  }

  .pub-img {
    flex: 0 0 auto;
    width: 100%;
    max-width: 360px;
  }

  .photo-caption {
    padding: 16px 12px 8px;
    font-size: 13px;
  }

  .photo-caption .photo-location {
    display: none;
  }

  .timeline-entry {
    flex-direction: column;
    gap: 4px;
  }

  .timeline-date {
    flex: none;
  }

  .page-wrap {
    padding: 24px 16px 16px;
  }

  .name {
    font-size: 28px;
  }
}
/* Job Market Banner Styles */
.job-banner, 
.job-banner strong {
  color: #dc2626 !important; /* Forces the red font */
  margin: 30px 0 25px 0; 
  padding-top: 15px;
  border-top: 1px dashed #fca5a5; 
  font-size: 16px;
  line-height: 1.5;
}

/* Link inside the banner */
.job-banner a {
  color: #dc2626 !important; 
  text-decoration: underline !important;
  font-weight: bold;
}

.job-banner a:hover {
  color: #991b1b !important;
}

/* Dark Mode Overrides */
body.dark .job-banner,
body.dark .job-banner strong {
  color: #ef4444 !important; /* Brighter red for dark backgrounds */
  border-top: 1px dashed #7f1d1d;
}

body.dark .job-banner a {
  color: #f87171 !important;
}

body.dark .job-banner a:hover {
  color: #fca5a5 !important;
}
