/* ===========================================================================
   Hinman Lab — shared stylesheet
   Modern-scientific. One stylesheet, no build step, no external dependencies.
   Palette: University of Illinois (Illini Blue + Illini Orange).
   =========================================================================== */

:root {
  --ink:        #13294b;   /* Illini blue — headings, primary buttons, links */
  --ink-soft:   #1c3a63;   /* hover state for ink surfaces */
  --accent:     #ff5f05;   /* Illini orange — decorative accents only */
  --accent-deep:#c1470a;   /* accessible orange for small text on white */
  --body:       #23272e;   /* body text */
  --muted:      #5b6472;   /* secondary text */
  --bg:         #ffffff;
  --surface:    #f5f7f9;   /* alternating section background */
  --surface-2:  #eef1f5;
  --border:     #e2e6ec;
  --maxw:       1080px;
  --radius:     12px;
  --shadow:     0 1px 2px rgba(19,41,75,.06), 0 8px 24px rgba(19,41,75,.07);
  --font:       system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---- Typography --------------------------------------------------------- */
h1, h2, h3 { color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .4em; }
p  { margin: 0 0 1em; }
a  { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent-deep); }

.eyebrow {
  display: inline-block; font-size: 1rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: .7em;
}
.lead { font-size: 1.18rem; color: var(--muted); }

/* Full-width Illini-orange accent stripe across the top of every page's content. */
main { border-top: 6px solid var(--accent); }

/* ---- Header / nav ------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand img { height: 44px; width: auto; display: block; }
.brand { flex: 0 0 auto; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .96rem;
  color: var(--ink); border-bottom: 2px solid transparent;
}
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.active { border-bottom-color: var(--accent); border-radius: 8px 8px 0 0; }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 650; font-size: .98rem; cursor: pointer; border: 1.6px solid transparent;
  transition: background .15s ease, color .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn.btn-primary { background: var(--ink); color: #fff; }
.btn.btn-primary:hover { background: var(--ink-soft); color: #fff; }
.btn.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn + .btn { margin-left: 10px; }

/* ---- Hero --------------------------------------------------------------- */
.hero { padding: 72px 0 60px; }
.hero .wrap {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
}
.hero-cta { margin-top: 26px; }
.hero-figure {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; text-align: center;
}
.hero-figure img { width: 100%; max-width: 340px; height: auto; border-radius: 8px; }
.hero-figure figcaption { font-size: .82rem; color: var(--muted); margin-top: 12px; }

/* ---- Generic sections --------------------------------------------------- */
.section { padding: 64px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 36px; }

/* ---- Card grid ---------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(19,41,75,.08), 0 16px 40px rgba(19,41,75,.10); color: var(--body); }
.card h3 { margin-bottom: .3em; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }
.card .card-link { margin-top: auto; padding-top: 14px; font-weight: 650; color: var(--accent-deep); }

/* ---- Recruitment band --------------------------------------------------- */
.recruit { background: var(--ink); color: #eaf0f8; }
.recruit h2 { color: #fff; }
.recruit .wrap { padding: 56px 24px; }
.recruit .lead { color: #c3d0e2; }
.recruit .roles { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 24px; list-style: none; padding: 0; }
.recruit .roles li {
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: 7px 15px; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.btn.btn-accent { background: var(--accent); color: #201000; }
.btn.btn-accent:hover { background: #ff7629; color: #201000; }

/* ---- Research page ------------------------------------------------------ */
/* Equal-weight card grid — areas sit side by side, not ranked top-to-bottom. */
.research-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 8px; }
.research-card {
  background: var(--bg); border: 1px solid var(--border); border-top: 6px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column;
}
.research-card .fig {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block;
  background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.research-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.research-card h3 { margin-bottom: .4em; font-size: 1.25rem; }
.research-card p { color: var(--body); font-size: .96rem; margin: 0; }
.research-card .projlist {
  list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column;
  align-items: flex-start; gap: 9px;
}
.research-card .projlist li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 13px; font-size: .85rem; color: var(--ink); font-weight: 600;
}
.research-card .caption { font-size: .78rem; color: var(--muted); padding: 8px 24px 0; }
/* Project bullets that link to a dedicated page get a clickable affordance. */
.research-card .projlist li:has(a) { border-color: var(--accent); }
.research-card .projlist li a { color: var(--ink); }
.research-card .projlist li:has(a):hover { background: var(--ink); }
.research-card .projlist li:has(a):hover a { color: #fff; }
@media (max-width: 820px) {
  .research-grid { grid-template-columns: 1fr; }
}

/* ---- Project pages ------------------------------------------------------ */
.back-link { display: inline-block; font-weight: 650; font-size: .9rem; color: var(--accent-deep); margin-bottom: 16px; }
.back-link:hover { color: var(--ink); }
.project-status {
  display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .04em;
  color: var(--accent-deep); background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 13px; margin-bottom: 14px;
}
.project-body { max-width: 720px; }
.project-body h2 { margin-top: 1.5em; font-size: 1.3rem; }
.project-fig {
  width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); margin: 8px 0 4px;
}
.paper-list { list-style: none; padding: 0; margin: 14px 0 0; }
.paper { padding: 18px 0; border-bottom: 1px solid var(--border); }
.paper:first-child { border-top: 1px solid var(--border); }
.paper .p-title { font-weight: 650; color: var(--ink); margin: 0; }
.paper .p-authors { color: var(--muted); font-size: .9rem; margin: 4px 0 0; }
.paper .p-status { font-size: .82rem; font-weight: 700; color: var(--accent-deep); margin: 6px 0 0; }
.paper .p-links { margin: 9px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.paper .p-links a {
  font-size: .82rem; font-weight: 650; padding: 5px 12px; border-radius: 999px;
  border: 1.4px solid var(--border); color: var(--ink);
}
.paper .p-links a:hover { border-color: var(--ink); background: var(--surface); }

/* ---- People page -------------------------------------------------------- */
.people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.people-grid.pi { grid-template-columns: repeat(2, 1fr); max-width: 720px; }
.person { text-align: center; }
.person .avatar {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--border); display: block;
}
.person .name { font-weight: 700; color: var(--ink); margin: 12px 0 2px; }
.person .role { font-size: .9rem; color: var(--muted); margin: 0; }
.person .detail { font-size: .84rem; color: var(--muted); margin: 4px 0 0; }
.person a { color: var(--accent-deep); font-size: .85rem; }
/* PI card — horizontal layout: photo left, text right */
.people-grid.pi { grid-template-columns: 1fr; max-width: 560px; }
.person.pi-card { display: flex; align-items: center; gap: 26px; text-align: left; }
.person.pi-card .avatar { width: 240px; flex: 0 0 240px; }
.person.pi-card .name { margin-top: 0; }
.person.pi-card .pi-links { margin: 10px 0 0; }
@media (max-width: 520px) {
  .person.pi-card { flex-direction: column; align-items: center; text-align: center; }
  .person.pi-card .avatar { width: 200px; flex-basis: auto; }
}
.alumni-list { columns: 2; gap: 40px; color: var(--muted); }
.subhead { margin-top: 8px; color: var(--accent-deep); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }

/* ---- Publications page -------------------------------------------------- */
.pub-year { margin: 34px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--accent); color: var(--ink); font-size: 1.35rem; }
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub {
  padding: 16px 0; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: baseline;
}
.pub .cite { color: var(--body); }
.pub .cite .authors { color: var(--body); }
.pub .cite .title { font-weight: 650; color: var(--ink); }
.pub .cite .venue { font-style: italic; color: var(--muted); }
.pub .note { display: block; margin-top: 5px; font-size: .86rem; color: var(--accent-deep); }
.pub .links { white-space: nowrap; display: flex; gap: 8px; }
.pub .links a {
  font-size: .82rem; font-weight: 650; padding: 5px 12px; border-radius: 999px;
  border: 1.4px solid var(--border); color: var(--ink);
}
.pub .links a:hover { border-color: var(--ink); background: var(--surface); }

/* ---- Contact page ------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-block h3 { margin-bottom: .2em; }
.contact-block p { color: var(--muted); margin: 0 0 .3em; }
.contact-block a { color: var(--ink); font-weight: 600; }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 8px; }
.site-footer .wrap {
  padding: 34px 24px; display: flex; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; font-size: .9rem; color: var(--muted);
}
.site-footer a { color: var(--ink); font-weight: 600; }
.site-footer .foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .hero { padding: 44px 0 40px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 32px; }
  .hero-figure { order: -1; }
  .site-header .wrap { justify-content: center; }
  .nav { justify-content: center; }
  .cards { grid-template-columns: 1fr; }
  .people-grid, .people-grid.pi { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .alumni-list { columns: 1; }
  .pub { grid-template-columns: 1fr; }
  .btn + .btn { margin-left: 0; margin-top: 10px; }
  .hero-cta .btn { display: block; text-align: center; }
}
@media (max-width: 460px) {
  .people-grid, .people-grid.pi { grid-template-columns: 1fr; }
}
