/* tobiasheck.de – styles. Fonts are self-hosted (no Google Fonts requests). */
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-Bold.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/fonts/InterDisplay-SemiBold.woff") format("woff"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/Lora-Variable.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lora"; src: url("/fonts/Lora-Italic-Variable.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --bg: #F2EFE9;
  --surface: #FBFAF7;
  --ink: #1C1B18;
  --text: #2E2C27;
  --muted: #55524A;
  --subtle: #67635A;
  --line: #E0DBD1;
  --accent: #56652A;
  --accent-dark: #3E4A1C;
  --accent-soft: #D6DCC2;
  --on-ink: #FFFFFF;
  --ink-hover: #3A3833;
  --nav: #47443D;
  --prose: #2E2C27;
  --code-bg: #E7E2D8;
  --card-hover: #C2BBAD;
  --pill-line: #D3CDC1;
  --band: #1C1B18;
  color-scheme: light dark;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
}

/* Dark mode – follows the visitor's system setting */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171612;
    --surface: #1F1E19;
    --ink: #EDEAE3;
    --text: #D9D5CC;
    --muted: #B3AEA3;
    --subtle: #9C978B;
    --line: #302E28;
    --accent: #AFC17A;
    --accent-dark: #C8D59D;
    --accent-soft: #3B4326;
    --on-ink: #1C1B18;
    --ink-hover: #D2CEC4;
    --nav: #C9C4B8;
    --prose: #DCD8CF;
    --code-bg: #2A2823;
    --card-hover: #4A473F;
    --pill-line: #3C3933;
    --band: #0E0D0B;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 40px; }
.narrow { max-width: 880px; }
.reading { max-width: 720px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--on-ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding-top: 24px; padding-bottom: 24px; }
.brand { font-family: var(--display); font-weight: 600; font-size: 20px; color: var(--ink); text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 15px; font-weight: 500; }
.nav a { color: var(--nav); text-decoration: none; padding: 10px 0; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.nav a:hover { color: var(--ink); }

/* Type */
h1, h2, h3 { margin: 0; color: var(--ink); }
.display { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; line-height: 1.06; font-size: clamp(38px, 5.6vw, 64px); }
.h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -0.01em; line-height: 1.15; }
.eyebrow { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.lead { margin: 0; font-size: 19px; line-height: 1.6; color: var(--nav); max-width: 620px; }
.muted { color: var(--subtle); }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid var(--ink); }
.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink-hover); color: var(--on-ink); }
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--on-ink); }
.btn-light { background: #fff; color: var(--band); border-color: #fff; }
.btn-light:hover { background: #E0DBD1; color: var(--band); }
.btn-outline-light { color: #fff; border-color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--band); }
.more { font-size: 15px; font-weight: 600; text-decoration: none; }

/* Sections */
.section { padding: 96px 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 40px; }
.split { display: flex; flex-wrap: wrap; gap: 48px; }
.split > :first-child { flex: 1 1 240px; }
.split > :last-child { flex: 999 1 520px; min-width: 0; }
@media (max-width: 640px) { .section { padding: 64px 0; } }

/* Hero */
.hero .wrap { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 96px; }
.hero-text { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.hero-photo { flex: 1 1 260px; max-width: 340px; aspect-ratio: 4 / 5; border-radius: 24px; object-fit: cover; object-position: 30% center; background: var(--line); }
@media (max-width: 640px) { .hero .wrap { padding-top: 40px; padding-bottom: 64px; gap: 40px; } .hero-photo { max-width: 240px; } }

/* Quiet intro (home) */
.intro .wrap { padding-top: 56px; padding-bottom: 72px; }
.intro-text { margin: 0; max-width: 680px; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.5; color: var(--text); }
.intro-links { margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; font-weight: 600; }
.intro-links a { text-decoration: none; padding: 10px 0; }
@media (max-width: 640px) { .intro .wrap { padding-top: 32px; padding-bottom: 48px; } }

/* Cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-topics { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s; }
.section:not(.section-white) .card { background: var(--surface); }
a.card:hover { border-color: var(--card-hover); color: var(--ink); transform: translateY(-2px); }
.card h3 { font-size: 21px; line-height: 1.3; font-weight: 600; }
.card p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.card .meta { margin-top: auto; font-size: 14px; color: var(--subtle); }
.topic { padding: 24px; border-radius: 16px; gap: 6px; }
.topic strong { font-size: 18px; }
.topic span { font-size: 15px; line-height: 1.5; color: var(--muted); }
.taglist { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }

/* Prose blocks */
.prose-block { display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.65; color: var(--text); }
.prose-block p { margin: 0; }

/* Writing list */
.page-head { padding: 64px 0 32px; display: flex; flex-direction: column; gap: 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; padding: 0; list-style: none; }
.pill { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px; text-decoration: none; background: var(--surface); color: var(--ink); border: 1.5px solid var(--pill-line); }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill[aria-current="page"] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.pill .count { margin-left: 8px; font-weight: 500; opacity: .7; }
.listbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--subtle); border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.postlist { margin: 0 0 120px; padding: 0; list-style: none; }
.postlist li { border-bottom: 1px solid var(--line); }
.postrow { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 28px 0; color: var(--ink); text-decoration: none; }
.postrow:hover h2 { color: var(--accent); }
.postrow time { flex: 0 0 120px; font-size: 14px; color: var(--subtle); padding-top: 3px; }
.postrow .body { flex: 1 1 400px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.postrow h2 { font-size: 22px; line-height: 1.3; font-weight: 600; }
.postrow p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--muted); }
.kind { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink); background: var(--ink); padding: 2px 8px; border-radius: 6px; }
.kind-note { background: var(--subtle); }
.rowtop { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.empty { padding: 48px 0 120px; color: var(--muted); }

/* Article */
.article { padding: 48px 0 96px; display: flex; flex-direction: column; gap: 32px; }
.article-head { display: flex; flex-direction: column; gap: 18px; }
.article-head h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5vw, 50px); line-height: 1.1; letter-spacing: -0.02em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); text-decoration: none; padding: 6px 12px; border: 1.5px solid var(--accent-soft); border-radius: 999px; }
.tag:hover { border-color: var(--accent); }
.legacy-note { margin: 0 0 32px; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; font-size: 15px; line-height: 1.55; color: var(--subtle); }
.prose { font-family: var(--serif); font-size: 20px; line-height: 1.7; color: var(--prose); }
.prose > * { margin: 0 0 24px; }
.prose > :first-child { font-size: 22px; line-height: 1.6; color: var(--ink); }
.prose h2, .prose h3 { font-family: var(--display); font-weight: 600; color: var(--ink); line-height: 1.25; margin-top: 40px; }
.prose h2 { font-size: 28px; }
.prose h3 { font-size: 22px; }
.prose blockquote { margin-left: 0; padding: 2px 0 2px 24px; border-left: 3px solid var(--accent); font-style: italic; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.prose img { border-radius: 12px; margin: 8px 0; }
.prose figure { margin: 32px 0; }
.prose figcaption { font-family: var(--sans); font-size: 14px; color: var(--subtle); margin-top: 8px; }
.prose code { font-size: .85em; background: var(--code-bg); padding: 2px 6px; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.prose table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: 16px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
@media (max-width: 640px) { .prose { font-size: 18px; } .prose > :first-child { font-size: 20px; } }

.author { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 28px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.author img { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; object-position: 30% center; }
.author div { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.author span { font-size: 15px; line-height: 1.5; color: var(--muted); }
.related h2 { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); margin-bottom: 8px; }
.related a { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.related a:last-child { border-bottom: 1px solid var(--line); }
.related strong { font-size: 19px; font-weight: 600; }
.related a:hover strong { color: var(--accent); }
.related span { font-size: 14px; color: var(--subtle); }

/* Work page */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { display: flex; flex-wrap: wrap; gap: 6px 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { flex: 0 0 150px; font-size: 15px; font-weight: 500; color: var(--subtle); }
.timeline .what { flex: 1 1 280px; display: flex; flex-direction: column; gap: 4px; }
.timeline strong { font-size: 18px; font-weight: 600; }
.timeline .what span { font-size: 16px; line-height: 1.55; color: var(--muted); }
.edu { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; font-size: 16px; line-height: 1.55; color: var(--text); }
.small-head { font-size: 13px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle); margin: 40px 0 16px; }
.focus-num { font-family: var(--display); font-size: 14px; font-weight: 600; color: var(--accent); }

/* About page */
.h1 { font-family: var(--display); font-weight: 600; font-size: clamp(34px, 5vw, 48px); letter-spacing: -0.02em; line-height: 1.1; }
.about { padding-bottom: 120px; display: flex; flex-direction: column; gap: 24px; }
.about .page-head { padding-bottom: 8px; }
.about section { display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.about-h2 { font-family: var(--display); font-weight: 600; font-size: 24px; letter-spacing: -0.01em; padding-top: 24px; border-top: 1px solid var(--line); }
.focus-list { margin: 8px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 32px; }
.focus-list dt { font-weight: 600; font-size: 16px; }
.focus-list dd { margin: 2px 0 0; font-size: 15px; line-height: 1.5; color: var(--muted); }
.about .timeline li { padding: 18px 0; }
.about .timeline .when { flex-basis: 120px; }

/* Legal pages */
.legal { padding: 48px 0 120px; }
.legal .prose-sans { font-size: 17px; line-height: 1.65; color: var(--text); }
.legal .prose-sans h2 { font-size: 22px; margin: 32px 0 8px; }
.legal .prose-sans p { margin: 0 0 14px; }

/* Contact + footer */
.contact { background: var(--band); color: #fff; }
.contact .wrap { padding-top: 104px; padding-bottom: 104px; display: flex; flex-direction: column; gap: 26px; }
.contact h2 { color: #fff; font-family: var(--display); font-weight: 600; font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.02em; line-height: 1.1; }
.contact p { margin: 0; max-width: 560px; font-size: 18px; color: #D2CCC0; }
.site-footer { background: var(--band); color: #ADA79B; font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 28px; padding-bottom: 36px; border-top: 1px solid #3A3833; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: #ADA79B; }
.site-footer a:hover { color: #fff; }
