/* Shared styles for the oernster.github.io profile hub.
   Hand-built, no build step. Dark theme, card grid, sticky top nav. */

:root {
  color-scheme: dark;
  --bg: #0b0f14;
  --panel: #11161c;
  --panel-2: #0e131a;
  --border: #1f2933;
  --text: #e6edf3;
  --muted: #9da7b3;
  --accent: #2f81f7;
  --radius: 16px;
  --maxw: 980px;
}

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

body {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; }

/* Sticky top navigation, present on every page. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 15, 20, 0.82);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 6px 4px;
  flex-wrap: wrap;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  white-space: nowrap;
}
.nav a:hover, .nav a:focus-visible { color: var(--text); border-color: var(--border); outline: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel); border-color: var(--border); }

/* Page shell. */
main { max-width: var(--maxw); margin: 0 auto; padding: 36px 24px 64px; }

.pagehead { margin-bottom: 8px; }
.pagehead h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.pagehead .role, .pagehead .lede { color: var(--muted); margin-top: 8px; font-size: 15.5px; }

h2.section { margin-top: 34px; margin-bottom: 2px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.section-note { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* Card grid. */
.grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  align-items: stretch;
}
.grid .wide { grid-column: 1 / -1; }
@media (max-width: 620px) { .grid { grid-template-columns: 1fr; } }

a.card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s ease, transform .15s ease;
}
a.card:hover, a.card:focus-visible { border-color: var(--accent); outline: none; }

.ic {
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 9px;
  object-fit: contain;
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ic img { width: 38px; height: 38px; object-fit: contain; border-radius: 9px; }
/* Monogram / emoji fallback tile for projects with no icon asset. */
.ic.mono {
  background: linear-gradient(160deg, #1b2530, #131a22);
  border: 1px solid var(--border);
  color: #a9c1dc;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}
.ic.emoji { background: #131a22; border: 1px solid var(--border); font-size: 20px; }

.card .body { display: flex; flex-direction: column; min-width: 0; }
.card .t { font-weight: 600; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.card .t .ext { color: var(--muted); font-size: 13px; font-weight: 500; }
.card .d { color: var(--muted); font-size: 15px; margin-top: 5px; }
.card .d code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 13px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; color: #c9d4e0; }
.card .count { color: var(--muted); font-size: 13.5px; margin-top: 6px; }

/* Footer. */
footer { max-width: var(--maxw); margin: 0 auto; padding: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
footer a:hover, footer a:focus-visible { color: var(--text); border-bottom-color: var(--border); outline: none; }
footer .row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
