/* ============================================================
   project.css
   Page-specific styles for /projects/ index and /projects/{slug}/
   detail pages.

   REQUIRES theme.css to be loaded FIRST.
   ============================================================ */

/* ── Project hero (detail) ───────────────────────────────── */
.project-hero      { padding: 132px 0 60px; }
.project-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.project-hero-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-neutral-40);
  position: relative;
}
.project-hero-image img { width: 100%; height: 100%; object-fit: cover; }
.project-hero-image::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(221deg, rgba(0,215,238,.12) 0%, rgba(97,0,255,.08) 100%);
  pointer-events: none;
}

/* ── Assistive Augmentation principles (detail page) ──────
   Sits at the bottom of the hero image as a frosted-glass strip,
   matching the visual language of the project cards on the index
   page (where the title bar sits inside the card image). Each
   principle is an icon + label pair. The bar absolutely positions
   over the image's gradient overlay (z-index:2 vs the ::after
   gradient sitting at the default 0). */
.project-principles {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-top: 1px solid rgba(255, 255, 255, .4);
}
.project-principle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.005em;
  color: var(--color-neutral-100);
}
.project-principle img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}
.project-principle-label { white-space: nowrap; }
@media (max-width: 767px) {
  .project-principles { padding: 10px 14px; gap: 10px; }
  .project-principle { font-size: 12px; gap: 6px; }
  .project-principle img { width: 20px; height: 20px; }
}

.project-hero-text h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 44px; line-height: 46px;
  color: var(--color-neutral-100);
  margin-bottom: 20px;
}
/* Inline year fragment that sits at the end of the h1, like
   "SonicVista · 2025". Lighter weight + neutral-60 color so the
   project name still reads as primary; a thin dot divider gives
   the year a sense of belonging without overpowering the title.
   The whole fragment is set with white-space:nowrap so the dot
   and year never wrap apart from each other if the title is long
   enough to wrap. */
.project-hero-text .project-title-year {
  display: inline-block;
  font-weight: 400;
  color: var(--color-neutral-60);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;          /* slight breathing space after the title */
}
.project-hero-text .project-title-sep {
  margin: 0 10px 0 6px;
  color: var(--color-neutral-40);
}
.project-hero-text .project-summary {
  font-size: 21px; line-height: 35px; color: var(--color-neutral-80);
}

@media (max-width: 991px) {
  .project-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-hero-text h1 { font-size: 36px; line-height: 42px; }
  .project-hero-text .project-summary { font-size: 19px; line-height: 28px; }
}

/* ── Project hero text — description appended below summary ──
   The hero is a 1fr 1fr grid (image | text). The text column now
   contains: year, title, summary, AND the multi-paragraph
   description. Fills the right column nicely instead of leaving
   it sparse below the summary line. */
.project-hero-text .project-description {
  margin-top: 24px;
}
.project-hero-text .project-description p {
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 26px;
  color: var(--color-neutral-80);
  margin-bottom: 14px;
}
.project-hero-text .project-description p:last-child { margin-bottom: 0; }

/* ── Project body (detail) ───────────────────────────────────
   Single-column body, no sidebar. People come first as a
   horizontal row, then publications as full-width long rows. */
.project-body { padding: 60px 0 80px; }
.project-people-row { margin-bottom: 60px; }
.project-sponsors-row { margin-bottom: 60px; }
.project-publications-row { /* spacing only; container is full-width */ }

/* ── Sponsors row ─────────────────────────────────────────
   Industry collaborators that supported this specific project.
   Renders as a row of pills; each pill shows either the sponsor's
   logo (preferred) or their name as a text label. Pills with a
   logo get a slightly larger height to give the image breathing
   room; text-only pills stay compact. */
.project-sponsors-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}
.project-sponsor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  background: var(--color-neutral-20);
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius);
  color: var(--color-neutral-90);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: border-color .25s, color .25s, transform .25s;
  min-height: 48px;
  box-sizing: border-box;
}
a.project-sponsor:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.project-sponsor.has-logo {
  padding: 8px 16px;
}
.project-sponsor.has-logo img {
  max-height: 32px;
  width: auto;
  display: block;
  /* Many sponsor logos are SVG/PNG with their own brand color and
     are designed to read on a light background — leave untouched. */
}
/* Visually-hidden span used for the sponsor name when only the
   logo is rendered, so screen readers and the title attribute
   still announce who the sponsor is. */
.project-sponsor .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── People row (horizontal grid of avatars) ─────────────────
   Each person is a small card: circular avatar on top with the
   name beneath. Wraps automatically — no fixed column count.
   Auto-fill at ~120px each so 6-7 people typically fit on one
   row at desktop width. */
.project-people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 24px 16px;
  margin-top: 20px;
}
.project-person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 8px 4px;
  border-radius: var(--radius);
  transition: background .25s, transform .25s;
}
.project-person-card:hover {
  background: var(--color-neutral-20);
}
.project-person-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  padding: 2px;
  background: var(--gradient);
  position: relative;
}
.project-person-avatar img,
.project-person-avatar-placeholder {
  width: 100%; height: 100%;
  border-radius: 50%;
  display: block;
}
.project-person-avatar img { object-fit: cover; }
.project-person-avatar-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--color-neutral-30);
  color: var(--color-neutral-70);
  font-family: var(--font-display); font-weight: 700;
  font-size: 24px;
}
.project-person-name {
  font-family: var(--font-text); font-weight: 600;
  font-size: 13px; line-height: 1.3;
  color: var(--color-neutral-100);
  transition: color .3s;
}
.project-person-card:hover .project-person-name { color: var(--color-accent); }

/* ── Publications list (long-row cards, matches publications archive) ──
   Numbered list, each item has title (linked), citation in muted text,
   and a row of small DOI/PDF buttons. Same pattern as the person profile
   page's publications, restyled without the leading number column for
   simplicity (project pages typically have 1-3 publications). */
.project-pub-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.project-pub-item {
  padding: 24px 0;
  border-top: 1px solid var(--color-neutral-30);
}
.project-pub-item:last-child { border-bottom: 1px solid var(--color-neutral-30); }
.project-pub-title {
  display: block;
  font-family: var(--font-display); font-weight: 700;
  font-size: 19px; line-height: 1.35;
  color: var(--color-neutral-100);
  margin-bottom: 8px;
  transition: color .25s;
}
a.project-pub-title:hover { color: var(--color-accent); }
.project-pub-citation {
  font-family: var(--font-text);
  font-size: 14px; line-height: 22px;
  color: var(--color-neutral-70);
  margin-bottom: 12px;
}
.project-pub-links {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.project-pub-link {
  font-family: var(--font-display); font-weight: 600;
  font-size: 11px; letter-spacing: .8px;
  color: var(--color-accent);
  padding: 5px 12px;
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius-sm);
  transition: all .25s;
}
.project-pub-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* ── External project links (demo / website / code / dataset / video) ──
   Sits at the bottom of .project-description inside the hero. The
   `demo` kind is rendered as a filled accent button to draw the
   primary-action eye; other kinds inherit the outlined pattern from
   .project-pub-link for visual consistency across the page. */
.project-ext-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.project-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 10px 18px;
  border: 1px solid var(--color-neutral-30);
  border-radius: var(--radius-sm);
  color: var(--color-accent);
  transition: all .25s;
}
.project-ext-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-1px);
}
.project-ext-link-icon {
  font-size: 12px;
  line-height: 1;
}
/* Demo is the primary action — filled button, larger tap target. */
.project-ext-link-demo {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.project-ext-link-demo:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}

@media (max-width: 767px) {
  .project-ext-link { font-size: 13px; padding: 8px 14px; }
}

@media (max-width: 767px) {
  .project-pub-title { font-size: 17px; }
  .project-people-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .project-person-avatar { width: 60px; height: 60px; }
}

/* ── Project images ──────────────────────────────────────── */
.project-images     { margin-top: 48px; }
.project-images img { margin-bottom: 20px; border-radius: var(--radius-lg); }

/* ── Press row (awards + news + videos for this project) ───
   Groups sit vertically (one for each non-empty type). Each
   group has a small eyebrow label and a list of bordered rows:
   title + outlet/year meta. No pub-style big numbered rows —
   press entries are shorter and look better in compact rows. */
/* ── Press (awards / news / videos on a project page) ──────
   Stacked groups — Awards first, then news, then videos —
   each with a small eyebrow label and a bordered list of
   items. Each item is a flex row: a type icon, the title,
   and meta (outlet · year) below the title.

   Visual weight is tuned so awards (usually the most
   impressive) stand out with a gold accent icon, while news
   and videos use more neutral icons. Items reveal an accent
   left border on hover to confirm they're interactive. */
.project-press-row {
  margin-bottom: 60px;
}
.project-press-group {
  margin-top: 28px;
}
.project-press-group:first-child {
  margin-top: 20px;
}
.project-press-group-label {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--color-neutral-60);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-neutral-30);
}
.project-press-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.project-press-item {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  padding: 14px 0 14px 12px;
  border-bottom: 1px solid var(--color-neutral-20);
  transition: background .2s, border-color .2s;
}
.project-press-item:last-child {
  border-bottom: none;
}
/* A subtle accent bar appears on the left edge when an item
   is hovered — hints at clickability without the heavier
   hover effects used on larger cards elsewhere. */
.project-press-item::before {
  content: "";
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 2px;
  background: transparent;
  border-radius: 2px;
  transition: background .2s;
}
.project-press-item:hover::before {
  background: var(--color-accent);
}

/* Type icon. Styled as a 24px rounded square with a glyph.
   Colors differ per type so the eye can scan the list and
   immediately spot "which of these is the award?". */
.project-press-item::after {
  content: "";
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background-color: var(--color-neutral-20);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
  flex-shrink: 0;
}
/* Inline SVG icons as data-URLs, so no extra HTTP requests.
   Colors chosen to match the press-index card iconography. */
.project-press-group.is-award .project-press-item::after {
  background-color: #fff6d6;
  /* trophy glyph (gold) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b7861a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9H4.5a2.5 2.5 0 0 1 0-5H6'/><path d='M18 9h1.5a2.5 2.5 0 0 0 0-5H18'/><path d='M4 22h16'/><path d='M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22'/><path d='M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22'/><path d='M18 2H6v7a6 6 0 0 0 12 0V2Z'/></svg>");
}
.project-press-group.is-news .project-press-item::after {
  background-color: #e8efff;
  /* newspaper glyph */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233858a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2'/><path d='M18 14h-8'/><path d='M15 18h-5'/><path d='M10 6h8v4h-8V6Z'/></svg>");
}
.project-press-group.is-video .project-press-item::after {
  background-color: #fde8e8;
  /* play glyph (red) */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c8371a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polygon points='6 3 20 12 6 21 6 3'/></svg>");
}

.project-press-title {
  grid-column: 2;
  display: block;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.4;
  color: var(--color-neutral-100);
  text-decoration: none;
  transition: color .25s;
}
a.project-press-title:hover { color: var(--color-accent); }
.project-press-meta {
  grid-column: 2;
  margin-top: 4px;
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--color-neutral-60);
}
.project-press-outlet { font-weight: 500; }

@media (max-width: 567px) {
  .project-press-item { grid-template-columns: 24px 1fr; gap: 12px; }
  .project-press-item::after { width: 24px; height: 24px; background-size: 14px 14px; }
  .project-press-title { font-size: 15px; }
}

/* ── Featured-at events row ────────────────────────────────
   Sits above "Recognition & coverage" in the project body. A
   horizontal row of small chips, each linking to the event's
   external microsite or local /events/{slug}/ detail page. The
   colored dot left of each chip indicates the event's kind
   (conference / exhibition / talk / trip / workshop). */
.project-events-row {
  margin-bottom: 40px;
}
.project-events-row .event-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.project-events-row .event-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--color-neutral-90);
  background: var(--color-neutral-20);
  border: 1px solid var(--color-neutral-30);
  border-radius: 999px;
  padding: 6px 14px;
  text-decoration: none;
  transition: background .25s, border-color .25s, color .25s;
}
.project-events-row .event-chip:hover {
  background: var(--color-neutral-30);
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.project-events-row .event-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-neutral-50);
  flex-shrink: 0;
}
.project-events-row .event-chip[data-kind="conference"] .event-chip-dot { background: #6100ff; }
.project-events-row .event-chip[data-kind="exhibition"] .event-chip-dot { background: #ff6b35; }
.project-events-row .event-chip[data-kind="talk"]       .event-chip-dot { background: #2a3a8a; }
.project-events-row .event-chip[data-kind="trip"]       .event-chip-dot { background: #00d7ee; }
.project-events-row .event-chip[data-kind="workshop"]   .event-chip-dot { background: #a200d5; }