:root {
  --bg: #ffffff;
  --bg-alt: #f5f7f9;
  --panel: #eef1f5;
  --text: #1a2533;
  --muted: #5a6a7a;
  --accent: #1a6a9a;
  --accent-dark: #124e73;
  --border: rgba(0,0,0,0.10);
}

* { box-sizing: border-box; }
html { font-size: 112.5%; }
body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

/* Header */
header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.brand img {
  height: 72px;
  width: auto;
}
.brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown .caret { font-size: 0.7em; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  min-width: 140px;
  padding: 0.4rem 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
  z-index: 20;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  padding: 0.45rem 1rem;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

/* Hero */
.hero {
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(10,40,70,0.52) 40%, rgba(10,40,70,0.12) 100%);
  display: flex;
  align-items: center;
}
.hero-content {
  color: #ffffff;
  max-width: 640px;
  padding: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 1rem;
  line-height: 1.1;
}
.hero-content .lede {
  font-size: 1.1rem;
  color: #ffffff;
  opacity: 1;
  margin-bottom: 1.5rem;
}

/* Sections */
section { padding: 3rem 0; }
section:nth-child(even) { background: var(--bg-alt); }
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.8rem;
}
.section-heading p {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  background: var(--bg-alt);
  padding: 0.5rem;
}
.card-body {
  padding: 1.25rem;
}
.card h3 { margin: 0 0 0.5rem; color: var(--accent-dark); }
.card p { margin: 0; color: var(--muted); }

/* Two-column / quote panels */
.two-column { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.5rem; }
.quote {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.quote h2 { margin-top: 0; color: var(--accent-dark); }

/* Lede (standalone) */
.lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 960px;
}

/* Clean list */
ul.clean-list { padding-left: 1.2rem; color: var(--muted); }

/* Button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 1rem;
  transition: background 0.2s;
}
.btn:hover { background: var(--accent-dark); }

/* Footer */
footer {
  padding: 2.5rem 0 3rem;
  color: var(--muted);
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
footer .footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
footer .brand img { height: 40px; }
footer a:hover { color: var(--accent); }

/* Home page - 4-card row */
.home-card-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
.home-card {
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  text-align: center;
}
.home-card-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #e8eaec;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.5rem;
  overflow: hidden;
}
.home-card-icon img {
  width: 75%;
  height: 75%;
  object-fit: contain;
  mix-blend-mode: multiply; /* blends white image backgrounds into the circle color */
}
/* Per-icon sizing so artwork appears visually consistent */
.home-card:nth-child(1) .home-card-icon img { width: 90%; height: 90%; } /* pit: lots of whitespace in art */
.home-card:nth-child(2) .home-card-icon img { width: 68%; height: 68%; } /* beaker */
.home-card:nth-child(3) .home-card-icon img { width: 72%; height: 72%; } /* laptop */
.home-card:nth-child(4) .home-card-icon img { width: 60%; height: 60%; } /* earth: art fills full frame */
.home-card h3 {
  font-size: 0.95rem;
  margin: 0.75rem 0 0.4rem;
  color: var(--accent-dark);
}
.home-card p {
  font-size: 0.88rem;
  margin: 0;
  color: var(--muted);
}

/* Home page - feature row with photo + text */
.home-feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.home-feature {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.home-feature img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.home-feature-body {
  padding: 1.4rem;
}
.home-feature-body h2 {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  color: var(--accent-dark);
}
.home-feature-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Services list */
.service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.service-item {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.service-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.service-item img[src$=".png"] {
  object-fit: contain;
  background: var(--bg-alt);
  padding: 1rem;
}
.service-item img[src$="leapfrog.png"] {
  object-fit: cover;
  background: none;
  padding: 0;
}
.service-body {
  padding: 1.25rem;
  flex: 1;
}
.service-body h2 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--accent-dark);
}
.service-body p {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 820px) {
  .service-list { grid-template-columns: 1fr; }
}

/* Contact layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 1.5rem;
  margin-top: 2rem;
  align-items: stretch;
}
.contact-map {
  border-radius: 0.75rem;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid var(--border);
}
.contact-map iframe { display: block; height: 100%; min-height: 360px; }
@media (max-width: 820px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* Job search */
.job-search {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 2rem;
}
.job-search-fields {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}
.job-input {
  flex: 1;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.job-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.job-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.job-filters label { display: flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.job-empty {
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
}
.job-empty a { color: var(--accent); }

/* Job listings */
.job-count {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.job-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}
.job-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
a.job-card:hover,
a.job-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.job-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  flex-wrap: wrap;
}
.job-card-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--accent-dark);
}
.job-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.job-tag {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.job-tag-remote {
  background: rgba(26, 106, 154, 0.1);
  border-color: rgba(26, 106, 154, 0.3);
  color: var(--accent-dark);
}
.job-card-meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.job-card-summary {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.job-card-cta {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
}

/* Job detail page (server-rendered by the API) */
.job-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--accent);
}
.job-back:hover { color: var(--accent-dark); }
.job-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.job-location { color: var(--muted); }
.job-posted {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.job-detail-body {
  margin-top: 1.75rem;
  max-width: 720px;
}
.job-detail-body p {
  color: var(--muted);
  margin: 0 0 1rem;
}

/* Values list */
.values-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 2rem;
}
.value-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 2rem;
}
.value-item:last-child { border-bottom: none; }
.value-text { flex: 1; }
.value-item h2 {
  margin: 0 0 0.6rem;
  font-size: 1.4rem;
  color: var(--accent-dark);
}
.value-item p {
  margin: 0;
  color: var(--muted);
  max-width: 720px;
}
.value-icon {
  flex-shrink: 0;
  color: var(--accent);
}
.value-icon svg {
  width: 56px;
  height: 56px;
}
@media (max-width: 600px) {
  .value-item { flex-direction: column-reverse; align-items: flex-start; gap: 1rem; }
}

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.team-member {
  text-align: center;
}
.team-member img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  border-radius: 0.5rem;
  filter: grayscale(100%);
  margin-bottom: 0.6rem;
}
.team-info {
  font-size: 0.95rem;
  color: var(--text);
}

/* Clickable team members (those with a bio) */
.team-member.has-bio {
  cursor: pointer;
  border-radius: 0.5rem;
  transition: transform 0.15s ease;
}
.team-member.has-bio:hover img,
.team-member.has-bio:focus-visible img {
  filter: grayscale(0%);
}
.team-member.has-bio:hover .team-info strong,
.team-member.has-bio:focus-visible .team-info strong {
  color: var(--accent);
  text-decoration: underline;
}
.team-member.has-bio:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

/* Bio popup modal */
.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.bio-modal[hidden] {
  display: none;
}
.bio-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.bio-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 0.75rem;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
.bio-modal-name {
  margin: 0 2rem 1rem 0;
  color: var(--accent);
}
.bio-modal-body {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
}
.bio-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.bio-modal-close:hover,
.bio-modal-close:focus-visible {
  color: var(--accent);
}

/* Benefits list - icons as bullet points */
.benefits-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  max-width: 760px;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.55rem 0;
}
.benefit-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-top: 0.2rem;
  color: var(--accent);
}
.benefit-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}
.benefit-item p {
  margin: 0;
  color: var(--muted);
}
.benefit-item strong {
  color: var(--accent-dark);
}

/* Inner page padding */
.page-main { padding: 3rem 0 4rem; }

/* Responsive */
@media (max-width: 820px) {
  .hero-img { height: 320px; }
  .two-column, .card-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-card-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-feature-row { grid-template-columns: 1fr; }
  nav { flex-direction: column; align-items: start; gap: 0.8rem; }
  .section-heading { flex-direction: column; align-items: start; }
}
