/* al-folio inspired styles */

:root {
  --global-theme-color: #0d6efd;
  --global-hover-color: #0a58ca;
  --global-hover-text-color: #fff;
  --global-text-color: #212529;
  --global-text-color-light: #6c757d;
  --global-bg-color: #fff;
  --global-divider-color: rgba(0, 0, 0, 0.175);
  --global-card-bg-color: #fff;
  --global-footer-bg-color: #f8f9fa;
  --global-footer-text-color: #6c757d;
  --global-footer-link-color: #495057;
  --global-code-bg-color: rgba(13, 110, 253, 0.05);
}

/* ── Base ── */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Sans 3", "Source Sans Pro", sans-serif;
  font-size: 1rem;
  color: var(--global-text-color);
  background-color: var(--global-bg-color);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--global-theme-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* ── Navbar ── */

.navbar {
  background-color: var(--global-bg-color);
  opacity: 0.95;
  border-bottom: 1px solid var(--global-divider-color);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.navbar-brand {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--global-text-color) !important;
  letter-spacing: -0.01em;
}

.navbar-brand:hover {
  color: var(--global-theme-color) !important;
  text-decoration: none;
}

.navbar-nav .nav-link {
  color: var(--global-text-color) !important;
  font-size: 0.95rem;
  padding-left: 0.85rem;
  padding-right: 0.85rem;
  transition: color 0.15s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--global-theme-color) !important;
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0;
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* ── Profile ── */

.profile {
  text-align: center;
  padding-top: 2rem;
}

.profile img {
  width: 100%;
  max-width: 140px;
  border-radius: 4px;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  margin-bottom: 1rem;
}

.profile h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.profile .affiliation {
  font-size: 0.9rem;
  color: var(--global-text-color-light);
  margin-bottom: 0.1rem;
}

.profile .social {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.profile .social a {
  color: var(--global-text-color-light);
  font-size: 1.15rem;
  transition: color 0.15s ease;
}

.profile .social a:hover {
  color: var(--global-theme-color);
  text-decoration: none;
}

/* ── Main Content ── */

.main-content {
  padding-top: 2rem;
  padding-bottom: 4rem;
  flex: 1;
}

.bio-section h2,
.news-section h2,
.publications-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--global-divider-color);
}

/* ── News ── */

.news-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.news-table td {
  padding: 0.5rem 0;
  vertical-align: top;
  border-bottom: 1px solid var(--global-divider-color);
}

.news-table tr:last-child td {
  border-bottom: none;
}

.news-table .news-date {
  color: var(--global-text-color-light);
  white-space: nowrap;
  padding-right: 1.5rem;
  min-width: 90px;
}

/* ── Publications ── */

.publications-section {
  margin-top: 3rem;
}

.pub-year {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--global-text-color-light);
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--global-divider-color);
}

.pub-entry {
  display: flex;
  gap: 1.25rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--global-divider-color);
}

.pub-entry:last-child {
  border-bottom: none;
}

.pub-thumb {
  flex: 0 0 120px;
}

.pub-thumb img {
  width: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.pub-thumb-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background-color: #f0f0f0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  font-size: 1.5rem;
}

.pub-info {
  flex: 1;
}

.pub-info .pub-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.pub-info .pub-authors {
  font-size: 0.88rem;
  color: var(--global-text-color-light);
  margin-bottom: 0.25rem;
}

.pub-info .pub-authors strong {
  color: var(--global-text-color);
}

.pub-info .pub-venue {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--global-text-color-light);
  margin-bottom: 0.5rem;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.pub-links a {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--global-theme-color);
  border-radius: 3px;
  color: var(--global-theme-color);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.pub-links a:hover {
  background-color: var(--global-theme-color);
  color: #fff;
  text-decoration: none;
}

.pub-abstract {
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.pub-abstract summary {
  cursor: pointer;
  color: var(--global-text-color-light);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
}

.pub-abstract summary:hover {
  color: var(--global-theme-color);
}

.pub-abstract p {
  margin-top: 0.5rem;
  color: var(--global-text-color-light);
  line-height: 1.6;
}

/* ── Footer ── */

.site-footer {
  background-color: var(--global-footer-bg-color);
  color: var(--global-footer-text-color);
  font-size: 0.85rem;
  padding: 1.5rem 0;
  text-align: center;
}

.site-footer a {
  color: var(--global-footer-link-color);
}

.site-footer a:hover {
  color: #fff;
}

/* ── Responsive ── */

@media (max-width: 767px) {
  .profile {
    padding-top: 1.5rem;
    margin-bottom: 1rem;
  }

  .profile img {
    max-width: 140px;
  }

  .pub-thumb {
    flex: 0 0 80px;
  }
}
