/* =====================================================================================================================
   Home section 2: research (partials/home_research.html)
   Left: headline, button and photo, pinned while the right column scrolls past (position: sticky).
   Right: intro, pull-quote and two columns of cards of different heights.
   ================================================================================================================== */
.hr {
  --hr-ink: #141a16;
  --hr-soft: #4a544e;
  --hr-muted: #6b746e;
  --hr-green: #148154;
  --hr-green-dark: #0f6843;
  --hr-card: #f1f4f2;
  --hr-line: #dfe6e1;
  --hr-display: "Fraunces", Georgia, serif;
  --hr-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --hr-top: calc(var(--hu-main-nav-h, 78px) + var(--hu-sub-nav-h, 46px) + 32px);
  padding: clamp(64px, 8vw, 120px) 0 clamp(72px, 9vw, 128px);
  background: #ffffff;
  color: var(--hr-ink);
  font-family: var(--hr-body);
}
.hr-shell { width: min(1280px, calc(100% - 56px)); margin-inline: auto; }
.hr-grid { display: grid; grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr); gap: clamp(36px, 6vw, 96px); align-items: start; }

/* ---------------- pinned column ---------------- */
.hr-aside { position: sticky; top: var(--hr-top); }
.hr-title {
  margin: 0; max-width: 14ch;
  font-family: "Lato", "Inter", system-ui, sans-serif; font-weight: 700;
  font-size: clamp(26px, 1.1rem + 1.5vw, 40px); line-height: 1.1; letter-spacing: -0.015em;
  color: var(--hr-ink); text-wrap: balance;
}
/* small, nearly square button (2px corners), like the buttons on NVIDIA's site */
.hr-pill {
  display: inline-flex; align-items: center; min-height: 34px; margin-top: 1.2rem; padding: 0 14px;
  border-radius: 2px; background: var(--hr-green); color: #fff;
  font-family: "Lato", "Inter", system-ui, sans-serif; font-size: 14px; font-weight: 700; text-decoration: none;
  transition: background-color 0.18s ease;
}
.hr-pill:hover { background: var(--hr-green-dark); color: #fff; }
.hr-photo { margin: clamp(2rem, 5vh, 3.25rem) 0 0; max-width: 30rem; }
.hr-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------------- scrolling column ---------------- */
.hr-main { min-width: 0; }
.hr-intro { margin: 0; max-width: 40rem; font-size: 1rem; line-height: 1.65; color: var(--hr-soft); }

.hr-quote { margin: 2.25rem 0 0; max-width: 40rem; }
.hr-quote blockquote { margin: 0; position: relative; padding-top: 2.1rem; }
.hr-quote blockquote::before {
  content: "\201C"; position: absolute; left: -0.06em; top: -0.35rem;
  font-family: var(--hr-display); font-size: 4.25rem; line-height: 1; color: var(--hr-green);
}
.hr-quote p {
  margin: 0; font-family: var(--hr-display); font-style: italic; font-weight: 400;
  font-size: clamp(1.25rem, 1rem + 0.8vw, 1.55rem); line-height: 1.4; color: var(--hr-ink); text-wrap: pretty;
}
.hr-quote figcaption { margin-top: 1rem; font-size: 0.875rem; font-weight: 600; color: var(--hr-muted); }

/* ---------------- card wall ---------------- */
.hr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.hr-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.hr-card { position: relative; display: flex; flex-direction: column; background: var(--hr-card); }
.hr-card__media { overflow: hidden; aspect-ratio: 4 / 3; background: var(--hr-line); }
.hr-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.hr-card:hover .hr-card__media img { transform: scale(1.03); }
.hr-card__body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.15rem 1.15rem 1.25rem; }
.hr-card--text .hr-card__body { padding: 1.4rem 1.25rem 1.3rem; gap: 0.85rem; }

.hr-card__title { margin: 0; font-family: var(--hr-body); font-size: 1.05rem; font-weight: 600; line-height: 1.32; color: var(--hr-ink); text-wrap: pretty; }
.hr-card--text .hr-card__title { font-family: var(--hr-display); font-weight: 500; font-size: 1.3rem; line-height: 1.22; }
.hr-card__title a { color: inherit; text-decoration: none; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.hr-card__title a::after { content: ""; position: absolute; inset: 0; }  /* the whole card opens the story */
.hr-card:hover .hr-card__title a, .hr-card__title a:focus-visible { color: var(--hr-green); text-decoration: underline; }
.hr-card__title a:focus-visible { outline: none; }
.hr-card:has(.hr-card__title a:focus-visible) { outline: 2px solid var(--hr-green); outline-offset: 2px; }

.hr-card__summary { margin: 0; font-size: 0.875rem; line-height: 1.55; color: var(--hr-soft);
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.hr-card--image .hr-card__summary { -webkit-line-clamp: 3; }
.hr-card__meta { display: flex; flex-wrap: wrap; align-items: center; margin: 0.35rem 0 0; font-size: 0.75rem; color: var(--hr-muted); }
.hr-card__meta span + span::before { content: ""; display: inline-block; width: 1px; height: 0.8em; margin: 0 0.6rem; background: var(--hr-line); vertical-align: -0.05em; }

/* video card */
.hr-card--video { background: #0b3a26; color: #f3f8f5; }
.hr-video { aspect-ratio: 4 / 5; background: #072a1b; }
.hr-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.hr-card--video .hr-card__body { gap: 0.5rem; padding: 1rem 1.15rem 1.25rem; }
.hr-handle { margin: 0; font-size: 0.8125rem; font-weight: 600; color: #9be3bc; }
.hr-caption { margin: 0; font-size: 0.9rem; line-height: 1.5; color: #dce9e1; }

.hr-more { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 1.75rem; font-size: 0.9rem; font-weight: 600; color: var(--hr-green); text-decoration: none; }
.hr-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.hr-more svg { transition: transform 0.2s ease; }
.hr-more:hover svg { transform: translateX(3px); }

.hr-pill:focus-visible, .hr-more:focus-visible { outline: 2px solid var(--hr-green); outline-offset: 3px; }

/* ---------------- responsive ---------------- */
@media (max-width: 960px) {
  .hr-grid { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
  .hr-aside { position: static; }
  .hr-title { max-width: 18ch; }
  .hr-photo { max-width: none; }
  .hr-photo img { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .hr-shell { width: calc(100% - 40px); }
  .hr-cards { grid-template-columns: minmax(0, 1fr); }
  .hr-video { aspect-ratio: 4 / 3; }
}
@media (prefers-reduced-motion: reduce) {
  .hr-card__media img, .hr-more svg, .hr-pill { transition: none; }
  .hr-card:hover .hr-card__media img { transform: none; }
}

/* The site-wide `body { overflow-x: hidden }` turns <body> into its own scroll box, which silently disables
   position: sticky for everything inside it. `clip` hides sideways overflow the same way without creating a
   scroll box. Applied only on the home page (this file is loaded only there, and :has() scopes it further). */
body:has(#huResearch) { overflow-x: clip !important; overflow-y: visible !important; }

/* The site-wide stylesheet sets `* { font-family: Poppins }`; elements here inherit the section fonts instead. */
:where(.hr) * { font-family: inherit; }   /* zero specificity: beats the site-wide `* { Poppins }`, loses to any class */
.hr-card__title a { font: inherit; }

/* Photo with rounded corners, as on stanford.edu */
.hr-photo img { border-radius: 16px; }

/* Pull-quote as on stanford.edu: no quotation marks, a vertical bar on the left, italic serif,
   here on a light HU-green panel. */
.hr-quote blockquote { padding: 1.5rem 1.75rem 1.5rem 1.6rem; background: #e8f3ee; border-left: 4px solid #148154; }
.hr-quote blockquote::before { content: none; }
.hr-quote p { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.45rem); line-height: 1.45; color: #142019; }
.hr-quote figcaption { margin-top: 0.85rem; }
