/* ==========================================================================
   Refinement layer - restrained, editorial styling
   Loaded last. Everything here is an override; delete this file to revert.
   ========================================================================== */

:root {
  --surface: #FAF8F7;        /* warm off-white for alternating bands */
  --rule: #E5E1DE;           /* hairline borders */
  --card-radius: 12px;
}

/* --- Vertical rhythm: give sections room to breathe --------------------- */

.section {
  padding: 96px 0;
}

/* Alternate white / warm neutral so sections read as distinct bands */
#research,
#people {
  background: var(--surface) !important;
}

/* --- Section headings --------------------------------------------------- */

.section-title {
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-title + * {
  margin-top: 0;
}

/* --- Cards: one consistent treatment ------------------------------------ */

.research-card,
.publication-card,
.person-card,
.team-preview-card {
  background: #ffffff;
  border: 1px solid var(--rule);
  border-radius: var(--card-radius);
  box-shadow: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

/* Restrained hover: the card lifts and the edge picks up the accent.
   No full-bleed colour fills, no scaling. */
.research-card:hover,
.publication-card:hover,
.person-card:hover,
.team-preview-card:hover {
  background: #ffffff;
  border-color: var(--cmu-red);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  color: inherit;
}

/* Undo the old invert-on-hover behaviour */
.research-card:hover h3,
.research-card:hover .research-card__title {
  color: var(--cmu-red);
}

.research-card:hover p {
  color: var(--text-light);
}

.research-card h3,
.research-card__title {
  letter-spacing: -0.01em;
}

/* Cards were clipped to a fixed height, which truncates longer entries */
.person-card {
  max-height: none;
}

/* --- Publications ------------------------------------------------------- */

.publication-card__venue {
  color: var(--text-light);
}

/* Quiet outline badge instead of a red gradient chip */
.achievement-badge {
  background: none;
  color: var(--cmu-red);
  border: 1px solid var(--cmu-red);
  border-radius: 999px;
  padding: 3px 12px;
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-xs);
  text-shadow: none;
  box-shadow: none;
  letter-spacing: 0.01em;
}

.achievement-badge:hover {
  background: var(--cmu-red);
  color: #ffffff;
}

/* --- Person card links: now text, so style them as pills ---------------- */

.person-card__links a,
.team-preview-card__links a {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: none;
  color: var(--text-light);
  font-size: var(--font-size-xs);
  text-decoration: none;
  transition: all 160ms ease;
}

.person-card__links a:hover,
.team-preview-card__links a:hover {
  background: var(--cmu-red);
  border-color: var(--cmu-red);
  color: #ffffff;
  transform: none;
}

/* --- Buttons ------------------------------------------------------------ */

.cta-button {
  border-radius: 8px;
  padding: 14px 28px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  transition: background 160ms ease, transform 160ms ease;
}

.cta-button:hover {
  transform: translateY(-1px);
}

/* --- Readability: cap the measure on long-form text --------------------- */

.research-card p,
.publication-card__abstract,
.person-card__bio {
  line-height: 1.65;
}

.hero .description {
  max-width: 680px;
  line-height: 1.6;
}

/* ==========================================================================
   People - box-free layout (after codverch.github.io/ifuse)
   Portrait, name, role, thesis, email in a centred column. No cards.
   ========================================================================== */

.people-grid,
.team-preview-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.75rem 3rem;
  background: none;
  border: none;
  padding: 0;
}

.person {
  width: 13rem;
  text-align: center;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  transform: none;
}

.person:hover {
  background: none;
  border: none;
  box-shadow: none;
  transform: none;
}

.person img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  background: #E8E2DA;
  display: block;
  margin: 0 auto 1rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.person a:hover img,
.person a:focus-visible img {
  transform: scale(1.07);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
}

.person h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  margin: 0 0 0.25rem;
  letter-spacing: -0.01em;
}

.person h3 a {
  color: var(--text-color);
  text-decoration: none;
}

.person h3 a:hover {
  color: var(--cmu-red);
}

.person .affiliation {
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}

.person .thesis {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-light);
  font-style: italic;
  margin: 0 0 0.4rem;
}

.person .email {
  font-size: 0.95rem;
  margin: 0;
  word-break: break-word;
}

.person .email a {
  color: var(--cmu-red);
  text-decoration: none;
}

.person .email a:hover {
  text-decoration: underline;
}

/* --- People: larger portraits and type ---------------------------------- */

.person {
  width: 16rem;
}

.person img {
  width: 180px;
  height: 180px;
  margin-bottom: 1.15rem;
}

.person h3 {
  font-size: 1.5rem;
}

.person .affiliation {
  font-size: 1.15rem;
}

.person .thesis {
  font-size: 1.05rem;
  color: var(--thesis-color);
}

.person .email {
  font-size: 1.05rem;
}

/* Faculty gets the full row so the name never wraps.
   Doubled class keeps this ahead of the plain .person width rules below. */
.person.person--faculty {
  width: 100%;
}

.person--faculty h3 {
  white-space: nowrap;
  font-size: 1.7rem;
}

.person--faculty img {
  width: 200px;
  height: 200px;
}

/* Group headings sit closer to the people they introduce */
.section-subtitle {
  margin-top: var(--spacing-3xl);
  margin-bottom: var(--spacing-xl);
}

/* --- People: wider columns so full names stay on one line --------------- */

/* The people section gets a wider container than the rest of the page,
   so three 20rem columns still fit across a row. */
#people .container {
  max-width: 1200px;
}

.person {
  width: 20rem;
}

/* Names run on a single line (longest is "Sara Mahdizadeh Shahri") */
.person h3 {
  white-space: nowrap;
}

/* Role line: darker than the muted grey it was */
.person .affiliation {
  color: #3D3D3D;
}

/* On narrow screens let names wrap again rather than overflow */
@media (max-width: 520px) {
  .person {
    width: 100%;
  }

  .person h3 {
    white-space: normal;
  }
}

/* --- People: explicit rows (three across, remainder centred beneath) ----- */

.people-grid,
.team-preview-grid {
  display: block;
}

.people-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.75rem 3rem;
}

.people-row + .people-row {
  margin-top: 2.75rem;
}

/* --- Footer: copyright + last-updated only ------------------------------ */

.site-footer {
  padding: 22px 0;
  margin-top: 0;
}

.site-footer .footer-bottom {
  border-top: none;
  padding-top: 0;
  text-align: center;
}

.site-footer .footer-bottom p {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.site-footer .last-updated {
  color: #A8A8A8;
}

/* --- People: fit three across at ordinary window widths ------------------
   The column was 20rem, which needs ~1100px of room for a row of three and
   wrapped early on smaller screens. Narrowing the column and the gap keeps
   Sara / Jaylen / Veronica on one line; the name size drops just enough that
   "Sara Mahdizadeh Shahri" still fits the narrower column on a single line. */

.person {
  width: 17rem;
}

.person h3 {
  font-size: 1.35rem;
}

.people-row {
  gap: 2.5rem 2.5rem;
}

/* Faculty is unconstrained on its own row */
.person.person--faculty h3 {
  font-size: 1.7rem;
}

/* --- Footer bar: same treatment as the top bar --------------------------
   Black ground, 3px Carnegie Red stripe, same 15px padding, same #F0F0F0
   text. The two lines sit side by side so the bar matches the header's
   height instead of running to two rows. */

.site-footer {
  padding: 15px 0;
}

.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1.4rem;
}

.site-footer .footer-bottom p {
  font-size: 1.09rem;
  color: #F0F0F0;
}

.site-footer .last-updated {
  color: #A8A8A8;
  position: relative;
}

/* Separator between the two, only while they share a line */
.site-footer .last-updated::before {
  content: "·";
  color: #5A5A5A;
  margin-right: 1.4rem;
}

@media (max-width: 620px) {
  .site-footer .footer-bottom {
    flex-direction: column;
    gap: 0.3rem;
  }

  .site-footer .last-updated::before {
    content: none;
  }
}

/* --- People: hard-guarantee three across on a row -----------------------
   Explicit rows were still breaking up, because .people-row could wrap
   internally when three columns did not fit the window. Above 700px the row
   no longer wraps and the columns shrink instead, so Sara / Jaylen / Veronica
   stay on one line and Deepanjali / Abnash on the next at any width.
   Column and name sizes are trimmed so three fit without shrinking on a
   normal window. */

@media (min-width: 700px) {
  .people-row {
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .person {
    flex: 0 1 15.5rem;
    min-width: 0;
  }

  /* The trailing row holds fewer people - keep them centred, not stretched */
  .person.person--faculty {
    flex: 0 0 100%;
  }
}

.person {
  width: 15.5rem;
}

.person h3 {
  font-size: 1.2rem;
  white-space: nowrap;
}

.person.person--faculty h3 {
  font-size: 1.7rem;
}

/* Below the breakpoint, let everything wrap and the names break normally */
@media (max-width: 699px) {
  .person h3 {
    white-space: normal;
  }
}

/* --- Hyperlinks: dark maroon -------------------------------------------- */

a {
  color: var(--link-color);
}

a:hover {
  color: var(--link-hover);
}

.person h3 a {
  color: var(--link-color);
}

.person h3 a:hover {
  color: var(--link-hover);
}

/* Links sitting on the black bars keep their light treatment */
header .nav-links a.nav-link,
.site-footer a {
  color: #F0F0F0;
}

header .nav-links a.nav-link:hover,
header .nav-links a.nav-link.active {
  color: #ffffff;
}

/* ==========================================================================
   Hero - left-aligned, bottom-anchored, artwork to the right (after karya.in)
   ========================================================================== */

.hero {
  display: flex;
  align-items: flex-end;
  min-height: 620px;
  padding: 140px 0 90px;
  text-align: left;
}

.hero .container.hero-inner {
  max-width: 1400px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
}

.hero-copy {
  flex: 1 1 auto;
  max-width: 46rem;
}

/* Large, light, tightly tracked - karya's headline treatment */
.hero h1 {
  font-size: clamp(2.75rem, 5.6vw, 5rem);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.045em;
  margin: 0 0 2rem;
  color: #ffffff;
}

.hero .description {
  font-size: clamp(1.2rem, 1.9vw, 1.85rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.01em;
  max-width: 40ch;
  margin: 0 0 2.25rem;
  color: #E6E6E6;
}

.hero .description strong {
  font-weight: 600;
}

.hero .intersection-graph {
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 900px) {
  .hero {
    padding: 90px 0 70px;
    min-height: 0;
  }

  .hero .container.hero-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 3rem;
  }

  .hero .intersection-graph {
    align-self: center;
  }
}

/* --- Venn pillars: teal / red / lime ------------------------------------ */

.hero .intersection-circle.sustainability {
  background: linear-gradient(135deg, var(--venn-sustainability), var(--venn-sustainability-2));
  color: #ffffff;
}

.hero .intersection-circle.equity {
  background: linear-gradient(135deg, var(--venn-equity), var(--venn-equity-2));
  color: #ffffff;
}

/* Lime needs dark text to stay readable */
.hero .intersection-circle.efficiency {
  background: linear-gradient(135deg, var(--venn-efficiency), var(--venn-efficiency-2));
  color: #14231A;
}

.hero .intersection-center {
  background: rgba(10, 49, 60, 0.96);
  color: #ffffff;
  letter-spacing: 0.02em;
}

/* Centre badge now holds one short word, so it can carry more weight */
.hero .intersection-center {
  font-size: 1.15rem;
  font-weight: var(--font-weight-bold);
}

/* Hero eyebrow: spells out what SCALE stands for */
.hero-eyebrow {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--venn-efficiency);
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .hero-eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.85rem;
  }
}

/* No dividing rules anywhere in the footer bar */
.site-footer,
.site-footer * {
  border: 0;
}

/* Equity reads light blue, so it takes dark text like the lime circle */
.hero .intersection-circle.equity {
  color: #0A313C;
}

/* SCALE badge in Carnegie Red */
.hero .intersection-center {
  background: var(--cmu-red);
  color: #ffffff;
}

/* ==========================================================================
   Hero, karya-style pitch: lime accent on the payoff line, cyan eyebrow
   sitting under a short lime rule.
   ========================================================================== */

.hero-eyebrow {
  color: #8FE7FF;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  margin: 0 0 1.75rem;
  padding-top: 1.1rem;
  position: relative;
  max-width: 34rem;
}

.hero-eyebrow::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3.5rem;
  height: 3px;
  background: var(--venn-efficiency);
}

/* The claim carries its payoff in lime */
.hero-accent {
  color: var(--venn-efficiency);
}

.hero h1 {
  margin-bottom: 1.75rem;
}

.hero .description {
  color: #D4DCDF;
  max-width: 36ch;
}

/* --- Hero eyebrow: full-width centred banner line ----------------------- */

.hero .container.hero-inner {
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
}

.hero-columns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  width: 100%;
}

.hero-eyebrow {
  max-width: none;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  font-size: clamp(0.8rem, 1.45vw, 1.4rem);
  letter-spacing: 0.1em;
  margin: 0 0 3rem;
  padding-top: 0;
}

/* no rule above the eyebrow */
.hero-eyebrow::before {
  content: none;
}

.hero-eyebrow-name {
  color: var(--venn-efficiency);
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero-columns {
    flex-direction: column;
    align-items: flex-start;
    gap: 3rem;
  }

  .hero-columns .intersection-graph {
    align-self: center;
  }
}

@media (max-width: 700px) {
  .hero-eyebrow {
    white-space: normal;
  }
}

/* --- Links: black text, maroon on hover --------------------------------- */

a,
.person h3 a {
  color: var(--text-color);
}

a:hover,
.person h3 a:hover {
  color: var(--link-color);
}

/* Bars keep their light treatment */
header .nav-links a.nav-link,
.site-footer a {
  color: #F0F0F0;
}

header .nav-links a.nav-link:hover,
header .nav-links a.nav-link.active {
  color: #ffffff;
}

/* Hero sits on black, so its links stay light */
.hero a {
  color: inherit;
}

/* ==========================================================================
   Top bar: karya-style placement (wide container, wordmark left, nav right)
   ========================================================================== */

header .container {
  max-width: 1400px;
}

/* Softer wordmark - the bright red was harsh against black */
header .logo,
header .logo .letter-s,
header .logo .letter-c,
header .logo .letter-a1,
header .logo .letter-l,
header .logo .letter-e {
  color: #F4F1EC;
}

header .logo:hover .letter-s,
header .logo:hover .letter-c,
header .logo:hover .letter-a1,
header .logo:hover .letter-l,
header .logo:hover .letter-e {
  color: #FFFFFF;
  text-shadow: none;
}

/* ==========================================================================
   Publications - venue badge left, entry right, outline link buttons
   (after niravatre.com)
   ========================================================================== */

.pub-group-title {
  font-size: 1.75rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
  margin: 3.5rem 0 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.pub-group-title:first-of-type {
  margin-top: 2rem;
}

.publication {
  display: flex;
  gap: 1.75rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid #F0EDEA;
}

.pub-badge-col {
  flex: 0 0 7.5rem;
  text-align: right;
  padding-top: 0.2rem;
}

.pub-badge {
  display: inline-block;
  min-width: 6.5rem;
  padding: 4px 10px;
  border-radius: 5px;
  background: var(--pub-accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  text-align: center;
}

.pub-body {
  flex: 1 1 auto;
  min-width: 0;
}

.pub-thumb {
  float: right;
  width: 190px;
  margin: 0 0 1rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.pub-title {
  font-size: 1.2rem;
  font-weight: var(--font-weight-bold);
  line-height: 1.35;
  margin: 0 0 0.4rem;
  color: var(--text-color);
}

.pub-authors {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-light);
  margin: 0 0 0.3rem;
}

.pub-authors strong {
  color: var(--text-color);
  font-weight: var(--font-weight-semibold);
}

.pub-venue {
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 0.9rem;
}

/* Outline buttons in the accent colour */
.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pub-btn {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.6;
  border: 1px solid var(--pub-accent);
  border-radius: 5px;
  background: none;
  color: var(--pub-accent);
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}

.pub-btn:hover {
  background: var(--pub-accent);
  color: #ffffff;
}

.pub-bib {
  margin: 0.9rem 0 0;
  padding: 1rem 1.15rem;
  background: #FAF8F7;
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-color);
}

@media (max-width: 720px) {
  .publication {
    flex-direction: column;
    gap: 0.75rem;
  }

  .pub-badge-col {
    text-align: left;
  }

  .pub-thumb {
    float: none;
    width: 100%;
    max-width: 320px;
    margin: 0 0 1rem;
  }
}

/* ==========================================================================
   Publications, restyled in karya's palette
   Cream ground, white cards, lime venue badge, purple venue line,
   pale-blue icon pills.
   ========================================================================== */

#publications.section {
  background: var(--k-cream) !important;
}

.pub-group-title {
  color: var(--k-teal-deep);
  border-bottom: none;
  padding-bottom: 0;
  letter-spacing: -0.015em;
}

.publication {
  background: #ffffff;
  border: 1px solid var(--k-cream-2);
  border-bottom: 1px solid var(--k-cream-2);
  border-radius: 14px;
  padding: 1.6rem 1.75rem;
  margin-bottom: 1.1rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.publication:hover {
  border-color: var(--k-cyan);
  box-shadow: 0 8px 24px rgba(10, 49, 60, 0.08);
  transform: translateY(-2px);
}

/* Venue badge: lime chip, deep teal type - karya's signature pairing */
.pub-badge {
  background: var(--k-lime);
  color: var(--k-teal-deep);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 0.85rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pub-title {
  color: var(--k-teal-deep);
}

.pub-authors {
  color: #55636A;
}

.pub-authors strong {
  color: var(--k-teal-deep);
}

/* Venue line in purple */
.pub-venue {
  color: var(--pub-venue);
  font-style: italic;
  font-weight: var(--font-weight-medium);
}

/* Icon pills, not outlines */
.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 5px 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--k-blue-pale);
  color: var(--k-teal);
  font-size: 0.85rem;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.01em;
}

.pub-btn:hover {
  background: var(--k-teal);
  color: #ffffff;
  border-color: var(--k-teal);
}

/* cite stands apart in pale lime */
.pub-btn[data-bib] {
  background: var(--k-lime-pale);
  color: var(--k-teal-deep);
}

.pub-btn[data-bib]:hover,
.pub-btn[data-bib][aria-expanded="true"] {
  background: var(--k-lime);
  color: var(--k-teal-deep);
  border-color: var(--k-lime);
}

.pub-ico {
  flex: 0 0 auto;
}

.pub-bib {
  background: var(--k-teal-deep);
  border: none;
  color: #DCEAF0;
  border-radius: 10px;
}

.pub-thumb {
  border: 1px solid var(--k-cream-2);
  border-radius: 10px;
}

/* Publisher mark under the venue chip */
.pub-publisher {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.72rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.14em;
  color: var(--k-teal);
  opacity: 0.85;
}

/* ==========================================================================
   Publications: vertical venue rail
   The venue runs up a coloured spine on the edge of each card instead of
   sitting in a badge column, so the list reads as a shelf of spines.
   ========================================================================== */

.publication {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.pub-badge-col {
  flex: 0 0 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 1.5rem 0;
  text-align: center;
  background: linear-gradient(180deg, var(--k-teal) 0%, var(--k-teal-deep) 100%);
}

/* Venue reads bottom-to-top along the spine */
.pub-badge {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  background: none;
  color: var(--k-lime);
  padding: 0;
  border-radius: 0;
  font-size: 0.82rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pub-publisher {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  display: block;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.22em;
  opacity: 1;
  white-space: nowrap;
}

.pub-body {
  padding: 1.6rem 1.75rem;
}

/* The spine brightens with the card */
.publication:hover .pub-badge-col {
  background: linear-gradient(180deg, var(--k-cyan) 0%, var(--k-teal) 100%);
}

@media (max-width: 720px) {
  .publication {
    flex-direction: column;
  }

  /* On narrow screens the spine lies flat across the top */
  .pub-badge-col {
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.9rem;
    padding: 0.6rem 1.25rem;
  }

  .pub-badge,
  .pub-publisher {
    writing-mode: horizontal-tb;
    transform: none;
  }
}

/* ==========================================================================
   Publications: horizontal venue tab, roomier cards
   ========================================================================== */

.publication {
  flex-direction: column;
  margin-bottom: 1.6rem;
}

/* Teal tab across the top of each card */
.pub-badge-col {
  flex: 0 0 auto;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  gap: 1.1rem;
  padding: 0.85rem 2.25rem;
  text-align: left;
  background: linear-gradient(90deg, var(--k-teal-deep) 0%, var(--k-teal) 100%);
}

.pub-badge,
.pub-publisher {
  writing-mode: horizontal-tb;
  transform: none;
}

.pub-badge {
  font-size: 0.9rem;
  letter-spacing: 0.22em;
}

.pub-publisher {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
}

.publication:hover .pub-badge-col {
  background: linear-gradient(90deg, var(--k-teal) 0%, var(--k-cyan) 100%);
}

/* More room inside each entry */
.pub-body {
  padding: 2rem 2.25rem 1.9rem;
}

.pub-title {
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.pub-authors,
.pub-venue {
  margin-bottom: 0.55rem;
}

.pub-venue {
  margin-bottom: 1.2rem;
}

.pub-links {
  gap: 0.5rem;
}

/* The Address Scaling figure is a wide diagram, so let it run full width */
.pub-thumb--wide {
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.4rem;
  background: var(--k-teal-deep);
}

@media (max-width: 720px) {
  .pub-badge-col {
    padding: 0.7rem 1.25rem;
  }

  .pub-body {
    padding: 1.5rem 1.25rem;
  }
}

/* ==========================================================================
   Publications: black venue tab, larger venue type
   ========================================================================== */

.pub-badge-col {
  background: #000000;
  padding: 1rem 2.25rem;
}

.publication:hover .pub-badge-col {
  background: #111111;
}

.pub-badge {
  color: var(--k-lime);
  font-size: 1.2rem;
  letter-spacing: 0.18em;
}

/* The figure sits on black, so match the card's tab */
.pub-thumb--wide {
  background: #000000;
  border-color: #000000;
}

/* Publication cards run wider than the default 1000px column */
#publications .container {
  max-width: 1150px;
}

/* The homepage card shares the publications-page treatment */
#publications.section {
  background: var(--k-cream) !important;
}

/* ==========================================================================
   Research prose + News
   ========================================================================== */

.prose {
  max-width: 62ch;
  margin: 0 auto;
}

.prose p {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-light);
  margin: 0 0 1.35rem;
}

.prose-lead {
  font-size: 1.6rem !important;
  line-height: 1.4 !important;
  font-weight: var(--font-weight-medium);
  color: var(--text-color) !important;
  letter-spacing: -0.015em;
  margin-bottom: 1.75rem !important;
  border-left: 3px solid var(--cmu-red);
  padding-left: 1.25rem;
}

/* News: date in a quiet gutter so headlines line up */
.news-list {
  max-width: 62rem;
  margin: 0 auto;
}

.news-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0 1.4rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.news-row:last-child {
  border-bottom: 0;
}

.news-date {
  font-size: 0.85rem;
  font-weight: var(--font-weight-semibold);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: right;
}

.news-body {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text-color);
}

.news-body a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-body a:hover {
  color: var(--link-hover);
}

.news-more {
  max-width: 62rem;
  margin: 1.75rem auto 0;
  text-align: right;
  font-size: 1rem;
}

.news-more a {
  color: var(--link-color);
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 600px) {
  .news-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .news-date {
    text-align: left;
  }
}

/* --- Research: lead sentence flanked by two figures ---------------------- */

.prose {
  max-width: 74rem;
}

.prose p {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  color: var(--text-color);
}

.prose-split {
  display: grid;
  grid-template-columns: 1fr minmax(0, 2fr) 1fr;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.prose-img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
}

.prose-split .prose-lead {
  margin: 0 !important;
  max-width: none;
}

@media (max-width: 860px) {
  .prose-split {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .prose-split .prose-lead {
    grid-column: 1 / -1;
    order: -1;
  }
}

/* --- News rows: date, thumbnail, text ----------------------------------- */

.news-row {
  grid-template-columns: 92px 64px 1fr;
  gap: 0 1.25rem;
  padding: 1rem 0;
  align-items: center;
}

.news-thumb {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: cover;
  display: block;
  background: #000000;
}

.news-link {
  white-space: nowrap;
  font-weight: var(--font-weight-semibold);
}

@media (max-width: 600px) {
  .news-row {
    grid-template-columns: 56px 1fr;
    gap: 0.35rem 1rem;
    align-items: start;
  }

  .news-date {
    grid-column: 1 / -1;
    text-align: left;
  }

  .news-thumb {
    width: 56px;
    height: 56px;
  }
}

/* --- Research prose: larger body, no rule on the lead ------------------- */

.prose-lead {
  border-left: none;
  padding-left: 0;
}

.prose p {
  font-size: 1.32rem;
  line-height: 1.7;
  max-width: 68ch;
  margin-bottom: 1.6rem;
}

.prose-lead {
  font-size: 1.85rem !important;
  line-height: 1.35 !important;
}

.prose-img {
  border-radius: 14px;
}

/* ==========================================================================
   News: black band, lime dates, teal links, circular portraits
   ========================================================================== */

#news.section {
  background: #000000 !important;
}

#news .section-title {
  color: #ffffff;
}

.news-row {
  grid-template-columns: 128px 68px 1fr;
  gap: 0 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid #1E1E1E;
  align-items: center;
}

.news-date {
  color: var(--k-lime);
  font-size: 0.95rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.04em;
  text-transform: none;
  text-align: right;
}

/* circular thumbnails */
.news-thumb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #23423F;
  background: #000000;
}

.news-body {
  font-size: 1.08rem;
  line-height: 1.6;
  color: #D9E2E5;
}

.news-body strong {
  color: #ffffff;
  font-weight: var(--font-weight-semibold);
}

.news-body em {
  color: #B9C6CA;
}

.news-body a {
  color: var(--k-cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 175, 223, 0.45);
}

.news-body a strong {
  color: var(--k-cyan);
}

.news-body a:hover,
.news-body a:hover strong {
  color: var(--k-lime);
  border-bottom-color: var(--k-lime);
}

.news-more a {
  color: var(--k-cyan);
}

.news-more a:hover {
  color: var(--k-lime);
}

@media (max-width: 600px) {
  .news-row {
    grid-template-columns: 60px 1fr;
    gap: 0.4rem 1rem;
    align-items: start;
  }

  .news-date {
    grid-column: 1 / -1;
    text-align: left;
  }

  .news-thumb {
    width: 60px;
    height: 60px;
  }
}

/* His news column is justified and set tight */
.news-body {
  text-align: justify;
  line-height: 1.45;
}

/* A news row carrying a preview image on the right */
.news-row:has(.news-preview) {
  grid-template-columns: 128px 68px 1fr 232px;
}

.news-preview {
  display: block;
  border: 0;
}

.news-preview img {
  width: 232px;
  height: auto;
  border-radius: 10px;
  display: block;
  border: 1px solid #23423F;
}

.news-preview:hover img {
  border-color: var(--k-lime);
}

@media (max-width: 900px) {
  .news-row:has(.news-preview) {
    grid-template-columns: 128px 68px 1fr;
  }

  .news-preview {
    grid-column: 1 / -1;
    margin-top: 0.9rem;
  }

  .news-preview img {
    width: 100%;
    max-width: 340px;
  }
}

/* SCALE mark in the top bar, beside the wordmark */
header .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: block;
  flex: 0 0 auto;
}

@media (max-width: 600px) {
  .logo-mark {
    width: 28px;
    height: 28px;
  }
}

/* Mark sits to the LEFT of the wordmark, on one line, never stacked.
   Two flex children only: the mark and the word. */
header .header-content .logo {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
}

header .header-content .logo .logo-word {
  display: inline-block;
  white-space: nowrap;
  line-height: 1;
}

header .header-content .logo .logo-mark {
  display: inline-block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
}

/* ==========================================================================
   Fun
   ========================================================================== */

#fun.section {
  background: var(--surface) !important;
}

.fun-lead {
  text-align: center;
  font-size: 1.5rem;
  color: var(--text-color);
  margin: 0 auto 2.5rem;
  max-width: 40ch;
}








/* ==========================================================================
   Fun: same treatment as News (black band, lime labels, circular photos)
   ========================================================================== */

#fun.section {
  background: #000000 !important;
}

#fun .section-title {
  color: #ffffff;
}

.fun-lead {
  text-align: center;
  font-size: 1.4rem;
  color: #D9E2E5;
  margin: 0 auto 2.75rem;
  max-width: 42ch;
}

/* ==========================================================================
   Warm ground everywhere instead of white
   ========================================================================== */

body,
main,
.section {
  background: var(--warm) !important;
}

/* the dark bands stay dark */
.hero,
#news.section,
#fun.section,
header,
.site-footer {
  background-color: var(--cmu-black) !important;
}

.hero {
  background:
    linear-gradient(rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0.62)),
    url('../images/backgrounds/hyperscale.jpg') center / cover no-repeat,
    var(--cmu-black) !important;
}

/* people band, a shade off the page ground */
#people.section {
  background: #F5EFE7 !important;
}

/* publications keep their cream */
#publications.section {
  background: var(--k-cream) !important;
}

/* cards lift off the warm ground rather than being pure white */
.publication,
.research-card,
.publication-card,
.person-card,
.team-preview-card {
  background: var(--warm-raised);
}

.publication:hover,
.research-card:hover,
.publication-card:hover,
.person-card:hover,
.team-preview-card:hover {
  background: var(--warm-raised);
}

.pub-bib {
  background: var(--k-teal-deep);
}

.person img {
  background: #EDE5DA;
}

/* ==========================================================================
   Fun gallery
   One composed mosaic: a feature tile, two wide, four tall, on a dense
   4-column grid with each photo cropped to fill its cell, so the block is
   flush on both edges at any width. Captions sit in a bar along the bottom.
   This is the only Fun layout; earlier masonry, honeycomb and justified
   attempts have been removed rather than left to override each other.
   ========================================================================== */

#fun .container {
  max-width: 1400px;
}

.moments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 215px;
  grid-auto-flow: dense;
  gap: 10px;
  margin-top: 1.25rem;
}

.moment {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #0B0B0B;
}

.moment.m-feature { grid-column: span 2; grid-row: span 3; }
.moment.m-wide    { grid-column: span 2; grid-row: span 2; }
.moment.m-tall    { grid-column: span 1; grid-row: span 2; }

.moment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 620ms cubic-bezier(0.2, 0.7, 0.2, 1), filter 400ms ease;
}

.moment:hover img {
  transform: scale(1.035);
  filter: brightness(1.04);
}

.moment figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.15rem 0.95rem;
  background: linear-gradient(to top,
              rgba(0, 0, 0, 0.86) 0%,
              rgba(0, 0, 0, 0.48) 55%,
              rgba(0, 0, 0, 0) 100%);
  text-align: left;
}

.moment-place {
  display: block;
  color: var(--k-lime);
  font-size: 1.1rem;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 0.25rem;
}

.moment-note {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #DCE3E5;
  font-size: 0.98rem;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .moments { grid-auto-rows: 180px; }
  .moment-place { font-size: 0.98rem; }
  .moment-note  { font-size: 0.9rem; }
}

@media (max-width: 760px) {
  .moments {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 165px;
  }

  .moment.m-feature,
  .moment.m-wide { grid-column: span 2; grid-row: span 2; }
  .moment.m-tall { grid-column: span 1; grid-row: span 2; }

  .moment figcaption { padding: 2rem 0.85rem 0.75rem; }
  .moment-place { font-size: 0.85rem; }
  .moment-note  { font-size: 0.8rem; -webkit-line-clamp: 2; line-clamp: 2; }
}

@media (max-width: 520px) {
  .moment-note { display: none; }
}
