/* ============================================================
   TenJ Lab — site styles
   Edit colors here once and they update everywhere.
   ============================================================ */

:root {
  --ucla-blue:   #2774AE;
  --ucla-darker: #003B5C;
  --ucla-gold:   #FFD100;
  --ink:         #1c2733;
  --muted:       #5b6770;
  --line:        #e3e8ee;
  --bg:          #ffffff;
  --bg-soft:     #f5f8fb;
  --max:         1080px;
  --radius:      14px;
  --shadow:      0 6px 24px rgba(0, 59, 92, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--ucla-blue); }

h1, h2, h3 { font-family: "Bricolage Grotesque", "Inter", sans-serif; line-height: 1.15; letter-spacing: -0.01em; color: var(--ucla-darker); }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 .6em; }
h3 { font-size: 1.2rem; margin: 0 0 .3em; }

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

.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { height: 44px; width: auto; display: block; flex: none; }
.brand__name { font-family: "Bricolage Grotesque", "Inter", sans-serif; font-weight: 800; color: var(--ucla-darker); font-size: 1.3rem; letter-spacing: -0.01em; }
.brand__sub  { display: block; font-weight: 500; color: var(--muted); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }

.nav-links { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav-links a:hover { background: var(--bg-soft); color: var(--ucla-darker); }
.nav-links a.active { color: var(--ucla-blue); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font-size: 1.6rem; color: var(--ucla-darker); padding: 4px 8px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--ucla-darker), var(--ucla-blue));
  color: #fff; padding: 96px 0;
  position: relative; overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.40; }
.hero__overlay { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(0,40,70,0.90), rgba(20,82,140,0.86)); }
.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.9); }
.hero .tagline { color: var(--ucla-gold); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .85rem; margin: 0 0 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; transition: transform .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ucla-gold); color: var(--ucla-darker); }
.btn--ghost { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.6); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}

/* ---------- People ---------- */
.person { text-align: center; }
.person__photo {
  width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 14px;
  object-fit: cover; object-position: center 22%; background: var(--bg-soft);
  border: 3px solid var(--line);
}
.person__photo--placeholder {
  display: grid; place-items: center; font-weight: 800; font-size: 1.8rem;
  color: var(--ucla-blue); background: var(--bg-soft);
}
.person__name { font-weight: 800; color: var(--ucla-darker); }
.person__role { color: var(--ucla-blue); font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.person__bio  { color: var(--muted); font-size: .92rem; text-align: left; }

.group-title { margin-top: 8px; border-left: 4px solid var(--ucla-gold); padding-left: 12px; }

.proj-meta { color: var(--ucla-blue); font-weight: 600; font-size: .88rem; margin: 0 0 10px; }

/* Story section with portrait (e.g. Jessie) */
.story-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: center; }
.story-grid figure { margin: 0; }
.story-grid img {
  width: 280px; height: 340px; object-fit: cover; object-position: center 20%;
  border-radius: 16px; box-shadow: var(--shadow); display: block;
}
@media (max-width: 640px) {
  .story-grid { grid-template-columns: 1fr; gap: 20px; }
  .story-grid figure { justify-self: center; }
  .story-grid img { width: 240px; height: 290px; }
}

/* Full-width single profile (e.g. PI / leadership) */
.person--lead {
  display: grid; grid-template-columns: 180px 1fr; gap: 32px;
  align-items: center; text-align: left;
}
.person--lead .person__photo { width: 170px; height: 170px; margin: 0; }
.person--lead .person__name,
.person--lead .person__role,
.person--lead .person__bio { text-align: left; }
@media (max-width: 640px) {
  .person--lead { grid-template-columns: 1fr; text-align: center; gap: 18px; }
  .person--lead .person__photo { margin: 0 auto; }
}

/* ---------- Publications ---------- */
.pub-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.pub {
  --accent: var(--ucla-blue);
  background: var(--bg); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 10px; padding: 15px 20px;
}
.pub:nth-child(odd)  { --accent: var(--ucla-blue); }
.pub:nth-child(even) { --accent: #C99700; }  /* deep gold (legible) */
.pub__dx { width: 20px; height: 20px; vertical-align: -4px; margin-right: 5px; }
.pub-legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .9rem; margin-top: 6px; }
.pub-legend .pub__dx { margin-right: 0; }
.pub__title { font-weight: 700; color: var(--ucla-darker); }
.pub__meta  { color: var(--muted); font-size: .92rem; }
.pub__authors { font-size: .92rem; }
.pub__visual { margin: 10px 0 0; }
.pub__visual svg {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
/* Collapsible expanders for summary + visual abstract */
.pub__more { margin-top: 10px; }
.pub__more > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 700; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ucla-blue); user-select: none;
}
.pub__more > summary::-webkit-details-marker { display: none; }
.pub__more > summary::before { content: "\25B8"; display: inline-block; transition: transform .15s ease; }
.pub__more[open] > summary::before { transform: rotate(90deg); }
.pub__more-body {
  margin-top: 8px; font-size: .92rem; color: var(--ink);
  background: var(--bg-soft);
  border-radius: 8px; padding: 11px 14px;
}

/* ---------- News ---------- */
.news-item { border-bottom: 1px solid var(--line); padding: 28px 0; }
.news-item:last-child { border-bottom: 0; }
.news-item__date { color: var(--ucla-blue); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }


.news-photo { max-width: 340px; margin: 18px 0 4px; }
.news-photo img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.news-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.news-gallery figure { margin: 0; }
.news-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.news-gallery figcaption { font-size: .82rem; color: var(--muted); margin-top: 6px; line-height: 1.4; }
@media (max-width: 640px) { .news-gallery { grid-template-columns: 1fr; } }

/* ---------- Contact form ---------- */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 6px; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: var(--bg-soft);
}
.form textarea { min-height: 140px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ucla-darker); color: rgba(255,255,255,.85); padding: 48px 0 32px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: var(--ucla-gold); margin: 0 0 12px; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 32px; padding-top: 20px; font-size: .85rem; color: rgba(255,255,255,.6); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .section { padding: 48px 0; }
  .hero { padding: 64px 0; }
}
