/* ===================================================================
   David Ardia — minimalist academic theme
   =================================================================== */

:root {
  --accent: #5b86ff;
  --accent-dark: #2962ff;
  --ink: #1f2733;
  --muted: #5b6675;
  --line: #e6e9ef;
  --band: #f6f8fb;
  --maxw: 880px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.3;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layout helpers ---- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 36px 24px; }

.band { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band .wrap { padding-top: 36px; padding-bottom: 36px; }

/* ---- Headings ---- */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 1.2rem;
  padding-bottom: 0.4rem;
  position: relative;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 48px; height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.sub-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 1.5rem 0 0.4rem;
}

/* ---- Links ---- */
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; }

/* ===================================================================
   Sticky header / nav
   =================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--accent); text-decoration: none; }
.nav-links { display: flex; flex: 1; justify-content: space-between; gap: 20px; white-space: nowrap; }
.nav-links a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active { color: var(--accent); text-decoration: none; border-bottom-color: var(--accent); }

/* mobile burger (checkbox hack) */
.nav-toggle { display: none; }
.nav-burger { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 8px; }
.nav-burger span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: 0.2s; }

/* ===================================================================
   Hero
   =================================================================== */
.hero {
  padding: 32px 24px;
  background-image:
    linear-gradient(to right,
      rgba(255,255,255,0.75) 0%,
      rgba(255,255,255,0.58) 45%,
      rgba(255,255,255,0.28) 75%,
      rgba(255,255,255,0.12) 100%),
    url('./img/background.jpg?v=2');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 34px;
}
.hero-text { text-align: left; }
.hero .portrait {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 24px rgba(31,39,51,0.22);
  flex-shrink: 0;
  margin: 0;
}
.hero-name {
  font-size: 2.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  color: #000;
}
.hero-tagline {
  font-size: 1.1rem;
  color: #000;
  margin: 0 0 16px;
}

/* social icon row */
.social-row {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 11px;
  padding: 0;
  margin: 0;
}
.social-row a {
  color: #000;
  font-size: 1.7rem;
  line-height: 1;
  transition: color 0.18s, transform 0.18s;
  display: inline-block;
}
.social-row a:hover { color: var(--accent); transform: translateY(-2px); text-decoration: none; }

/* ===================================================================
   About / body text
   =================================================================== */
#about p { margin: 0; text-align: justify; }

/* ===================================================================
   Publication search
   =================================================================== */
.pub-search { margin: 0 0 18px; }
#pubSearch {
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
#pubSearch::placeholder { color: #9aa3b2; }
#pubSearch:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91,134,255,0.18);
}
.pub-search-empty { color: var(--muted); margin: 12px 0 0; font-style: italic; }

.show-more-btn {
  margin-top: 16px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 18px;
  cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.show-more-btn:hover { border-color: var(--accent); background: rgba(91,134,255,0.07); }

/* ===================================================================
   Publication & award lists
   =================================================================== */
.small-bullet-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.small-bullet-list li {
  padding: 2px 0;
  font-size: 0.96rem;
}

/* ===================================================================
   Projects
   =================================================================== */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.project-list li {
  padding: 7px 0;
  font-size: 0.98rem;
}
.project-list a { font-weight: 700; }

/* ===================================================================
   Contact
   =================================================================== */
.contact-line { margin: 0.4rem 0; color: var(--muted); }
.contact-line i { color: var(--accent); width: 1.2em; }
.contact-line a { font-weight: 600; }

/* ===================================================================
   Footer
   =================================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding: 28px 0;
}
.site-footer .powered-by { font-size: 0.85rem; color: var(--muted); margin: 0; }
.button_icon i { color: var(--muted); }
.button_icon i:hover { color: var(--accent); }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav-toggle:checked ~ .nav-links { max-height: 440px; }
  .nav-links a { padding: 14px 24px; border-bottom: 1px solid var(--line); }
  .nav-links a:hover { border-bottom-color: var(--line); }
  .hero-name { font-size: 1.9rem; }
  .hero .portrait { width: 140px; height: 140px; }
  .hero-inner { flex-direction: column; gap: 18px; text-align: center; }
  .hero-text { text-align: center; }
  .social-row { justify-content: center; }
  .hero {
    background-image:
      linear-gradient(rgba(255,255,255,0.74), rgba(255,255,255,0.74)),
      url('./img/background.jpg?v=2');
  }
  .section, .band .wrap { padding-top: 28px; padding-bottom: 28px; }
}
