/*
@font-face {
  font-family: 'Roboto-Bold';
  src: url('./assets/fonts/Roboto/Roboto-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-ExtraBold';
  src: url('./assets/fonts/Roboto/Roboto-ExtraBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-ExtraLight';
  src: url('./assets/fonts/Roboto/Roboto-ExtraLight.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-Light';
  src: url('./assets/fonts/Roboto/Roboto-Light.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-SemiBold';
  src: url('./assets/fonts/Roboto/Roboto-SemiBold.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-Thin';
  src: url('./assets/fonts/Roboto/Roboto-Thin.ttf') format('truetype');
}
*/

@font-face {
  font-family: 'Roboto-Black';
  src: url('./assets/fonts/Roboto/Roboto-Black.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-Medium';
  src: url('./assets/fonts/Roboto/Roboto-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'Roboto-Regular';
  src: url('./assets/fonts/Roboto/Roboto-Regular.ttf') format('truetype');
}

:root {
  --font-sans: Roboto-Regular, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji", ui-sans-serif, -system-ui, -apple-system;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --font: var(--font-sans);

  /* light theme colors */
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280; /* gray-500 */
  --card: #f8fafc; /* slate-50 */
  --border: #e5e7eb; /* gray-200 */
  --link: #0ea5e9; /* sky-500 */
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --text: #e6e6e6;
    --muted: #9ca3af;
    --card: #111215;
    --border: #1f2937;
    --link: #38bdf8;
  }
}

/* Theme switching via [dark-theme] */
html[data-theme="light"] {
  --bg: #ffffff; --text: #111; --muted: #6b7280; --card: #f8fafc; --border: #e5e7eb; --link: #0ea5e9;
}
html[data-theme="dark"] {
  --bg: #0b0b0c; --text: #e6e6e6; --muted: #9ca3af; --card: #111215; --border: #1f2937; --link: #38bdf8;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
}

h1 {
  font-family: Roboto-Black;
  font-size: 1.75em;
}

h2 {
  font-family: Roboto-Medium;
  font-size: 1.35em;
}

h3 {
  font-size: 1.15em;
}

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip:focus { position: static; width: auto; height: auto; padding: 8px; background: var(--card); border: 1px solid var(--border); }

.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); backdrop-filter: saturate(180%) blur(8px); z-index: 10; }
.site-header nav { display: flex; align-items: center; height: 56px; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.spacer { flex: 1; }
.btn { border: 1px solid var(--border); background: var(--card); color: var(--text); padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.btn:focus { outline: 2px solid var(--link); outline-offset: 2px; }

.intro h1 { margin: 24px 0 8px; }
.muted { color: var(--muted); }
.excerpt { margin-top: 6px; }

.code-inline {
  font-family: var(--font-mono);
  font-size: 0.8em;
  padding: 2px;
  background-color: #eee;
  color: #bc1515;
  border-radius: 4px;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 0.8em;
  white-space: pre;
  overflow-x: auto;
  width: 100%;
  border-radius: 4px;
  background-color: #eee;
  color: #bc1515;
  padding-left: 16px;
}

.highlighted-s {
  background-color: #ffff007d;
}

.posts { margin: 24px 0 56px; }
.post-card { padding: 16px; border: 1px solid var(--border); background: var(--card); border-radius: 12px; margin: 12px 0; }
.post-card h3 { margin: 0 0 4px; }
.post-card a { color: var(--text); text-decoration: none; }
.post-card a:hover { text-decoration: underline; }

.post-header h1 { margin-bottom: 0; }
.post { margin: 24px 0 56px; }
.post-content { font-size: 18px; }
.post-content p, .post-content ul, .post-content ol { margin: 1em 0; }
.post-content h2 { margin-top: 1.6em; border-top: 1px dashed var(--border); padding-top: .6em; }
.post-content h3 { margin-top: 1.2em; }

/* shows up if there >= two headers */
.toc { border: 1px solid var(--border); background: var(--card); border-radius: 12px; padding: 12px; margin: 16px 0 24px; }
.toc h2 { font-size: 14px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.toc ul { margin: 0; padding-left: 16px; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

.site-footer { border-top: 1px solid var(--border); padding: 24px 16px; }

@media (min-width: 900px) {
  .post-content { font-size: 19px; }
}
