/* Academic homepage style (modeled on the al-folio Jekyll theme) */

:root {
  --theme-color: #003262;       /* main accent color: change to taste */
  --text-color: #000000;
  --text-muted: #828282;
  --bg-color: #ffffff;
  --divider-color: rgba(0, 0, 0, 0.1);
  --code-bg: rgba(0, 50, 98, 0.05);
  --max-width: 930px;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 70px; }

body {
  margin: 0;
  padding-top: 57px;        /* fixed navbar */
  padding-bottom: 70px;     /* fixed footer */
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.5;
}

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

b, strong { font-weight: 700; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-color);
  border-bottom: 1px solid var(--divider-color);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
}
.navbar-brand { font-size: 1.25rem; color: var(--text-color); font-weight: 300; }
.navbar-brand b { font-weight: 700; }
.navbar-brand:hover { color: var(--theme-color); text-decoration: none; }

.nav-social { display: flex; gap: 14px; font-size: 1.35rem; }
.nav-social a { color: var(--text-color); }
.nav-social a:hover { color: var(--theme-color); text-decoration: none; }

.nav-links { display: flex; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text-color);
  font-weight: 400;
}
.nav-links a:hover { color: var(--theme-color); text-decoration: none; }
.nav-links a.active { color: var(--theme-color); font-weight: 500; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.4rem;
  color: var(--text-color);
  cursor: pointer;
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px; left: 0; right: 0;
    flex-direction: column;
    background: var(--bg-color);
    border-bottom: 1px solid var(--divider-color);
    padding: 0.25rem 15px 0.75rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: right; }
}

/* ---------- Page header ---------- */

.post-header { margin: 2.5rem 0 1.5rem; }
.post-title {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1.2;
  margin: 0 0 0.25rem;
}
.post-title b { font-weight: 700; }
.desc {
  margin: 0;
  color: var(--theme-color);
  font-weight: 600;
}
.page-desc { color: var(--text-muted); font-weight: 400; margin: 0; }

/* ---------- About ---------- */

.profile {
  float: right;
  width: 30%;
  margin: 0 0 1rem 1.5rem;
  text-align: center;
}
.profile img {
  width: 100%;
  border-radius: 0.25rem;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
.profile .more-info { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.profile .more-info p { margin: 0; }

@media (max-width: 575px) {
  .profile { float: none; width: 100%; margin: 0 0 1rem; }
  .profile img { max-width: 260px; }
}

.clearfix::after { content: ""; display: table; clear: both; }

article p { margin: 0 0 1rem; }
article ul { padding-left: 1.5rem; margin: 0 0 1rem; }
article li { margin-bottom: 0.15rem; }

h2 {
  font-size: 1.75rem;
  font-weight: 400;
  margin: 2rem 0 1rem;
  color: var(--theme-color);
}
h2 a, h2 a:hover { color: inherit; text-decoration: none; }

h3 {
  font-size: 1.35rem;
  font-weight: 400;
  margin: 1.5rem 0 0.75rem;
}

/* ---------- Publications ---------- */

.publications h3.year {
  text-align: right;
  color: rgba(0, 0, 0, 0.15);
  font-size: 2rem;
  font-weight: 400;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--divider-color);
  padding-top: 0.5rem;
}

ol.bibliography { list-style: none; padding: 0; margin: 0; }
ol.bibliography > li { margin-bottom: 1.25rem; }

.pub-row { display: flex; gap: 1rem; }
.pub-abbr { flex: 0 0 16.6%; padding-top: 0.15rem; }
.pub-body { flex: 1; min-width: 0; }

.abbr-badge {
  display: inline-block;
  width: 100%;
  max-width: 110px;
  padding: 0.2rem 0.4rem;
  border-radius: 0.2rem;
  background: var(--theme-color);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.pub-title { font-weight: 700; }
.pub-author { margin-top: 0.1rem; }
.pub-author b { text-decoration: underline; text-underline-offset: 2px; }
.pub-venue { font-style: italic; }
.pub-award { color: #b8860b; font-weight: 700; font-style: normal; }

.pub-links { margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.btn-sm {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--text-color);
  border-radius: 0.2rem;
  color: var(--text-color);
  font-size: 0.75rem;
  text-transform: uppercase;
}
.btn-sm:hover {
  border-color: var(--theme-color);
  color: var(--theme-color);
  text-decoration: none;
}

@media (max-width: 575px) {
  .pub-row { flex-direction: column; gap: 0.35rem; }
  .pub-abbr { flex: none; }
  .abbr-badge { width: auto; }
}

/* ---------- CV ---------- */

.cv-card {
  border: 1px solid var(--divider-color);
  border-radius: 0.25rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.cv-card h3 { margin-top: 0; color: var(--theme-color); }
.cv-item { display: flex; gap: 1rem; padding: 0.4rem 0; border-top: 1px solid var(--divider-color); }
.cv-item:first-of-type { border-top: 0; }
.cv-date { flex: 0 0 9rem; }
.cv-date span {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 0.2rem;
  background: var(--code-bg);
  color: var(--theme-color);
  font-size: 0.8rem;
  font-weight: 500;
}
.cv-body { flex: 1; }
.cv-body .title { font-weight: 700; }
.cv-body .sub { font-style: italic; }
.cv-body ul { margin: 0.25rem 0 0; padding-left: 1.25rem; }

.skills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.skills span {
  padding: 0.15rem 0.6rem;
  border-radius: 0.2rem;
  background: var(--code-bg);
  color: var(--theme-color);
  font-size: 0.875rem;
}

@media (max-width: 575px) {
  .cv-item { flex-direction: column; gap: 0.25rem; }
  .cv-date { flex: none; }
}

/* ---------- Footer ---------- */

footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--bg-color);
  border-top: 1px solid var(--divider-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.6rem 0;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--theme-color); }

@media (max-width: 575px) {
  footer { position: static; }
  body { padding-bottom: 0; }
  main { padding-bottom: 1.5rem; }
}
