/* uckermark.dev — hand-written, no build step, no JavaScript. */

:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --card: #ffffff;
  --accent: #0f766e;
  --accent-soft: #ccfbf1;
  --grid: rgba(28, 25, 23, 0.05);
  --radius: 14px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f10;
    --fg: #e7e5e4;
    --muted: #a8a29e;
    --border: #25302f;
    --card: #11171a;
    --accent: #2dd4bf;
    --accent-soft: #0f2a28;
    --grid: rgba(231, 229, 228, 0.045);
  }
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--fg);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: var(--bg);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* header */
.site-header { padding: 1.5rem 0; }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
}
.brand span { color: var(--accent); }
nav ul { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
nav a {
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
}
nav a:hover,
nav a[aria-current="page"] { color: var(--fg); }
nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 0.35em; }

main { flex: 1; padding-bottom: 3rem; }

/* hero */
.hero { padding: 3.5rem 0 2rem; }
.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0.2rem 0.65rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
}
h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.4rem, 8vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.lead {
  margin: 0;
  max-width: 34rem;
  font-size: 1.25rem;
  color: var(--muted);
}

/* sections */
section { margin-top: 2.75rem; }
h2 {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
p { margin: 0 0 1rem; }

/* cards */
.cards {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}
.card {
  display: block;
  height: 100%;
  padding: 1.1rem 1.25rem;
  color: var(--fg);
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card strong { display: block; font-size: 1.05rem; }
.card .meta { display: block; margin-top: 0.15rem; font-size: 0.9rem; color: var(--muted); }
.card .arrow { color: var(--accent); font-family: var(--mono); }

/* post list */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-top: 1px solid var(--border); }
.posts li:last-child { border-bottom: 1px solid var(--border); }
.posts a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 1rem 0.25rem;
  color: var(--fg);
  text-decoration: none;
}
.posts a:hover .title { color: var(--accent); }
.posts .title { font-weight: 600; }
.posts time,
.post-meta { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); }
.posts .desc { flex-basis: 100%; color: var(--muted); font-size: 0.98rem; }

/* article */
article h1 { font-size: clamp(2rem, 6vw, 2.75rem); margin-top: 2.5rem; }
article h2 {
  margin-top: 2.25rem;
  font-family: var(--sans);
  font-size: 1.35rem;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
}
article ul, article ol { padding-left: 1.25rem; margin: 0 0 1rem; }
article li { margin-bottom: 0.35rem; }
code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  background: var(--accent-soft);
  border-radius: 6px;
}
pre {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
pre code { padding: 0; background: none; }
blockquote {
  margin: 0 0 1rem;
  padding: 0.1rem 0 0.1rem 1rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
}
.back { display: inline-block; margin-top: 2rem; font-size: 0.95rem; }

/* footer */
.site-footer {
  padding: 1.5rem 0 2rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--fg); }

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

@media print {
  body { background: #fff; color: #000; }
  nav, .skip, .site-footer { display: none; }
}
