/* Minimal academic homepage styling, modeled on the al-folio Jekyll theme. */
:root {
  --max-width: 930px;
  --bg: #ffffff;
  --text: #000000;
  --text-light: #828282;
  --theme: #b509ac;
  --divider: rgba(0, 0, 0, 0.1);
  --nav-bg: #ffffff;
  --badge-bg: #5a3eaf;
  --btn-border: #212529;
  --shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
html[data-theme="dark"] {
  --bg: #1c1c1d;
  --text: #e8e8e8;
  --text-light: #a0a0a0;
  --theme: #2698ba;
  --divider: #424246;
  --nav-bg: #1c1c1d;
  --badge-bg: #2698ba;
  --btn-border: #e8e8e8;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.5;
  transition: background-color 0.2s, color 0.2s;
}
a { color: var(--theme); text-decoration: none; }
a:hover { text-decoration: underline; }
strong, b { font-weight: 500; }

/* ---- navbar ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: var(--nav-bg);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}
.navbar .inner {
  max-width: var(--max-width); margin: 0 auto; padding: 0.6rem 1rem;
  display: flex; justify-content: flex-end; align-items: center; gap: 1.4rem;
}
.navbar a, .navbar button {
  color: var(--text); font: inherit; font-weight: 400; font-size: 1rem;
  background: none; border: none; cursor: pointer; padding: 0;
}
.navbar a:hover, .navbar button:hover { color: var(--theme); text-decoration: none; }
.navbar a.active { color: var(--theme); }

/* ---- layout ---- */
main { max-width: var(--max-width); margin: 0 auto; padding: 5rem 1rem 3rem; }
h1.name { font-size: 2.5rem; font-weight: 700; margin: 0 0 1.2rem; }
h2 {
  font-size: 1.6rem; font-weight: 500; color: var(--theme);
  margin: 2.5rem 0 0.8rem; padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--divider);
}
h3.year {
  font-size: 1.25rem; font-weight: 500; color: var(--text-light);
  text-align: right; margin: 1.6rem 0 0.4rem;
}

.profile { float: right; width: 30%; max-width: 270px; margin: 0 0 1rem 1.5rem; }
.profile img { width: 100%; border-radius: 0.25rem; box-shadow: var(--shadow); display: block; }
.bio p { margin: 0 0 1rem; }
.clearfix::after { content: ""; display: table; clear: both; }

.social { text-align: center; margin: 1.5rem 0 0.5rem; clear: both; }
.social a { color: var(--text); font-size: 2rem; margin: 0 0.6rem; }
.social a:hover { color: var(--theme); text-decoration: none; }

/* ---- publications ---- */
ol.pubs { list-style: none; padding: 0; margin: 0; }
ol.pubs > li { padding: 1rem 0; border-bottom: 1px solid var(--divider); }
ol.pubs > li:last-child { border-bottom: none; }
.pub { display: flex; gap: 1.5rem; align-items: flex-start; }
.pub .thumb { flex: 0 0 33%; }
.pub .thumb img {
  width: 100%; display: block; border-radius: 0.25rem; box-shadow: var(--shadow);
  background: #fff;
}
.pub .body { flex: 1; min-width: 0; }
.pub .title { font-weight: 500; font-size: 1.02rem; }
.pub .author { margin: 0.15rem 0; }
.pub .author a { color: var(--text); border-bottom: 1px dashed var(--text-light); }
.pub .author a:hover { color: var(--theme); text-decoration: none; }
.pub .author .self { font-weight: 500; }
.pub .note { color: var(--text-light); font-size: 0.9rem; font-style: italic; }
.links { margin-top: 0.45rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.btn {
  display: inline-block; font-size: 0.8rem; font-weight: 400; line-height: 1.4;
  padding: 0.15rem 0.55rem; border: 1px solid var(--btn-border); border-radius: 0.2rem;
  color: var(--text);
}
.btn:hover { color: var(--theme); border-color: var(--theme); text-decoration: none; }
.btn.venue { background: var(--badge-bg); color: #fff; border-color: transparent; }
.btn.venue:hover { color: #fff; filter: brightness(1.1); }

/* before/after hover swap (deblurring thumbnail) */
.swap { position: relative; }
.swap img.after {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s;
}
.swap:hover img.after { opacity: 1; }

/* ---- patents / plain lists ---- */
ul.plain { padding-left: 1.2rem; }
ul.plain li { margin-bottom: 0.5rem; }

footer {
  max-width: var(--max-width); margin: 0 auto; padding: 1rem;
  color: var(--text-light); font-size: 0.85rem; text-align: center;
}

@media (max-width: 640px) {
  .profile { float: none; width: 60%; margin: 0 auto 1.2rem; }
  .pub { flex-direction: column; gap: 0.6rem; }
  .pub .thumb { flex: none; width: 100%; }
  h1.name { font-size: 2rem; }
}
.social .icon { width: 2rem; height: 2rem; vertical-align: -0.25rem; }
