/*
 * Systembiotop — Ghost Theme Draft
 * Home: lebendes Kunstobjekt. Post: ruhiger Leseraum. Tag: geordnetes Herbarium.
 */
:root {
    --bg: #090808;
    --bg-panel: rgba(9, 8, 8, 0.78);
    --bg-soft: rgba(255, 255, 255, 0.024);
    --ink: #e3decb;
    --ink-strong: #fff9e8;
    --ink-muted: #918b7d;
    --line: rgba(227, 222, 203, 0.13);
    --line-soft: rgba(227, 222, 203, 0.07);
    --moss: #7a9c68;
    --moss-glow: rgba(122, 156, 104, 0.28);
    --rust: #c46d52;
    --cyan: #52a4c4;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    --serif: Georgia, "Times New Roman", ui-serif, serif;
    --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --content-width: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: var(--sans); overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.ambient-noise {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
}

.mycelium-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.site-shell { position: relative; z-index: 10; display: flex; min-height: 100vh; }
.machine-panel {
    width: clamp(292px, 20vw, 338px);
    min-height: 100vh;
    position: sticky;
    top: 0;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 30px 24px;
    border-right: 1px solid var(--line);
    background:
        radial-gradient(circle at 80% 18%, rgba(122, 156, 104, 0.09), transparent 16rem),
        linear-gradient(180deg, rgba(12, 15, 12, 0.92), rgba(8, 8, 8, 0.84));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 22px 0 70px rgba(0, 0, 0, 0.5), inset -1px 0 0 rgba(122, 156, 104, 0.08);
}
.system-header {
    display: grid;
    gap: 6px;
    padding-bottom: 15px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-muted);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    line-height: 1.45;
    text-transform: uppercase;
}
.system-clock { color: var(--moss); font: inherit; }
.site-kicker,
.section-label {
    margin: 0 0 12px;
    color: var(--rust);
    font-family: var(--mono);
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    line-height: 1.4;
    text-transform: uppercase;
}
.identity-mark {
    position: relative;
    width: 72px;
    height: 44px;
    margin: 0 0 18px;
    opacity: 0.95;
}
.mark-node { position: absolute; width: 9px; height: 9px; border: 1px solid var(--moss); border-radius: 999px; background: var(--bg); box-shadow: 0 0 18px var(--moss-glow); }
.mark-node-a { left: 4px; top: 31px; }
.mark-node-b { left: 43px; top: 8px; border-color: var(--cyan); box-shadow: 0 0 18px rgba(82, 164, 196, 0.22); }
.mark-node-c { right: 4px; bottom: 7px; }
.mark-thread { position: absolute; height: 1px; transform-origin: left center; background: linear-gradient(90deg, rgba(122, 156, 104, 0.08), rgba(122, 156, 104, 0.72), transparent); }
.mark-thread-a { width: 53px; left: 12px; top: 34px; transform: rotate(-29deg); }
.mark-thread-b { width: 47px; left: 50px; top: 15px; transform: rotate(34deg); background: linear-gradient(90deg, rgba(82, 164, 196, 0.08), rgba(122, 156, 104, 0.62), transparent); }
.site-title { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(1.9rem, 2.7vw, 2.45rem); font-weight: 400; line-height: 0.94; letter-spacing: -0.052em; }
.site-title a { display: grid; gap: 5px; color: inherit; text-decoration: none; }
.site-title span { display: block; color: var(--ink-strong); font-style: normal; }
.site-title em { display: block; color: var(--moss); font-style: italic; font-size: 0.74em; text-shadow: 0 0 24px rgba(122, 156, 104, 0.18); }
.site-description { max-width: 23rem; margin: 0 0 13px; color: var(--ink-muted); font-size: 0.89rem; line-height: 1.55; }
.site-alias { margin: 0 0 22px; color: rgba(145, 139, 125, 0.72); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.09em; line-height: 1.5; text-transform: uppercase; }
.site-alias span { color: var(--moss); }
.panel-label { margin: 0 0 13px; color: rgba(145, 139, 125, 0.72); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; }
.site-navigation { margin-bottom: 20px; }
.nav-list { display: flex; flex-direction: column; gap: 14px; padding: 0; margin: 0; list-style: none; }
.nav-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(227, 222, 203, 0.88);
    font-family: var(--mono);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 180ms ease, transform 180ms ease;
}
.nav-list a::before { content: "—"; color: var(--line); transition: color 180ms ease; }
.nav-list a:hover,
.nav-current a { color: var(--moss); transform: translateX(4px); }
.nav-list a:hover::before,
.nav-current a::before { content: "→"; color: var(--moss); }
.field-notes {
    margin: 0 0 20px;
    padding: 14px 0 0;
    border-top: 1px solid var(--line-soft);
}
.field-notes ul { display: grid; gap: 7px; padding: 0; margin: 0; list-style: none; }
.field-notes li { display: grid; grid-template-columns: 2.1em 1fr; gap: 8px; color: rgba(227, 222, 203, 0.72); font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.035em; line-height: 1.36; }
.field-notes li span { color: rgba(122, 156, 104, 0.82); }
.status-widget {
    margin-top: 0;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--bg-soft);
    color: var(--ink-muted);
    font-family: var(--mono);
    font-size: 0.66rem;
    line-height: 1.55;
}
.status-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 999px; background: var(--moss); box-shadow: 0 0 10px var(--moss-glow); animation: pulse 4s infinite; vertical-align: middle; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.site-main {
    flex: 1 1 auto;
    min-width: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(227, 222, 203, 0.045) 1px, transparent 0);
    background-size: 40px 40px;
}
.biotope-home { padding: 54px clamp(28px, 4vw, 62px) 70px; }
.biotope-heading { max-width: 700px; margin: 0 auto 40px; }
.biotope-heading h2,
.archive-header h1,
.empty-specimen h2 { margin: 0 0 18px; color: var(--ink-strong); font-family: var(--serif); font-size: clamp(2rem, 4vw, 4.3rem); font-style: italic; font-weight: 400; line-height: 1.02; letter-spacing: -0.045em; }
.biotope-heading p:not(.section-label),
.archive-header p,
.empty-specimen p { margin: 0; color: var(--ink-muted); font-size: 1.02rem; line-height: 1.7; }
.node-grid { display: flex; flex-direction: column; gap: clamp(42px, 6vh, 72px); width: min(760px, 100%); max-width: 760px; margin: 0 auto; padding-right: clamp(10px, 2vw, 28px); }
.specimen { --offset: 0px; position: relative; transform: translateX(var(--offset)); transition: transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.specimen:nth-child(1) { --offset: 0px; }
.specimen:nth-child(2) { --offset: 36px; }
.specimen:nth-child(3) { --offset: -18px; }
.specimen:nth-child(4) { --offset: 46px; }
.specimen:nth-child(5) { --offset: 12px; }
.specimen:nth-child(6) { --offset: 30px; }
.specimen:nth-child(7) { --offset: -20px; }
.specimen:nth-child(8) { --offset: 40px; }
.specimen:nth-child(9) { --offset: 20px; }
.specimen:nth-child(10) { --offset: 24px; }
.specimen:hover { transform: translateX(calc(var(--offset) + 12px)); }
.specimen-link { display: flex; align-items: stretch; gap: 16px; color: inherit; text-decoration: none; }
.seed-connector { display: flex; flex: 0 0 16px; flex-direction: column; align-items: center; width: 16px; }
.seed { position: relative; z-index: 2; width: 12px; height: 12px; margin-top: 11px; border: 1px solid var(--moss); border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--bg); transition: background 260ms ease, box-shadow 260ms ease, transform 260ms ease; }
.stem { width: 1px; flex-grow: 1; min-height: 44px; margin-top: 10px; background: linear-gradient(to bottom, var(--moss), transparent); opacity: 0.25; transition: opacity 260ms ease; }
.specimen:hover .seed { background: var(--moss); box-shadow: 0 0 18px var(--moss-glow), inset 0 0 0 2px var(--bg); transform: scale(1.2); }
.specimen:hover .stem { opacity: 0.7; }
.specimen-content { display: block; flex: 1 1 auto; min-width: 0; padding: 16px 18px 18px; border: 1px solid rgba(227, 222, 203, 0.075); border-radius: 14px; background: linear-gradient(135deg, rgba(255,255,255,0.028), rgba(122,156,104,0.026)); box-shadow: 0 18px 42px rgba(0,0,0,0.16); }
.meta-tag { display: block; margin-bottom: 10px; color: var(--rust); font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; line-height: 1.5; text-transform: uppercase; opacity: 0.84; }
.specimen:nth-child(2n) .meta-tag { color: var(--cyan); }
.specimen-title { margin: 0 0 10px; color: var(--ink); font-family: var(--serif); font-size: clamp(1.55rem, 2.45vw, 2.15rem); font-weight: 400; line-height: 1.15; letter-spacing: -0.025em; text-shadow: 0 0 1px rgba(227, 222, 203, 0.28); transition: color 220ms ease; }
.specimen:hover .specimen-title { color: var(--ink-strong); }
.specimen:hover .specimen-content { border-color: rgba(122, 156, 104, 0.22); background: linear-gradient(135deg, rgba(255,255,255,0.035), rgba(122,156,104,0.04)); }
.specimen-excerpt { display: block; max-width: 38rem; overflow-wrap: anywhere; word-break: normal; color: var(--ink-muted); font-size: 0.98rem; line-height: 1.56; }
.empty-specimen { max-width: 620px; padding: 32px; border: 1px dashed var(--line); background: rgba(9, 8, 8, 0.4); }

/* Reading room: intentionally calmer than the home art object. */
.reading-room,
.archive-header,
.herbarium-list,
.pagination {
    width: min(var(--content-width), calc(100vw - 400px - 10vw));
    max-width: var(--content-width);
    margin-right: auto;
    margin-left: auto;
}
.reading-room { position: relative; padding: 80px 0 100px; }
.reading-room::before,
.reading-room::after,
.reading-room-ornament {
    content: "";
    position: fixed;
    pointer-events: none;
    opacity: 0.18;
}
.reading-room::before { top: 10vh; right: 5vw; width: 120px; height: 280px; border-right: 1px solid var(--moss); border-radius: 50%; transform: rotate(10deg); }
.reading-room::after { bottom: 8vh; right: 8vw; width: 90px; height: 1px; background: linear-gradient(to right, transparent, var(--moss), transparent); }
.reading-room-ornament { top: 22vh; right: 6vw; width: 7px; height: 7px; border-radius: 999px; background: var(--moss); box-shadow: 0 0 22px var(--moss-glow); }
.post-header { margin-bottom: 42px; }
.post-title { margin: 0 0 18px; color: var(--ink-strong); font-family: var(--serif); font-size: clamp(2.45rem, 5vw, 5.2rem); font-weight: 400; line-height: 0.98; letter-spacing: -0.055em; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--ink-muted); font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; line-height: 1.6; text-transform: uppercase; }
.post-excerpt { max-width: 660px; margin: 26px 0 0; color: var(--ink-muted); font-family: var(--serif); font-size: 1.35rem; line-height: 1.5; }
.post-feature-image { margin: 0 0 42px; }
.post-feature-image img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 10px; filter: saturate(0.82) contrast(0.96); }
.post-feature-image figcaption { margin-top: 10px; color: var(--ink-muted); font-size: 0.86rem; line-height: 1.5; text-align: center; }
.gh-content { color: var(--ink); font-family: var(--serif); font-size: clamp(1.08rem, 1.35vw, 1.24rem); line-height: 1.78; }
.gh-content > * { margin-top: 0; margin-bottom: 1.35em; }
.gh-content h2,
.gh-content h3,
.gh-content h4 { margin-top: 2.1em; margin-bottom: 0.65em; color: var(--ink-strong); font-family: var(--serif); font-weight: 400; line-height: 1.18; letter-spacing: -0.02em; }
.gh-content h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); }
.gh-content h3 { font-size: clamp(1.45rem, 2vw, 2rem); }
.gh-content a { color: var(--moss); text-decoration-color: rgba(122, 156, 104, 0.45); text-underline-offset: 0.18em; }
.gh-content blockquote { margin: 2em 0; padding: 0 0 0 1.2em; border-left: 1px solid var(--moss); color: var(--ink-muted); font-style: italic; }
.gh-content code { padding: 0.16em 0.32em; border: 1px solid var(--line); border-radius: 4px; background: rgba(255, 255, 255, 0.04); font-family: var(--mono); font-size: 0.85em; }
.gh-content pre { overflow-x: auto; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: rgba(0, 0, 0, 0.26); font-family: var(--mono); font-size: 0.88rem; line-height: 1.55; }
.gh-content pre code { padding: 0; border: 0; background: transparent; }
.gh-content hr { height: 1px; margin: 2.6em 0; border: 0; background: linear-gradient(to right, transparent, var(--line), transparent); }
.gh-content figcaption { color: var(--ink-muted); font-size: 0.9rem; text-align: center; }

/* Herbarium/tag archive: denser, more card-catalogue than drifting garden. */
.archive-header { padding: 72px 0 30px; }
.herbarium-header h1 { font-style: normal; }
.herbarium-list { display: grid; gap: 22px; padding: 18px 0 80px; }
.herbarium-list .specimen { transform: none; }
.herbarium-list .specimen:hover { transform: translateX(6px); }
.herbarium-list .specimen-link { gap: 22px; padding: 18px 0; }
.herbarium-list .stem { min-height: 54px; }
.herbarium-list .specimen-content { padding-bottom: 18px; }
.herbarium-list .specimen-title { font-size: clamp(1.45rem, 2.1vw, 2rem); }
.herbarium-list .specimen-excerpt { font-size: 0.98rem; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 0 82px; color: var(--ink-muted); font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase; }
.pagination a { color: var(--ink); text-decoration: none; }
.pagination a:hover { color: var(--moss); }



/* Ghost Koenig content width helpers — required by GScan.
   The reading room stays calm, but wide/full cards may intentionally break out. */
.gh-content .kg-width-wide {
    width: min(1040px, calc(100vw - 400px - 8vw));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-full {
    width: min(1400px, calc(100vw - 400px - 4vw));
    max-width: none;
    margin-left: 50%;
    transform: translateX(-50%);
}
.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
    width: 100%;
    border-radius: 10px;
}
.gh-content .kg-card { margin-top: 2.2em; margin-bottom: 2.2em; }
.gh-content .kg-image { display: block; margin-right: auto; margin-left: auto; }
.gh-content .kg-gallery-container { display: flex; flex-direction: column; gap: 0.75em; }
.gh-content .kg-gallery-row { display: flex; gap: 0.75em; }
.gh-content .kg-gallery-image { flex: 1 1 0; }
.gh-content .kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
    .gh-content .kg-width-wide,
    .gh-content .kg-width-full {
        width: calc(100vw - 48px);
    }
}



@media (min-width: 901px) and (max-width: 1250px) {
    .machine-panel { width: 292px; padding-right: 22px; padding-left: 22px; }
    .biotope-home { padding-right: 34px; padding-left: 34px; }
    .node-grid { max-width: 700px; padding-right: 12px; }
    .specimen:nth-child(n) { --offset: 0px; }
 }

@media (max-width: 1100px) {
    .reading-room,
    .archive-header,
    .herbarium-list,
    .pagination { width: min(760px, calc(100vw - 330px - 6vw)); }
    .specimen:nth-child(n) { --offset: 0px; }
}

@media (max-width: 900px) {
    .site-shell { display: block; }
    .machine-panel { position: relative; width: 100%; min-height: auto; padding: 32px 24px; border-right: 0; border-bottom: 1px solid var(--line); box-shadow: none; }
    .site-main { background-size: 22px 22px; }
    .status-widget { margin-top: 34px; }
    .field-notes { display: none; }
    .biotope-home { padding: 48px 24px 72px; }
    .biotope-heading { margin-bottom: 52px; }
    .node-grid { gap: 58px; }
    .specimen { --offset: 0px !important; }
    .specimen:hover { transform: translateX(6px); }
    .specimen-link { gap: 20px; }
    .reading-room,
    .archive-header,
    .herbarium-list,
    .pagination { width: auto; max-width: none; margin-right: 24px; margin-left: 24px; }
    .reading-room { padding-top: 56px; }
    .reading-room::before,
    .reading-room::after,
    .reading-room-ornament { display: none; }
}

@media (max-width: 560px) {
    .machine-panel { padding: 28px 20px; }
    .nav-list { gap: 11px; }
    .specimen-link { gap: 14px; }
    .seed-connector { flex-basis: 14px; width: 14px; }
    .specimen-excerpt { font-size: 0.98rem; }
    .post-title { font-size: clamp(2.2rem, 14vw, 3.4rem); }
    .gh-content { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    .mycelium-canvas { display: none; }
    .specimen,
    .specimen:hover,
    .herbarium-list .specimen:hover { transform: none !important; }
}

.reduced-motion .mycelium-canvas { display: none; }
