/* ---------------------------------------------------------
   Data-Centric Computing Lab — shared stylesheet
   Neutral, academic palette
--------------------------------------------------------- */

:root {
  --bg: #f7f9f8;
  --bg-panel: #eef2f0;
  --bg-dark: #0f1d19;
  --text: #141a17;
  --text-muted: #5b6b64;
  --text-inverse: #f3f6f4;
  --accent: #0b6e4f;       /* deep green, drawn from the ACED Lab logo */
  --accent-dark: #0a5940;
  --gold: #b9a568;         /* warm gold from the logo's circuit leads */
  --border: #dde4e0;
  --card-bg: #ffffff;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Source Serif Pro", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: 'Sora', var(--serif);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', var(--sans);
  line-height: 1.6;
  font-size: 16.5px;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--accent-dark);
  font-weight: 500;
  margin-bottom: 0.6em;
  display: inline-block;
}

/* ---------- Header / Nav ---------- */

header.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.brand-row {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px 24px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.15;
}

.brand .logo-mark {
  height: 46px;
  width: auto;
  display: block;
}

.brand .lab-name {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.brand .lab-sub {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text .lab-line1 {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.brand-text .lab-line2 {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  margin-top: 4px;
}

.brand:hover { text-decoration: none; }

.brand-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

nav.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 248, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0 24px;
  max-width: var(--maxw);
  margin-left: auto;
  margin-right: auto;
  overflow-x: auto;
}

nav.main-nav a {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 14px 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

nav.main-nav a:hover,
nav.main-nav a.active {
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
  text-decoration: none;
}

/* ---------- Hero ---------- */

.hero {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}

.hero .container {
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero h1 { margin-bottom: 0.3em; max-width: 24ch; }

.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 1.2em;
  max-width: 62ch;
}

.hero .affiliation {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

.byline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 1.6em;
}

.byline img {
  width: 208px;
  height: 208px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 12%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--accent-dark);
}

.btn-primary {
  background: var(--accent-dark);
  color: var(--text-inverse);
}
.btn-primary:hover { background: var(--accent); text-decoration: none; }

.btn-secondary {
  background: transparent;
  color: var(--accent-dark);
}
.btn-secondary:hover { background: var(--bg); text-decoration: none; }

/* ---------- Sections ---------- */

section { padding: 56px 0; }
section.alt { background: var(--bg-panel); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-head { max-width: 65ch; margin-bottom: 34px; }
.section-head p { color: var(--text-muted); }

.section-head-with-media {
  max-width: 65ch;
  overflow: auto;
}
.justify { text-align: justify; }
.section-head-img {
  float: right;
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  margin: 4px 0 12px 24px;
}

/* ---------- Homepage: seamless main flow + News sidebar ---------- */

.home-wrap {
  padding: 56px 0 64px;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: start;
}

.home-main > .home-block {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.home-main > .home-block:first-child {
  padding-top: 0;
  border-top: none;
}

.home-aside {
  position: sticky;
  top: 76px;
}

.widget {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 24px 26px;
}

.widget h4 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 6px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.news-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
}
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item:first-of-type { padding-top: 14px; }

.news-item .news-date {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.news-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Photo collage ---------- */

.collage {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  grid-template-rows: repeat(2, 160px);
  gap: 12px;
}

.collage figure {
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--border);
  position: relative;
}

.collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.collage .tile-main {
  grid-row: span 2;
}

.collage figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 6px 10px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(to top, rgba(15,29,25,0.75), rgba(15,29,25,0));
}

/* Page hero (non-home pages) */
.page-hero {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 44px 0 38px;
}
.page-hero p { color: var(--text-muted); max-width: 70ch; margin: 0; }

/* ---------- Cards / grids ---------- */

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

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

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

.card h3 { margin-bottom: 0.5em; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 0; }

.figure {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card-bg);
  max-width: 75%;
  margin-left: auto;
  margin-right: auto;
}
.figure img { width: 100%; height: 195px; object-fit: cover; }
.figure figcaption {
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}
.collage-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.collage-pair img {
  width: 100%;
  height: 195px;
  object-fit: cover;
  display: block;
}

/* ---------- Research topic blocks ---------- */

.topic-block {
  max-width: 72ch;
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.topic-block:last-child { border-bottom: none; }
.topic-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 0.6em;
}
.topic-heading h3 { margin: 0; }
.topic-icon {
  width: 120px;
  height: 88px;
  object-fit: contain;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
}
.topic-block p { color: var(--text-muted); }

.pub-links {
  margin-top: 1.2em;
  padding-top: 1em;
  border-top: 1px solid var(--border);
}
.pub-links-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 0.5em;
}
.pub-links ul { padding-left: 1.2em; margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.pub-links li { margin-bottom: 0.4em; }
.pub-links a { color: var(--accent-dark); }

/* ---------- Project cards (funded projects) ---------- */

.project {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card-bg);
  padding: 26px 28px;
  margin-bottom: 20px;
}
.project .meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.project h3 { margin-bottom: 6px; }
.project p { color: var(--text-muted); margin-bottom: 0; }

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

.pub-year {
  font-family: var(--serif);
  font-size: 1.3rem;
  margin: 40px 0 14px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.pub-year:first-of-type { border-top: none; margin-top: 0; }

.pub-list { list-style: none; margin: 0; padding: 0; }

.pub-item {
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.95rem;
}
.pub-item:last-child { border-bottom: none; }

.pub-item .pub-title { font-weight: 600; color: var(--text); }
.pub-item .pub-venue { color: var(--text-muted); font-style: italic; }
.pub-item .pub-authors { color: var(--text-muted); }

.tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

.tag-gold {
  color: #6b5a20;
  background: #f6f0dd;
  border-color: #e6d9ab;
}

.filter-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

/* ---------- People ---------- */

.person-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 6px;
  padding: 26px;
  align-items: center;
}

.person-photo {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-panel);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; }

.grid-people {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.mini-person {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  text-align: left;
}
.mini-person .photo { aspect-ratio: 4/3; overflow: hidden; }
.mini-person .photo img { width: 100%; height: 100%; object-fit: cover; }
.mini-person .info { padding: 16px 18px; }
.mini-person h4 { margin-bottom: 2px; font-size: 1rem; }
.mini-person .role { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Stats strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat .num {
  font-family: var(--serif);
  font-size: 2.1rem;
  color: var(--accent-dark);
  font-weight: 700;
}
.stat .label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}
.contact-block { margin-bottom: 22px; }
.contact-block .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.contact-block .value { font-size: 1.02rem; }
.contact-photo {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.contact-photo img { width: 100%; height: 340px; object-fit: cover; }

.contact-form { max-width: 640px; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card-bg);
}
.form-row textarea { resize: vertical; min-height: 130px; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form .btn { border: 1px solid var(--accent-dark); cursor: pointer; }
.form-note {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */

footer.site-footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding: 40px 0 30px;
  margin-top: 40px;
}
footer.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
footer.site-footer a { color: var(--text-inverse); opacity: 0.85; }
footer.site-footer a:hover { opacity: 1; }
footer.site-footer .foot-logo { height: 40px; width: auto; display: block; margin-bottom: 10px; }
footer.site-footer .foot-name { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 4px; }
footer.site-footer .foot-sub { font-size: 0.82rem; opacity: 0.7; }
footer.site-footer .foot-links { display: flex; gap: 22px; font-size: 0.88rem; flex-wrap: wrap; }
footer.site-footer .copyright {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 24px;
  padding-top: 18px;
  font-size: 0.78rem;
  opacity: 0.65;
  text-align: center;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; }
  .home-aside { position: static; }
  .collage { grid-template-columns: 1fr; grid-template-rows: none; }
  .collage .tile-main { grid-row: auto; height: 220px; }
  .collage figure { height: 160px; }
  .grid-3, .grid-2, .grid-people { grid-template-columns: 1fr; }
  .section-head-img { float: none; width: 100%; height: 180px; margin: 0 0 16px; }
  .person-card { grid-template-columns: 1fr; }
  .person-photo { max-width: 220px; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  nav.main-nav ul { gap: 18px; }
  .brand-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
