:root {
  --bg: #0a0d0c;
  --bg-alt: #101812;
  --text: #f4f3ed;
  --muted: #b6b1a5;
  --accent: #d8a860;
  --accent-strong: #e3b874;
  --accent-secondary: #b17b61;
  --card-bg: rgba(22, 29, 22, 0.9);
  --border: rgba(216, 168, 96, 0.16);
  --shadow: 0 24px 60px rgba(6, 7, 5, 0.6);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  --container-width: min(1100px, 92vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: linear-gradient(200deg, var(--bg) 0%, #142318 65%, #1a2f1f 100%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: var(--container-width);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background-color: rgba(4, 6, 18, 0.85);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 56px;
  width: 56px;
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  font-size: 0.95rem;
}

.nav a {
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease,
    box-shadow 0.2s ease;
}

.nav a:hover {
  background-color: rgba(216, 168, 96, 0.12);
  color: var(--accent-strong);
  box-shadow: 0 0 0 1px rgba(216, 168, 96, 0.2);
}

.nav .cta {
  background: var(--accent);
  color: #271c0d;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(216, 168, 96, 0.35);
}

.nav .cta:hover {
  background: var(--accent-strong);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 3px;
  margin: 4px 0;
  background-color: var(--text);
  transition: transform 0.2s ease;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hero {
  padding: 2rem 0;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: start;
}

.hero-intro {
  max-width: none;
}

.eyebrow {
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.75rem;
}

h1,
h2,
h3 {
  color: #ffffff;
  line-height: 1.2;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  margin-bottom: 1.5rem;
}

.hero .lede {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 48ch;
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease,
    background-color 0.2s ease;
  border: 1px solid transparent;
}


.btn.primary,
.btn.primary:visited {
  background-color: var(--accent);
  color: #1b0f04;
  box-shadow: 0 18px 40px rgba(216, 168, 96, 0.4);
}

.btn.primary:hover {
  background-color: var(--accent-strong);
  color: #1b0f04;
  transform: translateY(-2px);
}

.btn.ghost {
  border: 1px solid rgba(122, 80, 60, 0.4);
  color: var(--accent-secondary);
}

.btn.ghost:hover {
  border-color: rgba(122, 80, 60, 0.7);
  color: var(--text);
}

.hero-card {
  padding: 2.5rem;
  border-radius: 24px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 1.55rem;
  margin-bottom: 1.4rem;
}

.hero-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.15rem;
}

.hero-card li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}

.hero-card li::before {
  content: "";
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(
      180deg,
      var(--accent-secondary),
      rgba(216, 168, 96, 0.85)
    );
  box-shadow: 0 0 0 2px rgba(216, 168, 96, 0.15);
  margin-top: 0.35rem;
}

.section {
  padding: 2rem 0;
}

.section.alt {
  background: linear-gradient(160deg, var(--bg-alt) 0%, #152318 100%);
}

.section-heading {
  margin-bottom: 1.75rem;
}

.section-heading > p {
  max-width: 52ch;
}

.section-heading p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 2rem;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.oss-grid {
  gap: 1.5rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.oss-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1rem 1.1rem;
}

.oss-card p {
  margin: 0;
}

.oss-card h3 {
  margin-bottom: 0.4rem;
}

.oss-card h3 a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.oss-card h3 a:hover {
  color: var(--accent-strong);
  text-shadow: 0 4px 12px rgba(216, 168, 96, 0.35);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--muted);
}

.card ul {
  margin: 1.25rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.card.highlight {
  border: 1px solid rgba(216, 168, 96, 0.3);
  border-radius: 24px;
  box-shadow: var(--shadow), 0 12px 30px rgba(12, 17, 12, 0.3);
  background: var(--card-bg);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.card-link::after {
  content: "→";
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.card-link:hover {
  color: var(--accent-strong);
  transform: translateX(2px);
}

.card-link:hover::after {
  transform: translateX(2px);
}

.expertise-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.expertise-chip {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.expertise-chip strong {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.expertise-chip span {
  color: var(--muted);
}

.approach-steps {
  list-style: none;
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin: 0;
  padding: 0;
}

.approach-steps h3 {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-secondary);
}

.about-grid {
  display: grid;
  gap: 3rem;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: start;
}

.about-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.about-card ul {
  margin: 1rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.contact {
  background: linear-gradient(
      170deg,
      rgba(216, 168, 96, 0.18),
      rgba(122, 80, 60, 0.08)
    ),
    #111d14;
}

.contact-card {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: center;
  padding: 3rem;
  border-radius: 28px;
  border: 1px solid rgba(216, 168, 96, 0.24);
  background: linear-gradient(
      200deg,
      rgba(27, 36, 27, 0.95),
      rgba(18, 26, 18, 0.92)
    );
  box-shadow: var(--shadow);
}

.contact h2 {
  font-size: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 1.05rem;
}

.contact-link {
  color: var(--accent);
  font-weight: 600;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  align-self: flex-end;
  width: 100%;
}

.contact-actions .btn {
  width: fit-content;
}

.contact-text {
  color: var(--muted);
}

.lab-detail {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.lab-cta {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}

.site-footer {
  padding: 2.5rem 0;
  background: rgba(4, 6, 18, 0.94);
  border-top: 1px solid var(--border);
}

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

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease;
  overflow-wrap: anywhere;
}

.footer-links a:hover {
  color: var(--accent);
}

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-alt);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(216, 168, 96, 0.3);
  border-radius: 999px;
  border: 3px solid var(--bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(216, 168, 96, 0.5);
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 740px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 68px;
    right: 4vw;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.4rem;
    border-radius: 16px;
    background: rgba(12, 14, 26, 0.95);
    border: 1px solid var(--border);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }

  .nav.nav-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .hero {
    padding-top: 6.5rem;
  }
}

@media (max-width: 560px) {
  .hero-card,
  .card,
  .about-card,
  .contact-card {
    padding: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-inner {
    padding: 0.7rem 0;
  }

  .logo {
    font-size: 1rem;
  }
}

.blog-hero .lede,
.blog-hero p {
  max-width: 60ch;
}

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}

.blog-card h2 {
  margin-bottom: 0.5rem;
}

.blog-card-date {
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}

.blog-card-description {
  color: var(--muted);
  margin-bottom: 1rem;
}

.blog-card-link {
  color: var(--accent-strong);
  font-weight: 600;
}

.blog-empty {
  color: var(--muted);
  font-style: italic;
}

.post-header {
  padding-top: 3rem;
  padding-bottom: 1rem;
}

.post-meta {
  color: var(--muted);
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.post-description {
  color: var(--muted);
  max-width: 65ch;
}

.post-content {
  max-width: 70ch;
  padding-bottom: 2rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content pre {
  background: #070a09;
  border-radius: 12px;
  padding: 1rem;
  overflow-x: auto;
}

.post-footer {
  padding-bottom: 4rem;
}

.post-back-link {
  color: var(--accent-strong);
  font-weight: 600;
}
