/*
Theme Name: Perceptual Engineering Lab
Theme URI: 
Author: Jas Brooks
Author URI: 
Description: 
Tags: accessibility-ready, one-column, two-columns, custom-menu, featured-images, microformats, sticky-post, threaded-comments, translation-ready
Version: 2026
Requires at least: 5.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v3 or Later
License URI: https://www.gnu.org/licenses/gpl.html
Text Domain: blankslate

PEL WordPress Theme 2011-2026
*/

/* ============================================================
   RESET
============================================================ */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}html{scroll-behavior:smooth}body{line-height:1}a{text-decoration-skip-ink:auto}a[href^="tel"]{color:inherit;text-decoration:none}button{outline:0}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}q{display:inline;font-style:italic}q:before{content:'\201C';font-style:normal}q:after{content:'\201D';font-style:normal}textarea,input[type="text"],input[type="button"],input[type="submit"],input[type="reset"],input[type="search"],input[type="password"]{appearance:none;border-radius:0}input[type="search"]{appearance:textfield}table{border-collapse:collapse;border-spacing:0}th,td{padding:2px}big{font-size:120%}small,sup,sub{font-size:80%}sup{vertical-align:super}sub{vertical-align:sub}dd{margin-left:20px}kbd,tt{font-family:courier;font-size:12px}ins{text-decoration:underline}del,strike,s{text-decoration:line-through}dt{font-weight:bold}address,cite,var{font-style:italic}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}

/* ============================================================
   WORDPRESS REQUIRED CLASSES
============================================================ */
.sticky{}.bypostauthor{}.wp-caption{}.wp-caption-text{}.gallery-caption{}.alignright{}.alignleft{}.aligncenter{}

.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important;word-break:normal}
.screen-reader-text:focus{background-color:#f7f7f7;border-radius:3px;box-shadow:0 0 2px 2px rgba(0,0,0,.6);clip:auto!important;clip-path:none;color:#007acc;display:block;font-size:14px;font-size:.875rem;font-weight:700;height:auto;right:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}
.skip-link{left:-9999rem;top:2.5rem;z-index:999999999;text-decoration:underline}
.skip-link:focus{display:block;left:6px;top:7px;font-size:14px;font-weight:600;text-decoration:none;line-height:normal;padding:15px 23px 14px;z-index:100000;right:auto}
.visually-hidden:not(:focus):not(:active),.form-allowed-tags:not(:focus):not(:active){position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);white-space:nowrap}

/* ============================================================
   FONTS
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ============================================================
   BLUU NEXT — Local webfont
============================================================ */
@font-face {
  font-family: 'BluuNext';
  src: url('fonts/bluunext-bold-webfont.woff2') format('woff2'),
       url('fonts/bluunext-bold-webfont.woff')  format('woff'),
       url('fonts/bluunext-bold.ttf')            format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'BluuNext';
  src: url('fonts/bluunext-bolditalic-webfont.woff2') format('woff2'),
       url('fonts/bluunext-bolditalic-webfont.woff')  format('woff'),
       url('fonts/bluunext-bolditalic.ttf')            format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'BluuNextTitling';
  src: url('fonts/bluunext-titling.woff2') format('woff2'),
       url('fonts/bluunext-titling.woff')  format('woff'),
       url('fonts/BluuNext-Titling.ttf')   format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   CSS CUSTOM PROPERTIES
============================================================ */
:root {
  --clr-bg:        #f7f6f3;
  --clr-surface:   #ffffff;
  --clr-border:    #e2dfd8;
  --clr-text:      #1a1916;
  --clr-muted:     #6b6860;
  --clr-accent:    #1a3a5c;
  --clr-accent-lt: #e8eef5;
  --clr-tag-bg:    #f0ede8;
  --clr-tag-text:  #4a4740;

  --font-display:  'EB Garamond', Georgia, serif;
  --font-body:     'DM Sans', system-ui, sans-serif;
  --font-brand: 'BluuNextTitling', 'BluuNext', Georgia, serif;

  --radius:        4px;
  --card-gap:      1.5rem;
  --section-gap:   4rem;

  --content-width:      1100px;
  --content-width-wide: 1000px;
  --content-padding:    2rem;

  --header-height: 56px;
}

/* ============================================================
   BASE
============================================================ */
body {
  background: var(--clr-bg);
  font-family: var(--font-body);
  color: var(--clr-text);
  line-height: 1.6;
}

/* BluuNext: Hero title on homepage */
.page-hero--home .page-hero__title {
  font-family: var(--font-brand);
}

/* BluuNext: Site name in header */
.site-header__title-main {
  font-family: var(--font-brand);
  letter-spacing: 0.02em;
}

/* BluuNext: Site name in footer */
.site-footer__lab-name {
  font-family: var(--font-brand);
  letter-spacing: 0.02em;
}

/* ============================================================
   SHARED: HERO BANNER
   Used by homepage, team, and publications pages.
============================================================ */
.page-hero {
  background: var(--clr-accent);
  color: #fff;
  padding: 5rem 0 4rem; /* horizontal padding lives on __inner */
}
.page-hero--home {
  position: relative;
  overflow: hidden; /* keeps the scaled/blurred image contained */
}

/* The publication image — purely decorative background */
.page-hero--home::before {
  content: '';
  position: absolute;
  inset: -20px; /* overshoot edges so blur doesn't leave white fringe */
  background-image: var(--hero-bg);
  background-blend-mode: multiply;
  background-size:
    cover;
  background-position: center;
  filter: grayscale(100%) blur(10px) contrast(220%) brightness(90%);
  opacity: 0.25; /* tweak: lower = more navy, higher = more image */
  z-index: 0;
}

/* Navy overlay — sits between image and text */
.page-hero--home::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 50, 0.55); /* adjust to taste */
  z-index: 1;
}

.default-page .page-hero__inner {
  max-width: 720px;
}

/* Text must sit above both layers, and align with page sections */
.page-hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--content-width-wide); /* 1000px — matches home-section__inner */
  margin: 0 auto;
}

.page-hero__eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 1.1rem;
}
.page-hero__title {
  font-family: var(--font-brand);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 1.6rem;
  letter-spacing: -0.01em;
}
.page-hero--home .page-hero__title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  margin-bottom: 1.8rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.page-hero__title em {
  font-style: italic;
  opacity: 0.75;
}
.page-hero__desc {
  font-size: 1.05rem;
  line-height: 1.75;
  opacity: 0.88;
  max-width: 680px;
  font-weight: 300;
}
.page-hero--home .page-hero__desc {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.7;
  max-width: 620px;
}
.page-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.page-hero__badge {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  padding: 0.3em 0.75em;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius);
  opacity: 0.85;
}

/* Hero load animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-hero--home .page-hero__eyebrow { animation: fadeUp 0.6s 0.0s ease both; }
.page-hero--home .page-hero__title   { animation: fadeUp 0.6s 0.1s ease both; }
.page-hero--home .page-hero__desc    { animation: fadeUp 0.6s 0.2s ease both; }
.page-hero--home .page-hero__badges  { animation: fadeUp 0.6s 0.3s ease both; }

/* ============================================================
   SHARED: STICKY JUMP NAV
   Used by team and publications pages.
   Sits below the sticky site header (56px tall).
============================================================ */
.jump-nav {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: var(--header-height);
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.jump-nav__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.jump-nav__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-muted);
  padding: 1rem 1.2rem 1rem 0;
  border-right: 1px solid var(--clr-border);
  margin-right: 0.5rem;
  white-space: nowrap;
}
.jump-nav__link {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--clr-muted);
  text-decoration: none;
  padding: 1rem 0.85rem;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.jump-nav__link:hover {
  color: var(--clr-accent);
  border-bottom-color: var(--clr-accent);
}
.jump-nav__link--active {
  color: var(--clr-accent);
  border-bottom-color: var(--clr-accent);
}

/* ============================================================
   SHARED: SECTION HEADER
   The title + optional count/link row above a content block.
============================================================ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--clr-border);
  flex-wrap: wrap;
}
.section-header__title {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--clr-accent);
  margin: 0;
  letter-spacing: -0.01em;
}
.section-header__meta {
  font-size: 0.78rem;
  color: var(--clr-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.section-header__more {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--clr-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: gap 0.2s;
  gap: 0.3rem;
}
.section-header__more::after {
  content: '→';
}
.section-header__more:hover {
  gap: 0.55rem;
}

/* ============================================================
   SHARED: LINK BUTTONS
   Small bordered action links (PDF, DOI, Video, etc.)
============================================================ */
.link-btn {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--clr-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28em 0.65em;
  border: 1px solid var(--clr-accent);
  border-radius: var(--radius);
  transition: background 0.18s, color 0.18s;
}
.link-btn:hover {
  background: var(--clr-accent);
  color: #fff;
}
.link-btn--muted {
  color: var(--clr-muted);
  border-color: var(--clr-border);
}
.link-btn--muted:hover {
  background: var(--clr-muted);
  color: #fff;
}

/* ============================================================
   SHARED: AWARD BADGES
============================================================ */
.award-badge {
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7a4f00;
  background: #fdf3dc;
  border: 1px solid #f0d89a;
  border-radius: var(--radius);
  padding: 0.2em 0.55em;
}

/* ============================================================
   HOMEPAGE
============================================================ */
.home-page {
  min-height: 100vh;
	scroll-margin-top: 120px;
}

/* Sections */
.home-section {
  padding: 4rem var(--content-padding);
}
.home-section--alt {
  background: var(--clr-surface);
}
.home-section__inner {
  max-width: var(--content-width-wide);
  margin: 0 auto;
}

/* About */
.about-body {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}
.about-text p {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--clr-text);
  margin: 0 0 1rem;
}
.about-text p:last-child { margin-bottom: 0; }
.about-aside {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.about-text strong {
  font-weight: 600;
  color: var(--clr-text);
}
.about-text a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26,58,92,0.3);
  transition: text-decoration-color 0.18s;
}
.about-text a:hover {
  text-decoration-color: var(--clr-accent);
}
.about-aside__card {
  background: var(--clr-accent-lt);
  border: 1px solid #c5d5e8;
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.about-aside__card-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 0.5rem;
}
.about-aside__card-text {
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--clr-text);
}
.about-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  font-size: 0.84rem;
  font-weight: 500;
  color: #fff;
  background: var(--clr-accent);
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  text-decoration: none;
  transition: opacity 0.2s;
}
.about-cta:hover { opacity: 0.85; }

/* Home team grid */
.home-team-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.home-team-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100px;
}
.home-team-member__photo-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--clr-accent-lt);
  border: 2px solid var(--clr-border);
  margin-bottom: 0.5rem;
  flex-shrink: 0;
  transition: border-color 0.2s;
}
.home-team-member:hover .home-team-member__photo-wrap {
  border-color: var(--clr-accent);
}
.home-team-member__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-team-member__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.25;
}
.home-team-member__name {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--clr-text);
  line-height: 1.3;
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.home-team-member__name:hover { color: var(--clr-accent); }
.home-team-member__position {
  font-size: 0.68rem;
  color: var(--clr-muted);
  line-height: 1.3;
}

/* Home news */
.news-list {
  display: flex;
  flex-direction: column;
}
.news-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 1.2rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--clr-border);
  align-items: baseline;
}
.news-item__date {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-weight: 400;
  white-space: nowrap;
}
.news-item__text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--clr-text);
}
.news-item__text a {
  color: var(--clr-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.news-item__text a:hover { border-bottom-color: var(--clr-accent); }

/* Home spotlight publications */
.spotlight-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.spotlight-entry {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--clr-border);
}
.spotlight-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.spotlight-entry__thumb {
  width: 250px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  display: block;
  background: var(--clr-accent-lt);
}
.spotlight-entry__thumb-placeholder {
  width: 250px;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  background: var(--clr-accent-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.4;
}
.spotlight-entry__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
}
.spotlight-entry__awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.spotlight-entry__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--clr-text);
  margin: 0;
  line-height: 1.35;
}
.spotlight-entry__authors {
  font-size: 0.8rem;
  color: var(--clr-muted);
  line-height: 1.5;
}
.spotlight-entry__authors strong {
  color: var(--clr-text);
  font-weight: 500;
}
.spotlight-entry__venue {
  font-size: 0.8rem;
  color: var(--clr-muted);
  font-style: italic;
}
.spotlight-entry__venue strong {
  font-style: normal;
  font-weight: 500;
  color: var(--clr-text);
}
.spotlight-entry__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.3rem;
}
.spotlight-more {
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
  text-align: center;
}
.spotlight-more__link {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--clr-accent);
  text-decoration: none;
  transition: opacity 0.18s;
}
.spotlight-more__link:hover { opacity: 0.7; }

/* Other contributions */
.contrib-type {
  font-size: 0.69rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 0.1rem;
}
.contrib-org-rel {
  font-style: italic;
  color: var(--clr-muted);
}

/* ============================================================
   TEAM PAGE
============================================================ */
.team-page {
  min-height: 100vh;
}
.team-content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3.5rem var(--content-padding) 5rem;
}
.team-section {
  margin-bottom: var(--section-gap);
  scroll-margin-top: 120px;
}

/* Member grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--card-gap);
}
.team-grid--pi {
  grid-template-columns: 1fr;
}

/* Member card */
.member-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}
.member-card:hover {
  box-shadow: 0 6px 24px rgba(26,58,92,0.10);
  transform: translateY(-2px);
}
.member-card__photo-wrap {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--clr-accent-lt);
}
.member-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.member-card:hover .member-card__photo { transform: scale(1.03); }
.member-card__photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-accent-lt);
}
.member-card__photo-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.3;
}
.member-card__body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.member-card__name {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  color: var(--clr-text);
  margin: 0 0 0.15rem;
  line-height: 1.3;
}
.member-card__pronouns {
  font-size: 0.74rem;
  color: var(--clr-muted);
  margin-bottom: 0.55rem;
  font-style: italic;
}
.member-card__fellowship {
  display: block;
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-bottom: 0.5rem;
}
.member-card__fellowship a {
  color: inherit;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 2px;
}
.member-card__meta, .member-card__bio, .member-card__positions {
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.member-card__meta svg {
  flex-shrink: 0;
  opacity: 0.55;
}
.member-card__meta--coadvisor {
  font-style: normal;
  display: block;
}
.member-card__meta--coadvisor a {
  color: var(--clr-accent);
  text-decoration: none;
  font-style: normal;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s;
}
.member-card__meta--coadvisor a:hover {
  border-bottom-color: var(--clr-accent);
}
.member-card__links {
  margin-top: auto;
  padding-top: 0.9rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* PI card — wide horizontal layout */
.member-card--pi {
  flex-direction: row;
  align-items: stretch;
  max-width: 700px;
}
.member-card--pi .member-card__photo-wrap {
  width: 200px;
  min-width: 200px;
  aspect-ratio: unset;
}
.member-card--pi .member-card__body { padding: 1.6rem 1.8rem; }
.member-card--pi .member-card__name { font-size: 1.35rem; }

.team-empty {
  color: var(--clr-muted);
  font-style: italic;
  font-size: 0.9rem;
  padding: 1rem 0;
}

/* ============================================================
   PUBLICATIONS PAGE
============================================================ */
.pubs-page {
  min-height: 100vh;
}
.pubs-content {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: 3.5rem var(--content-padding) 5rem;
}
.pubs-section {
  margin-bottom: var(--section-gap);
  scroll-margin-top: 120px;
}

/* Publication entry */
.pub-entry {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.pub-entry:last-child { border-bottom: none; }
.pub-entry__thumb-wrap {
  width: 350px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--clr-accent-lt);
  border: 1px solid var(--clr-border);
  flex-shrink: 0;
}
.pub-entry__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pub-entry__thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.2;
}
.pub-entry__thumb-placeholder svg {
  width: 36px;
  height: 36px;
}
.pub-entry__body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.pub-entry__awards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pub-entry__title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--clr-text);
  margin: 0;
}
.pub-entry__authors {
  font-size: 0.83rem;
  color: var(--clr-muted);
  line-height: 1.5;
}
.pub-entry__authors strong {
  color: var(--clr-text);
  font-weight: 500;
}
.pub-entry__equal-note {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--clr-muted);
}
.pub-entry__venue {
  font-size: 0.82rem;
  color: var(--clr-muted);
  font-style: italic;
}
.pub-entry__venue strong {
  font-style: normal;
  font-weight: 500;
  color: var(--clr-text);
}
.pub-entry__abstract {
  font-size: 0.8rem;
  color: var(--clr-muted);
  line-height: 1.6;
}
.pub-entry__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.2rem;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
	
  .page-hero { padding: 3rem 0 2.5rem; } /* horizontal padding still on __inner */
  .page-hero__inner {
    padding: 0 var(--content-padding);
  }
  .about-body {
    grid-template-columns: 1fr;
  }
  .about-aside {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .about-aside__card { flex: 1 1 200px; }

  .spotlight-entry,
  .pub-entry {
    grid-template-columns: 120px 1fr;
    gap: 1rem;
  }
  .spotlight-entry__thumb,
  .spotlight-entry__thumb-placeholder {
    width: 120px;
  }
  .pub-entry__thumb-wrap {
    width: 120px;
  }
}

@media (max-width: 640px) {
  .page-hero { padding: 3rem 0 2.5rem; } /* horizontal padding still on __inner */
  .page-hero__inner {
    padding: 0 var(--content-padding);
  }
  .team-content { padding: 2rem 1.25rem 4rem; }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .member-card--pi { flex-direction: column; }
  .member-card--pi .member-card__photo-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
  }
  .jump-nav__label { display: none; }
}

@media (max-width: 600px) {
	
  .page-hero { padding: 3rem 0 2.5rem; } /* horizontal padding still on __inner */
  .page-hero__inner {
    padding: 0 var(--content-padding);
  }
  .pubs-content { padding: 2rem 1.25rem 4rem; }
  .pub-entry { grid-template-columns: 1fr; }
  .pub-entry__thumb-wrap { width: 100%; }
}

@media (max-width: 500px) {
  .page-hero--home { padding: 4rem 0 3rem; } /* horizontal padding still on __inner */
  .home-section { padding: 3rem 1.25rem; }
  .news-item { grid-template-columns: 1fr; gap: 0.3rem; }
  .spotlight-entry { grid-template-columns: 1fr; }
  .spotlight-entry__thumb,
  .spotlight-entry__thumb-placeholder { width: 100%; }
}

@media (max-width: 420px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   SITE HEADER
============================================================ */
#site-header {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.site-header__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Branding / site title */
.site-header__branding { flex-shrink: 0; }
.site-header__title {
  margin: 0;
  font-size: 1rem; /* reset h1 when on front page */
  line-height: 1;
}
.site-header__title a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-header__title-main {
/*   font-family: var(--font-display); */
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--clr-accent);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.site-header__title a:hover .site-header__title-main {
  opacity: 0.75;
}

/* Nav */
.site-header__nav {
  margin-left: auto;
}
.site-header__menu {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-header__menu li a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--clr-muted);
  text-decoration: none;
  padding: 0.4em 0.75em;
  border-radius: var(--radius);
  transition: color 0.18s, background 0.18s;
  display: block;
  white-space: nowrap;
}
.site-header__menu li a:hover,
.site-header__menu li.current-menu-item > a,
.site-header__menu li.current-page-ancestor > a {
  color: var(--clr-accent);
  background: var(--clr-accent-lt);
}

/* Hamburger button (hidden on desktop) */
.site-header__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
}
.site-header__hamburger span {
  display: block;
  height: 1.5px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}
/* Animate to X when open */
.site-header__hamburger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header__hamburger.is-open span:nth-child(2) { opacity: 0; }
.site-header__hamburger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 640px) {
  .site-header__hamburger { display: flex; }
  .site-header__nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    padding: 0.75rem var(--content-padding) 1rem;
    z-index: 199;
  }
  .site-header__nav.is-open { display: block; }
  .site-header__menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
  }
  .site-header__menu li { width: 100%; }
  .site-header__menu li a {
    font-size: 0.92rem;
    padding: 0.6em 0.75em;
  }
}

/* ============================================================
   SITE FOOTER
============================================================ */
#site-footer {
  background: var(--clr-accent);
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  margin-top: auto;
}
.site-footer__inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem var(--content-padding) 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* Lab identity */
.site-footer__lab {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.site-footer__lab-name {
/*   font-family: var(--font-display); */
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.site-footer__lab-name:hover { opacity: 0.8; }

.site-footer__address {
  font-size: 0.8rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
  font-style: normal;
}
.site-footer__accessibility {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 1px;
  width: fit-content;
  transition: color 0.18s, border-color 0.18s;
}
.site-footer__accessibility:hover {
  color: rgba(255,255,255,0.85);
  border-bottom-color: rgba(255,255,255,0.5);
}

/* Affiliations */
.site-footer__affiliations {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-end;
}
.site-footer__affiliations-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.site-footer__logos {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.site-footer__logo-divider {
  color: rgba(255,255,255,0.2);
  font-size: 1rem;
  line-height: 1;
  user-select: none;
}

/* MIT / CSAIL image logos */
.site-footer__logo {
  display: block;
  filter: brightness(0) invert(1);  /* recolor any SVG/image to white */
  opacity: 0.75;
  transition: opacity 0.18s;
}
.site-footer__logo-link:hover .site-footer__logo { opacity: 1; }
.site-footer__logo--mit  { height: 26px; width: auto; }
.site-footer__logo--csail { height: 32px; width: auto; }
.site-footer__logo--mithci { height: 32px; width: auto; }

/* CSAIL / EECS text logos */
.site-footer__logo-link--text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
}
.site-footer__logo-text-abbr {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  line-height: 1;
}
.site-footer__logo-link:hover .site-footer__logo-text-abbr { color: #fff; }
.site-footer__logo-text-full {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.4;
  text-align: right;
}
.site-footer__logo-link:hover .site-footer__logo-text-full {
  color: rgba(255,255,255,0.65);
}

/* Bottom bar */
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1rem var(--content-padding);
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
}

/* Footer responsive */
@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2.5rem var(--content-padding) 2rem;
  }
  .site-footer__affiliations { align-items: flex-start; }
  .site-footer__logos { justify-content: flex-start; }
  .site-footer__logo-link--text { align-items: flex-start; }
  .site-footer__logo-text-full { text-align: left; }
}


/* ============================================================
   DEFAULT PAGE (page.php)
   Used for generic pages: Join Us, Advising, etc.
============================================================ */
.default-page__content {
  padding: 3.5rem var(--content-padding) 5rem;
}
.default-page__inner {
  max-width: 720px;
  margin: 0 auto;
}
 
/* Featured image */
.default-page__thumbnail {
  margin-bottom: 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--clr-border);
}
.default-page__thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}
 
/* Edit link (admin only, shows in hero) */
.page-hero__edit {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.72rem;
}
.page-hero__edit a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  transition: color 0.18s;
}
.page-hero__edit a:hover { color: rgba(255,255,255,0.85); }
 
/* ---- Entry content typography ----------------------------- */
 
/* Paragraphs */
.entry-content p {
  font-size: 0.97rem;
  line-height: 1.85;
  margin: 0 0 1.1rem;
  color: var(--clr-text);
}
 
/* Headings — use the same section-header feel as the rest of the site */
.entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--clr-accent);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 2.5rem 0 0.9rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--clr-border);
}
.entry-content h2:first-child { margin-top: 0; }
 
.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--clr-text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 2rem 0 0.6rem;
}
 
.entry-content h4 {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--clr-muted);
  margin: 1.75rem 0 0.5rem;
}
 
/* Lists */
.entry-content ul,
.entry-content ol {
  margin: 0 0 1.1rem 1.4rem;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li {
  font-size: 0.97rem;
  line-height: 1.8;
  color: var(--clr-text);
  margin-bottom: 0.3rem;
}
.entry-content li:last-child { margin-bottom: 0; }
 
/* Links */
.entry-content a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26,58,92,0.3);
  transition: text-decoration-color 0.18s;
}
.entry-content a:hover {
  text-decoration-color: var(--clr-accent);
}
 
/* Inline */
.entry-content strong { font-weight: 600; }
.entry-content em     { font-style: italic; }
 
/* Rule */
.entry-content hr {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin: 2.5rem 0;
}
 
/* Blockquote */
.entry-content blockquote {
  border-left: 3px solid var(--clr-accent);
  margin: 1.75rem 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--clr-muted);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.7;
}
.entry-content blockquote p { color: inherit; font-size: inherit; line-height: inherit; }
 
/* Images */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 1.5rem 0;
}
.entry-content figure {
  margin: 1.75rem 0;
}
.entry-content figcaption {
  font-size: 0.78rem;
  color: var(--clr-muted);
  margin-top: 0.5rem;
  font-style: italic;
}
 
/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 1.5rem 0;
}
.entry-content th {
  font-weight: 500;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid var(--clr-border);
  color: var(--clr-text);
}
.entry-content td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--clr-border);
  color: var(--clr-text);
  vertical-align: top;
}
.entry-content tr:last-child td { border-bottom: none; }
 
/* Responsive */
@media (max-width: 640px) {
  .default-page__content { padding: 2rem 1.25rem 4rem; }
  .entry-content h2 { font-size: 1.3rem; }
  .entry-content h3 { font-size: 1.05rem; }
}
 


/* ============================================================
   NEWS PAGE (news.php)
============================================================ */
.news-page__content {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: 3.5rem var(--content-padding) 5rem;
}
.news-page__section {
  margin-bottom: var(--section-gap);
  scroll-margin-top: 120px;
}
.news-page__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
 
/* News entry */
.news-entry {
  display: grid;
  grid-template-columns: 1fr;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--clr-border);
}
.news-entry__content strong {
	font-weight: 600;
}
.news-entry:last-child { border-bottom: none; }
 
/* Entry with image: side-by-side */
.news-entry--has-image {
  grid-template-columns: 220px 1fr;
  gap: 1.75rem;
  align-items: start;
}
.news-entry__image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  background: var(--clr-accent-lt);
}
.news-entry__image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
 
/* Entry body */
.news-entry__body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.news-entry__date {
  font-size: 0.75rem;
  color: var(--clr-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}
 
/* Long/short information content */
.news-entry__content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--clr-text);
}
.news-entry__content p {
  margin: 0 0 0.75rem;
}
.news-entry__content p:last-child { margin-bottom: 0; }
.news-entry__content a {
  color: var(--clr-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(26,58,92,0.3);
  transition: text-decoration-color 0.18s;
}
.news-entry__content a:hover { text-decoration-color: var(--clr-accent); }
.news-entry__content strong { font-weight: 600; }
.news-entry__content em { font-style: italic; }
 
.news-entry__link {
  align-self: flex-start;
  margin-top: 0.25rem;
}
 
/* Responsive */
@media (max-width: 640px) {
  .news-page__content { padding: 2rem 1.25rem 4rem; }
  .news-entry--has-image {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}


/* ============================================================
   LINK BUTTON — BUTTON ELEMENT OVERRIDES
============================================================ */
button.link-btn {
  background: transparent;
  color: var(--clr-accent);
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 500;
  cursor: pointer;
}
button.link-btn--active,
.link-btn--active {
  background: var(--clr-accent);
  color: #fff;
  font-weight: 500;
}

/* ============================================================
   BIBTEX BOX
============================================================ */
.bib-box {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  border-radius: var(--radius);
  overflow: hidden;
  transition: grid-template-rows 0.3s ease, margin-top 0.3s ease;
}
.bib-box.is-open {
  grid-template-rows: 1fr;
  margin-top: 0.5rem;
}
.bib-box__inner {
  overflow: hidden;
  background: #1a1916;
  border-radius: var(--radius);
  position: relative;
  min-height: 0;
  box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 0.3s ease;
}
.bib-box.is-open .bib-box__inner {
  box-shadow: inset 0 0 0 1px #333;
}
.bib-box__copy {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 500;
  color: #aaa;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 0.25em 0.6em;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}
.bib-box__copy:hover {
  color: #fff;
  background: rgba(255,255,255,0.15);
}
.bib-box__code {
  display: block;
  padding: 1rem 1.1rem;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.75rem;
  line-height: 1.65;
  color: #c8d3d8;
  white-space: pre;
  overflow-x: auto;
  word-break: normal;
  margin: 0;
}