@import url('https://fonts.cdnfonts.com/css/metropolis-2');

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

:root {
  --bg: #f7f7f5;
  --text: #1a1a1a;
  --text-light: #555555;
  --accent: #18453b;
  --accent-hover: #0b9a6d;
  --accent-bright: #008208;
  --border: #d9d9d4;
  --white: #ffffff;
  --max-width: 1100px;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
}

body {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-weight: normal;
  letter-spacing: 0.01em;
}

.bio-text h1 {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

h2 {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

ul {
  list-style: none;
  padding: 0;
}

/* ===== Header & Navigation ===== */
header {
  background-color: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 2rem;
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-title {
  font-size: 1.35rem;
  font-weight: bold;
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: 0.02em;
}

.site-title a {
  color: var(--accent);
}

.site-title a:hover {
  text-decoration: none;
  color: var(--accent);
}

.page-about .site-title {
  visibility: hidden;
}

.page-about main {
  padding-top: 0;
  padding-bottom: 0;
}

/* ===== Header Icon Links ===== */
.header-icons {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.header-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid var(--accent);
  transition: all 0.2s;
}

.header-icons a:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.header-icons a img {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

nav a {
  font-size: 0.88rem;
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: bold;
  letter-spacing: 0.02em;
  color: var(--accent);
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  text-decoration: none;
  border-bottom-color: var(--accent);
}

/* ===== Main Content ===== */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 2rem 3rem;
  flex: 1;
  width: 100%;
}

/* ===== Hero Section (About page) ===== */
.hero {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-light);
  opacity: 0.5;
  animation: gentle-bounce 2.5s ease-in-out infinite;
}

.scroll-indicator span {
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

@keyframes gentle-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== About / Index Page ===== */
.about-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 3rem;
  margin-left: -2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.photo-column .photo {
  width: 400px;
  height: 500px;
  border-radius: 0;
  display: block;
  object-fit: cover;
  object-position: center 5%;
  margin-top: -3rem;
  filter: none;
  mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, black 55%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 45%, black 55%, transparent 80%);
}

.photo-placeholder {
  width: 200px;
  height: 250px;
  background-color: var(--border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.8rem;
  text-align: center;
}

.bio-text .subtitle {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.bio-text p:not(.subtitle) {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 1.1rem;
}

/* ===== Contact Block (photo column) ===== */
.contact-block {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.5;
}

.contact-block a {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  font-weight: bold;
}

.contact-block address {
  font-style: normal;
  color: var(--text-light);
  margin-top: 0.4rem;
}

.quick-links {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.quick-links a {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-light);
  transition: all 0.2s;
}

.quick-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ===== Research Areas ===== */
.page-about h2 {
  text-align: center;
  border-bottom: none;
  font-size: 1.8rem;
}

.research-areas {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.research-card {
  flex: 1;
  min-width: 220px;
  padding: 2rem 1.75rem;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.research-card:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  text-decoration: none;
}

.research-card svg {
  color: var(--accent);
  margin-bottom: 1rem;
}

.research-card h3 {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.research-card p {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1.25rem;
  flex: 1;
}

.research-card-link {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.research-card-link:hover {
  color: var(--accent-hover);
  text-decoration: none;
}

/* ===== Current Projects ===== */
.project {
  margin-bottom: 1.25rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.project h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--accent);
}

.project p {
  font-size: 0.92rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ===== Research Page ===== */
.research-summary {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
  max-width: 800px;
}

.research-interests {
  margin-bottom: 2rem;
}

.research-interests li {
  font-size: 0.95rem;
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
}

.research-interests li::before {
  content: "\2022";
  color: var(--accent);
  position: absolute;
  left: 0;
}

.research-controls {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

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

.filter-label {
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: bold;
  color: var(--text-light);
  white-space: nowrap;
  width: 85px;
  flex-shrink: 0;
}

.search-row {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.results-count {
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-buttons::-webkit-scrollbar {
  display: none;
}

.filter-btn,
.method-btn,
.language-btn {
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  font-weight: bold;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: none;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn[data-filter="all"],
.method-btn[data-method="all"],
.language-btn[data-language="all"] {
  width: 125px;
  text-align: center;
  font-size: 0.7rem;
  padding: 0.28rem 0.75rem;
}

.filter-buttons .filter-btn[data-filter="all"],
.filter-buttons .method-btn[data-method="all"],
.filter-buttons .language-btn[data-language="all"] {
  margin-right: 0.5rem;
  border-right: none;
  position: relative;
}

.filter-buttons .filter-btn[data-filter="all"]::after,
.filter-buttons .method-btn[data-method="all"]::after,
.filter-buttons .language-btn[data-language="all"]::after {
  content: '';
  position: absolute;
  right: -0.5rem;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: var(--border);
}


.language-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.language-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}


.method-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.method-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.search-row .search-bar {
  flex: 1;
}

.search-bar input {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  width: 100%;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.search-bar input:focus {
  border-color: var(--accent);
}

.search-bar input::placeholder {
  color: var(--text-light);
  opacity: 0.6;
}

.category-header {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

.category-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.category-title-row svg {
  color: var(--accent);
  flex-shrink: 0;
}

.research-category {
  margin: 0;
  padding: 0;
  border-bottom: none;
  font-size: 1.5rem;
}

.category-summary {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 75%;
}

.category-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

.pub-card {
  margin-bottom: 1.75rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.pub-card--boxed {
  display: flex;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.pub-card--boxed .pub-figure {
  width: 280px;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  align-self: stretch;
}

.pub-figure-placeholder {
  width: 100%;
  height: 180px;
  background: var(--bg);
  border-radius: 6px;
}

.pub-figure-img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  border-radius: 4px;
  display: block;
  margin: auto;
}

.pub-card--boxed .pub-details {
  padding: 1.5rem 2rem;
}

.pub-details {
  flex: 1;
}

.pub-status {
  display: inline-block;
  font-family: "Metropolis", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.6rem;
}

.pub-status--published {
  background: var(--accent);
  color: var(--white);
}

.pub-status--forthcoming {
  background: #008208;
  color: var(--white);
}

.pub-status--working-paper {
  background: #0B9A6D;
  color: var(--white);
}

.search-keywords {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.pub-details .venue {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.pub-details .title {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.pub-details .authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.pub-details .pub-type {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.pub-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.pub-btn {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  background: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.pub-btn:hover {
  background: var(--accent);
  color: var(--white);
  text-decoration: none;
}

.abstract-content {
  display: none;
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: var(--white);
  border-left: 3px solid var(--border);
  border-radius: 2px;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-light);
}

.abstract-content.open {
  display: block;
}

.pub-summary {
  font-style: italic;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.pub-findings-label,
.pub-abstract-label {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.72rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.25rem;
  margin-top: 0.75rem;
}

.pub-findings {
  list-style: disc;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.pub-findings li {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 0.3rem;
}

/* ===== Teaching Page ===== */
.course {
  display: flex;
  margin-bottom: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  padding: 0;
  overflow: hidden;
}

.course-details {
  flex: 1;
  min-width: 0;
  padding: 1.25rem 1.5rem;
}

.course-actions {
  width: 180px;
  min-width: 180px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-left: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  align-self: stretch;
}

.course-actions .pub-btn {
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.8;
  color: var(--text-light);
}

.service-list-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 0.5rem 0;
}

.service-dates {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  color: var(--text-light);
  white-space: nowrap;
}

.course .code {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.course .name {
  font-weight: bold;
}

.course .description {
  font-size: 0.92rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* ===== Name Row ===== */
.name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.name-row .icon-links {
  margin-top: 0;
  gap: 0.5rem;
}

.name-row .icon-links a {
  width: 30px;
  height: 30px;
}

/* ===== Photo Column & Icon Links ===== */
.photo-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.icon-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.75rem;
}

.icon-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--accent);
  border: 1px solid var(--accent);
  transition: all 0.2s;
}

.icon-links a:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
  text-decoration: none;
}

.icon-links a img {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  object-fit: contain;
}

/* ===== Contact Page ===== */
.contact-info {
  font-size: 1rem;
}

.contact-info dt {
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-top: 1.25rem;
  margin-bottom: 0.25rem;
}

.contact-info dt:first-child {
  margin-top: 0;
}

.contact-info dd {
  margin-left: 0;
}

/* ===== Personal Page ===== */
.personal-section {
  margin-bottom: 2rem;
}

.personal-section p {
  font-size: 0.98rem;
}

/* ===== Footer ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  text-align: center;
  font-family: Garamond, "EB Garamond", Georgia, serif;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  html {
    font-size: 16px;
  }

  header {
    padding: 1rem 1.25rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    gap: 1rem;
  }

  main {
    padding: 1.75rem 1.25rem 2.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .bio-text .subtitle {
    text-align: center;
  }

  .quick-links {
    justify-content: center;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  .pub-card {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .hero {
    min-height: auto;
    padding-bottom: 3rem;
  }

  .scroll-indicator {
    display: none;
  }

  footer {
    padding: 1.25rem;
  }
}
