/* ── SELF-HOSTED JETBRAINS MONO ─────────────────────────────────────────────── */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/jbm/jbm-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
                 U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('fonts/jbm/jbm-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm/jbm-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F,
                 U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jbm/jbm-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
                 U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
                 U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
                 U+FEFF, U+FFFD;
}

/* ── DESIGN TOKENS ───────────────────────────────────────────────────────────── */
:root {
  --bg:        #0d1117;
  --bg2:       #161b22;
  --bg3:       #21262d;
  --border:    #30363d;
  --green:     #3fb950;
  --green-dim: #2ea043;
  --cyan:      #58a6ff;
  --cyan-dim:  #1f6feb;
  --yellow:    #e3b341;
  --purple:    #bc8cff;
  --red:       #f85149;
  --text:      #c9d1d9;
  --muted:     #8b949e;
  --muted2:    #6e7681;
  --white:     #f0f6fc;
}

[data-theme="light"] {
  --bg:        #f6f8fa;
  --bg2:       #ffffff;
  --bg3:       #eaeef2;
  --border:    #d0d7de;
  --green:     #1a7f37;
  --green-dim: #2da44e;
  --cyan:      #0969da;
  --cyan-dim:  #218bff;
  --yellow:    #9a6700;
  --purple:    #8250df;
  --red:       #cf222e;
  --text:      #1f2328;
  --muted:     #636c76;
  --muted2:    #848d97;
  --white:     #1f2328;
}
[data-theme="light"] nav { background: rgba(246, 248, 250, 0.92); }

/* ── BASE ────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

::selection { background: var(--cyan-dim); color: var(--white); }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }
body { cursor: default; }
a, button, [role="button"] { cursor: pointer; }

/* ── NAV ─────────────────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(16px, 4vw, 48px);
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav-brand {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav-brand::before { content: '⎈'; color: var(--green); }
.nav-links {
  display: flex;
  gap: 0;
  list-style: none;
  overflow-x: auto;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  padding: 0 14px;
  height: 48px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); border-bottom-color: var(--border); }
.nav-links a.active { color: var(--cyan); border-bottom-color: var(--cyan); }
.nav-status {
  font-size: 11px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.nav-status::before { content: '●'; animation: blink 2s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ── THEME BUTTON ────────────────────────────────────────────────────────────── */
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--muted); color: var(--text); }

/* ── SECTION HEADER ──────────────────────────────────────────────────────────── */
.res-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.res-kind {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.res-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}
.res-ns {
  font-size: 11px;
  color: var(--muted2);
  margin-left: auto;
}
.res-ns span { color: var(--cyan); }

/* ── FOOTER ──────────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px clamp(16px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted2);
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
