/* ooger.de: one small stylesheet, no external fonts or frameworks */

/* Self-hosted fonts, served unmodified (OFL 1.1, see /assets/fonts/*-OFL.txt).
   Noto Sans for headings and UI, Libron for running text. */
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/NotoSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/NotoSans-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/NotoSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Noto Sans"; src: url("/assets/fonts/NotoSans-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Italic.ttf") format("truetype"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libron"; src: url("/assets/fonts/Libron-BoldItalic.ttf") format("truetype"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --bg: #fbfaf7;
  --fg: #1f2328;
  --muted: #5f6670;
  --line: #dcd8cf;
  --accent: #2b4a73;      /* the bag's navy */
  --accent-soft: #e6ecf4;
  --todo-bg: #fff6d6;
  --todo-line: #d9b43c;
  --card: #ffffff;
  --measure: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15181c;
    --fg: #e6e3dc;
    --muted: #9aa1aa;
    --line: #2f343b;
    --accent: #8fb0dc;
    --accent-soft: #1f2a38;
    --todo-bg: #3a3216;
    --todo-line: #9c8330;
    --card: #1c2025;
  }
}
:root[data-theme="dark"] {
  --bg: #15181c; --fg: #e6e3dc; --muted: #9aa1aa; --line: #2f343b;
  --accent: #8fb0dc; --accent-soft: #1f2a38; --todo-bg: #3a3216; --todo-line: #9c8330; --card: #1c2025;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.6 "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-text-size-adjust: 100%;
}

main, .site-header, .site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

main :is(p, li, blockquote, figcaption) { font-family: "Libron", Georgia, serif; }

h1, h2, h3 { line-height: 1.25; text-wrap: balance; }
h1 { font-size: 2rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--line); }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

img, svg, video { max-width: 100%; height: auto; }

code { font-size: 0.92em; background: var(--accent-soft); padding: 0.1em 0.3em; border-radius: 4px; }
pre { overflow-x: auto; background: var(--accent-soft); padding: 0.75rem 1rem; border-radius: 6px; }
pre code { background: none; padding: 0; }
blockquote { margin: 1rem 0; padding: 0.25rem 1rem; border-left: 3px solid var(--accent); color: var(--muted); }
table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 0.4rem 0.75rem 0.4rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }

/* ---- Header / footer ---- */
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding-top: 1rem; padding-bottom: 0.5rem; }
.site-name { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--fg); }
.site-logo { height: 1.4em; width: auto; color: var(--accent); }
.crumb { color: var(--muted); text-decoration: none; }
a.crumb:hover { color: var(--accent); }
.site-footer { margin-top: 4rem; padding-top: 1rem; padding-bottom: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

/* ---- Project navigation ---- */
.project-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
.project-nav a { text-decoration: none; color: var(--muted); padding: 0.2rem 0; }
.project-nav a:hover { color: var(--accent); }
.project-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.meta { color: var(--muted); margin: 1.5rem 0 -0.75rem; font-size: 0.95rem; }

/* ---- Figures & photo placeholders ---- */
figure { margin: 1.5rem 0; }
figure img { display: block; border-radius: 6px; width: 100%; }
figure.small { max-width: 24rem; }
figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.4rem; }
.img-todo {
  display: block; padding: 1.5rem 1rem; border: 2px dashed var(--todo-line); background: var(--todo-bg);
  border-radius: 6px; font-size: 0.92rem; color: var(--fg);
}
/* Make "TODO:" placeholders in text easy to spot while drafting */
mark.todo { background: var(--todo-bg); color: inherit; padding: 0 0.15em; border-radius: 3px; font-weight: 600; }
@media print { mark.todo { background: none; } }

/* ---- Start page ---- */
.intro { margin-bottom: 2rem; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  overflow: hidden; text-decoration: none; color: var(--fg); transition: border-color 0.15s;
}
.card:hover { border-color: var(--accent); }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card-body { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.75rem 1rem 1rem; }
.card-body span { color: var(--muted); font-size: 0.95rem; }

/* ---- 3D viewer ---- */
.viewer-3d model-viewer {
  display: block;
  width: 100%; height: auto; aspect-ratio: 4 / 3; max-height: 70vh;
  background: radial-gradient(circle at 50% 40%, var(--card), var(--accent-soft));
  border: 1px solid var(--line); border-radius: 8px;
  --poster-color: transparent;
}

/* ---- Pattern viewer ---- */
.pv-toolbar { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.pv-toolbar button {
  font: inherit; min-width: 2.5rem; padding: 0.3rem 0.7rem; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
}
.pv-toolbar button:hover { border-color: var(--accent); }
.pv-readout { margin-left: auto; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.pv-stage {
  position: relative; height: min(70vh, 34rem); overflow: hidden; touch-action: none; cursor: grab;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.pv-stage:active { cursor: grabbing; }
.pv-stage:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pv-stage svg { width: 100%; height: 100%; display: block; }
.pv-hint { color: var(--muted); font-size: 0.9rem; }

/* ---- Build log list ---- */
.log-list { padding-left: 1.25rem; }
.log-list li { margin-bottom: 0.75rem; }
.log-list .log-day { color: var(--muted); font-size: 0.9rem; margin-left: 0.25rem; }
.log-list span { color: var(--muted); }

/* ---- Print: just the article, black on white ---- */
@media print {
  :root { --fg: #000; --bg: #fff; --muted: #333; --accent: #000; }
  .site-header, .project-nav, .pager, .site-footer, .viewer-3d, .pattern-viewer, script { display: none !important; }
  body { font-size: 11pt; }
  main { max-width: none; padding: 0; }
  a { color: #000; text-decoration: none; }
  figure, .img-todo { break-inside: avoid; }
  figure img { max-height: 9cm; width: auto; }
  h2 { break-after: avoid; border-top: none; }
}

