/* =========================================================
   PNC Lab — ivory, teal, and copper design tokens
   ========================================================= */
:root{
  /* color */
  --paper:      #f5f1e8;
  --paper-raised:#fffdf8;
  --ink:        #152b2a;
  --ink-soft:   #435b58;
  --line:       #d8d1c4;
  --edge:       #17675f;   /* connection / link color, from network diagrams */
  --edge-soft:  #78a69e;
  --signal:     #b65d3c;   /* single warm accent, used sparingly */
  --node-fill:  #152b2a;

  /* type */
  --font-body:    "Inter", "Helvetica Neue", Arial, sans-serif;

  /* scale */
  --measure: 62ch;
  --gap: 1.5rem;
  --radius: 3px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em 0;
}

h1{ font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 600; }
h2{ font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3{ font-size: 1.15rem; }

p{ margin: 0 0 1em 0; max-width: var(--measure); color: var(--ink-soft); }

a{ color: var(--edge); text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.eyebrow{
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 500;
  color: var(--edge);
}

.wrap{
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------------------------------------------------------
   Header / nav
   --------------------------------------------------------- */
.site-header{
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand{
  display:flex;
  align-items: baseline;
  gap: 0.6rem;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
}
.brand:hover{ text-decoration: none; }
.brand .brand-mark{
  width: 10px; height: 10px;
  background: var(--signal);
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.brand small{
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-soft);
}

nav.primary-nav ul{
  list-style: none;
  display:flex;
  gap: 1.8rem;
  margin:0; padding:0;
}
nav.primary-nav a{
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}
nav.primary-nav a[aria-current="page"]{
  color: var(--edge);
  border-bottom: 2px solid var(--signal);
  padding-bottom: 3px;
}

.nav-toggle{
  display:none;
  background:none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  font-family: var(--font-body);
  cursor:pointer;
}

@media (max-width: 860px){
  .nav-toggle{ display:block; }
  nav.primary-nav{
    display:none;
    position:absolute;
    left:0; right:0; top: 100%;
    background: var(--paper-raised);
    border-bottom: 1px solid var(--line);
  }
  nav.primary-nav.open{ display:block; }
  nav.primary-nav ul{
    flex-direction: column;
    gap:0;
    padding: 0.5rem 2rem 1.2rem;
  }
  nav.primary-nav li{ padding: 0.55rem 0; border-bottom: 1px dashed var(--line); }
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.hero{
  padding: 4.5rem 0 3.5rem;
}
.hero .wrap{
  display:grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 860px){
  .hero .wrap{ grid-template-columns: 1fr; }
}

.hero-copy .eyebrow{ display:block; margin-bottom: 0.9rem; }
.hero .hero-title{
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.12;
  margin-bottom: 1.2rem;
  text-wrap: balance;
}
.hero-copy .hero-tagline{
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 2.2vw, 1.6rem);
  line-height: 1.3;
  color: var(--edge);
  margin-bottom: 1rem;
}
.hero-copy p.lede{
  font-size: 1.1rem;
  color: var(--ink);
  max-width: 46ch;
}
.hero-affil{
  margin-top: 1.6rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-left: 2px solid var(--line);
  padding-left: 0.9rem;
}
.hero-affil a{ color: var(--ink-soft); }

.hero-diagram{ width: 100%; height: auto; }
.hero-diagram .edge{
  stroke: var(--edge-soft);
  stroke-width: 1;
  opacity: 0;
  animation: draw-edge 900ms ease-out forwards;
}
.hero-diagram .node{
  fill: var(--node-fill);
  opacity: 0;
  animation: pop-node 500ms ease-out forwards;
}
.hero-diagram .node.accent{ fill: var(--signal); }
.hero-diagram text{
  font-family: var(--font-body);
  font-size: 10px;
  fill: var(--ink-soft);
}

@keyframes draw-edge{ to{ opacity: 1; } }
@keyframes pop-node{ to{ opacity: 1; } }

@media (prefers-reduced-motion: reduce){
  .hero-diagram .edge, .hero-diagram .node{
    animation: none !important;
    opacity: 1 !important;
  }
}

/* ---------------------------------------------------------
   Sections
   --------------------------------------------------------- */
section{ padding: 3.2rem 0; }
section.alt{
  background: var(--paper-raised);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section-head{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.9rem;
}
.section-head .eyebrow{ margin:0; }

/* research area grid — nodes, not cards */
.area-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 720px){ .area-grid{ grid-template-columns: 1fr; } }

.area{
  background: var(--paper);
  padding: 1.8rem;
  position: relative;
}
.area .index{
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--edge);
  display:block;
  margin-bottom: 0.6rem;
}
.area h3{ margin-bottom: 0.5rem; }
.area p{ font-size: 0.95rem; margin-bottom: 0; }

/* news / list rows */
.row-list{ border-top: 1px solid var(--line); }
.row-item{
  display:grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 620px){
  .row-item{ grid-template-columns: 1fr; gap: 0.3rem; }
}
.row-item time{
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.row-item p{ margin:0; }

/* people grid */
.people-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 220px));
  gap: 2rem 1.5rem;
}

.person{
  --portrait-width: 200px;
  position: relative;
  padding-top: calc(0.9rem + 2px);
}
.person::before{
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--portrait-width);
  max-width: 100%;
  height: 2px;
  background: var(--ink);
}
.person .avatar{
  width: var(--portrait-width);
  max-width: 100%;
  aspect-ratio: 5 / 6;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  margin-bottom: 0.9rem;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family: var(--font-body);
  color: var(--line);
  font-size: 0.75rem;
  overflow: hidden;
}
.person .avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.person .avatar.initials{
  color: var(--edge);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  background: var(--paper);
}
.person h3{ margin-bottom: 0.15rem; }
.person .role{
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--edge);
  display:block;
  margin-bottom: 0.6rem;
}
.person p{ font-size: 0.92rem; }
.person .links a{ font-size: 0.85rem; margin-right: 0.8rem; }

/* publications */
.pub-year{
  font-family: var(--font-body);
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 2rem 0 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
}
.pub-list{ list-style:none; margin:0; padding:0; }
.pub-item{
  padding: 1rem 0;
  border-bottom: 1px dashed var(--line);
}
.pub-item .pub-title{ color: var(--ink); font-weight: 500; }
.pub-item .pub-meta{
  display:block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}
.pub-item .pub-tag{
  display:inline-block;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  color: var(--ink-soft);
  margin-right: 0.4rem;
}

.placeholder-note{
  font-family: var(--font-body);
  font-size: 0.78rem;
  color: var(--signal);
  background: #f7ecdb;
  border: 1px dashed var(--signal);
  padding: 0.7rem 1rem;
  margin-bottom: 2rem;
  max-width: none;
}

/* ---------------------------------------------------------
   Footer
   --------------------------------------------------------- */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  margin-top: 2rem;
}
.site-footer .wrap{
  display:flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.site-footer a{ color: var(--ink-soft); }
.site-footer .cols{
  display:flex;
  gap: 3rem;
  flex-wrap: wrap;
}
.site-footer .cols div{ font-family: var(--font-body); font-size: 0.8rem; }
.site-footer .cols a{ display:block; margin-bottom: 0.4rem; }

.btn{
  display:inline-block;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  margin-top: 1.4rem;
}
.btn:hover{ background: var(--ink); color: var(--paper); text-decoration:none; }

/* PNC Lab: extensions to the shared UI Group layout. */
:root { --header-offset: 7rem; }
[hidden] { display: none !important; }
body { overflow-wrap: break-word; }
main { min-height: 60vh; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: white; padding: .6rem 1rem; }
.skip-link:focus { top: .5rem; }
[id] { scroll-margin-top: var(--header-offset); }
.brand { white-space: nowrap; }
.page-intro { padding: 3.5rem 0 2.5rem; }
.page-intro .wrap { display: block; }
.page-intro h1 { max-width: 21ch; margin-top: .7rem; }
.page-intro .lede { max-width: 66ch; font-size: 1.08rem; }
.hero .wrap > * { min-width: 0; }
.hero-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 1.2rem; }
.text-link { font-family: var(--font-body); font-size: .82rem; }
.area h3 a { color: var(--ink); }
.research-map { margin: 0 -1.4rem 0 -1rem; }
.research-map svg { width: 100%; height: auto; display: block; overflow: visible; }
.research-map figcaption { text-align: center; font-family: var(--font-body); font-size: .68rem; color: var(--ink-soft); margin-top: .6rem; }
.research-map text { font-family: var(--font-body); font-weight: 500; fill: var(--ink); font-size: 12px; }
.research-orbit { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 8; fill: none; }
.research-edge { stroke: var(--edge-soft); stroke-width: 1.5; fill: none; }
.research-flow { stroke: var(--signal); stroke-width: 3; stroke-dasharray: 7 120; fill: none; animation: data-flow 5s linear infinite; }
.research-box { fill: var(--paper-raised); stroke: var(--line); transition: stroke .2s; }
.research-map a:hover .research-box, .research-map a:focus .research-box { stroke: var(--edge); stroke-width: 2; }
.research-dot { fill: var(--signal); }
.research-core { fill: var(--ink); }
.research-halo { stroke: var(--edge-soft); stroke-width: 1; fill: none; animation: halo-pulse 4s ease-in-out infinite; transform-origin: 300px 235px; }
.research-map .map-core-title { font-family: var(--font-body); font-weight: 600; font-size: 37px; fill: var(--paper-raised); }
.research-map .map-core-sub { font-size: 8px; fill: #d3e5e0; }
@keyframes data-flow { to { stroke-dashoffset: -254; } }
@keyframes halo-pulse { 50% { opacity: .35; transform: scale(1.06); } }
.project-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.project-strip a { border-top: 2px solid var(--edge); padding-top: 1rem; color: var(--ink); }
.project-strip a:hover { text-decoration: none; }
.project-strip a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.project-strip strong { display: block; font-family: var(--font-body); font-size: 1.6rem; font-weight: 500; margin: .5rem 0; }
.project-strip a > span:last-child { display: block; color: var(--ink-soft); font-size: .9rem; }
.research-row { display: grid; grid-template-columns: 15rem 1fr; gap: 3rem; padding: 2.5rem 0; border-bottom: 1px solid var(--line); }
.research-row:first-child { padding-top: .5rem; }
.research-row:last-child { border-bottom: 0; }
.research-row h2 { font-size: 1.65rem; margin-top: .7rem; }
.minor-heading { font-family: var(--font-body); font-size: .75rem; margin: 1.6rem 0 .7rem; color: var(--ink-soft); font-weight: 500; }
.related-papers { padding-left: 1.2rem; margin-bottom: 0; font-size: .88rem; }
.related-papers li { margin: .6rem 0; }
.people-section { padding-top: 2rem; }
.page-intro.people-intro { padding-bottom: .75rem; }
.people-intro .lede { margin-bottom: 0; }
.people-intro + .people-section { padding-top: 1rem; }
.people-section:nth-of-type(odd) { background: var(--paper-raised); }
.person-note { font-size: .85rem !important; }
.person .links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.person .links a { margin: 0; }
.project-row { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 1.5rem; padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.project-identity { display: grid; align-content: start; gap: 1rem; }
.project-logo { display: flex; align-items: center; justify-content: center; width: 7.5rem; height: 4.5rem; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.project-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-logo--dark { background: #172c43; border-color: #172c43; }
.project-logo:hover { border-color: var(--edge); }
.project-period { font-family: var(--font-body); font-size: .8rem; color: var(--ink-soft); padding-top: .15rem; }
.project-period time { white-space: nowrap; }
.project-row h3 { font-size: 1.35rem; margin: 0 0 .5rem; }
.project-row h3 a { color: var(--edge); }
.project-row p { margin-bottom: .7rem; max-width: 76ch; }
.project-row .project-full-title { color: var(--ink); font-weight: 500; }
.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.5rem; margin-top: 1rem; }
.project-tag { display: inline-block; font-family: var(--font-body); font-size: .68rem; border: 1px solid var(--line); padding: .15rem .5rem; border-radius: 3px; }
.project-tag.european { color: var(--edge); background: #edf3f8; border-color: #bdcfde; }
.project-tag.national { color: #79531d; background: #f8f1e5; border-color: #dfcba9; }
.project-links { display: flex; flex-wrap: wrap; gap: 1rem; font-family: var(--font-body); font-size: .8rem; }
.pub-controls { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(0,1fr) 7rem auto; gap: 1rem; align-items: end; padding-bottom: 1.5rem; }
.pub-controls label { display: block; font-family: var(--font-body); font-size: .72rem; margin-bottom: .5rem; }
.pub-controls input, .pub-controls select, .filter-reset { width: 100%; min-height: 44px; border: 1px solid var(--line); background: var(--paper-raised); color: var(--ink); padding: .65rem .7rem; border-radius: 3px; font: inherit; font-size: .82rem; }
.pub-controls input:focus-visible, .pub-controls select:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; }
.filter-reset { cursor: pointer; width: auto; font-family: var(--font-body); }
.filter-reset:hover { background: var(--paper); }
.pub-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding: 1.2rem 0; }
.year-nav { display: flex; flex-wrap: wrap; gap: .4rem; }
.year-nav a { padding: .2rem .5rem; border: 1px solid var(--line); border-radius: 3px; font-family: var(--font-body); font-size: .78rem; }
.year-nav a:hover { background: var(--paper); }
.pub-help { font-size: .8rem; max-width: none; margin: 0 0 2rem; }
.publication-year { padding: 0; margin-top: 2.5rem; }
.pub-year-heading { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid var(--ink); padding-bottom: .7rem; }
.pub-year-heading h2 { font-family: var(--font-body); font-size: 2rem; font-weight: 500; margin: 0; }
.pub-list { counter-reset: paper; }
.pub-item { position: relative; padding: 1.4rem 0 1.4rem 3rem; border-bottom: 1px solid var(--line); }
.pub-item::before { counter-increment: paper; content: counter(paper, decimal-leading-zero); position: absolute; top: 1.45rem; left: 0; color: var(--ink-soft); font-family: var(--font-body); font-size: .7rem; }
.pub-item .pub-tag { font-size: .65rem; margin-bottom: .65rem; padding: .12rem .45rem; color: var(--edge); background: #edf3f8; border-color: #c6d5e3; }
.pub-item .pub-tag.conference { color: #79531d; background: #f8f1e5; border-color: #dfcba9; }
.pub-item .pub-tag.chapter { color: #536238; background: #f0f3e9; border-color: #d4dec2; }
.pub-item .pub-title { display: block; font-family: var(--font-body); font-size: 1.03rem; font-weight: 600; line-height: 1.5; margin: 0 0 .4rem; }
.pub-authors { font-size: .85rem; color: var(--ink-soft); max-width: none; line-height: 1.7; margin: 0 0 .3rem; }
.pub-venue { font-family: var(--font-body); font-size: .73rem; max-width: none; margin: 0 0 .7rem; }
.pub-links { display: flex; flex-wrap: wrap; gap: .5rem 1.3rem; font-family: var(--font-body); font-size: .73rem; }
.pdf-link { font-weight: 500; }
.no-results { padding: 3rem 0; }
.bibliography-note { border-top: 1px solid var(--line); padding-top: 1.5rem; margin-top: 3rem; font-size: .82rem; }
.bibliography-note summary { cursor: pointer; font-family: var(--font-body); margin-bottom: 1rem; }
.bibliography-note p { max-width: 85ch; }
@media (max-width: 950px) {
 .brand small { display: none; }
 nav.primary-nav ul { gap: 1.2rem; }
 .hero .wrap { gap: 2rem; }
}
@media (min-width: 861px) { .hero:not(.page-intro) .wrap { grid-template-columns: 1fr 1fr; gap: 2rem; } }
@media (max-width: 860px) {
 .research-map { max-width: 600px; margin: 0 auto; }
 .research-row { grid-template-columns: 12rem 1fr; gap: 2rem; }
 .pub-controls { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
 .filter-reset { justify-self: start; }
}
@media (max-width: 620px) {
 .wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
 .hero { padding: 3rem 0 2.5rem; }
 .hero h1 { font-size: 2.5rem; }
 .hero-copy p.lede { font-size: 1rem; }
 .section-head { gap: .5rem; flex-wrap: wrap; }
 .project-strip, .research-row, .project-row { grid-template-columns: 1fr; gap: 1.2rem; }
 .project-row { gap: .6rem; }
 .project-identity { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1rem; margin-bottom: .5rem; }
 .project-identity .project-period { flex: 1; min-width: 0; }
 .project-logo { width: 6.5rem; height: 4rem; flex: 0 0 6.5rem; }
 .project-strip { gap: 2rem; }
 .research-row h2 { margin-bottom: 0; }
 .people-grid { row-gap: 2rem; }
 .pub-controls { grid-template-columns: minmax(0,1fr); }
 .pub-item { padding-left: 2rem; }
 .pub-toolbar { align-items: flex-start; }
 .pub-venue { font-size: .7rem; }
 .year-nav a { padding: .35rem .55rem; }
 .site-footer .cols { gap: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
 html { scroll-behavior: auto; }
 .research-flow, .research-halo { animation: none; }
 * { transition: none !important; }
}
@media print {
 .site-header, .site-footer, .pub-controls, .year-nav, .pub-help { display: none; }
 body, section.alt { background: white; color: black; }
 .publication-year { break-before: auto; }
 .pub-item { break-inside: avoid; }
}

/* Research infrastructures: compact overview with a full-size figure link. */
.infrastructure-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 2.5rem; align-items: start; }
.infrastructure-copy h2 { font-size: 1.65rem; }
.infrastructure-copy ul { padding-left: 1.2rem; color: var(--ink-soft); margin: 0 0 1rem; }
.infrastructure-copy li { margin-bottom: .4rem; }
.testbed-figure { margin: 0; min-width: 0; width: 100%; max-width: 480px; }
.testbed-figure > a { display: block; background: #fff; border: 1px solid var(--line); padding: .75rem; border-radius: var(--radius); }
.testbed-figure > a:hover { border-color: var(--edge); }
.testbed-figure img { display: block; width: 100%; height: auto; background: #fff; }
.testbed-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; margin-top: .7rem; font-family: var(--font-body); font-size: .68rem; line-height: 1.6; color: var(--ink-soft); }
.infrastructure-source { margin: 2rem 0 0; max-width: 90ch; font-family: var(--font-body); font-size: .72rem; color: var(--ink-soft); }
@media (max-width: 860px) {
 .infrastructure-layout { grid-template-columns: 1fr; gap: 2rem; }
}
