/*
  FROOT Lab site styles.
  Ported from the WordPress "Systems Lab" theme (systems-lab-theme) so the
  look stays the same after moving to a static site.
*/

:root {
  /* Modern slate + indigo palette: cool neutrals, an electric indigo
     primary, a cyan accent, and deep indigo gradients for dark panels. */
  --sl-bg: #f8fafc;
  --sl-surface: #ffffff;
  --sl-text: #0f172a;
  --sl-text-muted: #64748b;
  --sl-primary: #6366f1;
  --sl-primary-strong: #4f46e5;
  --sl-accent: #a5b4fc;
  --sl-highlight: #475569;
  --sl-ink: #0f172a;
  --sl-border: #e2e8f0;
  --sl-header-bg: rgba(248, 250, 252, 0.82);
  --sl-radius-lg: 20px;
  --sl-radius-md: 14px;
  --sl-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
  --sl-max-width: 1120px;
  color-scheme: light dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "IBM Plex Sans", -apple-system, "Segoe UI", "Helvetica Neue", sans-serif;
  background: radial-gradient(circle at 10% 0%, #eef2ff 0%, var(--sl-bg) 45%), var(--sl-bg);
  color: var(--sl-text);
  line-height: 1.6;
}

a {
  color: var(--sl-primary);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--sl-primary-strong);
}

.wrap {
  width: min(100% - 2.5rem, var(--sl-max-width));
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  margin: 0 0 0.75rem;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  letter-spacing: -0.02em;
}

.section-intro {
  margin: 0;
  color: var(--sl-text-muted);
  max-width: 64ch;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: var(--sl-header-bg);
  border-bottom: 3px solid var(--sl-ink);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--sl-text);
  font-weight: 700;
  letter-spacing: 0.01em;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav ul {
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--sl-text);
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  color: var(--sl-primary-strong);
  box-shadow: inset 0 -2px 0 var(--sl-accent);
  padding-bottom: 0.15rem;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--sl-border);
  border-radius: 10px;
  background: var(--sl-surface);
  padding: 0.45rem 0.7rem;
  font-size: 1rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--sl-border);
  background: var(--sl-surface);
  color: var(--sl-text);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--sl-primary);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--sl-primary);
  color: #fff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--sl-primary-strong);
  color: #fff;
}

.button.secondary {
  background: #fff;
  border-color: var(--sl-ink);
  color: var(--sl-ink);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: var(--sl-ink);
  color: #fff;
}

.hero {
  padding-top: 5.3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 999px;
  background: var(--sl-ink);
  color: #e2e8f0;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.hero h1 {
  margin: 1rem 0;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 600;
  font-size: clamp(2.15rem, 6vw, 4rem);
}

.hero p {
  margin: 0;
  color: var(--sl-text-muted);
  max-width: 62ch;
}

.hero-actions {
  margin-top: 1.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-panel {
  background: linear-gradient(155deg, #e2e8f0, #cbd5e1 60%, #b9c3d1);
  color: #0f172a;
  border-radius: var(--sl-radius-lg);
  padding: 1.4rem;
  box-shadow: var(--sl-shadow);
  border-top: 4px solid var(--sl-primary);
}

.hero-panel h3 {
  margin: 0;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sl-highlight);
}

.metrics {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.metrics li {
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  padding-top: 0.8rem;
}

.metric-number {
  display: block;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-size: 2rem;
  line-height: 1;
  font-weight: 700;
  color: var(--sl-highlight);
}

.card-grid {
  margin-top: 1.6rem;
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  position: relative;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-top: 3px solid var(--sl-primary);
  border-radius: var(--sl-radius-md);
  padding: 1.3rem 1.3rem 1.45rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sl-shadow);
}

.card:has(.card-link) {
  cursor: pointer;
}

.card-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.card h3,
.card h4 {
  margin: 0 0 0.45rem;
}

.card p {
  margin: 0;
  color: var(--sl-text-muted);
}

.card-meta {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  color: var(--sl-text-muted);
}

.featured-project {
  margin-top: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-left: 6px solid var(--sl-primary);
  border-radius: var(--sl-radius-md);
  padding: 1.6rem 1.9rem;
}

.featured-project + .featured-project {
  margin-top: 1rem;
}

.featured-project .featured-body h3 {
  margin: 0 0 0.5rem;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.featured-project .featured-body p {
  margin: 0;
  color: var(--sl-text-muted);
  max-width: 58ch;
}

.featured-project .button {
  flex-shrink: 0;
}

.sponsor-label {
  margin: 1.4rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sl-text-muted);
}

.sponsor-label:first-of-type {
  margin-top: 1.5rem;
}

.section--sponsors {
  padding-top: 0;
}

.section--sponsors .sponsor-list {
  margin: 0.9rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.4rem 2.4rem;
}

.sponsor-list li {
  display: flex;
  align-items: center;
  margin: 0;
}

/*
  There are no frames here, so nothing but the artwork itself normalises these.
  Heights are therefore set per logo so each occupies roughly the same visual
  area: a square mark and a 3:1 wordmark at one shared height are not the same
  size, because the wordmark spreads its ink across three times the width.
*/
.sponsor-list img {
  display: block;
  width: auto;
  height: auto;
  max-height: 42px;
  max-width: 100%;
  object-fit: contain;
}

/*
  A circular mark covers only about 79% of its bounding box, so it needs
  roughly 13% more diameter than a square one to look the same size.
*/
.sponsor-list li.sponsor-round img {
  max-height: 66px;
}

/* Square marks that fill their box: the Microsoft tiles. */
.sponsor-list li.sponsor-sq img {
  max-height: 60px;
}

/* Between the two: the Red Hat mark. */
.sponsor-list li.sponsor-tall img {
  max-height: 54px;
}

/*
  Laude's artwork is white on a dark ground and no light version exists, so it
  keeps a chip of its own rather than floating a dark rectangle on the page.
*/
.sponsor-list li.sponsor-dark {
  padding: 0.35rem 0.6rem;
  border-radius: 10px;
  background: #2c040c;
}

.sponsor-list li.sponsor-dark img {
  max-height: 46px;
}

.sponsor-list li.sponsor-muted {
  opacity: 0.75;
}

.sponsor-list li.sponsor-tag {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sl-text-muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.news-date {
  color: var(--sl-text-muted);
  font-size: 0.85rem;
}

.cta-band {
  background: linear-gradient(125deg, #475569, #64748b 55%, #6366f1);
  color: #fff;
  border-radius: var(--sl-radius-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cta-band h2 {
  margin: 0;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
}

.cta-band p {
  margin: 0.45rem 0 0;
  opacity: 0.92;
}

.cta-band .cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: 0.7rem;
  opacity: 1;
}

.cta-band .cta-links a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.5);
}

.cta-band .cta-links a:hover,
.cta-band .cta-links a:focus-visible {
  color: var(--sl-accent);
  text-decoration-color: var(--sl-accent);
}

.cta-band .button.secondary {
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent;
  color: #fff;
}

.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--sl-border);
  margin-top: 2.5rem;
}

.footer-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.footer-row p {
  margin: 0;
  color: var(--sl-text-muted);
  font-size: 0.92rem;
}

.footer-row .footer-links a {
  display: inline-flex;
  align-items: center;
  margin-left: 1rem;
}

.footer-row .footer-links a:first-child {
  margin-left: 0;
}

.footer-row .footer-links svg {
  width: 28px;
  height: 28px;
}

.footer-university {
  text-align: right;
}

.content-shell {
  margin-top: 2rem;
  padding: 1.35rem;
  border-radius: var(--sl-radius-md);
  border: 1px solid var(--sl-border);
  background: var(--sl-surface);
}

.page-content {
  color: var(--sl-text);
}

.page-content p {
  margin-top: 0;
}

.page-content h2 {
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}

.page-content h2:first-child {
  margin-top: 0;
}

.section-subtitle {
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  letter-spacing: -0.02em;
  font-size: 1.5rem;
  margin: 2.5rem 0 0.75rem;
}

.section-subtitle--tight {
  margin-top: 0;
}

.pub-list {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
}

.pub-list li {
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--sl-border);
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.pub-title {
  font-weight: 600;
}

.pub-links {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.pub-meta,
.pub-authors {
  margin: 0.25rem 0 0;
  color: var(--sl-text-muted);
  font-size: 0.94rem;
}

.pub-venue {
  margin: 0.15rem 0 0;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--sl-text);
}

.pub-status {
  font-weight: 400;
  font-style: italic;
  color: var(--sl-text-muted);
}

.pub-award {
  margin: 0.2rem 0 0;
  font-size: 0.94rem;
}

.pub-loading,
.pub-error {
  color: var(--sl-text-muted);
}

.pub-note {
  color: var(--sl-primary-strong);
  font-weight: 600;
}

.people-list {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.people-list li {
  color: var(--sl-text);
}

.people-list .role {
  color: var(--sl-text-muted);
}

.pi-profile {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pi-profile img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: var(--sl-radius-md);
  border: 1px solid var(--sl-border);
}

.pi-profile .pi-links a {
  margin-right: 0.75rem;
  font-weight: 600;
}

.linkedin-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.linkedin-slot {
  display: flex;
  justify-content: center;
}

.linkedin-slot iframe {
  width: 100%;
  max-width: 504px;
  border: none;
  border-radius: var(--sl-radius-md);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.team-card {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-md);
  padding: 1.15rem;
  text-align: center;
}

.team-card .avatar,
.team-card .avatar-placeholder {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
}

.team-card .avatar {
  object-fit: cover;
  border: 1px solid var(--sl-border);
}

.team-card .avatar-placeholder {
  background: linear-gradient(135deg, var(--sl-ink), var(--sl-primary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Newsreader", "Iowan Old Style", Georgia, serif;
  font-weight: 700;
  font-size: 1.6rem;
}

.team-card h3 {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.team-card .role {
  display: block;
  color: var(--sl-text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.team-card .bio {
  font-size: 0.88rem;
  color: var(--sl-text);
  margin: 0 0 0.75rem;
  text-align: left;
}

.team-card .team-links {
  margin: 0;
}

.team-card .team-links a {
  margin: 0 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 980px) {
  .hero-grid,
  .two-col {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cta-band {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    inset: 76px 1.25rem auto;
    border: 1px solid var(--sl-border);
    border-radius: 14px;
    background: var(--sl-surface);
    padding: 0.95rem;
    box-shadow: var(--sl-shadow);
    display: none;
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.65rem;
  }

  .site-nav .button {
    width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }
}

/*
  Dark mode.
  Applied automatically when the OS is set to dark (unless the user has
  explicitly chosen light via the toggle), or forced by [data-theme="dark"]
  when the user has explicitly chosen dark via the toggle.
*/
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --sl-bg: #0b1120;
    --sl-surface: #111827;
    --sl-text: #e2e8f0;
    --sl-text-muted: #94a3b8;
    --sl-primary: #818cf8;
    --sl-primary-strong: #a5b4fc;
    --sl-accent: #a5b4fc;
    --sl-highlight: #475569;
    --sl-ink: #1e293b;
    --sl-border: #1e293b;
    --sl-header-bg: rgba(11, 17, 32, 0.85);
    --sl-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }

  :root:not([data-theme="light"]) body {
    background: radial-gradient(circle at 10% 0%, #1e1b4b 0%, var(--sl-bg) 45%), var(--sl-bg);
  }

  :root:not([data-theme="light"]) .button.secondary {
    background: var(--sl-surface);
    border-color: var(--sl-text-muted);
    color: var(--sl-text);
  }

  :root:not([data-theme="light"]) .button.secondary:hover,
  :root:not([data-theme="light"]) .button.secondary:focus-visible {
    background: var(--sl-text);
    color: var(--sl-bg);
  }

  :root:not([data-theme="light"]) .linkedin-slot {
    background: var(--sl-surface);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius-md);
    padding: 1rem;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

:root[data-theme="dark"] {
  --sl-bg: #0b1120;
  --sl-surface: #111827;
  --sl-text: #e2e8f0;
  --sl-text-muted: #94a3b8;
  --sl-primary: #818cf8;
  --sl-primary-strong: #a5b4fc;
  --sl-accent: #a5b4fc;
  --sl-highlight: #475569;
  --sl-ink: #1e293b;
  --sl-border: #1e293b;
  --sl-header-bg: rgba(11, 17, 32, 0.85);
  --sl-shadow: 0 18px 42px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

:root[data-theme="dark"] body {
  background: radial-gradient(circle at 10% 0%, #1e1b4b 0%, var(--sl-bg) 45%), var(--sl-bg);
}

:root[data-theme="dark"] .button.secondary {
  background: var(--sl-surface);
  border-color: var(--sl-text-muted);
  color: var(--sl-text);
}

:root[data-theme="dark"] .button.secondary:hover,
:root[data-theme="dark"] .button.secondary:focus-visible {
  background: var(--sl-text);
  color: var(--sl-bg);
}

:root[data-theme="dark"] .linkedin-slot {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-radius: var(--sl-radius-md);
  padding: 1rem;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
