:root {
  --bg: #111110;
  --text: #a39e93;
  --bright: #f4f1ea;
  --muted: #8a847a;
  --pill-border: rgba(244, 241, 234, 0.28);
  --sans: Inter, system-ui, -apple-system, sans-serif;
  --sidebar: minmax(240px, 340px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #3a3832;
  color: var(--bright);
}

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

:focus-visible {
  outline: 2px solid var(--bright);
  outline-offset: 3px;
}

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10;
  padding: 8px 12px;
  background: var(--bright);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transform: translateY(-150%);
}

.skip:focus { transform: none; }

.shell {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.sidebar h1,
.role,
main h2,
.entry h3,
.meta,
.when,
strong {
  color: var(--bright);
}

.sidebar h1 {
  margin: 0;
  font-size: clamp(32px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.role {
  margin: 12px 0 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.3;
}

.nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 36px;
}

.nav a {
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active { color: var(--bright); }

.social {
  display: flex;
  gap: 14px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--text);
}

.social a:hover { color: var(--bright); }

.social svg { width: 22px; height: 22px; }

main h2 {
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 700;
}

main section { scroll-margin-top: 32px; }

main section + section { margin-top: 64px; }

main p { margin: 0 0 16px; }

main p:last-child { margin-bottom: 0; }

strong { font-weight: 650; }

.entry {
  position: relative;
  margin: 8px -16px 0;
  padding: 16px;
  border-radius: 10px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.entry h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.4;
}

.entry:focus-within {
  outline: 2px solid var(--bright);
  outline-offset: 3px;
}

.entry h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.entry h3 span {
  display: inline-block;
  transition: transform 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
  .entry:hover { background: rgba(244, 241, 234, 0.07); }

  section:has(.entry:hover) .entry:not(:hover) { opacity: 0.4; }

  .entry:hover h3 span { transform: translate(3px, -3px); }
}

.entry-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.meta,
.when {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.entry-top .when { margin: 0; white-space: nowrap; }

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.pills li {
  padding: 4px 12px;
  border: 1px solid var(--pill-border);
  border-radius: 999px;
  color: var(--bright);
  font-size: 12px;
  line-height: 1.4;
}

.missing {
  min-height: 70vh;
  display: grid;
  align-content: center;
  gap: 12px;
  width: min(640px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.missing h1 {
  margin: 0;
  color: var(--bright);
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
}

.missing p { margin: 0; }

.missing a {
  color: var(--bright);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (min-width: 900px) {
  .shell {
    display: grid;
    grid-template-columns: var(--sidebar) minmax(0, 1fr);
    column-gap: 64px;
    align-items: start;
    min-height: 100vh;
    padding: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    padding: 88px 0 48px;
  }

  .social { margin-top: 0; }

  main { padding: 88px 0 96px; }
}

@media (max-width: 560px) {
  .entry-top { flex-wrap: wrap; }
  .entry-top .when { margin-top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
