@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
html,
body {
  margin: 0;
  padding: 0;
  background: #f7f8fa;
  font-family: "EB Garamond", Garamond, "Times New Roman", Times, serif;
  color: #21243d;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font-family: "EB Garamond", Garamond, "Times New Roman", Times, serif;
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  background: #fff;
  border-bottom: 1.5px solid #e5e8ee;
  font-size: 1.12em;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 18px 0 10px 0;
}

.nav-link {
  text-decoration: none;
  color: #2152c1;
  border-bottom: 2px solid transparent;
  transition: border 0.2s;
  padding-bottom: 2px;
}

.nav-link:hover,
.nav-link.active {
  border-bottom: 2px solid #2152c1;
  color: #112244;
}

main {
  max-width: 900px;
  background: #fff;
  margin: 48px auto 40px auto;
  border-radius: 16px;
  box-shadow: 0 2px 16px 0 rgba(30, 45, 70, 0.06);
  padding: 48px 36px 40px 36px;
  text-align: center;
}

.profile-img-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.profile-img {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  box-shadow: 0 2px 10px #dbeafe80;
  object-fit: cover;
}

h1 {
  margin: 10px 0 4px 0;
  font-size: 2.2em;
  font-weight: 700;
  color: #1c2233;
}

h2 {
  margin: 2px 0 24px 0;
  font-size: 1.12em;
  font-weight: 500;
  color: #4b5563;
  letter-spacing: 0.02em;
}

.about-section {
  text-align: left;
  margin: 0 auto 36px auto;
}

.about-section p {
  font-size: 1.2em; /* or any size you prefer */
  line-height: 1.5; /* improves readability */
}

.about-section blockquote {
  background: #f2f5fa;
  border-left: 4px solid #2152c1;
  text-align: center;
  margin: 22px 0 0 0;
  padding: 16px 20px;
  font-size: 1.1em;
  font-style: normal;
  color: #193366;
  border-radius: 0 6px 6px 0;
}

.contact-section {
  margin-top: 20px;
}

.contact-email {
  display: inline-block;
  font-size: 1.07em;
  color: #2152c1;
  text-decoration: none;
  margin-bottom: 14px;
  font-weight: 600;
  border-bottom: 1.5px dotted #b2cdfa;
  transition: color 0.2s;
}
.contact-email:hover {
  color: #193366;
  border-bottom: 1.5px solid #2152c1;
}

.social-links {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 18px;
}
.social-links img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  transition: box-shadow 0.17s, filter 0.2s;
  filter: grayscale(20%);
  background: #f1f2fa;
}
.social-links img:hover {
  filter: none;
  box-shadow: 0 2px 8px #c7d1ee80;
}

footer {
  text-align: center;
  color: #9ca3af;
  font-size: 0.98em;
  margin: 40px 0 10px 0;
  padding-top: 12px;
}
.pub-year {
  margin-bottom: 40px;
}
.pub-year h2 {
  font-size: 1.5em;
  font-weight: 700;
  color: #2453aa;
  margin: 28px 0 20px 0;
  letter-spacing: 0.01em;
  text-align: center;
}
.pub-entry {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
  text-align: left;
}
.pub-citation {
  flex: 10;
  font-size: 1.08em;
  color: #25253d;
  line-height: 1.5;
  text-align: left;
}
.pub-link {
  flex: 1;
  display: flex;
  align-items: center;
}
.pub-link a {
  display: inline-block;
  background: #2453aa;
  color: #fff;
  padding: 6px 16px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  text-align: center;
  transition: background 0.2s;
  width: 100%;
  min-width: 40px;
}
.pub-link a:hover {
  background: #193366;
}
.dark-toggle {
  padding: 7px 18px;
  border-radius: 6px;
  border: none;
  background: #ececec;
  color: #222;
  cursor: pointer;
  font-size: 0.98em;
  box-shadow: 0 2px 10px #eee;
  transition: all 0.18s;
  font-weight: 500;
  /* To fit in navbar */
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 600px) {
  .navbar {
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 16px;
  }
  .dark-toggle {
    font-size: 1em;
    padding: 7px 10px;
    margin-left: 0;
    width: 100%;
    margin-top: 10px;
    /* Make sure it wraps to next line if needed */
  }
}

body.dark-mode {
  background: #16181e;
  color: #e7e9ec;
}
body.dark-mode main {
  background: #232433;
  color: #e7e9ec;
  box-shadow: 0 2px 16px 0 rgba(20, 20, 40, 0.19);
}
body.dark-mode nav,
body.dark-mode .navbar {
  background: #232433;
  border-bottom: 1.5px solid #232433;
}
body.dark-mode .nav-link {
  color: #e1cfae;
}
body.dark-mode .nav-link.active,
body.dark-mode .nav-link:hover {
  color: #d5be8b;
  border-bottom: 2px solid #d5be8b;
}
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
  color: #d6cba4;
}
body.dark-mode .pub-link a {
  background: #33344a;
  color: #f9e4b7;
}
body.dark-mode .pub-link a:hover {
  background: #22222a;
}
body.dark-mode .about-section blockquote {
  background: #22222a;
  color: #f5e7c8;
  border-left: 4px solid #f5e7c8;
}
body.dark-mode .contact-email {
  color: #e7c388;
  border-bottom: 1.5px dotted #e7c388;
}
body.dark-mode .contact-email:hover {
  color: #ffe3b0;
  border-bottom: 1.5px solid #ffe3b0;
}
body.dark-mode .social-links img {
  filter: grayscale(40%) brightness(0.92);
  background: #232433;
}
body.dark-mode footer {
  color: #cab88b;
}
body.dark-mode .pub-citation {
  color: #e7e9ec;
}

.carousel {
  position: relative;
  max-width: 900px;
  margin: 48px auto 60px auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(30, 45, 70, 0.3);
  background-color: black;
  height: 480px; /* fixed height */
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 16px;
  overflow: hidden;
  background-color: black;
}

.carousel-slide.active {
  display: flex;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* important! */
  border-radius: 16px 16px 0 0;
  user-select: none;
  pointer-events: none;
}

.caption {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 12px 20px;
  font-size: 1.1em;
  font-family: "EB Garamond", serif;
  border-radius: 0 0 16px 16px;
  user-select: none;
  text-align: center;
}

.carousel-controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
}

.carousel-controls button {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 6px 14px;
  cursor: pointer;
  border-radius: 50%;
  pointer-events: auto;
  user-select: none;
  transition: background 0.3s ease;
}

.carousel-controls button:hover {
  background: rgba(0, 0, 0, 0.8);
}
