:root {
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --faint: #8c8c8c;
  --line: #e6e6e6;
  --bg: #ffffff;
  --card: #fafafa;
  --green: #2ea043;
  --red: #d23f3f;
  --maxw: 1040px;
  --serif: Georgia, "Times New Roman", Cambria, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: #fff;
  padding: 8px 12px;
  border: 1px solid var(--line);
  z-index: 10;
}

/* ---------- NAV ---------- */
.nav {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  /* Solid background instead of backdrop-filter: blur() — the blur forces a
     full-viewport repaint on every scroll frame and is the main cause of jank. */
  background: #fff;
  z-index: 5;
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__brand {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
}
.nav__links {
  display: flex;
  gap: 30px;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14.5px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ---------- HERO ---------- */
.hero {
  padding-top: 92px;
  padding-bottom: 28px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
}
.hero__lede {
  font-size: clamp(19px, 2.4vw, 26px);
  color: #444;
  margin: 0;
  max-width: 760px;
  line-height: 1.4;
}

/* ---------- RULES / BLOCKS ---------- */
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 40px auto;
}
.block { padding: 12px 28px; }
.block__title {
  font-size: 26px;
  font-weight: 600;
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

/* ---------- OVERZICHT ---------- */
.cols-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.col {
  padding: 0 36px;
  border-left: 1px solid var(--line);
}
.col:first-child {
  padding-left: 0;
  border-left: 0;
}
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #f3f3f3;
  color: #555;
  margin-bottom: 18px;
}
.icon svg { width: 22px; height: 22px; }
.col__title {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 14px;
}
.col__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.col__list li {
  color: var(--muted);
  font-size: 14.5px;
  padding: 6px 0;
}

/* ---------- GITHUB ---------- */
.github {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: start;
}
.github__count {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}
.heatmap {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 11px);
  grid-auto-columns: 11px;
  gap: 3px;
}
.heatmap span {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: #ebedf0;
}
.heatmap .d1 { background: #c6e6c8; }
.heatmap .d2 { background: #7bc97f; }
.heatmap .d3 { background: #3aa64a; }
.heatmap .d4 { background: #1c7a2e; }
.heatmap__legend {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.heatmap__legend .lvl {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  display: inline-block;
}
.heatmap__legend .lvl:first-of-type { margin-left: 6px; }
.heatmap__legend .lvl:last-of-type { margin-right: 6px; }
.lvl-0 { background: #ebedf0; }
.lvl-1 { background: #c6e6c8; }
.lvl-2 { background: #7bc97f; }
.lvl-3 { background: #3aa64a; }
.lvl-4 { background: #1c7a2e; }

.github__subtitle {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin: 0 0 16px;
}
.langs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.langs li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14.5px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}
.langs__name { flex: 1; }
.langs__pct { color: var(--muted); }

/* ---------- PORTFOLIO ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px 18px;
  text-align: center;
  background: var(--bg);
}
.stat__label {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 500;
}
.stat__value {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.stat__value.pos { color: var(--green); }
.stat__value.neg { color: var(--red); }
.stat__sub {
  font-size: 12px;
  color: var(--faint);
  margin: 0;
}

.chart {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  position: relative;
}
.chart svg { display: block; width: 100%; height: auto; touch-action: none; }

/* hover tooltip */
.chart__tip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -100%);
  background: #1a1a1a;
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  padding: 7px 10px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.08s;
  z-index: 2;
}
.chart__tip b { font-weight: 600; }
.chart__tip .tip-date { color: #b9b9b9; display: block; font-size: 11px; margin-top: 1px; }

.pf-status {
  font-size: 12px;
  color: var(--faint);
  margin: 6px 2px 0;
}
.pf-status .live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 6px;
  vertical-align: middle;
}
.pf-status .live-dot.sim { background: #c9a227; }
.chart__note {
  font-size: 12.5px;
  color: var(--faint);
  margin: 12px 2px 0;
}

/* ---------- HOLDINGS TABLE ---------- */
.holdings { margin-top: 32px; }
.holdings__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
}
.holdings__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.holdings__table th {
  text-align: right;
  font-weight: 500;
  color: var(--faint);
  font-size: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.holdings__table th:first-child,
.holdings__table td:first-child { text-align: left; }
.holdings__table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  color: #444;
}
.holdings__table tr:last-child td { border-bottom: 0; }
.holdings__table tr:hover td { background: var(--card); }
.h-name { font-weight: 500; color: var(--ink); }
.h-ticker {
  color: var(--faint);
  font-size: 12px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}
.h-num { font-variant-numeric: tabular-nums; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.h-bar {
  display: inline-block;
  height: 6px;
  border-radius: 3px;
  background: #2ea043;
  vertical-align: middle;
  margin-right: 8px;
}

/* ---------- BOTTOM ---------- */
.bottom__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.socials {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.social {
  text-decoration: none;
  text-align: center;
  color: var(--ink);
}
.social__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #333;
  margin: 0 auto 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.social:hover .social__icon {
  border-color: #bdbdbd;
  transform: translateY(-2px);
}
.social__icon svg { width: 24px; height: 24px; }
.social__label {
  font-size: 13px;
  color: var(--muted);
}

.nu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nu li {
  position: relative;
  padding-left: 20px;
  color: #444;
  font-size: 15px;
  margin-bottom: 14px;
}
.nu li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #999;
}

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 28px 0;
  text-align: center;
  color: var(--faint);
  font-size: 13px;
}

/* ---------- PERFORMANCE ---------- */
/* Skip layout/paint for sections while they're off-screen. The reserved size
   keeps the scrollbar stable so there's no jump when they come into view. */
.block { content-visibility: auto; contain-intrinsic-size: auto 480px; }

.stat__value { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav__links { gap: 18px; }
  .cols-3 { grid-template-columns: 1fr; gap: 32px; }
  .col { padding: 0; border-left: 0; }
  .github { grid-template-columns: 1fr; gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bottom__grid { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 620px) {
  .nav__links { display: none; }
  .stats { grid-template-columns: 1fr; }
  .hero { padding-top: 56px; }
}
