/*
Theme Name: Web Wilke
Theme URI: https://web-wilke.de
Author: Maximilian Wilke
Author URI: https://web-wilke.de
Description: Minimalistisches, sicherheitsgehärtetes WordPress-Theme für web-wilke.de. Schlanke Typografie, automatischer Dark-/Light-Mode ohne JavaScript, Fokus auf Inhalt.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: web-wilke
Tags: blog, one-column, custom-menu, translation-ready
*/

/* ------------------------------------------------------------------
   Design-Tokens
   ------------------------------------------------------------------ */
:root {
	--bg: #fdfdfc;
	--bg-alt: #f2f4f4;
	--text: #1f2428;
	--muted: #5f6b74;
	--accent: #0f766e;
	--accent-soft: #0f766e22;
	--border: #e3e7e8;

	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
		"Liberation Mono", monospace;

	--content-width: 44rem;

	color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #10151a;
		--bg-alt: #1a2128;
		--text: #d7dde3;
		--muted: #8a959e;
		--accent: #4fd1b8;
		--accent-soft: #4fd1b826;
		--border: #242c34;
	}
}

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-sans);
	font-size: 1.0625rem;
	line-height: 1.7;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.wrap {
	width: 100%;
	max-width: calc(var(--content-width) + 2.5rem);
	margin-inline: auto;
	padding-inline: 1.25rem;
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover,
a:focus {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

::selection {
	background: var(--accent-soft);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	line-height: 1.3;
	margin: 2em 0 0.6em;
	font-weight: 650;
}

h1 { font-size: 1.75rem; margin-top: 0; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }
h4, h5, h6 { font-size: 1rem; }

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

hr {
	border: 0;
	border-top: 1px solid var(--border);
	margin: 2.5rem 0;
}

/* Screenreader-Text (WordPress-Konvention) */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	word-wrap: normal;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: var(--bg);
	padding: 0.5rem 1rem;
	z-index: 100;
}

.skip-link:focus {
	left: 0;
}

/* ------------------------------------------------------------------
   Header & Navigation
   ------------------------------------------------------------------ */
.site-header {
	border-bottom: 1px solid var(--border);
	padding: 1.1rem 0;
}

.header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

.site-title {
	margin: 0;
	font-family: var(--font-mono);
	font-size: 1rem;
	font-weight: 600;
}

.site-title a {
	color: var(--text);
}

.site-title .prompt {
	color: var(--accent);
	user-select: none;
}

.site-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
}

.site-nav a {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--muted);
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
	color: var(--accent);
}

/* ------------------------------------------------------------------
   Hauptbereich
   ------------------------------------------------------------------ */
.site-main {
	flex: 1;
	padding: 3rem 1.25rem 4rem;
}

.page-header {
	margin-bottom: 2.5rem;
}

.page-header h1 {
	font-size: 1.6rem;
}

.archive-description {
	color: var(--muted);
}

/* Startseite / Hero */
.hero {
	padding: 2.5rem 0 1.5rem;
}

.hero h1 {
	font-size: 2.3rem;
	margin: 0 0 0.5rem;
	letter-spacing: -0.02em;
}

.hero .tagline {
	font-family: var(--font-mono);
	color: var(--accent);
	font-size: 1.05rem;
	margin: 0;
}

/* ------------------------------------------------------------------
   Beitragsliste (Blog, Archive, Suche)
   ------------------------------------------------------------------ */
.post-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.post-list-item {
	display: grid;
	grid-template-columns: 6.5rem 1fr;
	gap: 1rem;
	align-items: baseline;
	padding: 0.55rem 0;
}

.post-list-item .post-date {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
	white-space: nowrap;
}

.post-list-item a {
	color: var(--text);
	font-weight: 550;
}

.post-list-item a:hover,
.post-list-item a:focus {
	color: var(--accent);
}

@media (max-width: 34rem) {
	.post-list-item {
		grid-template-columns: 1fr;
		gap: 0.1rem;
		padding: 0.8rem 0;
	}
}

/* Pagination */
.pagination,
.navigation.pagination {
	margin-top: 2.5rem;
	font-family: var(--font-mono);
	font-size: 0.9rem;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.pagination .page-numbers {
	color: var(--muted);
}

.pagination .page-numbers.current {
	color: var(--accent);
	font-weight: 700;
}

/* ------------------------------------------------------------------
   Einzelbeitrag & Seiten
   ------------------------------------------------------------------ */
.entry-header {
	margin-bottom: 2rem;
}

.entry-header h1 {
	margin-bottom: 0.4rem;
}

.entry-meta {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

.entry-content {
	overflow-wrap: break-word;
}

.entry-content > * + * {
	margin-top: 1.1em;
}

.entry-content a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.entry-content li + li {
	margin-top: 0.35em;
}

.entry-content blockquote,
.wp-block-quote {
	margin: 1.5em 0;
	padding: 0.25em 0 0.25em 1.25em;
	border-left: 3px solid var(--accent);
	color: var(--muted);
	font-style: normal;
}

.entry-content code,
.entry-content kbd {
	font-family: var(--font-mono);
	font-size: 0.875em;
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: 4px;
	padding: 0.1em 0.35em;
}

.entry-content pre,
.wp-block-code {
	background: var(--bg-alt);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	overflow-x: auto;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	line-height: 1.6;
}

.entry-content pre code {
	background: none;
	border: 0;
	padding: 0;
	font-size: inherit;
}

.entry-content table {
	border-collapse: collapse;
	width: 100%;
	font-size: 0.95rem;
	display: block;
	overflow-x: auto;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--border);
	padding: 0.5rem 0.75rem;
	text-align: left;
}

.entry-content th {
	background: var(--bg-alt);
}

.entry-content figcaption,
.wp-caption-text {
	font-size: 0.85rem;
	color: var(--muted);
	text-align: center;
	margin-top: 0.5rem;
}

.alignleft {
	float: left;
	margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	max-width: 100%;
}

.post-thumbnail img {
	border-radius: 6px;
	margin-bottom: 1.5rem;
}

/* Beitrags-Fußzeile: Kategorien / Tags */
.entry-footer {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--border);
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

.entry-footer a {
	color: var(--muted);
}

.entry-footer a:hover,
.entry-footer a:focus {
	color: var(--accent);
}

/* Beitragsnavigation (vorheriger / nächster) */
.post-navigation {
	margin-top: 2.5rem;
	font-size: 0.95rem;
}

.post-navigation .nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
}

.post-navigation .nav-next {
	text-align: right;
	margin-left: auto;
}

/* ------------------------------------------------------------------
   Suche & 404
   ------------------------------------------------------------------ */
.search-form {
	display: flex;
	gap: 0.5rem;
	margin: 1.5rem 0;
}

.search-form input[type="search"] {
	flex: 1;
	max-width: 20rem;
	font: inherit;
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 0.45rem 0.75rem;
}

.search-form input[type="search"]:focus {
	border-color: var(--accent);
	outline: none;
}

.search-form button {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--bg);
	background: var(--accent);
	border: 0;
	border-radius: 6px;
	padding: 0.45rem 1rem;
	cursor: pointer;
}

.error-404 .page-title {
	font-family: var(--font-mono);
}

/* ------------------------------------------------------------------
   Man-Page-Stil (About-Seite, siehe examples/about-man-page.html)
   ------------------------------------------------------------------ */
.man-page {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	line-height: 1.65;
}

.man-page .man-title {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	color: var(--muted);
	margin-bottom: 2rem;
}

.man-page h2 {
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 2rem 0 0.6rem;
}

.man-page h2:first-of-type {
	margin-top: 0;
}

.man-page > p,
.man-page > dl {
	margin: 0 0 0 2rem;
}

.man-page dt {
	font-weight: 700;
	margin-top: 0.9rem;
	color: var(--accent);
}

.man-page dd {
	margin: 0.2rem 0 0 2rem;
}

@media (max-width: 34rem) {
	.man-page > p,
	.man-page > dl {
		margin-left: 0.75rem;
	}

	.man-page dd {
		margin-left: 0.75rem;
	}
}

/* ------------------------------------------------------------------
   Kommentare
   ------------------------------------------------------------------ */
.comments-area {
	margin-top: 3.5rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border);
}

.comments-title,
.comment-reply-title {
	font-size: 1.2rem;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: 1.5rem;
	border-left: 1px solid var(--border);
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--border);
}

.comment-meta {
	font-size: 0.85rem;
	color: var(--muted);
}

.comment-meta .avatar {
	border-radius: 50%;
	vertical-align: middle;
	margin-right: 0.5rem;
}

.comment-form label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
	width: 100%;
	max-width: 100%;
	font: inherit;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
	margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	border-color: var(--accent);
	outline: none;
}

.comment-form .submit {
	font-family: var(--font-mono);
	color: var(--bg);
	background: var(--accent);
	border: 0;
	border-radius: 6px;
	padding: 0.55rem 1.25rem;
	cursor: pointer;
}

/* ------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------ */
.site-footer {
	border-top: 1px solid var(--border);
	padding: 1.75rem 0;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	color: var(--muted);
}

.footer-inner {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

.social-links ul,
.footer-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
}

.social-links a,
.footer-nav a {
	color: var(--muted);
}

.social-links a:hover,
.social-links a:focus,
.footer-nav a:hover,
.footer-nav a:focus {
	color: var(--accent);
}

.site-footer .copyright {
	margin: 0;
}
