/* binhk.de theme. Fonts are served by this site (no Google Fonts). */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("../fonts/space-grotesk-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("../fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); }

:root {
    --blue: #1D4ED8;
    --blue-dark: #1E3A8A;
    --blue-soft: #DBEAFE;
    --blue-faint: #EFF6FF;
    --orange: #F97316;
    --orange-dark: #9A3412;
    --orange-ink: #431407;
    --orange-soft: #FFEDD5;
    --orange-faint: #FFF7ED;
    --ink: #0F172A;
    --text: #1E293B;
    --muted: #475569;
    --line: #E2E8F0;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --radius: 20px;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --container: 1200px;
    --content: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }

.container { max-width: var(--container); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 10; }
.skip-link:focus { left: 16px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; padding-top: 16px; padding-bottom: 16px; }
.wordmark { font-family: var(--font-head); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.wordmark:hover { color: var(--ink); }
.wordmark__dot { color: var(--orange); }
.wordmark__tld { color: var(--blue); }
.wordmark--light { color: #fff; font-size: 24px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { display: block; padding: 10px 16px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 500; }
.nav a:hover { background: var(--blue-faint); color: var(--blue-dark); }
.nav .is-current a { background: var(--blue); color: #fff; }
.nav__item--familie.is-current a { background: var(--orange); color: var(--ink); }
.icon-button { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-button:hover { border-color: var(--blue); color: var(--blue); }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 32px; }
.hero__text { display: flex; flex-direction: column; gap: 20px; }
.badge { align-self: flex-start; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-dark); background: var(--orange-soft); padding: 6px 12px; border-radius: 999px; }
.hero__title { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; letter-spacing: -0.03em; }
.hero__lead { margin: 0; font-size: 19px; color: var(--muted); max-width: 560px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 200px; padding: 28px; border-radius: var(--radius); text-decoration: none; transition: transform .15s ease; }
.tile:hover { transform: translateY(-3px); }
.tile--tech, .tile--tech:hover { background: var(--blue); color: #fff; }
.tile--familie, .tile--familie:hover { background: var(--orange); color: var(--ink); }
.tile__text { display: flex; flex-direction: column; gap: 6px; }
.tile__title { font-family: var(--font-head); font-size: 28px; font-weight: 700; }
.tile__sub { font-size: 15px; }
.tile--tech .tile__sub { color: var(--blue-soft); }
.tile--familie .tile__sub { color: var(--orange-ink); }
@media (max-width: 420px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { min-height: 0; gap: 20px; } }

/* Sections */
.section { padding-top: 24px; padding-bottom: 32px; }
.section--top { padding-top: 56px; }
.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__title { margin: 0; font-size: 28px; }
.empty { color: var(--muted); font-size: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #CBD5E1; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Pills and tones per category (tag slug) */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-size: 14px; color: var(--muted); }
.pill { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #E2E8F0; color: var(--ink); text-decoration: none; }
.pill--tech { background: var(--blue); color: #fff; }
.pill--familie { background: var(--orange); color: var(--ink); }
a.pill:hover { filter: brightness(0.95); color: inherit; }
a.pill--tech:hover { color: #fff; }
.card__image--empty { background: #E2E8F0; }
.tone--tech { background: var(--blue-soft); }
.tone--familie { background: var(--orange-soft); }

/* Featured post */
.feature { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .15s ease, border-color .15s ease; }
.feature:hover { color: var(--ink); border-color: #CBD5E1; box-shadow: 0 12px 32px -16px rgba(15, 23, 42, .25); }
.feature__image { flex: 1 1 420px; min-height: 300px; max-height: 420px; object-fit: cover; }
.feature__body { flex: 1 1 420px; display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 40px; }
.feature__title { margin: 0; font-size: clamp(26px, 3vw, 34px); }
.feature__excerpt { margin: 0; color: var(--muted); }
.feature__more { font-weight: 600; color: var(--blue); }
@media (max-width: 600px) { .feature__body { padding: 24px; } .feature__image { min-height: 200px; } }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card { display: flex; }
.card__link { display: flex; flex-direction: column; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.card__link:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 12px 32px -16px rgba(15, 23, 42, .25); }
.card__image { width: 100%; height: 190px; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.card__title { margin: 0; font-size: 21px; line-height: 1.25; }
.card__excerpt { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; padding: 40px 0 16px; }
.pagination__info { color: var(--muted); font-size: 15px; }

/* Tag and author pages */
.tag-head { padding-top: 64px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 16px; }
.tag-head .pill { align-self: flex-start; }
.tag-head__title { margin: 0; font-size: clamp(40px, 6vw, 60px); }

/* Article */
.article { padding: 56px 24px 32px; }
.article__head, .content, .article__tags { max-width: var(--content); margin-left: auto; margin-right: auto; }
.article__head { display: flex; flex-direction: column; gap: 20px; }
.back { align-self: flex-start; padding: 10px 0; font-weight: 500; font-size: 15px; text-decoration: none; }
.article__title { margin: 0; font-size: clamp(34px, 5vw, 52px); line-height: 1.08; letter-spacing: -0.03em; }
.article__lead { margin: 0; font-size: 21px; line-height: 1.55; color: var(--muted); }
.article__image { margin: 40px auto; max-width: 1000px; }
.article__image img { width: 100%; border-radius: var(--radius); }
.article__image figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
.article__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.tag-link { padding: 8px 14px; border-radius: 999px; background: var(--blue-faint); color: var(--blue-dark); text-decoration: none; font-size: 14px; font-weight: 500; }
.tag-link:hover { background: var(--blue-soft); }

/* Post content (Koenig editor output) */
.content { margin-top: 32px; font-size: 18px; line-height: 1.75; color: var(--text); }
.content > * + * { margin-top: 1.2em; }
.content > * { margin-bottom: 0; }
.content h2 { font-size: 30px; margin-top: 1.8em; }
.content h3 { font-size: 24px; margin-top: 1.6em; }
.content h4 { font-size: 20px; margin-top: 1.4em; }
.content ul, .content ol { padding-left: 1.4em; }
.content li + li { margin-top: .4em; }
.content blockquote { margin-left: 0; padding: 4px 0 4px 24px; border-left: 4px solid var(--orange); font-size: 20px; color: var(--ink); }
.content hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.content code { font-family: var(--font-mono); font-size: .88em; background: #E2E8F0; padding: .1em .35em; border-radius: 6px; }
.content pre { padding: 20px 24px; background: var(--ink); color: #E2E8F0; border-radius: 14px; overflow-x: auto; font-size: 15px; line-height: 1.6; }
.content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }
.content figure { margin-left: 0; margin-right: 0; }
.content figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); text-align: center; }
.content img { border-radius: 14px; }
.content table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.content th, .content td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.kg-width-wide { position: relative; width: min(1000px, calc(100vw - 48px)); max-width: none; left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; max-width: none; left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; }
.content .kg-callout-card { border-radius: 14px; }

/* Footer */
.site-footer { margin-top: 56px; background: var(--ink); color: #CBD5E1; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.site-footer__about { display: flex; flex-direction: column; gap: 10px; max-width: 380px; }
.site-footer__about p { margin: 0; font-size: 15px; }
.site-footer .nav a { color: #E2E8F0; padding: 10px 12px; text-decoration: underline; text-underline-offset: 3px; }
.site-footer .nav a:hover { background: transparent; color: #fff; }
.site-footer .nav .is-current a { background: transparent; color: #fff; }

/* Error page */
.error { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 20px; }
.error__code { margin: 0; font-size: clamp(72px, 14vw, 140px); color: var(--blue); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
