/* Lybarger Language Lab - single site stylesheet.
   Mobile-first. No framework, no preprocessor.
   Palette: neutral base, Mason green accent, gold reserved for focus. */

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lato";
  src: url("../fonts/lato-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #006633;
  --green-dark: #004d26;
  --gold: #ffcc33;
  --text: #1c1c1c;
  --muted: #575757;
  --rule: #e3e3e3;
  --bg: #ffffff;
  --bg-soft: #f6f7f6;
  --content: 68rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Lato", "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

.wrap {
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ---------- chrome ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--green);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 10;
}

.skip-link:focus { left: 0; }

.site-header {
  border-top: 4px solid var(--green);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 2rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark { width: 1.6rem; height: 1.6rem; }

.brand span { color: var(--green); }

.site-header nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.35rem;
  margin: 0;
  padding: 0;
}

.site-header nav a {
  color: var(--text);
  text-decoration: none;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover { border-bottom-color: var(--green); }

.site-header nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
  border-bottom-color: var(--green);
}

main { padding-block: 2.25rem 3rem; }

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
  padding-block: 1.5rem;
  margin-top: 2rem;
}

.site-footer p { margin: 0.25rem 0; }

/* ---------- typography ---------- */

h1 { font-size: 1.9rem; line-height: 1.25; margin: 0 0 1rem; }

h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--rule);
}

h3 { font-size: 1.15rem; margin: 1.5rem 0 0.5rem; }

p { margin: 0 0 1rem; }

a { color: var(--green); }

a:hover { color: var(--green-dark); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.lede {
  font-size: 1.15rem;
  max-width: 46rem;
}

.muted { color: var(--muted); }

.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-weight: 600;
}

.btn:hover { background: var(--green-dark); color: #fff; }

/* ---------- cards (people, projects, home team strip) ---------- */

.cards {
  display: grid;
  /* 19rem minimum caps the grid at three columns inside the 68rem
     content width, so five students break 3 + 2, never 4 + 1. */
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.75rem;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.card h3 { margin: 0.6rem 0 0.1rem; }

.card .role { color: var(--muted); margin: 0 0 0.4rem; }

.headshot {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  /* Anchor the square crop to the top of the photo so portrait
     images lose their bottom, not the tops of heads. */
  object-position: top;
  border-radius: 6px;
  background: var(--bg-soft);
  display: block;
}

.link-row {
  font-size: 0.9rem;
  margin: 0 0 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.link-row a { white-space: nowrap; }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 5px;
  color: var(--green);
}

.icon-link svg { width: 1.15rem; height: 1.15rem; }

.icon-link:hover {
  color: #ffffff;
  background: var(--green);
}

.person-bio { font-size: 0.95rem; }

.person-wide {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem 2rem;
  margin: 1rem 0 2rem;
}

@media (min-width: 42rem) {
  .person-wide { grid-template-columns: 13rem 1fr; align-items: start; }
}

.person-wide .headshot { max-width: 13rem; }

.person-wide h3 { margin: 0 0 0.1rem; font-size: 1.3rem; }

.person-wide .person-bio { font-size: 1rem; }

.hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0 0 1.75rem;
}

.team-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: center;
}

.team-strip img { border-radius: 50%; }

/* ---------- news ---------- */

.news-item {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.1rem;
  scroll-margin-block-start: 1.5rem;
}

/* Arriving from a home-page headline: mark the item that was asked for.
   The rule is an inset shadow, not a border, so nothing shifts. */
.news-item:target {
  background: var(--bg-soft);
  box-shadow: inset 0.25rem 0 0 var(--gold);
  padding-inline: 1rem;
  margin-inline: -1rem;
}

/* Home strip headlines link to the matching item on the News page.
   Underline on hover only: four underlined headings in a row is noisy. */
.news-item h3 a { text-decoration: none; }

.news-item h3 a:hover,
.news-item h3 a:focus-visible { text-decoration: underline; }

.news-item:last-of-type { border-bottom: none; }

.news-item h2, .news-item h3 {
  border: none;
  margin: 0.15rem 0 0.4rem;
  font-size: 1.15rem;
  padding: 0;
}

.news-item p:last-child { margin-bottom: 0; }

.news-item time {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- publications ---------- */

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 1.5rem;
}

.pub-list li {
  margin-bottom: 0.9rem;
  padding-left: 1.1rem;
  border-left: 3px solid var(--rule);
  font-size: 0.97rem;
}

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}

.highlight-card {
  border: 1px solid var(--rule);
  border-top: 4px solid var(--green);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
}

.highlight-card .title {
  display: block;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.4rem;
}

.highlight-card p { margin: 0 0 0.35rem; }

.highlight-card .card-authors { font-size: 0.9rem; }

.highlight-card .venue { color: var(--muted); font-size: 0.9rem; }

.award {
  display: inline-block;
  color: var(--green-dark);
  background: #fff7dd;
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 0 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
}

details.pub-collapse summary {
  cursor: pointer;
  list-style-position: outside;
}

details.pub-collapse summary h2 {
  display: inline-block;
  margin: 2.25rem 0 0.75rem;
  width: calc(100% - 2rem);
  vertical-align: top;
}

/* ---------- projects ---------- */

.project {
  border-bottom: 1px solid var(--rule);
  padding-block: 1.25rem;
}

.project:last-of-type { border-bottom: none; }

.project h2 { border: none; margin: 0 0 0.4rem; padding: 0; }

.project .meta { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.5rem; }

.project-figure {
  display: block;
  width: 100%;
  max-width: 16rem;
  height: auto;
  margin: 0 0 1rem;
}

/* Figure beside the prose once there is room, stacked above it before that.
   Same shape as .person-wide on the People page. */
@media (min-width: 42rem) {
  .project-media {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 1.5rem;
    align-items: start;
  }

  .project-figure { margin-bottom: 0; }
}

/* ---------- contact ---------- */

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.contact-list li { margin-bottom: 0.6rem; }

.contact-list strong { display: inline-block; min-width: 7rem; }

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .card, .highlight-card, .icon-link, .btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease,
                background-color 0.15s ease, color 0.15s ease;
  }

  .card:hover, .highlight-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  }
}

/* ---------- print ---------- */

@media print {
  .site-header nav, .site-footer, .skip-link { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
  .pub-list li { border-left: none; padding-left: 0; }
}
