:root {
  --bg: #0b0e11;
  --surface-a: #10151a;
  --surface-b: #0d1216;
  --surface-c: #13181d;
  --text: #eef1f4;
  --body: #c3cad2;
  --muted: #8e98a3;
  --line: rgba(255,255,255,.105);
  --line-soft: rgba(255,255,255,.065);
  --accent: #87b4e6;
  --accent-soft: rgba(135,180,230,.13);
  --max: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { max-width: 100%; display: block; }
.shell { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(11,14,17,.91);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-id {
  color: #d8dde3;
  text-decoration: none;
  font-size: .91rem;
  font-weight: 650;
  letter-spacing: -.015em;
}
.site-id span { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 23px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
}
.nav-links a:hover, .site-id:hover { color: var(--text); }

.intro-section { background: var(--bg); }
.intro {
  padding: 82px 0 88px;
  display: grid;
  grid-template-columns: .8fr 1.45fr;
  gap: 82px;
  align-items: start;
}
.intro h1 {
  margin: 0 0 7px;
  font-size: clamp(2.55rem, 5vw, 3.75rem);
  line-height: 1.03;
  letter-spacing: -.05em;
  font-weight: 720;
}
.role {
  margin: 0;
  color: var(--accent);
  font-size: 1.07rem;
  font-weight: 650;
}
.lead {
  max-width: 740px;
  margin: 0 0 14px;
  color: #e1e5e9;
  font-size: clamp(1.24rem, 2.2vw, 1.52rem);
  line-height: 1.48;
  letter-spacing: -.018em;
}
.intro-copy {
  max-width: 750px;
  margin: 0 0 23px;
  color: var(--body);
  font-size: 1.02rem;
}
.text-links { display: flex; flex-wrap: wrap; gap: 18px; }
.text-links a, .work-footer a, .work-links a {
  color: #d8e2ed;
  text-decoration: none;
  font-size: .91rem;
  font-weight: 600;
}
.text-links a:hover, .work-footer a:hover, .work-links a:hover { color: var(--accent); }

.section-band { padding: 80px 0 84px; scroll-margin-top: 56px; }
.work-band { background: var(--surface-a); }
.experience-band { background: var(--surface-b); }
.about-band { background: var(--surface-c); }
.band-heading {
  display: grid;
  grid-template-columns: .8fr 1.45fr;
  gap: 82px;
  align-items: start;
  margin-bottom: 43px;
}
.section-label {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  margin-bottom: 5px;
}
.band-heading h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  letter-spacing: -.038em;
  line-height: 1.1;
}
.band-heading > p {
  margin: 4px 0 0;
  color: var(--muted);
  max-width: 680px;
}

.work-list { border-top: 1px solid var(--line); }
.work-item {
  display: grid;
  grid-template-columns: .8fr 1.45fr;
  gap: 82px;
  padding: 36px 0 38px;
  border-bottom: 1px solid var(--line);
}
.work-side {
  display: grid;
  align-content: start;
  gap: 3px;
  color: var(--muted);
  font-size: .84rem;
}
.work-content { min-width: 0; }
.work-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 11px;
}
.work-content h3 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.18;
  letter-spacing: -.032em;
}
.work-content > p {
  max-width: 760px;
  margin: 0 0 17px;
  color: var(--body);
}
.quiet-stat {
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}
.work-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 17px 0 18px;
  color: var(--muted);
  font-size: .83rem;
}
.work-evidence span { position: relative; }
.work-evidence span + span::before {
  content: "·";
  position: absolute;
  left: -13px;
  color: #59636d;
}
.work-evidence strong { color: #dbe1e7; font-weight: 650; }
.work-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding-top: 15px;
  border-top: 1px solid var(--line-soft);
}
.stack { color: var(--muted); font-size: .82rem; }
.work-links { display: inline-flex; gap: 16px; flex: 0 0 auto; }

/* Compact badge inspired by the simple repository statistic badges common on research/open-source sites. */
.repo-badge {
  display: inline-flex;
  align-items: stretch;
  height: 24px;
  overflow: hidden;
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: .72rem;
  line-height: 24px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.repo-badge-label {
  padding: 0 8px;
  background: #343a40;
  color: #f3f4f5;
}
.repo-badge strong {
  min-width: 44px;
  padding: 0 8px;
  background: #3178a8;
  color: white;
  font-weight: 700;
  text-align: center;
}
.repo-badge:hover { filter: brightness(1.09); }

.experience-list { border-top: 1px solid var(--line); }
.experience-item {
  display: grid;
  grid-template-columns: .8fr 1.45fr;
  gap: 82px;
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--line);
}
.experience-date { color: var(--muted); font-size: .86rem; padding-top: 2px; }
.experience-main h3 { margin: 0 0 3px; font-size: 1.13rem; letter-spacing: -.015em; }
.experience-role { color: #b2bbc5; font-size: .92rem; margin-bottom: 8px; }
.experience-main p { margin: 0; color: var(--muted); max-width: 760px; }

.about-layout {
  display: grid;
  grid-template-columns: .8fr 1.45fr;
  gap: 82px;
  align-items: start;
}
.about-copy { grid-column: 2; color: var(--body); font-size: 1.01rem; }
.about-copy p:first-child { margin-top: 0; }
.about-copy p:last-child { margin-bottom: 0; }
.facts-list {
  grid-column: 2;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 28px;
  border-top: 1px solid var(--line);
}
.facts-list div { padding: 15px 0 17px; border-bottom: 1px solid var(--line-soft); }
.facts-list dt {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.facts-list dd { margin: 0; color: #d7dde3; font-size: .9rem; }

/* Project detail pages */
.page-hero { padding: 78px 0 50px; }
.page-hero .back { color: var(--muted); text-decoration: none; font-size: .88rem; }
.page-hero .back:hover { color: var(--text); }
.page-hero h1 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -.05em;
  margin: 25px 0 16px;
  max-width: 900px;
}
.page-hero h1 .download-badge {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 12px;
  height: 24px;
  line-height: 24px;
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
  transform: translateY(-6px);
}
.page-hero h1 .download-badge span,
.page-hero h1 .download-badge b {
  flex: 0 0 auto;
  padding: 0 8px;
}
.page-hero p { max-width: 800px; color: var(--body); font-size: 1.12rem; }
.page-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tag { border: 1px solid var(--line); color: var(--muted); border-radius: 999px; padding: 4px 9px; font-size: .78rem; }



.download-badge {
  display: inline-flex;
  height: 20px;
  overflow: hidden;
  border-radius: 4px;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .59rem;
  line-height: 20px;
  white-space: nowrap;
  transform: translateY(1px);
}

.download-badge span,
.download-badge b { padding: 0 6px; }

.download-badge span {
  background: #343b43;
  color: #f1f3f5;
  font-weight: 500;
}

.download-badge b {
  min-width: 42px;
  background: #4c7199;
  color: #fff;
  text-align: center;
  font-weight: 750;
}

.download-badge:hover { filter: brightness(1.09); }

.page-download-stat { margin-top: 20px; }

.section { padding: 70px 0; border-top: 1px solid var(--line-soft); }
.case-grid { display: grid; grid-template-columns: 190px 1fr; gap: 55px; }
.case-nav { position: sticky; top: 84px; align-self: start; display: grid; gap: 8px; }
.case-nav a { color: var(--muted); text-decoration: none; font-size: .86rem; }
.case-nav a:hover { color: var(--text); }
.case-content { max-width: 790px; }
.case-content section { margin-bottom: 56px; scroll-margin-top: 90px; }
.case-content h2 { font-size: 1.7rem; margin: 0 0 13px; letter-spacing: -.03em; }
.case-content h3 { margin-top: 28px; }
.case-content p, .case-content li { color: #b9c1ca; }
.case-content ul { padding-left: 20px; }
.callout { border-left: 2px solid var(--accent); background: var(--accent-soft); padding: 13px 16px; color: #cbd7e8; margin: 20px 0; }
.video-box { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #0e1217; min-height: 420px; display: grid; place-items: center; color: #68737f; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,.025);
  font-size: .88rem;
  font-weight: 600;
}
.button:hover { background: rgba(255,255,255,.055); }
.button.subtle { background: transparent; }

.footer { background: var(--bg); border-top: 1px solid var(--line-soft); padding: 32px 0 44px; color: var(--muted); font-size: .86rem; }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); }

@media (max-width: 820px) {
  .nav-links a:not(.keep-mobile) { display: none; }
  .intro, .band-heading, .work-item, .experience-item, .about-layout { grid-template-columns: 1fr; gap: 22px; }
  .intro { padding: 62px 0 68px; }
  .section-band { padding: 64px 0 68px; }
  .about-copy, .facts-list { grid-column: 1; }
  .facts-list { grid-template-columns: 1fr 1fr; }
  .work-title-row { align-items: flex-start; }
  .case-grid { grid-template-columns: 1fr; }
  .case-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 8px; }
  .case-nav a { white-space: nowrap; }
}

@media (max-width: 560px) {
  .shell { width: min(calc(100% - 30px), var(--max)); }
  .site-id span { display: none; }
  .intro h1 { font-size: 2.7rem; }
  .work-title-row { display: block; }
  .repo-badge, .quiet-stat { display: inline-flex; margin-top: 9px; }
  .work-evidence { display: grid; gap: 7px; }
  .work-evidence span + span::before { display: none; }
  .work-footer { align-items: flex-start; flex-direction: column; gap: 10px; }
  .facts-list { grid-template-columns: 1fr; }
}
