/* UCI Rehabilitation & Augmentation Lab — Shared Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: #111827; background: #fff; line-height: 1.6; font-size: var(--fs-body); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* Variables */
:root {
  --blue: #003087;
  --blue-dk: #001f5b;
  --blue-tint: #eef2fb;
  --gold: #FFD200;
  --tx: #111827;
  --mt: #1F2937;
  --sb: #9CA3AF;
  --bg: #ffffff;
  --bg2: #f8f9fc;
  --bd: #E5E7EB;
  --r: 4px;
  /* type scale: every text size on the site comes from one of these */
  --fs-title: clamp(28px, 3.5vw, 40px);  /* page titles in the top banner */
  --fs-subtitle: 18px;                    /* line under page titles, homepage department line */
  --fs-section: clamp(24px, 3vw, 32px);  /* gold-underlined section headings */
  --fs-subhead: clamp(20px, 2.5vw, 24px);/* focus area titles, study title, PI name */
  --fs-item: 18px;                        /* card, project, person, publication and Join titles */
  --fs-body: 16px;                        /* all paragraphs */
  --fs-small: 14px;                       /* supporting details, menu, buttons, footer text */
  --fs-label: 12px;                       /* all-caps tags and labels, small outlined buttons */
}

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: #fff; border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(48px, calc((100% - 1100px) / 2)); height: 64px;
}
.nav-brand { font-size: var(--fs-small); font-weight: 700; color: var(--blue); }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  font-size: var(--fs-small); font-weight: 500; color: var(--mt);
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: var(--blue); }
.nav-links a.active { color: var(--blue); border-bottom-color: var(--gold); }

/* PAGE HEADER */
.page-hdr { background: linear-gradient(90deg, rgba(0,20,60,.65) 0%, rgba(0,20,60,.35) 45%, rgba(0,20,60,0) 75%), url('images/page-header-background.png') center/cover no-repeat var(--blue-dk); padding: 64px 48px 52px; }
.page-hdr-in { max-width: 1100px; margin: 0 auto; }
.page-hdr h1 {
  font-size: var(--fs-title); font-weight: 700; color: #fff;
  letter-spacing: -.025em; line-height: 1.1;
}
.page-hdr p { font-size: var(--fs-subtitle); color: rgba(255,255,255,.6); margin-top: 12px; }
/* page titles slide in like the homepage banner */
.page-hdr h1, .page-hdr p { animation: heroSweep .9s cubic-bezier(.2,.7,.2,1) both; }
.page-hdr p { animation-delay: .3s; }

/* SHARED */
.wrap { max-width: 1100px; margin: 0 auto; }
.sec { padding: 80px 48px; }
.sec-off { background: var(--bg2); }
.sec-h { font-size: var(--fs-section); font-weight: 700; color: var(--tx); line-height: 1.2; letter-spacing: -.02em; margin-bottom: 32px; }
.sec-h span { display: inline-block; border-bottom: 3px solid var(--gold); padding-bottom: 4px; }
.ral-link { display: inline-block; margin-top: 16px; font-size: var(--fs-label); font-weight: 600; color: var(--blue); border: 1.5px solid var(--blue); padding: 5px 12px; border-radius: var(--r); transition: background .15s, color .15s; }
.ral-link:hover { background: var(--blue); color: #fff; }

/* HERO */
.hero {
  min-height: 680px; overflow: hidden; background: var(--blue-dk);
  display: flex; align-items: flex-end; position: relative;
}
/* lab photos crossfade behind the hero text; hero.js advances them and drives the arrows */
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease; }
.hero-slide.on { opacity: 1; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,20,60,.45); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.hero-arrow:hover { background: rgba(0,20,60,.75); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,20,60,.88) 0%, rgba(0,20,60,.4) 55%, rgba(0,20,60,.15) 100%);
}
.hero-c { position: relative; z-index: 1; width: 100%; max-width: 1196px; margin: 0 auto; padding: 56px 48px; }
.hero-c img.lab-name { max-height: 58px; width: auto; margin-bottom: 14px; }
.hero-dept { font-size: var(--fs-subtitle); color: rgba(255,255,255,.9); margin-bottom: 32px; }
/* logo and department line slide in from the left once, on page load */
.hero-sweep { animation: heroSweep .9s cubic-bezier(.2,.7,.2,1) both; }
.hero-dept.hero-sweep { animation-delay: .3s; }
@keyframes heroSweep { from { opacity: 0; transform: translateX(-60px); } to { opacity: 1; transform: none; } }
.btn-gold { display: inline-block; background: var(--gold); color: var(--blue-dk); font-size: var(--fs-small); font-weight: 700; font-family: inherit; padding: 12px 26px; border-radius: var(--r); margin-right: 10px; margin-bottom: 8px; }
.btn-outline { display: inline-block; border: 1.5px solid rgba(255,255,255,.4); color: rgba(255,255,255,.85); font-size: var(--fs-small); font-weight: 500; font-family: inherit; padding: 12px 26px; border-radius: var(--r); margin-bottom: 8px; }
.btn-outline:hover { border-color: rgba(255,255,255,.75); color: #fff; }

/* ABOUT SPLIT */
.about-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 60px; align-items: center; }
.about-text p { font-size: var(--fs-body); color: var(--mt); line-height: 1.8; margin-bottom: 14px; }
.about-img img { width: 100%; height: auto; }

/* RESEARCH THEMES PREVIEW */
.themes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--bd); margin-top: 36px; }
.theme-card { background: #fff; border-top: 3px solid #f1f3f9; transition: border-color .2s; display: flex; flex-direction: column; }
.theme-img { aspect-ratio: 16/10; overflow: hidden; background: var(--blue-tint); }
.theme-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.theme-card:hover .theme-img img { transform: scale(1.04); }
.theme-img-empty { display: flex; align-items: center; justify-content: center; font-size: var(--fs-label); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sb); border-bottom: 1px dashed #c9d3ea; }
.theme-body { padding: 26px 26px 30px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.theme-card .theme-body a { margin-top: auto; }
.theme-card .theme-body p { margin-bottom: 14px; }
.theme-card:hover { border-top-color: var(--gold); }
.theme-area { font-size: var(--fs-label); font-weight: 700; color: var(--blue); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 10px; }
.theme-card h3 { font-size: var(--fs-item); font-weight: 700; color: var(--tx); line-height: 1.3; margin-bottom: 10px; }
.theme-card p { font-size: var(--fs-body); color: var(--mt); line-height: 1.7; margin: 0; }
.theme-card a { display: inline-block; margin-top: 14px; font-size: var(--fs-label); font-weight: 600; color: var(--blue); border: 1.5px solid var(--blue); padding: 5px 12px; border-radius: var(--r); transition: background .15s, color .15s; }
.theme-card a:hover { background: var(--blue); color: #fff; }

/* HOME PUBLICATION CARDS: figure on top */
.pub-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 24px; }
.pub-card { display: block; background: #fff; border: 1px solid var(--bd); border-radius: var(--r); overflow: hidden; border-top: 3px solid var(--bd); transition: border-color .2s; }
.pub-card:hover { border-top-color: var(--gold); }
.pub-card-img { aspect-ratio: 16/9; background: #fff; border-bottom: 1px solid var(--bd); }
.pub-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.pub-card-body { padding: 20px 22px 24px; }
.pub-card .pub-title { margin-bottom: 6px; }
.pub-card:hover .pub-title { color: var(--blue); }

/* PUBLICATIONS */
.pub-item { display: grid; grid-template-columns: 100px 1fr; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--bd); align-items: start; }
.pub-thumb { aspect-ratio: 4/3; border-radius: var(--r); overflow: hidden; background: var(--blue-tint); }
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pub-j { font-size: var(--fs-label); font-weight: 700; color: var(--blue); letter-spacing: .05em; text-transform: uppercase; margin-bottom: 5px; }
.pub-title { font-size: var(--fs-item); font-weight: 600; color: var(--tx); line-height: 1.4; margin-bottom: 5px; display: block; }
.pub-title:hover { color: var(--blue); }
.pub-authors { font-size: var(--fs-small); color: var(--mt); }
.pub-authors strong { color: var(--tx); font-weight: 600; }
.pub-sec-h { margin-top: 56px; margin-bottom: 8px; }
.wrap > .pub-sec-h:first-child { margin-top: 0; }
/* publications page: text left, buttons right */
.pub-row { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--bd); }
.pub-row .pub-title { margin-bottom: 3px; }
.pub-meta { font-size: var(--fs-small); color: var(--mt); line-height: 1.55; }
.pub-meta strong { color: var(--tx); font-weight: 600; }
.pub-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pub-btn { font-size: var(--fs-label); font-weight: 600; color: var(--blue); border: 1.5px solid var(--blue); padding: 4px 10px; border-radius: var(--r); transition: background .15s, color .15s; }
.pub-btn:hover { background: var(--blue); color: #fff; }
.pub-more { margin-top: 48px; font-size: var(--fs-body); color: var(--mt); }
.pub-more a { color: var(--blue); font-weight: 600; border-bottom: 1px solid var(--bd); }

/* PARTNERS */
.partners-logos { display: flex; align-items: center; justify-content: center; gap: 48px; flex-wrap: wrap; }
.partners-logos img { max-height: 38px; width: auto; transition: transform .2s; }
.partners-logos a:hover img { transform: translateY(-2px); }
.partner-stack { display: flex; flex-direction: column; gap: 6px; width: 190px; }
.partners-logos .partner-stack img { width: 100%; height: auto; max-height: none; }
.partners-label { text-align: center; font-size: var(--fs-body); font-weight: 600; color: var(--tx); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 32px; }

/* PEOPLE - PI CARD */
.ppl-wrap { display: flex; flex-direction: column; gap: 24px; }
.grp-box { background: var(--bg2); border-radius: var(--r); padding: 32px 40px 36px; border-left: 3px solid var(--blue); }
.pi-card { display: grid; grid-template-columns: 128px 1fr; gap: 32px; align-items: start; }
.av { border-radius: 50%; overflow: hidden; background: var(--blue-tint); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--blue); position: relative; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.av-lg { width: 128px; height: 128px; font-size: 32px; }
.av-md { width: 84px; height: 84px; font-size: 20px; }
.av-sm { width: 100px; height: 100px; font-size: 24px; }
.pi-info h2 { font-size: var(--fs-subhead); font-weight: 700; color: var(--tx); line-height: 1.2; margin-bottom: 4px; letter-spacing: -.01em; }
.pi-title { font-size: var(--fs-body); font-weight: 600; color: var(--blue); margin-bottom: 2px; }
.pi-dept { font-size: var(--fs-body); color: var(--mt); margin-bottom: 6px; line-height: 1.5; }
.pi-email { font-size: var(--fs-body); color: var(--mt); margin-bottom: 18px; }
.tag-links { display: flex; gap: 10px; flex-wrap: wrap; }
.tag-link { font-size: var(--fs-label); font-weight: 600; color: var(--blue); border: 1.5px solid var(--blue); padding: 5px 12px; border-radius: var(--r); transition: background .15s, color .15s; }
.tag-link:hover { background: var(--blue); color: #fff; }

/* PEOPLE GRID */
.grp-h { font-size: var(--fs-label); font-weight: 600; color: var(--blue); padding-bottom: 10px; margin-bottom: 20px; border-bottom: 1px solid var(--bd); letter-spacing: .04em; text-transform: uppercase; }
.ppl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 32px; }
.ppl-grid-4 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 28px; }
/* photo left, top-aligned with the name, same as the PI card */
.person-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.p-name { font-size: var(--fs-item); font-weight: 600; color: var(--tx); line-height: 1.3; margin-bottom: 2px; }
.p-role { font-size: var(--fs-small); font-weight: 500; color: var(--blue); margin-bottom: 4px; }
.p-coadv { font-size: var(--fs-small); font-style: italic; color: var(--mt); margin-bottom: 4px; }
.p-bg { font-size: var(--fs-small); color: var(--mt); line-height: 1.5; }

/* ALUMNI */
.alumni-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 48px; }
.alumni-grp h4 { font-size: var(--fs-label); font-weight: 600; color: var(--mt); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.alumni-list { list-style: none; }
.alumni-list li { font-size: var(--fs-body); color: var(--mt); padding: 4px 0; }

/* RESEARCH */
.res-sec { padding-top: 0; }
.res-wrap { display: flex; flex-direction: column; gap: 56px; }
/* focus area title sits in a gray box; its description and projects follow below */
.theme-hd { background: var(--bg2); border-left: 3px solid var(--blue); border-radius: var(--r); padding: 24px 32px; }
.theme-hd-area { font-size: var(--fs-label); font-weight: 600; color: var(--blue); margin-bottom: 6px; letter-spacing: .06em; text-transform: uppercase; }
.theme-hd h2 { font-size: var(--fs-subhead); font-weight: 700; color: var(--tx); line-height: 1.2; letter-spacing: -.015em; }
.theme-desc { font-size: var(--fs-body); color: var(--mt); line-height: 1.75; margin-top: 20px; }
/* project rows: image on the left at one fixed width */
.proj { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; padding: 28px 0; }
.proj:last-child { padding-bottom: 0; }
.proj-img { background: #fff; border: 1px solid var(--bd); border-radius: var(--r); padding: 10px; }
.proj-img img { width: 100%; height: auto; }
.proj-tag { display: inline-block; font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-tint); padding: 3px 8px; border-radius: 2px; margin-bottom: 10px; }
.proj-text h3 { font-size: var(--fs-item); font-weight: 700; color: var(--tx); margin-bottom: 12px; line-height: 1.3; letter-spacing: -.01em; }
.proj-text p { font-size: var(--fs-body); color: var(--mt); line-height: 1.75; }
.proj-paper { display: inline-block; margin-top: 14px; font-size: var(--fs-label); font-weight: 600; color: var(--blue); border: 1.5px solid var(--blue); padding: 5px 12px; border-radius: var(--r); transition: border-color .15s, background .15s; }
.proj-paper:hover { background: var(--blue); color: #fff; }

/* JOIN */
.join-list { max-width: 760px; margin-top: 24px; }
.join-item { padding: 24px 0; border-bottom: 1px solid var(--bd); }
.join-item:first-child { border-top: 1px solid var(--bd); }
.join-item h3 { font-size: var(--fs-item); font-weight: 700; color: var(--tx); margin-bottom: 8px; }
.join-item p { font-size: var(--fs-body); color: var(--mt); line-height: 1.7; }
.page-intro { font-size: var(--fs-body); color: var(--mt); line-height: 1.8; }
.page-intro + .page-intro { margin-top: 16px; }
.text-link { color: var(--blue); font-weight: 600; border-bottom: 1px solid var(--bd); }
/* news */
.news-year { margin-top: 48px; margin-bottom: 8px; }
.wrap > .news-year:first-child { margin-top: 0; }
.news-item { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--bd); }
.news-date { font-size: var(--fs-small); font-weight: 700; color: var(--blue); letter-spacing: .04em; text-transform: uppercase; padding-top: 2px; }
.news-body p { font-size: var(--fs-body); color: var(--mt); line-height: 1.7; }
.news-body a { color: var(--blue); font-weight: 600; border-bottom: 1px solid var(--bd); }
.news-imgs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.news-imgs img { height: 120px; width: auto; border-radius: var(--r); border: 1px solid var(--bd); }
/* click-to-enlarge images */
.zoomable img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 500; background: rgba(0,10,30,.88); display: flex; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--r); background: #fff; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.lightbox-close { position: absolute; top: 16px; right: 20px; font-size: 36px; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }
.study { background: var(--bg2); border-left: 3px solid var(--blue); border-radius: var(--r); padding: 40px; }
.study-hd { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; margin-bottom: 8px; }
.study-img { background: #fff; border: 1px solid var(--bd); border-radius: var(--r); padding: 10px; }
.study-img img { width: 100%; height: auto; }
.study-tag { display: inline-block; font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue-dk); background: var(--gold); padding: 3px 9px; border-radius: 2px; margin-bottom: 10px; }
.study-hd h3 { font-size: var(--fs-subhead); font-weight: 700; color: var(--tx); line-height: 1.25; letter-spacing: -.01em; }
.study-sub { font-size: var(--fs-small); color: var(--mt); margin-top: 8px; }
.study-body h4 { font-size: var(--fs-label); font-weight: 600; color: var(--blue); letter-spacing: .06em; text-transform: uppercase; margin: 24px 0 6px; }
.study-body p, .study-body li { font-size: var(--fs-body); color: var(--mt); line-height: 1.75; }
.study-body ul { padding-left: 20px; }
.study-contact { margin-top: 28px; padding: 16px 20px; background: #fff; border-left: 3px solid var(--gold); border-radius: var(--r); font-size: var(--fs-body); color: var(--tx); }
.study-contact a { color: var(--blue); font-weight: 600; }
.join-inline { color: var(--blue); font-weight: 600; border-bottom: 1px solid var(--bd); }

/* FOOTER */
.footer { background: #001336; padding: 56px 48px 28px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08); }
.footer-brand h3 { font-size: var(--fs-item); font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-brand p { font-size: var(--fs-small); color: rgba(255,255,255,.48); line-height: 1.7; max-width: 30ch; }
.footer-col h4 { font-size: var(--fs-label); font-weight: 600; color: rgba(255,255,255,.3); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: var(--fs-small); color: rgba(255,255,255,.55); transition: color .15s; }
.footer-col a:hover { color: var(--gold); }
.footer-addr { font-style: normal; font-size: var(--fs-small); color: rgba(255,255,255,.55); line-height: 1.6; }
.footer-col .footer-map { display: inline-block; margin-top: 12px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.footer-col .footer-map:hover { color: #fff; }
.footer-bottom { max-width: 1100px; margin: 22px auto 0; display: flex; justify-content: space-between; font-size: var(--fs-label); color: rgba(255,255,255,.25); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { padding: 12px 20px; height: auto; flex-wrap: wrap; gap: 8px; }
  .nav-links { gap: 6px 14px; flex-wrap: wrap; }
  .hero { min-height: 460px; }
  .hero-c { padding: 40px 20px; }
  .hero-arrow { top: 20px; transform: none; width: 38px; height: 38px; font-size: 26px; }
  .hero-prev { left: auto; right: 62px; }
  .sec { padding: 52px 20px; }
  .theme-hd, .study { padding: 24px 20px; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .news-imgs img { height: 90px; }
  .study-hd { grid-template-columns: 1fr; gap: 16px; }
  .page-hdr { padding: 48px 20px 40px; }
  .about-grid, .themes-grid, .pub-cards, .footer-inner { grid-template-columns: 1fr; }
  .themes-grid { gap: 0; background: none; }
  .ppl-grid, .ppl-grid-4 { grid-template-columns: 1fr; }
  .grp-box { padding: 24px 20px 28px; }
  .pi-card { grid-template-columns: 84px 1fr; gap: 18px; }
  .pi-card .av-lg, .person-card .av-lg { width: 84px; height: 84px; font-size: 20px; }
  .person-card .av-sm { width: 68px; height: 68px; font-size: 16px; }
  .proj { grid-template-columns: 1fr; gap: 16px; }
  .alumni-cols { grid-template-columns: 1fr; }
  .pub-row { grid-template-columns: 1fr; gap: 10px; }
  .pub-links { justify-content: flex-start; }
  .partners-logos { gap: 24px; }
  .footer { padding: 48px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } .hero-sweep, .page-hdr h1, .page-hdr p { animation: none; } }.research-participate { font-size: var(--fs-body); color: var(--mt); margin-top: 48px; }
.research-participate a { color: var(--blue); font-weight: 600; border-bottom: 1px solid var(--bd); }
