@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;600&family=Nunito:wght@400;600;700;800&display=swap");

:root {
  --sw-primary: #0f4c81;
  --sw-primary-strong: #0b3a66;
  --sw-secondary: #0f766e;
  --sw-accent: #b7791f;
  --sw-bg-paper: #ffffff;
  --sw-ink: #1f2937;
  --sw-muted: #4b5563;
  --sw-border: #d3dce8;
  --sw-shadow: 0 14px 34px rgba(15, 76, 129, 0.13);
}

body {
  font-family: "Nunito", sans-serif;
  color: var(--sw-ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(15, 76, 129, 0.2), transparent 35%),
    radial-gradient(circle at 90% 10%, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(180deg, #f3f7fc 0%, #f8fbff 42%, #f6fbfa 100%);
}

main h1,
main h2,
main h3,
main h4,
main h5,
main h6,
.navbar-title {
  font-family: "Fraunces", serif;
  letter-spacing: 0.01em;
}

pre,
code,
kbd,
samp {
  font-family: "JetBrains Mono", monospace;
}

.navbar {
  border-bottom: 1px solid rgba(15, 76, 129, 0.25);
  backdrop-filter: blur(11px);
  background: rgba(244, 249, 255, 0.84);
}

.navbar-title {
  font-weight: 700;
}

#quarto-content main {
  max-width: 1120px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.72fr) minmax(250px, 0.88fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.hero-card {
  border: 1px solid var(--sw-border);
  border-radius: 18px;
  padding: 1.42rem;
  background:
    linear-gradient(135deg, rgba(15, 76, 129, 0.17), rgba(180, 205, 230, 0.15) 52%, rgba(15, 118, 110, 0.13));
  box-shadow: var(--sw-shadow);
  animation: rise-in 0.62s ease-out both;
}

.hero-main .hero-lead {
  color: #27374c;
  font-size: 1.08rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.62rem;
  margin-top: 0.95rem;
}

.hero-buttons a {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.43rem 0.95rem;
  text-decoration: none;
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.hero-buttons a:nth-child(1),
.hero-buttons a:nth-child(3) {
  color: #fff;
  background: linear-gradient(120deg, var(--sw-primary), #1f67a2);
}

.hero-buttons a:nth-child(2),
.hero-buttons a:nth-child(4) {
  color: #fff;
  background: linear-gradient(120deg, #0f7f75, #166c96);
}

.hero-buttons a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 76, 129, 0.25);
}

.profile-card {
  border: 1px solid var(--sw-border);
  border-radius: 18px;
  background: var(--sw-bg-paper);
  padding: 1rem;
  box-shadow: var(--sw-shadow);
  animation: rise-in 0.7s ease-out both;
}

.profile-photo {
  width: 100%;
  max-width: 222px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 2px solid rgba(15, 76, 129, 0.2);
  box-shadow: 0 12px 26px rgba(15, 76, 129, 0.18);
}

.profile-name {
  margin-top: 0.75rem;
  margin-bottom: 0.24rem;
  font-family: "Fraunces", serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.profile-role {
  color: var(--sw-muted);
  font-size: 0.94rem;
  line-height: 1.44;
}

.interest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.interest-chip {
  border: 1px solid rgba(15, 76, 129, 0.35);
  color: #0d406f;
  border-radius: 999px;
  background: #eef5ff;
  padding: 0.25rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.snapshot-grid {
  margin: 1.2rem 0 1.1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 0.75rem;
}

.snapshot-item {
  border: 1px solid var(--sw-border);
  border-radius: 10px;
  background: var(--sw-bg-paper);
  padding: 0.82rem 0.9rem;
}

.snapshot-number {
  color: var(--sw-primary-strong);
  font-family: "Fraunces", serif;
  font-size: 1.52rem;
  font-weight: 700;
}

.snapshot-label {
  color: var(--sw-muted);
  font-size: 0.88rem;
}

.card-list {
  display: grid;
  gap: 0.84rem;
  margin-top: 0.5rem;
}

.entry-card {
  border: 1px solid var(--sw-border);
  border-left: 4px solid var(--sw-primary);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  background: var(--sw-bg-paper);
  box-shadow: 0 10px 22px rgba(15, 76, 129, 0.09);
  animation: rise-in 0.55s ease-out both;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.entry-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 25px rgba(15, 76, 129, 0.14);
}

.entry-card h4,
.entry-card h5 {
  margin: 0 0 0.36rem;
}

.two-col-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.92rem;
}

.feature-card {
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f8ff 100%);
  padding: 0.92rem 1rem;
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.09);
}

.feature-card h4 {
  margin-top: 0;
}

.section-note {
  border-left: 4px solid var(--sw-accent);
  background: #fff8ed;
  padding: 0.72rem 0.92rem;
  border-radius: 8px;
  color: #7c4f17;
  margin: 0.86rem 0 1.35rem;
}

.visitor-grid {
  margin-top: 0.62rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.visitor-stat {
  border: 1px solid #d8e2ee;
  border-radius: 10px;
  background: #f6faff;
  padding: 0.65rem 0.75rem;
}

.visitor-stat .label {
  display: block;
  color: #52606d;
  font-size: 0.78rem;
}

.visitor-stat .value {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.18rem;
  color: #24344d;
}

.visitor-counter {
  margin-top: 0.85rem;
  border: 1px solid #d7e1eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.72rem;
  box-shadow: 0 8px 20px rgba(15, 76, 129, 0.1);
}

.visitor-globe {
  width: 100%;
  height: 340px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d4e0ec;
  background: radial-gradient(circle at 35% 12%, #1c2957 0%, #111827 62%, #0d1324 100%);
}

.globe-note {
  margin: 0.55rem 0 0;
  color: #526174;
  font-size: 0.84rem;
}

.globe-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  color: #f0f4ff;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.analytics-hidden {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.quarto-title-block .description {
  color: var(--sw-muted);
}

.page-section-divider {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, rgba(15, 76, 129, 0), rgba(15, 76, 129, 0.56), rgba(15, 76, 129, 0));
  margin: 1.32rem 0;
}

.project-safe-note {
  border-left: 4px solid var(--sw-secondary);
  background: #edf9f8;
  padding: 0.74rem 0.92rem;
  border-radius: 8px;
  color: #21545f;
  margin: 0.8rem 0 1.2rem;
}

.project-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.65rem;
}

.project-metric-chips {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.62rem;
}

.project-metric-chip {
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  background: #f4f8ff;
  padding: 0.62rem 0.72rem;
  display: grid;
  gap: 0.22rem;
}

.project-metric-chip .k {
  font-size: 0.76rem;
  color: #4d6078;
  font-weight: 700;
}

.project-metric-chip .v {
  font-size: 0.88rem;
  color: #1f2d43;
}

.project-figure-grid-2 {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.project-figure-grid-3 {
  margin-top: 0.72rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.82rem;
}

.project-figure-card {
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 0.66rem;
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.09);
  transition: transform 130ms ease, box-shadow 130ms ease;
}

.project-figure-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(15, 76, 129, 0.14);
}

.project-figure-card img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #dbe4ef;
  object-fit: cover;
}

.project-hero-grid .project-figure-card img {
  aspect-ratio: 16 / 9;
}

.project-figure-grid-2 .project-figure-card img,
.project-figure-grid-3 .project-figure-card img {
  aspect-ratio: 16 / 10;
}

.project-figure-card p {
  margin: 0.54rem 0 0;
  font-size: 0.88rem;
  color: #283a53;
  line-height: 1.45;
}

.project-figure-caption-cn {
  color: #5f6d83;
  font-size: 0.8rem;
}

.project-evidence-table {
  margin-top: 0.78rem;
  border: 1px solid var(--sw-border);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
}

.project-evidence-table table {
  margin-bottom: 0;
}

.project-evidence-table thead th {
  background: #eef4fc;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .profile-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.9rem;
    align-items: center;
  }

  .profile-photo {
    max-width: 140px;
  }

  .two-col-grid {
    grid-template-columns: 1fr;
  }

  .project-hero-grid,
  .project-figure-grid-2,
  .project-figure-grid-3 {
    grid-template-columns: 1fr;
  }

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

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

  .visitor-globe {
    height: 310px;
  }
}

@media (max-width: 640px) {
  .hero-card,
  .profile-card,
  .entry-card,
  .feature-card {
    padding: 0.9rem;
  }

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

  .profile-photo {
    max-width: 190px;
  }

  .project-metric-chips {
    grid-template-columns: 1fr;
  }

  .visitor-globe {
    height: 280px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
