/* ============================================================
   Chicago B3 Lab — Custom Stylesheet for Shibuya Theme
   Palette:
     Amber  (Bees)        #D4780A / #F0A500
     Green  (Biodiversity) #1B5E3B / #2D9B5A
     Purple (Brains)      #3B1F7A / #6B4FBB
     Light bg             #FAFAF8
     Dark text            #1A1A1A
   ============================================================ */

/* --- CSS Variables ----------------------------------------- */
:root {
  --b3-amber:        #D4780A;
  --b3-amber-light:  #F0A500;
  --b3-amber-pale:   #2A1E04;
  --b3-green:        #2D9B5A;
  --b3-green-mid:    #2D9B5A;
  --b3-green-pale:   #0A1F13;
  --b3-purple:       #3B1F7A;
  --b3-purple-mid:   #6B4FBB;
  --b3-purple-pale:  #150E2A;
  --b3-bg:           #0E0E0D;
  --b3-bg-dark:      #080807;
  --b3-text:         #E8E6DF;
  --b3-text-muted:   #888;
  --b3-border:       #222220;
  --b3-radius:       10px;
  --b3-radius-lg:    18px;
  --b3-shadow:       0 2px 12px rgba(0,0,0,0.08);
  --b3-shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --b3-transition:   all 0.2s ease;
}

/* Dark mode — same as default since we're always dark */
[data-theme="dark"] {
  --b3-bg:         #0E0E0D;
  --b3-bg-dark:    #080807;
  --b3-text:       #E8E6DF;
  --b3-text-muted: #888;
  --b3-border:     #222220;
}

/* --- Global ------------------------------------------------- */
body {
  background: var(--b3-bg);
  color: var(--b3-text);
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

a {
  color: var(--b3-amber);
}
a:hover {
  color: var(--b3-amber-light);
}

/* Hide left and right sidebars — top nav only */
.sy-lside,
.sy-lside-inner,
.sy-rside,
.sy-rside-inner,
.sy-scrollbar,
.lside-overlay,
.rside-overlay,
.rside-close {
  display: none !important;
}

/* Strip ALL shibuya wrapper padding — we control spacing ourselves */
.sy-main,
.sy-main article,
.sy-main article.yue,
.sy-main .flex.flex-col,
.sy-main .relative.min-w-0,
.sy-breadcrumbs {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Kill any page-level background that leaks through */
.sy-body,
.sy-wrap,
.sy-page {
  background: var(--b3-bg) !important;
}

/* ============================================================
   SPLIT-SCREEN HERO (left: content, right: gallery)
   ============================================================ */
.b3-hero-split {
  display: grid;
  grid-template-columns: 400px 1fr; /* gallery LEFT, content right */
  min-height: calc(100vh - 64px);
  margin: 0;                        /* no whitespace around the split */
  overflow: hidden;
}

/* RIGHT panel — gradient background with lab intro */
.b3-hero-left {
  background: linear-gradient(
    150deg,
    var(--b3-purple)  0%,
    #2A1557          30%,
    #1B3A28          65%,
    #3D2000          100%
  );
  position: relative;
  padding: 2.5rem 3rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.b3-hero-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 15% 40%, rgba(212,120,10,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 70%, rgba(45,155,90,0.12) 0%, transparent 55%);
  pointer-events: none;
}

.b3-hero-left > * { position: relative; }

.b3-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.2rem;
  width: fit-content;
}

.b3-hero-title {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.b3-accent { color: var(--b3-amber-light); }

.b3-hero-tagline {
  font-size: 1rem;
  color: rgba(255,255,255,0.6);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1.2rem;
}

.b3-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin: 0 0 2rem;
  max-width: 460px;
}

.b3-hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

/* Mini pillar list inside hero */
.b3-hero-pillars {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 1.8rem;
}

.b3-hero-pillar {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.b3-hero-pillar-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.b3-hero-pillar strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
}

.b3-hero-pillar p {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0;
}

/* LEFT panel — scrollable media gallery */
.b3-hero-gallery {
  background: #080807;
  border-right: 1px solid rgba(255,255,255,0.07);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
  order: -1; /* ensures it renders first / leftmost */
}

.b3-gallery-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.b3-gitem {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

.b3-gitem img,
.b3-gitem video {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 280px;
  background: #000;
  transition: transform 0.3s ease;
}

.b3-gitem:hover img,
.b3-gitem:hover video {
  transform: scale(1.02);
}

.b3-gcap {
  padding: 0.55rem 0.9rem 0.7rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.45;
  font-style: italic;
  background: #0E0E0D;
}

/* --- Buttons ----------------------------------------------- */
.b3-btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--b3-radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--b3-transition);
}

.b3-btn-primary {
  background: var(--b3-amber);
  color: #fff;
  border: 2px solid var(--b3-amber);
}
.b3-btn-primary:hover {
  background: var(--b3-amber-light);
  border-color: var(--b3-amber-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,120,10,0.4);
}

.b3-btn-outline {
  background: transparent;
  color: rgba(255,255,255,0.88);
  border: 2px solid rgba(255,255,255,0.4);
}
.b3-btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.75);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================================
   THREE PILLARS
   ============================================================ */
.b3-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 0 0 3.5rem;
}

.b3-pillar {
  background: var(--b3-bg);
  border: 1px solid var(--b3-border);
  border-radius: var(--b3-radius-lg);
  padding: 2rem 1.6rem;
  text-align: center;
  box-shadow: var(--b3-shadow);
  transition: var(--b3-transition);
}
.b3-pillar:hover {
  box-shadow: var(--b3-shadow-hover);
  transform: translateY(-3px);
}

.b3-pillar-icon {
  font-size: 2.4rem;
  margin-bottom: 0.8rem;
}

.b3-pillar h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--b3-text);
  margin: 0 0 0.6rem;
}

.b3-pillar p {
  font-size: 0.92rem;
  color: var(--b3-text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ============================================================
   RESEARCH CARDS (sphinx-design grid)
   ============================================================ */
.b3-card .sd-card {
  border: 1px solid var(--b3-border) !important;
  border-radius: var(--b3-radius) !important;
  box-shadow: var(--b3-shadow) !important;
  transition: var(--b3-transition) !important;
  background: var(--b3-bg) !important;
}
.b3-card .sd-card:hover {
  box-shadow: var(--b3-shadow-hover) !important;
  transform: translateY(-3px);
  border-color: var(--b3-amber) !important;
}
.b3-card .sd-card-title {
  color: var(--b3-text) !important;
  font-weight: 700 !important;
}

.b3-card-sm .sd-card {
  border: 1px solid var(--b3-border) !important;
  border-radius: var(--b3-radius) !important;
  font-size: 0.9rem !important;
  transition: var(--b3-transition) !important;
  background: var(--b3-bg) !important;
}
.b3-card-sm .sd-card:hover {
  border-color: var(--b3-amber) !important;
  transform: translateY(-2px);
}

/* ============================================================
   NEWS STRIP (homepage)
   ============================================================ */
.b3-news-strip {
  background: var(--b3-amber-pale);
  border: 1px solid rgba(212,120,10,0.2);
  border-radius: var(--b3-radius-lg);
  padding: 2rem 2.5rem;
  margin: 3rem 0;
}

.b3-news-strip h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 1.2rem;
  color: var(--b3-amber);
}

.b3-news-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.b3-news-list li {
  display: flex;
  gap: 1.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(212,120,10,0.15);
  font-size: 0.95rem;
  align-items: baseline;
}
.b3-news-list li:last-child {
  border-bottom: none;
}

.b3-news-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--b3-amber);
  white-space: nowrap;
  min-width: 72px;
}

/* ============================================================
   CTA BAND
   ============================================================ */
.b3-cta {
  background: linear-gradient(135deg, var(--b3-green) 0%, var(--b3-purple) 100%);
  border-radius: var(--b3-radius-lg);
  margin: 3rem 0;
  overflow: hidden;
}

.b3-cta-inner {
  padding: 3rem 2.5rem;
  text-align: center;
}

.b3-cta-inner h2 {
  color: #fff;
  font-size: 1.6rem;
  margin: 0 0 0.8rem;
}

.b3-cta-inner p {
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 1.8rem;
  font-size: 1rem;
  line-height: 1.65;
}

/* ============================================================
   PAGE HEADER (inner pages)
   ============================================================ */
.b3-page-header {
  border-left: 4px solid var(--b3-amber);
  padding: 0.5rem 0 0.5rem 1.4rem;
  margin: 0 0 2.5rem;
}

.b3-page-intro {
  font-size: 1.1rem;
  color: var(--b3-text-muted);
  line-height: 1.75;
  margin: 0;
}

/* ============================================================
   RESEARCH VISUALS (placeholder boxes)
   ============================================================ */
.b3-research-visual {
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.b3-research-visual-inner,
.b3-outreach-visual-inner {
  background: var(--b3-purple-pale);
  border: 2px dashed rgba(107,79,187,0.3);
  border-radius: var(--b3-radius-lg);
  padding: 2.5rem;
  text-align: center;
  width: 100%;
}

.b3-outreach-visual {
  height: 100%;
  min-height: 200px;
  display: flex;
  align-items: center;
}

.b3-outreach-visual-inner {
  background: var(--b3-green-pale);
  border-color: rgba(45,155,90,0.3);
  width: 100%;
}

.b3-research-icon-large {
  display: block;
  font-size: 3rem;
  margin-bottom: 0.8rem;
}

.b3-research-visual-inner p,
.b3-outreach-visual-inner p {
  font-size: 0.82rem;
  color: var(--b3-text-muted);
  margin: 0;
  font-style: italic;
}

/* ============================================================
   METHODS TABLE
   ============================================================ */
.b3-methods-table table {
  width: 100%;
  border-collapse: collapse;
}
.b3-methods-table th {
  background: var(--b3-purple-pale);
  color: var(--b3-purple);
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
}
.b3-methods-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--b3-border);
  vertical-align: top;
  font-size: 0.92rem;
}
.b3-methods-table tr:last-child td {
  border-bottom: none;
}

/* ============================================================
   PEOPLE PAGE
   ============================================================ */
.b3-person-card {
  display: flex;
  gap: 1.8rem;
  padding: 2rem;
  border: 1px solid var(--b3-border);
  border-radius: var(--b3-radius-lg);
  margin-bottom: 1.5rem;
  align-items: flex-start;
  box-shadow: var(--b3-shadow);
  background: var(--b3-bg);
}

.b3-pi-card {
  border-left: 4px solid var(--b3-amber);
}

.b3-person-photo-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--b3-purple-mid), var(--b3-amber));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.b3-person-photo-placeholder.b3-open {
  background: var(--b3-border);
  color: var(--b3-text-muted);
  font-size: 2rem;
}

.b3-person-info h3,
.b3-person-info h4 {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.b3-person-title {
  color: var(--b3-amber);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0 0 0.15rem;
}

.b3-person-dept {
  color: var(--b3-text-muted);
  font-size: 0.88rem;
  margin: 0 0 0.7rem;
}

.b3-person-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.b3-person-links a {
  font-size: 0.88rem;
  color: var(--b3-amber);
  text-decoration: none;
  font-weight: 600;
}
.b3-person-links a:hover {
  text-decoration: underline;
}

.b3-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
}

.b3-person-open .b3-person-info p {
  font-size: 0.88rem;
  color: var(--b3-text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   PUBLICATIONS PAGE
   ============================================================ */
.b3-pub-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.b3-pub-item {
  display: flex;
  gap: 1.2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--b3-border);
  align-items: baseline;
}

.b3-pub-year {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--b3-amber);
  min-width: 46px;
  white-space: nowrap;
}

.b3-pub-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.b3-pub-authors,
.b3-pub-journal {
  font-size: 0.88rem;
  color: var(--b3-text-muted);
}

.b3-pub-links {
  margin-left: 0.5rem;
  font-size: 0.82rem;
}

.b3-pub-links a {
  color: var(--b3-amber);
  font-weight: 600;
}

.b3-pub-year-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--b3-purple);
  border-bottom: 2px solid var(--b3-purple-pale);
  padding-bottom: 0.4rem;
  margin: 1.5rem 0 0.8rem;
}

.b3-pub-placeholder {
  color: var(--b3-text-muted);
  font-style: italic;
  padding: 0.5rem 0;
}

/* ============================================================
   NEWS FEED (news page)
   ============================================================ */
.b3-news-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.b3-news-item {
  padding: 1.8rem 0;
  border-bottom: 1px solid var(--b3-border);
}

.b3-news-item:last-child {
  border-bottom: none;
}

.b3-news-meta {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.b3-news-item h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.b3-news-item p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--b3-text-muted);
  line-height: 1.65;
}

.b3-news-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.b3-tag-grant   { background: var(--b3-amber-pale);  color: var(--b3-amber); }
.b3-tag-field   { background: var(--b3-green-pale);  color: var(--b3-green); }
.b3-tag-lab     { background: var(--b3-purple-pale); color: var(--b3-purple); }
.b3-tag-outreach{ background: #E8F0FE; color: #1A5CB8; }
.b3-tag-paper   { background: #FDE8F0; color: #B81A5C; }

/* ============================================================
   JOIN PAGE
   ============================================================ */
.b3-position-card {
  border: 1px solid var(--b3-border);
  border-radius: var(--b3-radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
  background: var(--b3-bg);
  box-shadow: var(--b3-shadow);
}

.b3-position-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.b3-position-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

.b3-position-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.8rem;
  border-radius: 99px;
}

.b3-status-open {
  background: #D4EDDA;
  color: #1B5E3B;
}

.b3-position-card ul {
  margin: 0.5rem 0 1rem 1.2rem;
  padding: 0;
}

.b3-position-card li {
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
  color: var(--b3-text-muted);
}

.b3-contact-box {
  background: var(--b3-bg);
  border: 1px solid var(--b3-border);
  border-radius: var(--b3-radius-lg);
  padding: 1.8rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  box-shadow: var(--b3-shadow);
  margin-bottom: 1.5rem;
}

.b3-contact-item {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.b3-contact-label {
  font-weight: 700;
  color: var(--b3-amber);
  min-width: 58px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   BELOW-FOLD LOWER SECTION (research highlights + news)
   ============================================================ */
.b3-lower {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  margin: 0;
  padding: 3rem 3rem 3rem;
  align-items: flex-start;
  background: var(--b3-bg);
}

.b3-lower-left {
  padding-right: 2.5rem;
}

.b3-lower-right {
  border-left: 1px solid var(--b3-border);
  padding-left: 2.5rem;
}

.b3-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--b3-text);
  margin: 0 0 1.1rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--b3-amber-pale);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .b3-hero-split {
    grid-template-columns: 1fr;
    min-height: unset;
    margin: -1rem -1rem 2rem;
  }
  .b3-hero-left { padding: 3rem 1.5rem 2rem; }
  .b3-hero-gallery {
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
    max-height: 60vw;
    overflow-y: hidden;
    overflow-x: auto;
  }
  .b3-gallery-inner {
    flex-direction: row;
    width: max-content;
  }
  .b3-gitem { width: 260px; flex-shrink: 0; border-bottom: none; border-right: 1px solid rgba(255,255,255,0.06); }
  .b3-lower { grid-template-columns: 1fr; }
  .b3-lower-right { border-left: none; border-top: 1px solid var(--b3-border); padding-left: 0; padding-top: 2rem; margin-top: 2rem; }
}

@media (max-width: 768px) {
  .b3-hero-title { font-size: 2rem; }
  .b3-pillars { grid-template-columns: 1fr; }
  .b3-person-card { flex-direction: column; align-items: center; text-align: center; }
  .b3-person-links { justify-content: center; }
  .b3-news-strip { padding: 1.5rem; }
  .b3-cta-inner { padding: 2rem 1.2rem; }
}

/* ============================================================
   RESEARCH HIGHLIGHT LIST (replaces cards in split layout)
   ============================================================ */
.b3-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 2rem;
}

.b3-highlight-item {
  display: flex;
  gap: 1rem;
  padding: 0.9rem 0.6rem;
  border-bottom: 1px solid var(--b3-border);
  text-decoration: none;
  color: var(--b3-text);
  border-radius: var(--b3-radius);
  transition: var(--b3-transition);
  align-items: flex-start;
}
.b3-highlight-item:hover {
  background: var(--b3-amber-pale);
  color: var(--b3-text);
  text-decoration: none;
  padding-left: 1rem;
}
.b3-highlight-item:last-child {
  border-bottom: none;
}

.b3-highlight-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.b3-highlight-item strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.b3-highlight-item p {
  font-size: 0.85rem;
  color: var(--b3-text-muted);
  line-height: 1.55;
  margin: 0;
}

/* ============================================================
   MEDIA GALLERY (right column)
   ============================================================ */
.b3-media-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.b3-media-item {
  border-radius: var(--b3-radius);
  overflow: hidden;
  background: var(--b3-bg-dark);
  position: relative;
  box-shadow: var(--b3-shadow);
  transition: var(--b3-transition);
}
.b3-media-item:hover {
  box-shadow: var(--b3-shadow-hover);
  transform: translateY(-2px);
}

.b3-media-item img,
.b3-media-item video {
  width: 100%;
  display: block;
  object-fit: cover;
  max-height: 260px;
  background: #000;
}

.b3-media-item video {
  max-height: 220px;
}

.b3-media-caption {
  padding: 0.55rem 0.8rem;
  font-size: 0.78rem;
  color: var(--b3-text-muted);
  line-height: 1.45;
  background: var(--b3-bg);
  border-top: 1px solid var(--b3-border);
  font-style: italic;
}
