:root {
  --ink: #18222d;
  --muted: #65717d;
  --line: #dce3e8;
  --paper: #ffffff;
  --soft: #f5f8fa;
  --tint: #edf6f4;
  --accent: #167a72;
  --accent-dark: #105e58;
  --blue: #1e5f8a;
}

body {
  color: var(--ink);
  background: #fafbfc;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #0c4642;
}

.navbar {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.navbar-brand img {
  max-height: 32px;
}

.site-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.intro-panel,
.page-header {
  max-width: 880px;
  padding: 4rem 0 3rem;
}

.intro-panel h1,
.page-header h1 {
  max-width: 850px;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: 0;
  margin: 0 0 1.25rem;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.18rem;
  line-height: 1.65;
}

.logo-pair {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dark-logo-panel {
  background: #101820;
  border-color: #253241;
}

.logo-pair {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.logo-pair.dark-logo-panel {
  display: inline-flex;
  background: linear-gradient(135deg, #101820, #172536);
  padding: 1.1rem 1.35rem;
}

.logo-pair img {
  display: block;
  max-height: 96px;
  max-width: 220px;
  object-fit: contain;
}

.kicker,
.card-label {
  margin: 0 0 0.75rem;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-row,
.row-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.button,
.journal-link .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

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

.button.primary:hover {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

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

.button.secondary:hover {
  border-color: var(--accent);
}

.metric-grid,
.article-grid,
.topic-grid {
  display: grid;
  gap: 1rem;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0 4rem;
}

.metric-grid article,
.article-card,
.article-row,
.topic-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-grid article {
  padding: 1.25rem;
}

.metric-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.metric-grid strong {
  display: block;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 0.7rem;
}

.metric-grid p,
.article-card p,
.article-row p,
.topic-grid p {
  color: var(--muted);
  line-height: 1.6;
}

.section-block {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
}

.section-block.quiet {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2rem;
  margin-top: 2rem;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  letter-spacing: 0;
}

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

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

.article-card {
  padding: 1.5rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.article-card.project-card {
  border-top: 4px solid #ff6b35;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: contain;
  padding: 0.6rem;
  margin-bottom: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.feature-thumb {
  object-fit: cover;
  padding: 0;
  background: #101820;
}

.article-card:hover,
.article-row:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 122, 114, 0.55);
  box-shadow: 0 14px 28px rgba(24, 34, 45, 0.08);
}

.article-card h3,
.article-row h2 {
  letter-spacing: 0;
  line-height: 1.2;
}

.article-card h3 a,
.article-row h2 a {
  color: var(--ink);
  text-decoration: none;
}

.article-card h3 a:hover,
.article-row h2 a:hover {
  color: var(--accent-dark);
}

.text-link {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
}

.card-actions {
  align-items: center;
}

.article-list {
  display: grid;
  gap: 1rem;
}

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.article-row.project-row {
  grid-template-columns: 160px minmax(0, 1fr) auto;
}

.row-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101820;
}

.row-actions {
  min-width: 170px;
  justify-content: flex-end;
  margin-top: 0;
}

.topic-grid article {
  padding: 1.5rem;
}

.journal-link {
  margin: 0 0 1.75rem;
}

.brief-box {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.4rem;
  background: var(--tint);
  border: 1px solid rgba(22, 122, 114, 0.25);
  border-radius: 8px;
}

.brief-box h2 {
  margin-top: 0 !important;
  font-size: 1.25rem;
}

.brief-box p,
.brief-box li {
  color: var(--ink);
}

.blog-figure {
  margin: 2rem 0;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(24, 34, 45, 0.06);
}

.blog-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.blog-figure figcaption {
  margin: 0.75rem 0.15rem 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.site-footer {
  box-sizing: border-box;
  width: 100vw;
  margin: 4rem calc(50% - 50vw) 0;
  padding: 2.25rem 1.25rem;
  background: #f2f3f5;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1120px, calc(100vw - 2.5rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(280px, 1fr) minmax(240px, auto);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.footer-logo img {
  display: block;
  max-height: 52px;
  width: auto;
}

.site-footer p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer strong {
  color: var(--ink);
  font-size: 1rem;
}

.site-footer a {
  font-weight: 700;
}

.footer-inner > div:nth-child(2) p {
  max-width: 560px;
}

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

.footer-contact p {
  white-space: nowrap;
}

#title-block-header {
  padding-top: 2rem;
}

main.content {
  line-height: 1.72;
}

main.content h2 {
  margin-top: 2.2rem;
  letter-spacing: 0;
}

main.content p,
main.content li {
  font-size: 1.02rem;
}

@media (max-width: 820px) {
  .site-shell {
    padding-top: 2rem;
  }

  .intro-panel,
  .page-header {
    padding: 2rem 0;
  }

  .metric-grid,
  .article-grid,
  .topic-grid,
  .article-row {
    grid-template-columns: 1fr;
  }

  .article-row.project-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
  }

  .row-thumb {
    max-width: 280px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .footer-contact {
    text-align: left;
  }

  .footer-contact p {
    white-space: normal;
  }
}
