/* pfeffer.or.at – Design-Tokens zuerst, darunter die Bausteine. */
:root {
  --paper: #FAF8F4;
  --surface: #F1EDE6;
  --ink: #1F1D1A;
  --muted: #6B655C;
  --line: #E2DCD2;
  --accent: #B23A26;        /* Pfefferrot */
  --accent-soft: #F6E3DE;
  --code-bg: #F3F0EA;
  --code-ink: #2A2724;
  --radius: 10px;
  --wrap: 46rem;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #161513;
    --surface: #1F1D1A;
    --ink: #ECE8E1;
    --muted: #A39C91;
    --line: #2F2C28;
    --accent: #E8735D;
    --accent-soft: #3A221C;
    --code-bg: #1C1B19;
    --code-ink: #E4DFD6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #161513; --surface: #1F1D1A; --ink: #ECE8E1; --muted: #A39C91; --line: #2F2C28;
  --accent: #E8735D; --accent-soft: #3A221C; --code-bg: #1C1B19; --code-ink: #E4DFD6;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: -0.01em;
}
.brand svg { width: 26px; height: 26px; flex: none; }
.brand .tld { color: var(--muted); font-weight: 400; }
.site-nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--accent); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 4rem; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-top: 1.5rem; padding-bottom: 2rem; }
.site-footer a { color: var(--muted); }
.site-footer nav { display: flex; gap: 1rem; }

/* Startseite */
.hero { padding: 3.5rem 0 2rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 2.9rem); line-height: 1.1; letter-spacing: -0.025em; margin: 0 0 1rem; font-weight: 600; }
.hero h1 .dot { color: var(--accent); }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 36rem; margin: 0; }

.section-title {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted);
  font-weight: 600; margin: 3rem 0 0.5rem;
}

/* Notizen-Liste */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { border-bottom: 1px solid var(--line); }
.note-list a {
  display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.25rem 1rem;
  padding: 1rem 0; text-decoration: none; color: var(--ink);
}
.note-list a:hover .note-title { color: var(--accent); }
.note-date { color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; padding-top: 0.1rem; }
.note-title { font-weight: 600; line-height: 1.35; }
.note-tags { grid-column: 2; display: flex; gap: 0.4rem; flex-wrap: wrap; }
@media (max-width: 520px) {
  .note-list a { grid-template-columns: 1fr; }
  .note-tags { grid-column: 1; }
}
.tag {
  font-size: 0.75rem; padding: 0.1rem 0.5rem; border-radius: 99px;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.more { margin-top: 1rem; }

/* Seitenkopf & Artikel */
.page-header { padding: 2.5rem 0 1rem; }
.page-header h1 { font-size: clamp(1.7rem, 5vw, 2.3rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.75rem; font-weight: 600; }
.page-header .lede { color: var(--muted); margin: 0; }
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--muted); }
.meta { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 0.9rem; }

.prose { overflow-wrap: anywhere; }
.prose h2 { font-size: 1.3rem; margin: 2.25rem 0 0.5rem; letter-spacing: -0.01em; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }
.prose li { margin-bottom: 0.3rem; }
.prose figure { margin: 1.5rem 0; }
.prose figure img { border: 1px solid var(--line); border-radius: var(--radius); display: block; }
.prose figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }

code, pre { font-family: var(--mono); font-size: 0.86em; }
:not(pre) > code {
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 5px;
  padding: 0.08em 0.35em; overflow-wrap: anywhere;
}
pre {
  background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.55;
  margin: 0 0 1.25rem; tab-size: 4;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
pre code { font-size: inherit; }
pre[data-lang]::before {
  content: attr(data-lang); display: block; font-family: var(--font); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem;
}

.notice {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 0.85rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 1.5rem; font-size: 0.95rem;
}
.notice p { margin: 0; }
.origin { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2.5rem; }

.legal h2 { font-size: 1.1rem; }
.address-img, .mail-img { vertical-align: middle; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .address-img, :root:not([data-theme="light"]) .mail-img { filter: invert(0.9); }
}
:root[data-theme="dark"] .address-img, :root[data-theme="dark"] .mail-img { filter: invert(0.9); }

/* What's my IP */
.ip-big {
  font-family: var(--mono); font-size: clamp(1.6rem, 7vw, 2.6rem); line-height: 1.2;
  margin: 0.5rem 0 1.5rem; padding: 1rem 1.25rem; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--ink); border: 1px solid var(--line);
  user-select: all; overflow-wrap: anywhere;
}
.kv { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.kv th, .kv td { text-align: left; vertical-align: top; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
.kv th { color: var(--muted); font-weight: 400; width: 10rem; padding-right: 1rem; }
.kv td { overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.88rem; }
@media (max-width: 520px) {
  .kv th, .kv td { display: block; width: auto; border: 0; padding: 0; }
  .kv tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--line); }
}

/* Projects */
.project { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 640px) { .project { grid-template-columns: 18rem minmax(0, 1fr); align-items: start; } }
.project-thumb { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.project-thumb svg { display: block; width: 100%; height: auto; transition: transform .3s; }
.project-thumb:hover svg { transform: scale(1.03); }
.project h2 { font-size: 1.35rem; margin: 0 0 0.5rem; font-weight: 600; letter-spacing: -0.01em; }
.project p { margin: 0 0 0.85rem; }
.btn-link { display: inline-block; font-weight: 600; text-decoration: none; background: var(--accent); color: #fff;
            padding: 0.5rem 1rem; border-radius: 8px; margin-right: 0.75rem; }
.btn-link:hover { filter: brightness(1.08); }
.hint { display: block; margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; }
