/* ============================================================================
   Modern Minimalist Theme - inspired by Medium & Ghost
   Clean typography, generous whitespace, focus on content
   ============================================================================ */

/* CSS Reset & Base Styles
   ========================================================================== */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

:root {
	/* Colors - Neutral, elegant palette */
	--color-text: #1a1a1a;
	--color-text-light: #6b6b6b;
	--color-text-lighter: #999;
	--color-background: #ffffff;
	--color-background-alt: #fafafa;
	--color-border: #e6e6e6;
	--color-border-light: #f0f0f0;
	--color-accent: #0066cc;
	--color-accent-hover: #0052a3;

	/* Typography */
	--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-serif: "Georgia", "Times New Roman", serif;
	--font-mono: "SF Mono", "Monaco", "Consolas", monospace;

	/* Font sizes - fluid and responsive with clamp() */
	--text-xs: clamp(0.688rem, 0.65rem + 0.19vw, 0.75rem);      /* 11-12px */
	--text-sm: clamp(0.813rem, 0.77rem + 0.22vw, 0.875rem);     /* 13-14px - einheitlich für Meta, Footer, Menü */
	--text-base: clamp(0.938rem, 0.88rem + 0.29vw, 1rem);       /* 15-16px */
	--text-lg: clamp(1rem, 0.94rem + 0.31vw, 1.125rem);         /* 16-18px - Body-Text */
	--text-xl: clamp(1.125rem, 1rem + 0.63vw, 1.375rem);        /* 18-22px */
	--text-2xl: clamp(1.25rem, 1.08rem + 0.85vw, 1.625rem);     /* 20-26px */
	--text-3xl: clamp(1.5rem, 1.23rem + 1.34vw, 2.125rem);      /* 24-34px */
	--text-4xl: clamp(1.875rem, 1.42rem + 2.27vw, 2.875rem);    /* 30-46px */
	--text-5xl: clamp(1.875rem, 1.35rem + 2.63vw, 3rem);        /* 30-48px - Post-Titel (verkleinert) */

	/* Spacing */
	--space-1: 0.25rem;      /* 4px */
	--space-2: 0.5rem;       /* 8px */
	--space-3: 0.75rem;      /* 12px */
	--space-4: 1rem;         /* 16px */
	--space-5: 1.5rem;       /* 24px */
	--space-6: 2rem;         /* 32px */
	--space-8: 3rem;         /* 48px */
	--space-12: 4rem;        /* 64px */
	--space-16: 6rem;        /* 96px */

	/* Layout */
	--container-width: 1200px;
	--container-narrow: 720px;
	--content-width: 680px;

	/* Transitions */
	--transition: 200ms ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	:root {
		--color-text: #e4e4e4;
		--color-text-light: #a0a0a0;
		--color-text-lighter: #707070;
		--color-background: #0f0f0f;
		--color-background-alt: #1a1a1a;
		--color-border: #2a2a2a;
		--color-border-light: #222;
		--color-accent: #4d9fff;
		--color-accent-hover: #6bb0ff;
	}
}

html {
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	font-family: var(--font-sans);
	font-size: var(--text-lg);
	line-height: 1.6;
	color: var(--color-text);
	background-color: var(--color-background);
}

@media (max-width: 768px) {
	body {
		line-height: 1.7; /* Etwas mehr Zeilenhöhe auf mobil für bessere Lesbarkeit */
	}
}

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	background: var(--color-accent);
	color: white;
	padding: var(--space-2) var(--space-4);
	text-decoration: none;
	z-index: 1000;
	opacity: 0;
	transition: all 200ms ease;
}

.skip-link:focus {
	top: 0;
	opacity: 1;
}

/* Container System
   ========================================================================== */

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--space-5);
}

.container-narrow {
	max-width: var(--container-narrow);
	margin: 0 auto;
	padding: 0 var(--space-5);
}

@media (max-width: 768px) {
	.container,
	.container-narrow {
		padding: 0 var(--space-4);
	}
}

/* Navigation
   ========================================================================== */

.navbar {
	background: var(--color-background);
	padding: var(--space-5) 0;
	position: sticky;
	top: 0;
	z-index: 100;
	backdrop-filter: blur(10px);
	background-color: rgba(255, 255, 255, 0.95);
}

@media (prefers-color-scheme: dark) {
	.navbar {
		background-color: rgba(15, 15, 15, 0.95);
	}
}

.navbar .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.navbar-brand {
	font-size: var(--text-xl);
	font-weight: 600;
	color: var(--color-text);
	text-decoration: none;
	transition: color var(--transition);
}

.navbar-brand:hover {
	color: var(--color-accent);
}

.navbar-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: var(--space-2);
	flex-direction: column;
	gap: 4px;
}

.navbar-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-text);
	transition: all var(--transition);
}

.navbar-menu {
	display: flex;
}

.navbar-nav {
	display: flex;
	list-style: none;
	gap: var(--space-6);
	align-items: center;
}

.nav-link {
	color: var(--color-text-light);
	text-decoration: none;
	font-size: var(--text-sm);
	transition: color var(--transition);
	position: relative;
}

.nav-link:hover,
.nav-item.active .nav-link {
	color: var(--color-text);
}

/* Mobile Navigation */
@media (max-width: 768px) {
	.navbar-toggle {
		display: flex;
	}

	.navbar-menu {
		position: fixed;
		top: 73px;
		left: 0;
		right: 0;
		background: var(--color-background);
		border-bottom: 1px solid var(--color-border);
		padding: var(--space-5);
		transform: translateY(-100%);
		opacity: 0;
		transition: all 300ms ease;
		pointer-events: none;
	}

	.navbar-menu.active {
		transform: translateY(0);
		opacity: 1;
		pointer-events: auto;
	}

	.navbar-nav {
		flex-direction: column;
		gap: var(--space-4);
		align-items: flex-start;
	}
	
	.nav-link {
		font-size: var(--text-base);
	}
}

/* Main Content Area
   ========================================================================== */

.main {
	padding: var(--space-12) 0;
	min-height: 60vh;
}

/* Archive Header
   ========================================================================== */

.archive-header {
	margin-bottom: var(--space-12);
	padding-bottom: var(--space-6);
}

.archive-title {
	font-size: var(--text-4xl);
	font-weight: 700;
	line-height: 1.2;
	color: var(--color-text);
}

/* Post Grid
   ========================================================================== */

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: var(--space-8);
	margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
	.post-grid {
		grid-template-columns: 1fr;
		gap: var(--space-6);
	}
}

.post-card {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.post-card-image-link {
	display: block;
	margin-bottom: var(--space-4);
	overflow: hidden;
	border-radius: 8px;
}

.post-card-image {
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.post-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.post-card-content {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.post-card-title {
	font-size: var(--text-2xl);
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: var(--space-3);
}

.post-card-title a {
	color: var(--color-text);
	text-decoration: none;
	transition: color var(--transition);
}

.post-card-title a:hover {
	color: var(--color-accent);
}

.post-card-excerpt {
	color: var(--color-text-light);
	font-size: var(--text-base);
	margin-bottom: var(--space-4);
	line-height: 1.6;
	line-height: 1.6;
	flex: 1;
}

.post-card-meta {
	font-size: var(--text-sm);
	color: var(--color-text-lighter);
	margin-top: auto;
}

.reading-time {
	color: var(--color-text-lighter);
}

/* No Content Message
   ========================================================================== */

.no-content {
	text-align: center;
	padding: var(--space-12) 0;
	color: var(--color-text-light);
}

/* Pagination
   ========================================================================== */

.pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-6);
	padding: var(--space-8) 0;
	margin-top: var(--space-8);
	border-top: 1px solid var(--color-border);
}

.pagination-link {
	color: var(--color-accent);
	text-decoration: none;
	font-size: var(--text-base);
	transition: color var(--transition);
}

.pagination-link:hover {
	color: var(--color-accent-hover);
}

.pagination-info {
	color: var(--color-text-light);
	font-size: var(--text-sm);
}

/* Single Post Page
   ========================================================================== */

.single-post {
	padding: var(--space-12) 0;
}

.post-header {
	margin-bottom: var(--space-8);
	text-align: center;
}

.post-title {
	font-size: var(--text-5xl);
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: var(--space-4);
	color: var(--color-text);
}

.post-meta {
	font-size: var(--text-sm);
	color: var(--color-text-light);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: var(--space-2);
	flex-wrap: wrap;
}

.meta-separator {
	color: var(--color-text-lighter);
}

.post-cover {
	margin: var(--space-8) 0;
	border-radius: 12px;
	overflow: hidden;
}

.post-cover img {
	width: 100%;
	height: auto;
	display: block;
}

.post-content {
	font-size: var(--text-lg);
	line-height: 1.8;
	color: var(--color-text);
}

/* Post Content Typography
   ========================================================================== */

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
	font-weight: 600;
	line-height: 1.3;
	margin-top: var(--space-8);
	margin-bottom: var(--space-4);
	color: var(--color-text);
}

.post-content h1 { font-size: var(--text-4xl); }
.post-content h2 { font-size: var(--text-3xl); }
.post-content h3 { font-size: var(--text-2xl); }
.post-content h4 { font-size: var(--text-xl); }
.post-content h5 { font-size: var(--text-lg); }
.post-content h6 { font-size: var(--text-base); }

.post-content p {
	margin-bottom: var(--space-5);
}

.post-content a {
	color: var(--color-accent);
	text-decoration: none;
	border-bottom: 1px solid var(--color-accent);
	transition: all var(--transition);
}

.post-content a:hover {
	color: var(--color-accent-hover);
	border-bottom-color: var(--color-accent-hover);
}

.post-content ul,
.post-content ol {
	margin-bottom: var(--space-5);
	padding-left: var(--space-6);
}

.post-content li {
	margin-bottom: var(--space-2);
}

.post-content blockquote {
	margin: var(--space-6) 0;
	padding: var(--space-4) var(--space-6);
	border-left: 4px solid var(--color-border);
	background: var(--color-background-alt);
	font-style: italic;
	color: var(--color-text-light);
}

.post-content blockquote p:last-child {
	margin-bottom: 0;
}

.post-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: var(--space-6) auto;
	border-radius: 8px;
}

.post-content code {
	font-family: var(--font-mono);
	font-size: 0.9em;
	background: var(--color-background-alt);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--color-text);
}

.post-content pre {
	background: var(--color-background-alt);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	padding: var(--space-4);
	overflow-x: auto;
	margin: var(--space-6) 0;
}

.post-content pre code {
	background: none;
	padding: 0;
	border-radius: 0;
}

.post-content hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: var(--space-8) 0;
}

.post-content table {
	width: 100%;
	border-collapse: collapse;
	margin: var(--space-6) 0;
}

.post-content th,
.post-content td {
	padding: var(--space-3);
	border: 1px solid var(--color-border);
	text-align: left;
}

.post-content th {
	background: var(--color-background-alt);
	font-weight: 600;
}

.post-footer {
	margin-top: var(--space-12);
	padding-top: var(--space-6);
	color: var(--color-text-light);
	font-size: var(--text-sm);
}

.post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin-bottom: var(--space-4);
}

.post-tags .tag {
	display: inline-block;
	padding: var(--space-1) var(--space-3);
	background: var(--color-background-alt);
	border-radius: 4px;
	color: var(--color-text-light);
	text-decoration: none;
	font-size: var(--text-sm);
	transition: all var(--transition);
}

.post-tags .tag:hover {
	background: var(--color-border);
	color: var(--color-text);
}

/* Footer
   ========================================================================== */

.footer {
	padding: var(--space-8) 0;
	margin-top: var(--space-16);
}

.footer-content {
	text-align: center;
}

.footer-text {
	color: var(--color-text-light);
	font-size: var(--text-sm);
	margin: 0;
}

/* Utility Classes
   ========================================================================== */

.seo-hidden {
	display: none !important;
	visibility: hidden;
}

/* Print Styles
   ========================================================================== */

@media print {
	.navbar,
	.pagination,
	.footer {
		display: none;
	}

	.post-content {
		font-size: 12pt;
		line-height: 1.5;
	}

	.post-content a {
		text-decoration: underline;
		color: #000;
	}
}
