/* Rice RobotΠ Lab
   Palette: Rice Blue #00205B, Rice Gray #7C7E7F.
   Type: Rice's brand faces are Copernicus (serif) and Mallory (sans). Both are
   licensed, so they come first in each stack and the open-source stand-ins
   Source Serif 4 and Hanken Grotesk are what load by default. */

:root {
  --blue: #00205b;
  --blue-deep: #00143a;
  --blue-soft: #1d3f7c;
  --gray: #7c7e7f;
  --ink: #101828;
  --body: #3d4553;
  --muted: #6b7280;
  --line: #e2e6ed;
  --tint: #f5f7fa;
  --paper: #ffffff;
  --sky: #a9c1e8;

  --serif: "Copernicus", "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Mallory", "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --edge: clamp(16px, 4.5vw, 72px); /* left/right inset of the header and hero, measured from the screen edge */
  --header-h: 68px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); font-family: var(--serif); font-weight: 600; line-height: 1.2; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
:target { scroll-margin-top: calc(var(--header-h) + 20px); }
:focus-visible { outline: 2px solid var(--blue-soft); outline-offset: 3px; }

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

.eyebrow {
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s, border-color 0.25s;
}
.site-header .wrap { max-width: none; padding: 0 var(--edge); height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: baseline; gap: 10px; color: var(--blue); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: -0.01em; }
.brand-pi { font-family: "Helvetica Neue", Arial, sans-serif; font-weight: 500; font-size: 0.92em; }
.site-header .brand-name { font-size: 27px; }
.site-header .brand-uni { font-size: 13px; }
@media (max-width: 940px) { .site-header .brand-uni { display: none; } }
.brand-uni { font-size: 10.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gray); padding-left: 10px; border-left: 1px solid currentColor; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
}
.nav a:hover { text-decoration: none; color: var(--blue); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.2s; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--blue); }

.nav-toggle { display: none; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; }
.nav-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; background: currentColor; transition: transform 0.2s, opacity 0.2s; }

/* Transparent header while it sits on top of the hero video. */
.site-header.is-clear { background: transparent; border-color: transparent; color: #fff; }
.site-header.is-clear .brand, .site-header.is-clear .nav a { color: #fff; }
.site-header.is-clear .brand-uni { color: rgba(255, 255, 255, 0.75); }

@media (max-width: 720px) {
  .nav-toggle { display: block; color: var(--blue); }
  .site-header.is-clear .nav-toggle { color: #fff; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px var(--edge) 14px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav a, .site-header.is-clear .nav a { color: var(--ink); padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .nav-open .nav { display: flex; }
  .nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .brand-uni { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px;
  border: 1px solid var(--blue);
  background: var(--blue); color: #fff;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--blue-soft); border-color: var(--blue-soft); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-light { background: #fff; border-color: #fff; color: var(--blue); }
.btn-light:hover { background: transparent; border-color: #fff; color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn-outline-light:hover { background: #fff; border-color: #fff; color: var(--blue); }

.more { font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.more::after { content: " →"; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: flex; align-items: flex-end;
  height: 100vh; height: min(100svh, 1200px); min-height: 560px;
  padding: calc(var(--header-h) + 40px) 0 clamp(56px, 10vh, 96px);
  background: var(--blue-deep);
  color: #fff;
  overflow: hidden;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 20, 58, 0.6) 0%, rgba(0, 20, 58, 0.22) 24%, rgba(0, 20, 58, 0.5) 55%, rgba(0, 20, 58, 0.93) 100%),
    linear-gradient(90deg, rgba(0, 20, 58, 0.58) 0%, rgba(0, 20, 58, 0) 72%);
}
.hero .wrap { max-width: none; padding: 0 var(--edge); position: relative; z-index: 1; text-shadow: 0 1px 28px rgba(0, 20, 58, 0.55); }
.hero .eyebrow { color: rgba(255, 255, 255, 0.82); font-size: clamp(12px, 3.2vw, 14px); }
.hero h1 {
  margin: 14px 0 18px;
  color: #fff;
  font-size: clamp(28px, 8.4vw, 88px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.hero h1 span { display: block; white-space: nowrap; }
.hero h1 b { font-weight: 700; color: var(--sky); }
.hero-sub { max-width: 58ch; margin-bottom: 26px; font-size: clamp(15px, 1.5vw, 18px); color: rgba(255, 255, 255, 0.86); }
.hero-sub .nowrap { white-space: nowrap; }
.hero-pi { display: block; width: fit-content; margin-top: 8px; }
.hero-sub a { color: #fff; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.hero-sub a:hover { color: var(--sky); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; text-shadow: none; }

/* A second, small video in the corner of the hero. It sits above the navy overlay so it reads as a clear picture-in-picture. */
.hero-inset {
  position: absolute; z-index: 1; right: var(--edge); bottom: 80px;
  width: clamp(220px, 23vw, 360px); aspect-ratio: 16 / 9; object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.6); background: var(--blue-deep);
  box-shadow: 0 12px 32px rgba(0, 20, 58, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.5s, visibility 0.5s;
}
.hero-inset.is-on { opacity: 1; visibility: visible; }
@media (max-width: 720px) { .hero-inset { top: calc(var(--header-h) + 12px); bottom: auto; width: 44vw; } }

/* A thin line along the bottom of the hero showing how far through its loop the video is. */
.hero-progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, 0.16); }
.hero-progress span { display: block; width: 100%; height: 100%; background: var(--sky); transform: scaleX(0); transform-origin: left center; }

.hero-toggle {
  position: absolute; z-index: 2; right: var(--edge); bottom: 24px;
  width: 38px; height: 38px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
  background: rgba(0, 20, 58, 0.35); color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.hero-toggle:hover { background: rgba(0, 20, 58, 0.7); }
.hero-toggle svg { width: 12px; height: 12px; fill: currentColor; }
.hero-toggle .i-play, .hero-toggle.is-paused .i-pause { display: none; }
.hero-toggle.is-paused .i-play { display: block; }

/* ---------- Sections ---------- */

.section { padding: clamp(44px, 7vw, 76px) 0; }
.section-tint { background: var(--tint); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 4px; }

.mission { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 5vw, 64px); align-items: start; }
.mission h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 500; }
.mission p { font-size: 16.5px; }
.themes { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.themes li { padding: 5px 12px; border: 1px solid var(--line); font-size: 13px; color: var(--ink); background: var(--paper); }
@media (max-width: 760px) { .mission { grid-template-columns: 1fr; } }

/* ---------- Rolling rows (highlights, awards) ---------- */

.roller-controls { display: flex; gap: 6px; }
.roller-btn { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); background: var(--paper); color: var(--blue); font-size: 16px; line-height: 1; cursor: pointer; }
.roller-btn:hover { border-color: var(--blue); background: var(--blue); color: #fff; }

.roller { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding: 0 max(var(--gutter), calc((100% - var(--wrap)) / 2)); }
.roller::-webkit-scrollbar { display: none; }
.roller-track { display: flex; gap: 16px; width: max-content; }
.roller.is-static .roller-track { display: grid; width: auto; }
.roller.is-static .highlight, .roller.is-static .award { width: auto; }
.roller-controls[hidden] { display: none; }

.highlight { flex: none; width: min(78vw, 400px); background: var(--paper); border: 1px solid var(--line); color: inherit; }
a.highlight:hover { text-decoration: none; border-color: var(--blue); }
.highlight video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--blue-deep); }
.highlight-body { padding: 13px 16px 15px; }
.highlight-venue { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 700; letter-spacing: 0.06em; color: var(--blue); }
.highlight h3 { font-size: 16px; font-weight: 600; line-height: 1.32; }

.award {
  flex: none; width: 250px; min-height: 148px;
  display: flex; flex-direction: column;
  background: var(--blue); color: #fff;
  border-top: 3px solid var(--sky);
}
a.award { transition: background-color 0.2s; }
a.award:hover { background: var(--blue-soft); text-decoration: none; }
.award img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.award-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.award-year { font-size: 11.5px; font-weight: 600; letter-spacing: 0.16em; color: var(--sky); }
.award h3 { margin: 8px 0 auto; padding-bottom: 14px; color: #fff; font-size: 17.5px; font-weight: 500; line-height: 1.25; }
.award p { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.25; color: #fff; }
.award-note { margin-top: 4px; white-space: pre-line; font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, 0.78); }

/* ---------- News ---------- */

.news { margin: 0; padding: 0; list-style: none; }
.news li { display: grid; grid-template-columns: 96px 132px minmax(0, 1fr); gap: 20px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news li:first-child { padding-top: 0; }
.news li:last-child { border-bottom: 0; padding-bottom: 0; }
.news time { padding-top: 2px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.news img { width: 132px; aspect-ratio: 3 / 2; object-fit: contain; border: 1px solid var(--line); background: var(--paper); }
.news h3 { font-size: 18px; margin-bottom: 4px; }
.news h3 a { color: var(--ink); }
.news h3 a:hover { color: var(--blue); }
.news p { margin: 0; font-size: 14.5px; }
.news li[hidden] { display: none; }
.news-more { overflow-wrap: anywhere; }
.news-more p { margin-top: 8px; }
.news-toggle, .news-link { margin-top: 6px; padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; }
.news-link { display: inline-block; }
.news-toggle:hover, .news-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-all { margin-top: 24px; cursor: pointer; font-family: inherit; }
@media (max-width: 720px) {
  .news li { grid-template-columns: 88px minmax(0, 1fr); gap: 6px 14px; }
  .news time { grid-column: 1 / -1; }
  .news img { width: 88px; }
}

/* ---------- Inner page header ---------- */

.page-head { padding: calc(var(--header-h) + clamp(32px, 6vw, 56px)) 0 clamp(26px, 4vw, 40px); background: var(--blue); color: #fff; }
.page-head .eyebrow { color: var(--sky); }
.page-head h1 { margin-top: 6px; color: #fff; font-size: clamp(32px, 5vw, 50px); font-weight: 500; letter-spacing: -0.015em; }
.page-head p { max-width: 62ch; margin: 12px 0 0; color: rgba(255, 255, 255, 0.82); }

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

.pub-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-bottom: 8px; }
.pub-search { flex: 1 1 260px; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 0; background: var(--paper); color: var(--ink); font: inherit; font-size: 14.5px; }
.pub-search:focus { outline: none; border-color: var(--blue); }
.pub-select {
  flex: none; min-width: 140px; height: 40px; padding: 0 36px 0 14px;
  border: 1px solid var(--line); border-radius: 0;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2300205b' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 13px center;
  color: var(--body); font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.pub-select:hover, .pub-select:focus { border-color: var(--blue); color: var(--blue); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--paper); color: var(--body); font: inherit; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip[aria-pressed="true"] { border-color: var(--blue); background: var(--blue); color: #fff; }
.pub-count { margin: 0 0 6px; font-size: 13px; color: var(--muted); }

.pub-year { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 20px; padding: 22px 0 6px; border-top: 1px solid var(--line); }
.pub-year h2 { position: sticky; top: calc(var(--header-h) + 14px); align-self: start; font-size: 26px; font-weight: 500; color: var(--blue); }
.pub-list { margin: 0; padding: 0; list-style: none; }
.pub { padding: 0 0 18px; }
.pub h3 { font-size: 17px; font-weight: 600; line-height: 1.32; }
.pub h3 a { color: var(--ink); }
.pub h3 a:hover { color: var(--blue); }
.pub-authors { margin: 3px 0 2px; font-size: 14px; color: var(--body); }
.pub-authors b { font-weight: 600; color: var(--ink); }
.pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.pub-venue { font-style: italic; color: var(--muted); }
.pub-links { display: inline-flex; flex-wrap: wrap; gap: 4px 10px; }
.pub-links a { font-size: 11.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.pub-empty { padding: 32px 0; color: var(--muted); }
@media (max-width: 640px) {
  .pub-year { grid-template-columns: 1fr; gap: 10px; }
  .pub-year h2 { position: static; }
}

/* ---------- People ---------- */

/* Every section uses the same grid, so every photo on the page is the same size. */
.people, .pi { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 48px 32px; }
.people { margin: 0; padding: 0; list-style: none; }
.pi img, .person img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--tint); }
.person img { margin-bottom: 14px; }

.pi { align-items: start; row-gap: 20px; }
.pi > div { grid-column: 2 / -1; }
.pi h3 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 500; }
.pi p { max-width: 74ch; }
.pi-role { margin: 4px 0 14px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.pi-links { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: 4px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

.person h3 { font-size: 18.5px; }
.person p { margin: 4px 0 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.person-links { display: flex; gap: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 760px) { .pi > div { grid-column: 1 / -1; } }
@media (max-width: 480px) { .people, .pi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; } .pi { row-gap: 18px; } }

/* ---------- Join ---------- */

.join { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 60px); align-items: start; }
/* Rice's logo and the Rice Owls mark, shown as decoration beside the text. Use both files as supplied. */
.join-mark { position: sticky; top: calc(var(--header-h) + 24px); padding-top: 8px; }
.join-mark img { display: block; height: auto; margin: 0 auto; }
.join-mark .join-mark-uni { width: 100%; }
.join-mark .join-mark-owls { width: 210px; margin-top: 44px; }
@media (max-width: 820px) { .join { grid-template-columns: 1fr; } .join-mark { display: none; } }
.join-block { padding: 0 0 26px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.join-block:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.join-block h2 { margin: 6px 0 12px; font-size: clamp(22px, 2.8vw, 28px); }
.join-block ul { margin: 0 0 1em; padding-left: 18px; }
.join-block li { margin-bottom: 6px; }
.join-block li::marker { color: var(--blue); }
.join-block .btn { margin-top: 6px; }
.note strong { color: var(--ink); font-weight: 600; }
.note { padding: 12px 16px; border-left: 3px solid var(--blue); background: var(--tint); font-size: 14.5px; }

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

.site-footer { background: var(--blue-deep); color: rgba(255, 255, 255, 0.72); font-size: 13.5px; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding-top: 40px; padding-bottom: 28px; }
.site-footer .brand { color: #fff; }
.site-footer .brand-uni { color: rgba(255, 255, 255, 0.7); display: inline; }
.site-footer p { margin: 10px 0 0; max-width: 40ch; }
.site-footer h2 { margin-bottom: 10px; font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sky); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 5px; }
.site-footer a { color: rgba(255, 255, 255, 0.86); }
.site-footer a:hover { color: #fff; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, 0.14); }
.footer-base .wrap { display: block; padding-top: 14px; padding-bottom: 16px; font-size: 12px; color: rgba(255, 255, 255, 0.55); }
@media (max-width: 720px) { .site-footer .wrap { grid-template-columns: 1fr; gap: 22px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
