/* ============================================================
   tobiasstieber.de — Bauhaus verfeinert
   Eine Datei ersetzt tailwind.css + styles.css + Inline-Styles.
   ============================================================ */

:root {
    --red: #dc2626;
    --ink: #0a0a0a;
    --paper: #fafafa;
    --muted: rgba(10, 10, 10, .55);
    --line: #0a0a0a;
    --line-soft: rgba(10, 10, 10, .25);
    --surface: #ffffff;
}
@media (prefers-color-scheme: dark) {
    :root {
        --ink: #fafafa;
        --paper: #0f0f0f;
        --muted: rgba(250, 250, 250, .55);
        --line: #fafafa;
        --line-soft: rgba(250, 250, 250, .25);
        --surface: #171717;
    }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
    font-family: 'Space Grotesk', ui-sans-serif, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
}
.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

::selection { background: var(--red); color: #fff; }

a:focus-visible, button:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--red); color: #fff; padding: .8rem 1.2rem;
    font-family: 'IBM Plex Mono', monospace; font-size: .78rem;
    text-transform: uppercase; letter-spacing: .1em; text-decoration: none;
}
.skip-link:focus { left: 0; }

/* ————— Header / Brand ————— */
.site-head { padding: 3.5rem 0 0; }
.brandline { display: flex; align-items: center; gap: 1rem; margin-bottom: 3rem; }
.brandline.flip { margin-bottom: 0; }
.brand-square { width: 44px; height: 44px; background: var(--red); flex: none; display: block; }
a.brand-square:hover { background: var(--ink); }
.brand-rule { height: 3px; background: var(--line); flex: 1; }
.brand-circle { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); flex: none; }
@media (prefers-color-scheme: dark) { .brand-circle { background: var(--paper); } }

.top-nav { display: flex; gap: 1.75rem; flex-wrap: wrap; margin-bottom: 4rem; }
.top-nav a {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
    text-decoration: none; color: var(--muted);
    padding-bottom: 2px; border-bottom: 2px solid transparent;
}
.top-nav a:hover { color: var(--red); border-color: var(--red); }

/* ————— Hero (Startseite) ————— */
.hero { display: grid; grid-template-columns: 1fr; gap: 3rem; padding-bottom: 5rem; }
@media (min-width: 820px) { .hero { grid-template-columns: 7fr 4fr; align-items: end; } }
.hero h1 {
    font-size: clamp(2.8rem, 8vw, 5.4rem);
    font-weight: 700; line-height: .98; letter-spacing: -.02em;
    text-transform: uppercase; margin-bottom: 1.6rem;
}
.hero h1 .dot { color: var(--red); }
.hero .role {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
    color: var(--red); margin-bottom: 2rem;
}
.hero .bio { max-width: 34rem; color: var(--muted); font-size: 1.02rem; }
.hero .bio p + p { margin-top: .8em; }
.hero-photo { position: relative; max-width: 340px; }
/* width/height explizit, sonst gewinnt das height="600"-Attribut gegen aspect-ratio */
.hero-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; filter: grayscale(18%); cursor: pointer; }
.hero-photo::after {
    content: ""; position: absolute; inset: auto -14px -14px auto;
    width: 72px; height: 72px; background: var(--red); z-index: -1;
}
.hero-cta { display: flex; gap: .8rem; margin-top: 2.2rem; flex-wrap: wrap; }

.btn {
    font-family: 'IBM Plex Mono', monospace; font-size: .72rem;
    letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
    border: 2px solid var(--line); padding: .75rem 1.3rem; font-weight: 700;
    transition: all .15s ease; background: transparent; color: var(--ink);
    cursor: pointer; display: inline-block;
}
.btn:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.solid:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* ————— Sektionen ————— */
section.block { padding: 4.5rem 0; border-top: 3px solid var(--line); }
.sec-head { display: flex; align-items: baseline; gap: 1.2rem; margin-bottom: .8rem; }
.sec-num {
    font-family: 'IBM Plex Mono', monospace; font-size: .78rem;
    color: var(--red); letter-spacing: .1em; font-weight: 600;
}
.sec-head h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem); text-transform: uppercase;
    font-weight: 700; letter-spacing: -.01em; line-height: 1.05;
}
.sec-head .shape { margin-left: auto; flex: none; align-self: center; }
.shape.sq { width: 18px; height: 18px; background: var(--red); }
.shape.ci { width: 18px; height: 18px; border-radius: 50%; background: var(--red); }
.shape.tr { width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 19px solid var(--red); }
.shape.bar { width: 18px; height: 18px; background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 8px); }
.sec-sub { color: var(--muted); font-size: .95rem; max-width: 36rem; margin-bottom: 2.6rem; }
.sec-more { margin-top: 2.4rem; }
.sec-more a {
    font-family: 'IBM Plex Mono', monospace; font-size: .74rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; text-decoration: none;
    border-bottom: 2px solid var(--red); padding-bottom: 2px;
}
.sec-more a:hover { color: var(--red); }
.sec-more-extra { margin-top: 1.6rem; }
.sec-stand { font-family: 'IBM Plex Mono', monospace; font-size: .66rem; color: var(--muted); letter-spacing: .08em; margin-top: 1.2rem; }

/* Artikel-Liste */
.articles { display: grid; }
.article {
    display: grid; grid-template-columns: 1fr; gap: .3rem 2rem;
    padding: 1.15rem 0; border-top: 1px solid var(--line-soft);
    text-decoration: none;
}
.article:first-child { border-top: none; }
@media (min-width: 700px) { .article { grid-template-columns: 7.5rem 1fr; } }
.article .date { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; color: var(--muted); padding-top: .3rem; letter-spacing: .05em; }
.article h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3; }
.article:hover h3 { color: var(--red); }
.article .src { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: .25rem; display: block; }

/* Medien-Reihen */
.media-row { display: grid; gap: 1.2rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) {
    .media-row.films { grid-template-columns: repeat(4, 1fr); }
    .media-row.albums { grid-template-columns: repeat(3, 1fr); }
    .media-row.insp { grid-template-columns: repeat(4, 1fr); }
}
.media { text-decoration: none; display: block; }
/* frame/cap sind <span>s — ohne display:block ignoriert der Browser
   aspect-ratio (Inline-Box) und die Captions überlappen den Folgeinhalt */
.media .frame {
    display: block;
    border: 3px solid var(--line); position: relative; background: var(--surface);
    transition: transform .15s ease, box-shadow .15s ease;
    overflow: hidden;
}
.media:hover .frame { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--red); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.films .media .frame { aspect-ratio: 2/3; }
.albums .media .frame, .insp .media .frame { aspect-ratio: 1; }
.frame.empty { display: flex; align-items: center; justify-content: center; }
.frame.empty span { font-family: 'IBM Plex Mono', monospace; font-size: 2rem; color: var(--line-soft); font-weight: 700; }
.media .cap { display: block; margin-top: .65rem; }
.media .cap .t { display: block; font-weight: 600; font-size: .92rem; line-height: 1.25; color: var(--ink); }
.media .cap .m { display: block; font-family: 'IBM Plex Mono', monospace; font-size: .7rem; color: var(--muted); margin-top: .15rem; letter-spacing: .04em; }
.media .cap .stars { color: var(--red); letter-spacing: .1em; }

/* Streaming-Links unter Alben */
.stream-links { display: flex; gap: .6rem; margin-top: .5rem; flex-wrap: wrap; }
.stream-links a {
    font-family: 'IBM Plex Mono', monospace; font-size: .64rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    color: var(--muted); border-bottom: 1px solid var(--line-soft);
}
.stream-links a:hover { color: var(--red); border-color: var(--red); }

/* Projekt-Banner */
.project {
    border: 3px solid var(--line); padding: 2.2rem; background: var(--surface);
    display: grid; gap: 2rem;
}
@media (min-width: 820px) { .project { grid-template-columns: 1fr auto; align-items: center; } }
.project h3 { font-size: 1.5rem; text-transform: uppercase; margin-bottom: .5rem; }
.project p { color: var(--muted); font-size: .95rem; max-width: 34rem; }
.stats { display: flex; gap: 2.2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.stat .n { font-size: 1.9rem; font-weight: 700; color: var(--red); line-height: 1; }
.stat .l { font-family: 'IBM Plex Mono', monospace; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: .3rem; }

/* Zitat-Band (full-bleed: bricht aus .wrap aus) */
.full-bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.quote-band { background: var(--red); color: #fff; padding: 3.2rem 0; margin-top: 4.5rem; }
.quote-band blockquote { font-size: clamp(1.15rem, 2.6vw, 1.6rem); font-weight: 500; max-width: 46rem; line-height: 1.4; }
.quote-band .attr { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; opacity: .85; margin-top: 1.2rem; }
.quote-band button {
    margin-top: 1.6rem; border: 2px solid #fff; background: transparent; color: #fff;
    font-family: 'IBM Plex Mono', monospace; font-size: .7rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase; padding: .6rem 1.2rem; cursor: pointer;
    transition: all .15s ease;
}
.quote-band button:hover { background: #fff; color: var(--red); }

/* ————— Unterseiten: Prosa (Impressum, Datenschutz, Projekt) ————— */
.page-head { padding-bottom: 3rem; }
.page-head .crumb { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin-bottom: 1rem; }
.page-head h1 {
    font-size: clamp(2.2rem, 6vw, 3.6rem); font-weight: 700; line-height: 1.02;
    text-transform: uppercase; letter-spacing: -.015em;
}
.page-head .lede { color: var(--muted); max-width: 38rem; margin-top: 1.4rem; font-size: 1.05rem; }

.prose { max-width: 44rem; padding-bottom: 5rem; }
.prose h2 { font-size: 1.45rem; text-transform: uppercase; margin: 2.6rem 0 .9rem; border-top: 3px solid var(--line); padding-top: 1.6rem; }
.prose h3 { font-size: 1.1rem; margin: 1.8rem 0 .6rem; }
.prose p, .prose li { color: var(--muted); }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--ink); text-decoration-color: var(--red); text-decoration-thickness: 2px; }
.prose a:hover { color: var(--red); }
.prose strong { color: var(--ink); }
.prose .mono, .prose code { font-family: 'IBM Plex Mono', monospace; font-size: .88em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4rem 0; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line-soft); padding: .6rem .8rem; text-align: left; }
.prose th { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }

/* ————— CV (hello) ————— */
.cv-grid { display: grid; gap: 3rem; padding-bottom: 5rem; }
/* Kenntnisse laufen links unter der Timeline weiter, die Sidebar daneben —
   sonst klafft links ein Loch in Höhe der (längeren) Sidebar */
@media (min-width: 860px) {
    .cv-grid {
        grid-template-columns: 2fr 1fr;
        grid-template-areas: "main aside" "skills aside";
        align-items: start;
    }
    .cv-main { grid-area: main; }
    .cv-grid > aside { grid-area: aside; }
    .cv-skills { grid-area: skills; }
}
.cv-skills { padding-bottom: 0; }
.cv-skills > h2:first-child { margin-top: 0; }
/* Wie .hero-photo: aspect-ratio + object-fit, sonst stauchen die
   width/height-Attribute das Querformat-Foto ins Quadrat */
.cv-photo { position: relative; }
.cv-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.cv-photo::after {
    content: ""; position: absolute; inset: auto -14px -14px auto;
    width: 72px; height: 72px; background: var(--red); z-index: -1;
}
.timeline { border-left: 3px solid var(--line); padding-left: 1.8rem; }
.tl-item { position: relative; padding-bottom: 2.2rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
    content: ""; position: absolute; left: calc(-1.8rem - 3px - 7px); top: .4rem;
    width: 14px; height: 14px; background: var(--red);
}
.tl-item .when { font-family: 'IBM Plex Mono', monospace; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); }
.tl-item h3 { font-size: 1.15rem; margin: .3rem 0 .2rem; }
.tl-item .org { font-size: .92rem; color: var(--muted); }
.tl-item p { font-size: .92rem; color: var(--muted); margin-top: .5rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.skill-tags span {
    font-family: 'IBM Plex Mono', monospace; font-size: .68rem; letter-spacing: .06em;
    border: 2px solid var(--line); padding: .35rem .7rem; text-transform: uppercase;
}
.aside-block h2 { font-size: 1.05rem; text-transform: uppercase; margin-bottom: 1rem; border-top: 3px solid var(--line); padding-top: 1.2rem; }
.aside-block { margin-bottom: 2.4rem; }

/* ————— Kontakt ————— */
.contact-grid { display: grid; gap: 3rem; padding-bottom: 5rem; max-width: 44rem; }
.contact-ways { display: grid; gap: 1rem; }
.contact-way {
    border: 3px solid var(--line); padding: 1.6rem; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease; background: var(--surface);
    display: flex; align-items: center; gap: 1.4rem;
}
.contact-way:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--red); }
.contact-way .ico { width: 44px; height: 44px; background: var(--red); flex: none; display: grid; place-items: center; color: #fff; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.contact-way .t { font-weight: 700; font-size: 1.05rem; }
.contact-way .m { font-family: 'IBM Plex Mono', monospace; font-size: .74rem; color: var(--muted); margin-top: .15rem; }

/* ————— 404 ————— */
.err { min-height: 40vh; display: grid; align-content: center; padding-bottom: 5rem; }
.err h1 { font-size: clamp(4rem, 16vw, 9rem); line-height: 1; color: var(--red); font-weight: 700; }
.err p { color: var(--muted); margin: 1rem 0 2rem; }

/* ————— Footer ————— */
.site-foot { margin-top: 2rem; padding: 3rem 0 4rem; }
.foot-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; margin-top: 2rem; }
.foot-row p, .foot-row a {
    font-family: 'IBM Plex Mono', monospace; font-size: .7rem;
    letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none;
}
.foot-row nav { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.foot-row a:hover { color: var(--red); }

/* Back-to-top */
#to-top {
    position: fixed; bottom: 1.2rem; right: 1.2rem; z-index: 40;
    width: 44px; height: 44px; border: 2px solid var(--line); background: var(--paper);
    color: var(--ink); font-size: 1.1rem; cursor: pointer; display: none;
    font-family: 'IBM Plex Mono', monospace; font-weight: 700;
}
#to-top.show { display: block; }
#to-top:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Easter-Egg-Modal */
#egg-modal {
    position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.75);
    display: none; align-items: center; justify-content: center; padding: 2rem;
}
#egg-modal.open { display: flex; }
#egg-modal figure { max-width: 560px; background: var(--paper); border: 3px solid var(--line); padding: 1rem; }
#egg-modal img { width: 100%; }
#egg-modal figcaption { font-family: 'IBM Plex Mono', monospace; font-size: .72rem; color: var(--muted); padding-top: .8rem; text-align: center; }

/* ————— Druck (v. a. Lebenslauf auf hello.tobiasstieber.de) ————— */
@media print {
    :root {
        --ink: #000; --paper: #fff; --muted: rgba(0, 0, 0, .6);
        --line: #000; --line-soft: rgba(0, 0, 0, .25); --surface: #fff;
    }
    body { font-size: 11pt; }
    .top-nav, .brandline, .hero-cta, .site-foot nav, #to-top, .skip-link { display: none !important; }
    .site-head { padding-top: 0; }
    .wrap { max-width: 100%; padding: 0; }
    .page-head { padding-bottom: 1.5rem; }
    /* Druckbreite liegt unter dem 860px-Breakpoint — zweispaltig erzwingen */
    .cv-grid {
        grid-template-columns: 2fr 1fr;
        grid-template-areas: "main aside" "skills aside";
        align-items: start;
        gap: 2rem; padding-bottom: 2rem;
    }
    .cv-main { grid-area: main; }
    .cv-grid > aside { grid-area: aside; }
    .cv-skills { grid-area: skills; }
    .cv-photo::after { display: none; }
    .tl-item, .aside-block { break-inside: avoid; }
    .prose { max-width: 100%; padding-bottom: 0; }
    a { text-decoration: none; }
}
