/*
Theme Name: Mono Serif
Theme URI: https://example.com/mono-serif
Author: Lupo
Author URI: https://example.com
Description: Ein minimalistisches, redaktionelles WordPress-Theme im Stil von Science at Risk – schwarz auf weiß, Headlines in Noto Serif, Fließtext in IBM Plex Mono, zentriertes Logo und Full-Width-Hero für Storys.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mono-serif
Tags: blog, editorial, minimal, two-columns, custom-menu, featured-images, translation-ready
*/

/* ------------------------------------------------------------------
   Design tokens
------------------------------------------------------------------ */
:root {
    --color-bg: #ffffff;
    --color-fg: #000000;
    --color-muted: #666666;
    --color-line: #000000;
    --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --content-width: 1024px;
    --gutter: 24px;
}

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

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

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-fg);
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: opacity 0.15s ease;
}

a:hover {
    opacity: 0.55;
}

/* ------------------------------------------------------------------
   Headings (Noto Serif)
------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.2rem; }

p { margin: 0 0 1.4em; }

/* ------------------------------------------------------------------
   Layout helpers
------------------------------------------------------------------ */
.wrapper {
    width: 100%;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.full-bleed {
    width: 100%;
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-bg);
    border-bottom: 1px solid transparent;
}

.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 72px;
}

.site-header__lang {
    font-family: var(--font-mono);
    font-size: 14px;
    text-decoration: none;
    justify-self: start;
    text-transform: uppercase;
}

.site-header__logo {
    justify-self: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-decoration: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.site-header__logo img,
.custom-logo {
    display: block;
    width: auto;
    height: 46px;      /* an die Header-Höhe angepasst */
    max-height: 46px;
}

.site-header__logo:hover { opacity: 1; }

.site-header__right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Hamburger */
.nav-toggle {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: 0;
    padding: 8px 0 8px 8px;
    cursor: pointer;
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    width: 34px;
}

.nav-toggle span {
    display: block;
    height: 1.5px;
    width: 26px;
    background: var(--color-fg);
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* Slide-over menu: Panel von rechts, ca. 1/3 der Seitenbreite */
.site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 33.333vw;
    min-width: 300px;
    max-width: 460px;
    background: var(--color-fg);
    color: var(--color-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    padding: 96px 48px 48px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 40;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.18);
    overflow-y: auto;
}

.site-nav.is-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
}

.site-nav a {
    font-family: var(--font-serif);
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    text-decoration: none;
    color: var(--color-bg);
    line-height: 1.5;
}

/* abgedunkelter Hintergrund hinter dem Panel */
.site-nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 39;
}
.site-nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

/* ------------------------------------------------------------------
   Breadcrumbs
------------------------------------------------------------------ */
.breadcrumbs {
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 28px 0 0;
    color: var(--color-fg);
}

.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs .sep { padding: 0 6px; }

/* ------------------------------------------------------------------
   Hero (featured image, full width)
------------------------------------------------------------------ */
.story-hero {
    margin: 24px 0 0;
}
.story-hero img {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
}

/* ------------------------------------------------------------------
   Single story / article
------------------------------------------------------------------ */
.story {
    padding: 40px 0 100px;
}

.story__title {
    margin: 0 0 18px;
    max-width: none;   /* erstreckt sich über Artikel-Text und Meta-Spalte */
}

.story__date {
    font-family: var(--font-mono);
    font-size: 13px;
    margin: 0 0 40px;
    color: var(--color-fg);
}
.story__date i {
    margin-right: 3em;   /* ca. 3 Tabs Abstand zum Datum */
}

/* Two-column grid: body + meta sidebar */
.story__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 48px;
    align-items: start;
}

.story__lead p,
.story__lead {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.4vw, 1.75rem);
    line-height: 1.35;
    margin: 0 0 1.5em;
}

.story__body {
    font-family: var(--font-mono);
    font-size: 16px;
    line-height: 1.5;
}

.story__body h2,
.story__body h3 { margin-top: 1.6em; }

.story__body figure { margin: 2.2em 0; }
.story__body figcaption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    margin-top: 8px;
}

.story__body blockquote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    line-height: 1.35;
    margin: 1.8em 0;
    padding-left: 20px;
    border-left: 2px solid var(--color-line);
}

.story__meta {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.5;
}
.story__meta .label { color: var(--color-muted); }

/* Meta-Daten als Icon + Wert (Font Awesome) */
.story__meta dl {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 12px;
    row-gap: 12px;
    align-items: baseline;
    margin: 0;
}
.story__meta dt {
    margin: 0;
    color: var(--color-fg);
    text-align: center;
}
.story__meta dt i {
    font-size: 14px;
    line-height: 1;
}
.story__meta dd { margin: 0; }
.story__meta dd a { text-decoration: none; }
.story__meta dd a:hover { text-decoration: underline; }

/* Teilen-Zeile in der Meta-Spalte: "Teilen:   [Icons]" */
.story__share {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--color-line);
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    row-gap: 10px;
}
.story__share-label {
    color: var(--color-muted);
}
.story__share-icons {
    margin-left: 3em;          /* ca. 3 Tabs Abstand zum Text */
    display: inline-flex;
    gap: 16px;
    font-size: 18px;
}
.story__share-icons a {
    text-decoration: none;
    display: inline-flex;
    color: var(--color-fg);
}
.story__share-icons a:hover {
    opacity: 0.55;
    text-decoration: none;
}

/* Leichtgraue "Zur Startseite"-Zeile am Artikelende */
.story__home {
    margin: 48px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e6e6e6;
    font-family: var(--font-mono);
    font-size: 14px;
    color: #999999;
}
.story__home a {
    color: #999999;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.story__home a:hover {
    color: var(--color-fg);
    opacity: 1;
    text-decoration: underline;
}

/* ------------------------------------------------------------------
   Archive / index listing
------------------------------------------------------------------ */
.page-head {
    padding: 40px 0 24px;
}
.page-head h1 { margin: 0; }

.story-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 48px 32px;
    padding: 24px 0 100px;
}

.story-card {
    display: flex;
    flex-direction: column;
}
.story-card__thumb {
    aspect-ratio: 3 / 2;
    overflow: hidden;
    margin-bottom: 14px;
}
.story-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.story-card__date {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
    margin-bottom: 6px;
}
.story-card__title {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    line-height: 1.2;
    margin: 0;
}
.story-card__title a { text-decoration: none; }

/* ------------------------------------------------------------------
   Blog-Übersicht (Seitenvorlage template-blog.php)
   Listen-Stil mit Beitragsbild rechts, weißer Hintergrund
------------------------------------------------------------------ */
.page-head__intro {
    max-width: 62ch;
    margin-top: 14px;
}

.blog-list {
    padding: 4px 0 40px;
}

.blog-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 40px;
    align-items: start;
    padding: 34px 0;
    border-bottom: 1px solid var(--color-line);
}
.blog-item:first-child {
    border-top: 1px solid var(--color-line);
}

.blog-item__title {
    font-family: var(--font-serif);
    font-size: clamp(1.5rem, 2.6vw, 2rem);
    line-height: 1.16;
    margin: 0 0 12px;
}
.blog-item__title a { text-decoration: none; }

.blog-item__meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-muted);
    margin: 0 0 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.blog-item__meta i { margin-right: 8px; color: var(--color-fg); }
.blog-item__cat a { color: var(--color-muted); text-decoration: none; }
.blog-item__cat a:hover { text-decoration: underline; }

.blog-item__excerpt {
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 14px;
}

.blog-item__more {
    font-family: var(--font-mono);
    font-size: 14px;
    text-decoration: none;
}
.blog-item__more:hover { text-decoration: underline; opacity: 1; }

/* Beitragsbild rechts */
.blog-item__thumb {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.blog-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 680px) {
    .blog-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .blog-item__thumb {
        order: -1;
        aspect-ratio: 16 / 9;
    }
}

/* ------------------------------------------------------------------
   Fotoserie (single.php, Portfolio-Beiträge)
   Fotos mit Geolocation + Metadaten
------------------------------------------------------------------ */
.photo-series {
    margin: 48px 0 0;
    display: flex;
    flex-direction: column;
    gap: 56px;
}
.photo-series__item {
    margin: 0;
}
.photo-series__img {
    width: 100%;
    height: auto;
    display: block;
}
.photo-series__caption {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--color-muted);
    margin-top: 10px;
}

/* Metadaten-Block unter dem Foto */
.photo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    margin: 14px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--color-line);
    font-family: var(--font-mono);
    font-size: 13px;
}
.photo-meta__pair {
    display: flex;
    flex-direction: column;
    min-width: 110px;
}
.photo-meta dt {
    color: var(--color-muted);
    margin: 0;
}
.photo-meta dd {
    margin: 2px 0 0;
    color: var(--color-fg);
}
.photo-meta dd a { text-decoration: none; }
.photo-meta dd a:hover { text-decoration: underline; }
.photo-meta dt i { margin-right: 6px; color: var(--color-fg); }

/* ------------------------------------------------------------------
   Pagination
------------------------------------------------------------------ */
.pagination {
    font-family: var(--font-mono);
    font-size: 14px;
    padding: 24px 0 80px;
}
/* Listen-Container (paginate_links type=list) und nav-links ohne Aufzählung */
.pagination ul.page-numbers,
.pagination .nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
    list-style: none;
}
/* Nur die einzelnen Zahlen/Links als Kästchen – nicht die <ul> */
.pagination a.page-numbers,
.pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--color-line);
    text-decoration: none;
    line-height: 1;
}
.pagination a.page-numbers:hover {
    background: var(--color-fg);
    color: var(--color-bg);
    opacity: 1;
}
.pagination .page-numbers.current {
    background: var(--color-fg);
    color: var(--color-bg);
}
.pagination .page-numbers.dots {
    border-color: transparent;
    min-width: 0;
    padding: 0 2px;
}

/* ------------------------------------------------------------------
   Comments
------------------------------------------------------------------ */
.comments-area {
    padding: 40px 0 80px;
    font-family: var(--font-mono);
    font-size: 14px;
}
.comments-area h2 { font-family: var(--font-serif); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { margin-bottom: 24px; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */
.site-footer {
    background: var(--color-fg);   /* schwarz */
    color: var(--color-bg);        /* weiß */
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 48px 0 56px;
}
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; opacity: 1; }

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;
}

.site-footer__left {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* rechte Spalte: Social oben, Suche darunter */
.site-footer__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 18px;
}

.site-footer__social {
    display: flex;
    gap: 20px;
    font-size: 22px;
    line-height: 1;
}
.site-footer__social a {
    display: inline-flex;
    transition: opacity 0.15s ease;
}
.site-footer__social a:hover { opacity: 0.6; text-decoration: none; }

/* Blog-Suche im Footer */
.site-footer__search {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
}
.site-footer__search input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--color-bg);
    font-family: var(--font-mono);
    font-size: 13px;
    padding: 9px 12px;
    min-width: 210px;
    outline: none;
}
.site-footer__search input[type="search"]::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.site-footer__search button {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--color-bg);
    padding: 9px 12px;
    cursor: pointer;
    line-height: 1;
}
.site-footer__search button:hover { opacity: 0.6; }

/* ------------------------------------------------------------------
   WP core helpers
------------------------------------------------------------------ */
.screen-reader-text {
    position: absolute !important;
    clip: rect(1px, 1px, 1px, 1px);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.aligncenter { margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption-text,
.wp-element-caption {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-muted);
}

.sticky, .gallery-caption, .bypostauthor { /* placeholders for theme-check */ }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------ */
@media (max-width: 768px) {
    .story__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .story__meta {
        order: -1;
        border-bottom: 1px solid var(--color-line);
        padding-bottom: 20px;
    }
    .site-header__inner { height: 60px; }
    .site-header__logo { font-size: 24px; }
    .site-header__logo img,
    .custom-logo { height: 38px; max-height: 38px; }

    .site-footer__inner { flex-direction: column; }
    .site-footer__right { align-items: flex-start; width: 100%; }
    .site-footer__search { width: 100%; }
    .site-footer__search input[type="search"] { flex: 1; min-width: 0; }
}
