:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --surface-muted: #eef4f8;

  --text: #172033;
  --text-soft: #5d6980;
  --text-muted: #7a8799;

  --border: #e5ebf2;
  --border-strong: #d8e1ea;

  --brand: #1f6feb;
  --brand-dark: #184ea6;
  --accent: #20b486;
  --navy: #101828;

  --shadow-sm: 0 10px 30px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 18px 48px rgba(16, 24, 40, 0.08);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;

  --container-max: 1160px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.site-container {
  max-width: var(--container-max);
}

a {
  text-decoration: none;
}

/* ── Navbar ── */
.site-header .navbar {
  background: linear-gradient(135deg, #111827 0%, #172033 100%);
  padding-top: 1rem;
  padding-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.navbar-brand {
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-logo {
  border-radius: 8px;
  object-fit: cover;
}

.brand-text {
  color: #fff;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

/* ── Hero ── */
.hero-section {
  padding: 5.5rem 0 4.5rem;
  background:
    radial-gradient(circle at top left, rgba(32, 180, 134, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(31, 111, 235, 0.10), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.hero-title,
.page-title {
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-lead,
.page-lead,
.section-subtitle {
  font-size: 1.08rem;
  color: var(--text-soft);
  max-width: 760px;
}

/* ── Shared card/panel surfaces ── */
.hero-panel,
.callout-panel,
.content-panel,
.side-panel,
.content-box,
.filter-bar,
.project-sidebar,
.list-project-card,
.project-card,
.info-card,
.member-card,
.team-feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  padding: 1.25rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.hero-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
}

.hero-card-label {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.hero-card-value {
  margin-top: 0.25rem;
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-note {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.08), rgba(32, 180, 134, 0.08));
  color: var(--text-soft);
}

/* ── Pills & Tags ── */
.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1;
}

.meta-pill-ongoing {
  border-color: rgba(32, 180, 134, 0.4);
  color: #0d7a56;
  background: rgba(32, 180, 134, 0.08);
}

.meta-pill-completed {
  border-color: rgba(31, 111, 235, 0.3);
  color: var(--brand-dark);
  background: rgba(31, 111, 235, 0.06);
}

.meta-pill-on-hold {
  border-color: rgba(180, 120, 32, 0.35);
  color: #8a5a00;
  background: rgba(180, 120, 32, 0.07);
}

.hero-mini-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ── Buttons ── */
.btn {
  border-radius: 999px;
  font-weight: 600;
  padding-left: 1.15rem;
  padding-right: 1.15rem;
}

.btn-brand {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border: none;
  color: #fff;
  box-shadow: 0 14px 30px rgba(31, 111, 235, 0.22);
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  opacity: 0.96;
}

.btn-soft {
  background: #fff;
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.btn-soft:hover,
.btn-soft:focus {
  background: #f8fbff;
  color: var(--text);
}

/* ── Sections ── */
.section-block {
  padding: 5rem 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(255,255,255,0.2) 0%, rgba(238,244,248,0.7) 100%);
}

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

.section-title,
.content-title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.info-card,
.content-box {
  padding: 1.5rem;
}

.icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand);
  background: rgba(31, 111, 235, 0.08);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-text {
  color: var(--text-soft);
  margin-bottom: 0;
}

/* ── Project cards ── */
.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.project-thumb,
.list-project-thumb,
.project-show-thumb {
  border-radius: 14px;
  border: 1px solid var(--border);
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
}

.project-thumb {
  height: 200px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
}

.project-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.35rem;
}

.project-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.project-title,
.list-project-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.65rem;
}

.project-text,
.list-project-text {
  color: var(--text-soft);
  margin-bottom: 1rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.text-link {
  color: var(--brand-dark);
  font-weight: 700;
}

.text-link:hover {
  color: var(--brand);
}

.text-link-sm {
  color: var(--brand-dark);
  font-weight: 600;
  font-size: 0.9rem;
}

.text-link-sm:hover {
  color: var(--brand);
}

/* ── Project content (rendered markdown) ── */
.project-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-top: 2rem;
  margin-bottom: 0.65rem;
}

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

.project-content p {
  color: var(--text-soft);
}

.project-content ul,
.project-content ol {
  padding-left: 1.2rem;
  color: var(--text-soft);
}

.project-content li + li {
  margin-top: 0.3rem;
}

.project-content strong {
  color: var(--text);
}

.project-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  display: block;
  margin: 1.5rem 0;
}

.project-content em {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.project-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.project-content th,
.project-content td {
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  text-align: left;
}

.project-content th {
  background: var(--surface-soft);
  font-weight: 700;
  color: var(--text);
}

.project-content td {
  color: var(--text-soft);
}

/* ── Publication list (jekyll-scholar reference output) ── */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pub-entry {
  padding: 1rem 1.1rem;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  font-size: 0.93rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.pub-entry p,
.pub-entry ol,
.pub-entry li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pub-entry a {
  color: var(--brand);
}

/* Small icon badge floating to the right of the citation text */
.pub-entry-icon {
  float: right;
  font-size: 0.9rem;
  color: var(--brand);
  opacity: 0.45;
  margin-left: 0.6rem;
  margin-top: 0.1rem;
}

/* ── Skip link (accessibility) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--brand);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 9999;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ── Back to top ── */
.back-to-top {
  position: fixed;
  bottom: 1.75rem;
  right: 1.75rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(31, 111, 235, 0.35);
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1050;
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  background: var(--brand-dark);
}

/* ── Hero deployed card ── */
.hero-card-deployed {
  cursor: default;
  position: relative;
}

.label-icon {
  font-size: 0.75rem;
  opacity: 0.7;
  vertical-align: middle;
}

.tip-item {
  font-size: 0.88rem;
  padding: 0.15rem 0;
}

.project-section + .project-section {
  margin-top: 2rem;
}

/* ── Footer ── */
.site-footer {
  margin-top: 4rem;
  padding: 4rem 0 2rem;
  background: linear-gradient(135deg, #111827 0%, #172033 100%);
  color: rgba(255, 255, 255, 0.92);
}

.footer-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-text,
.footer-links li,
.footer-links a,
.footer-links span {
  color: rgba(255, 255, 255, 0.74);
}

.footer-links li + li {
  margin-top: 0.5rem;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.62);
  font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .hero-section,
  .section-block {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

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

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

  .hero-title,
  .page-title {
    font-size: 2.35rem;
  }

  .section-title,
  .content-title {
    font-size: 1.6rem;
  }
}
