:root {
  --paper: #f5f4f1;
  --ink: #111110;
  --soft: #6f6e6a;
  --line: #dcdad3;
  --hair: #e6e4dd;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* faint film grain — shared with the journal */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

a {
  color: inherit;
  text-decoration: none;
}

::selection { background: var(--ink); color: var(--paper); }

main {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin: 0 auto;
  padding: 104px 28px 64px;
}

/* ── intro ─────────────────────────────────────── */
.intro {
  margin-bottom: 120px;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.kicker {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 30px;
}
.intro h1 {
  font-family: "Fraunces", Georgia, serif;
  font-style: normal;
  font-weight: 400;
  font-size: clamp(56px, 13vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0 0 30px;
}
.lede {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink);
  max-width: 44ch;
  margin: 0;
}
.lede strong { font-weight: 500; }
.lede a {
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.lede a:hover { border-bottom-color: var(--ink); }

/* ── blocks ────────────────────────────────────── */
.block {
  margin-bottom: 104px;
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.block:nth-of-type(1) { animation-delay: 0.08s; }
.block:nth-of-type(2) { animation-delay: 0.16s; }

.label {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--soft);
  margin: 0 0 36px;
}
.block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.block-head .label { margin: 0; }
.note {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--soft);
  margin: 0;
}
.note em { font-style: normal; color: var(--ink); }

/* ── repos (index list) ────────────────────────── */
.repos {
  border-top: 1px solid var(--hair);
}
.repo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--hair);
  color: inherit;
  transition: padding-left 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
a.repo:hover { padding-left: 10px; }
.repo-main { min-width: 0; }
.repo-name {
  display: block;
  font-family: "Fraunces", Georgia, serif;
  font-style: normal;
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 5px;
}
.repo-desc {
  display: block;
  font-size: 14.5px;
  font-weight: 300;
  color: var(--soft);
  line-height: 1.5;
}
.repo-meta {
  flex-shrink: 0;
  text-align: right;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--soft);
  white-space: nowrap;
}
.repo-meta span { display: block; }
.repo-meta .repo-lang { color: var(--ink); margin-bottom: 4px; }

/* skeleton rows */
.repo.sk {
  display: block;
  height: 70px;
  border-bottom: 1px solid var(--hair);
  background: linear-gradient(100deg, transparent 20%, rgba(17, 17, 16, 0.04) 50%, transparent 80%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── footer ────────────────────────────────────── */
footer {
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--hair);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--soft);
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.24s both;
}
.journal-link {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease;
}
.journal-link:hover { border-bottom-color: var(--ink); }

/* ── language switch (monochrome) ─────────────── */
.lang-switch {
  position: absolute;
  top: 30px;
  right: 30px;
  display: inline-flex;
  gap: 12px;
  z-index: 10;
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0 0 4px;
  cursor: pointer;
  opacity: 0.38;
  border-bottom: 1px solid transparent;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.lang-switch button:hover { opacity: 0.75; }
.lang-switch button[aria-pressed="true"] {
  opacity: 1;
  border-bottom-color: var(--ink);
}
.lang-switch svg {
  display: block;
  width: 23px;
  height: 15px;
  border-radius: 1px;
  filter: grayscale(1) contrast(1.05);
}

/* ── motion ────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 540px) {
  main { padding: 80px 22px 56px; }
  .intro { margin-bottom: 88px; }
  .block { margin-bottom: 80px; }
  .lang-switch { top: 20px; right: 20px; }
  .repo { gap: 18px; }
}

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