:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --panel: #111;
  --panel-2: #171717;
  --text: #f1f1ed;
  --muted: #9a9a93;
  --line: #2a2a27;
  --accent: #c8ff3d;
  --max: 1180px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% -10%, #20261a 0, transparent 30rem), var(--bg); }
a { color: inherit; }
button, input { font: inherit; }
.shell { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.wordmark { text-decoration: none; font-weight: 800; letter-spacing: -.04em; font-size: 1.15rem; }
.wordmark span { color: var(--accent); }
.topbar nav a, .footer a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.topbar nav a:hover, .footer a:hover { color: var(--text); }
.hero { padding: 110px 0 92px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 20px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .73rem; font-weight: 700; }
h1 { margin: 0; max-width: 950px; font-size: clamp(3.5rem, 8vw, 7.4rem); line-height: .92; letter-spacing: -.075em; font-weight: 760; }
h1 em { color: var(--muted); font-style: normal; font-weight: 500; }
.lede { max-width: 720px; margin: 42px 0 48px; color: #b8b8b0; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.65; }
.stats { display: flex; gap: 54px; flex-wrap: wrap; }
.stats div { display: grid; gap: 5px; }
.stats strong { font-size: 1.05rem; }
.stats span { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.catalog { padding: 76px 0 120px; }
.catalog-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.05em; }
.search input { width: min(340px, 80vw); border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--text); padding: 13px 18px; outline: none; }
.search input:focus { border-color: #777; }
.skill-grid { display: grid; grid-template-columns: repeat(12, 1fr); border-top: 1px solid var(--line); }
.skill-card { grid-column: span 6; min-height: 270px; border-bottom: 1px solid var(--line); padding: 30px 32px 34px 0; display: flex; flex-direction: column; cursor: pointer; position: relative; }
.skill-card:nth-child(even) { border-left: 1px solid var(--line); padding-left: 32px; }
.skill-card:hover .card-arrow { transform: translate(5px, -5px); color: var(--accent); }
.card-index { color: var(--muted); font: 500 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.skill-card h3 { margin: auto 0 12px; font-size: clamp(1.7rem, 3vw, 2.5rem); letter-spacing: -.05em; }
.skill-card p { margin: 0; max-width: 520px; color: var(--muted); line-height: 1.55; }
.card-arrow { position: absolute; right: 28px; top: 28px; transition: transform .2s ease, color .2s ease; }
.empty { color: var(--muted); padding: 40px 0; }
.skill-dialog { width: min(860px, calc(100% - 24px)); max-height: 88vh; padding: 0; border: 1px solid #3a3a35; border-radius: 18px; background: var(--panel); color: var(--text); box-shadow: 0 30px 100px #000b; }
.skill-dialog::backdrop { background: #000b; backdrop-filter: blur(8px); }
.dialog-close { position: sticky; top: 18px; float: right; margin: 18px 18px 0 0; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #1d1d1a; color: var(--text); cursor: pointer; z-index: 2; }
.dialog-body { padding: 54px 64px 70px; }
.dialog-body h2 { margin-bottom: 18px; }
.dialog-description { color: var(--muted); line-height: 1.6; font-size: 1.05rem; margin-bottom: 36px; }
.dialog-source { display: inline-flex; margin-bottom: 42px; color: var(--accent); font: 600 .82rem ui-monospace, monospace; text-decoration: none; }
.markdown { border-top: 1px solid var(--line); padding-top: 28px; color: #d3d3cc; line-height: 1.7; }
.markdown h1, .markdown h2, .markdown h3 { letter-spacing: -.03em; line-height: 1.2; color: var(--text); }
.markdown h1 { font-size: 2rem; margin-top: 1.4em; }
.markdown h2 { font-size: 1.45rem; margin-top: 1.6em; }
.markdown h3 { font-size: 1.15rem; margin-top: 1.5em; }
.markdown code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #20201d; padding: .12em .35em; border-radius: 4px; }
.markdown pre { overflow: auto; padding: 18px; background: #090909; border: 1px solid var(--line); border-radius: 10px; }
.markdown pre code { background: transparent; padding: 0; }
.markdown li { margin: .35em 0; }
.footer { min-height: 110px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
  .shell { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding: 72px 0 64px; }
  .catalog-head { align-items: stretch; flex-direction: column; }
  .search input { width: 100%; }
  .skill-card { grid-column: 1 / -1; padding: 28px 0 30px; min-height: 230px; }
  .skill-card:nth-child(even) { border-left: 0; padding-left: 0; }
  .dialog-body { padding: 54px 24px 44px; }
  .footer { align-items: flex-start; flex-direction: column; justify-content: center; }
}
