/* VT Robotics
   One stylesheet, no build step. The proportions follow collab.me.vt.edu:
   TeX Gyre Pagella throughout, one centered 40rem column, and a base font
   size that steps up with the width of the screen. */

/* ---------- Font: TeX Gyre Pagella (an open Palatino), self-hosted ---------- */
@font-face {
  font-family: "TeXGyrePagella";
  src: url("../fonts/texgyrepagella-regular.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeXGyrePagella";
  src: url("../fonts/texgyrepagella-bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TeXGyrePagella";
  src: url("../fonts/texgyrepagella-italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "TeXGyrePagella";
  src: url("../fonts/texgyrepagella-bolditalic.woff2") format("woff2");
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}

/* ---------- Settings ---------- */
:root {
  --text: #333;
  --maroon: #861f41;        /* Virginia Tech Chicago maroon */
  --orange: #ff9900;        /* rgb(255, 153, 0), the orange used on collab.me.vt.edu */
  --rule: #333;
  --footer-text: #6b6b6b;
  --footer-bg: #fafafa;
  --footer-rule: #f3f3f3;
  --placeholder: #ececec;
  --measure: 40rem;         /* width of the text column */
  --gutter: 1rem;           /* smallest gap between text and screen edge */
  --font: "TeXGyrePagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

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

/* The whole page scales from this one value: 16px, then 18px, then 20px. */
html { font-size: 100%; }
@media (min-width: 48em) { html { font-size: 112.5%; } }
@media (min-width: 64em) { html { font-size: 125%; } }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  line-height: 1.75;
  color: var(--text);
  background: #fff;
}

.wrap {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

h1, h2, h3 {
  font-weight: bold;
  line-height: 1.25;
  margin: 1em 0 0.5em;
}
h1 { font-size: 1.5rem; }
h2, h3 { font-size: 1.125rem; }

p, ul, ol { margin: 0 0 1rem; }
p { line-height: 1.5; }
ul, ol { padding-left: 2rem; }

img, video { max-width: 100%; height: auto; }

a {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover, a:focus-visible { color: var(--maroon); }
a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

small, .small { font-size: 0.8rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Header ---------- */
.site-header { padding: 1.5rem 0 1rem; }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
}
.site-header a { color: var(--text); text-decoration: none; }
.site-header a:hover, .site-header a:focus-visible { color: var(--orange); }

/* The logo is the link home. Change its size here; the width follows. */
.site-logo { display: block; }
.site-logo svg { display: block; height: 4.5rem; width: auto; }
.site-logo:hover, .site-logo:focus-visible { opacity: 0.88; }
.site-nav { display: flex; align-items: center; gap: 1rem; }
.site-nav .icon-link { display: flex; }
.site-nav .icon-link svg { width: 1.1rem; height: 1.1rem; }
.site-nav a[aria-current="page"] { color: var(--maroon); }

/* ---------- Main ---------- */
.site-main { flex: 1 0 auto; padding: 1rem 0 2rem; }

.hero {
  display: block;
  width: 100%;
  margin: 1.75rem 0;
  background: var(--placeholder);
}

/* ---------- People ---------- */
/* Page heading on the left, sort control on the right. */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1.5rem;
}
.sort {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.sort[hidden] { display: none; }
.sort button {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}
.sort button:hover, .sort button:focus-visible { color: var(--orange); }
.sort button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* The sort in use is maroon and underlined, like the current page in the header. */
.sort button[aria-pressed="true"] {
  color: var(--maroon);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

.people {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.person {
  display: flex;
  gap: 1.5rem;
  padding: 0.75rem 0;
}
.person img {
  flex: none;
  width: 150px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--placeholder);
}
.person div { min-width: 0; }
.person h2 { margin-top: 0.75rem; }
/* Title and department, and research area, are slightly smaller than body text.
   The lab link stays at body size. */
.person p { font-size: 0.875rem; line-height: 1.3; margin-bottom: 0.5rem; }
.person .lab { font-size: 1rem; }

@media (max-width: 32em) {
  .person { gap: 1rem; }
  .person img { width: 96px; }
  .person h2 { margin-top: 0; }
}

/* ---------- Simple list of dated items (used on the VRS page) ---------- */
.editions {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  border-top: 1px solid var(--rule);
}
.editions li {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  padding: 0.6rem 0;
  line-height: 1.4;
}
.editions .year { font-weight: bold; flex: none; width: 3rem; }
.editions .details { flex: 1 1 16rem; min-width: 0; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 4rem var(--gutter);
  text-align: center;
  font-size: 0.75rem;
  color: var(--footer-text);
  background: var(--footer-bg);
  border-top: thin solid var(--footer-rule);
}
