/* Site stylesheet. No framework; one file. Colours and sizes are the variables below. */
:root {
  --green: #4caf50;
  --text: rgba(0, 0, 0, .8);
  --heading: #313131;
  --muted: #aaa;
  --dark: #333;
  --light-bg: #f7f7f7;
  --nav-h: 70px;
}

/* Icon fonts (Font Awesome subset, self-hosted) */
@font-face { font-family: "FA Brands"; src: url(/fonts/fa-brands-400.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "FA Solid"; font-weight: 900; src: url(/fonts/fa-solid-900.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "FA Regular"; src: url(/fonts/fa-regular-400.woff2) format("woff2"); font-display: swap; }
.ico { font-style: normal; font-weight: 400; line-height: 1; display: inline-block; }
.ico.brands { font-family: "FA Brands"; }
.ico.solid { font-family: "FA Solid"; font-weight: 900; }
.ico.regular { font-family: "FA Regular"; }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 21px; scroll-padding-top: var(--nav-h); }
body {
  margin: 0; position: relative; overflow-x: hidden;
  font-family: Raleway, sans-serif; line-height: 1.65; color: var(--text); background: var(--dark);
}
main { margin-top: var(--nav-h); background: #fff; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: Montserrat, sans-serif; font-weight: 400; color: var(--heading); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
img { max-width: 100%; }
.muted { color: #777; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.container.narrow { max-width: 900px; }
.page { padding-top: 1rem; padding-bottom: 3rem; }
.page > h1 { margin: 1rem 0 1.25rem; }

/* Faint triangulation drawing behind the page */
#watermark {
  position: absolute; top: 30px; left: 0; width: 100%; height: 100vh; z-index: 0; pointer-events: none; opacity: .07;
  background: url(/img/background/Bundle3.png) 100% 100% / 700px 700px no-repeat;
}

/* Layout helpers (12-column grid, collapses on narrow screens) */
.row { display: flex; flex-wrap: wrap; margin: 0 -15px; }
.row > [class*="col-"] { padding: 0 15px; width: 100%; }
@media (min-width: 992px) {
  .row > .col-4 { width: 33.3333%; } .row > .col-8 { width: 66.6667%; }
  .row > .col-5 { width: 41.6667%; } .row > .col-7 { width: 58.3333%; }
}

/* Navigation bar */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 100;
  background: rgba(0, 0, 0, .75);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1140px; }
.brand { color: #fff; font-size: 1.2rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
#nav-links { display: flex; }
.nav-link { color: #fff; font-size: .77rem; padding: .5rem; }
.nav-link:hover { text-decoration: none; opacity: .8; }
.nav-link.active { color: var(--green); opacity: 1; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.1rem; cursor: pointer; padding: .25rem; }
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  #nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; background: rgba(0, 0, 0, .9); padding: .5rem 15px 1rem;
  }
  #nav-links.open { display: flex; }
  .nav-link { font-size: .9rem; padding: .5rem 0; }
}

/* Body text is justified (flush left and right, like Word's "Justify"). Switch hyphens to auto to let long words break across lines */
.home-section .col-8 > p, .article-style p, .pub-abstract { text-align: justify; hyphens: manual; }
/* Affiliation lines stay on one line when the profile column sits beside the text */
@media (min-width: 992px) { .portrait-title h3 { white-space: nowrap; } }

/* Home page sections */
.home-section { padding: 110px 0; position: relative; z-index: 1; }
.page { position: relative; z-index: 1; }
.home-section.first { padding-top: 50px; }
.home-section.alt { background: var(--light-bg); }
.home-section .col-4, .home-section .col-8 { margin-bottom: 1rem; }
.section-heading { display: flex; flex-direction: column; align-items: center; }
@media (min-width: 992px) { .section-heading { align-items: flex-start; } }
.section-heading h1, .section-heading h2 { margin-bottom: .5rem; }
.section-heading h2 { font-size: 1.5rem; }

.profile { text-align: center; }
.avatar { width: 270px; height: 270px; border-radius: 50%; object-fit: cover; max-width: 100%; }
.portrait-title h2 { font-family: Raleway, sans-serif; font-size: 1.75em; font-weight: 300; color: #000; margin: 20px 0 10px; }
.portrait-title h3 { font-family: Raleway, sans-serif; font-size: .8rem; font-weight: 300; line-height: 1.25; color: rgba(0, 0, 0, .54); margin: 0 0 10px; }
.network-icons { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 30px 0 .5rem; gap: 12px; }
.network-icons a { color: var(--muted); font-size: 2rem; display: inline-block; transition: transform .15s; }
.network-icons a:hover { transform: scale(1.2); text-decoration: none; }
.network-icons .ico { font-size: 2rem; }
.comment { color: var(--muted); font-size: .8rem; }

.btn {
  display: inline-block; padding: .5rem .75rem; border: 1px solid var(--dark); border-radius: 6px;
  color: var(--dark); background: transparent; font: inherit; font-size: .8rem; line-height: 1.5; cursor: pointer;
}
.btn:hover { background: var(--dark); color: #fff; text-decoration: none; }
.btn-sm { padding: .2rem .45rem; font-size: .667rem; border-radius: 4px; }
.btn-xs { padding: .2rem .5rem; font-size: .65rem; border-radius: 4px; }
.btn-green { border-color: var(--green); color: var(--green); }
.btn-green:hover { background: var(--green); border-color: var(--green); }
.btn-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }

.sidebarpic { width: 200px; max-width: 100%; }
.inner-row { margin-top: 1rem; }
.inner-row h3 { font-weight: 700; }
.edu img { height: 1rem; vertical-align: -2px; margin-right: 10px; }
.service { font-size: .8rem; margin-top: 1.5rem; }

.note {
  display: flex; gap: .75rem; align-items: center; margin-bottom: 1.5rem; padding: .75rem 1rem;
  background: #f6fbfe; border: 1px solid #1976d2; border-radius: 6px; color: #12537e; font-size: .9rem;
}
.note a { color: #12537e; text-decoration: underline; }
.note-icon {
  flex: none; width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #1976d2; color: #fff;
  font: 700 .8rem/1.2rem Montserrat, sans-serif; text-align: center;
}

/* "Citation" style items on the home page */
.pub-cite { position: relative; margin-bottom: 1rem; padding-left: 1.4rem; line-height: 1.65; }
.pub-cite .pub-icon { position: absolute; left: 0; top: .5rem; font-size: .8rem; opacity: .7; }
.pub-cite .btn-row { margin: .4rem 0 0; }
.see-all { text-transform: uppercase; font-size: .8rem; letter-spacing: .02em; margin-top: 1.5rem; }
ins { text-decoration: underline; }

.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { position: relative; padding-left: 2.2rem; margin-bottom: .1rem; }
.contact-list .ico { position: absolute; left: .3rem; top: .45rem; font-size: .7rem; }
.cryptedmail { font-family: "Roboto Mono", monospace; font-size: .85rem; }

/* Publications list page */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.filters input, .filters select {
  font: inherit; font-size: .8rem; padding: .35rem .5rem; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #495057;
}
.pub-item { padding: .25rem 0 .5rem; }
.pub-title { font-size: 1.3rem; font-weight: 400; margin: 0 0 .1rem; line-height: 1.4; }
.pub-title a { color: var(--heading); }
.pub-item .summary { display: block; color: #555; font-size: .7rem; line-height: 1.5; }
.pub-item .summary:hover { text-decoration: none; }
.pub-item .pub-authors { font-size: .62rem; color: #777; margin: .25rem 0 .35rem; }
.pub-item .btn-row { margin-bottom: .75rem; }

/* Single publication page */
.pub-meta { font-size: .6rem; color: #777; margin-bottom: 1rem; }
.pub-abstract { font-size: .9rem; }
.meta-table { margin: 1.5rem 0 1rem; }
.meta-row { display: flex; gap: 1rem; margin-bottom: .75rem; font-size: .9rem; }
.meta-name { flex: 0 0 25%; font-weight: 700; }
@media (max-width: 575px) { .meta-row { flex-direction: column; gap: 0; } }

/* Students / Teaching pages */
.article-style ul { padding-left: 1.4rem; }
.article-style li { margin-bottom: .1rem; }
.article-style h2 { margin-top: 1.5rem; }

/* Footer */
#site-footer { background: var(--dark); border-top: 7px solid #c1bbab; padding: 1.5rem 0 1rem; color: rgb(137, 149, 150); font-size: .67rem; }
#site-footer p { margin: 0 0 .75rem; }
.cc-icons .ico { font-size: 1.4rem; margin-right: .5rem; }
.cc-icons { text-align: center; }

/* "Cite" dialog */
#cite-dialog { width: min(640px, 92vw); border: 0; border-radius: 8px; padding: 1rem 1.25rem; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }
#cite-dialog::backdrop { background: rgba(0, 0, 0, .5); }
.cite-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .75rem; }
.cite-close { background: none; border: 0; font-size: 1.4rem; cursor: pointer; line-height: 1; }
#cite-text { background: #f6f6f6; border-radius: 4px; padding: .75rem; font: .65rem/1.5 "Roboto Mono", monospace; white-space: pre-wrap; word-break: break-word; max-height: 55vh; overflow: auto; margin: 0 0 .75rem; }
.cite-actions { display: flex; gap: .5rem; }

@media (max-width: 575px) { html { font-size: 17px; } .home-section { padding: 50px 0; } }
