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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #2c2c2c;
  background-color: #f2f1ef;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
}

a {
  color: #2c5282;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1a365d;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  border-bottom-color: #e8e7e4;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
}

.nav-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-name {
  font-family: 'Epilogue', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2c2c2c;
  letter-spacing: 0.01em;
}

.nav-name:hover {
  color: #2c5282;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #2c5282;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #2c2c2c;
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero / Bio ===== */
.hero {
  padding-top: 120px;
  padding-bottom: 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 56px;
  align-items: start;
}

.hero-photo img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.hero-bio h1 {
  font-family: 'Epilogue', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  line-height: 1.2;
}

.subtitle {
  font-size: 1.02rem;
  color: #666;
  margin-bottom: 28px;
  line-height: 1.5;
}

.bio-text p {
  margin-bottom: 16px;
  color: #3a3a3a;
  font-size: 0.97rem;
}

.plain-link {
  color: inherit !important;
  text-decoration: none !important;
}

.plain-link:hover {
  color: inherit !important;
  text-decoration: underline !important;
}

.bio-text p:last-child {
  margin-bottom: 28px;
}

.bio-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.link-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2c5282;
  padding: 6px 14px;
  border: 1px solid #a0b4cc;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.link-item:hover {
  background: #2c5282;
  color: #fff;
  border-color: #2c5282;
}

.link-item:hover svg {
  stroke: #fff;
}

/* ===== Sections ===== */
.section {
  padding: 64px 0;
}

.section-alt {
  background: #f3f3f0;
}

.section-title {
  font-family: 'Epilogue', sans-serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: #2c5282;
  border-radius: 2px;
}

.subsection-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 40px;
  margin-bottom: 20px;
}

/* ===== Paper Cards ===== */
.paper-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-card {
  border-left: 5px solid #2c5282;
  padding: 18px 22px;
  background: #fff;
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Paper category colors */
.paper-card.cat-finance  { border-left-color: #4a9eff; }
.paper-card.cat-theory   { border-left-color: #0f8a4f; }
.paper-card.cat-platform { border-left-color: #ff6a00; }

.paper-card:hover {
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
  transform: translateX(3px);
}

.paper-title {
  font-family: 'Epilogue', sans-serif;
  font-size: 1.08rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 5px;
  line-height: 1.4;
}

.paper-title a {
  font-size: 0.70em;
}

.paper-authors {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 4px;
}

.paper-detail {
  font-size: 0.84rem;
  color: #888;
  font-style: italic;
}

.paper-abstract {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #555;
}

.paper-abstract summary {
  cursor: pointer;
  font-weight: 400;
  color: #777;
  line-height: 1.6;
  font-family: 'Poppins', sans-serif;
  list-style: none;
}

.paper-abstract summary::-webkit-details-marker {
  display: none;
}

.paper-abstract summary:hover {
  color: #2c5282;
}

.paper-abstract p {
  margin-top: 0.5rem;
  line-height: 1.75;
  color: #555;
  padding-left: 0;
  border-left: none;
}

.paper-title a {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #2c5282;
}

.paper-title a:hover {
  color: #1a365d;
}

/* ===== Coauthor Styling ===== */
.coauthor {
  font-weight: 600;
  color: #2c5282;
  text-decoration: none;
  border-bottom: 1px dotted #a0b4cc;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.coauthor:hover {
  color: #1a365d;
  border-bottom-color: #1a365d;
}

span.coauthor {
  color: #333;
  border-bottom: none;
}

/* ===== Teaching ===== */
.teaching-intro {
  font-size: 0.97rem;
  color: #3a3a3a;
  margin-top: 24px;
  margin-bottom: 32px;
  max-width: 700px;
}

.teaching-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.teaching-card {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.teaching-year {
  font-family: 'Epilogue', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2c5282;
  white-space: nowrap;
  min-width: 68px;
}

.teaching-card h4 {
  font-size: 0.97rem;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 2px;
}

.teaching-card p {
  font-size: 0.88rem;
  color: #777;
}

/* ===== Footer ===== */
.footer {
  padding: 36px 0;
  text-align: center;
  border-top: 1px solid #e8e7e4;
}

.footer p {
  font-size: 0.84rem;
  color: #999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250, 250, 248, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid #e8e7e4;
  }

  .nav-links.open {
    max-height: 300px;
    padding: 16px 0;
  }

  .nav-links li {
    padding: 10px 0;
  }

  .hero {
    padding-top: 96px;
    padding-bottom: 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }

  .hero-photo {
    max-width: 240px;
    margin: 0 auto;
  }

  .hero-bio h1 {
    font-size: 2rem;
  }

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

  .bio-text {
    text-align: left;
  }

  .section-title::after {
    /* center underline on mobile when hero is centered */
  }

  .teaching-card {
    flex-direction: column;
    gap: 4px;
  }

  .teaching-year {
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }

  .hero-bio h1 {
    font-size: 1.7rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .paper-card {
    padding: 14px 16px;
  }

  .bio-links {
    gap: 10px;
  }

  .link-item {
    font-size: 0.84rem;
    padding: 5px 10px;
  }
}
