/*
Theme Name: Twenty Twelve Modern
Theme URI: https://example.com/twentytwelve-modern
Author: Claude
Author URI: https://claude.ai
Description: A modern refresh of the classic Twenty Twelve theme. Same clean structure, updated typography with Source Serif 4, warm terracotta accent colour, and improved spacing.
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
Tags: blog, one-column, two-columns, right-sidebar, flexible-header, custom-background, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
Text Domain: twentytwelve-modern
*/

/* ==========================================================================
   ROOT VARIABLES
   ========================================================================== */

:root {
	--accent:       #C0623A;
	--accent-hover: #A34E2A;
	--text:         #1a1a1a;
	--text-muted:   #5a5a5a;
	--text-light:   #888;
	--border:       #ddd;
	--border-light: #ececec;
	--bg:           #fff;
	--bg-page:      #f0eeeb;
	--font-serif:   'Source Serif 4', Georgia, 'Times New Roman', serif;
	--content-width: 1080px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
	font-size: 18px;
}

body {
	background: var(--bg-page);
	font-family: var(--font-serif);
	font-size: 1rem;
	line-height: 1.75;
	color: var(--text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	margin: 0;
	padding: 0;
}

a {
	color: var(--accent);
	text-decoration: underline;
	text-decoration-color: rgba(192, 98, 58, 0.35);
	text-underline-offset: 3px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover,
a:focus {
	color: var(--accent-hover);
	text-decoration-color: var(--accent-hover);
}

a:focus {
	outline: none;
}

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

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

/* ==========================================================================
   LAYOUT WRAPPER
   ========================================================================== */

#page {
	max-width: var(--content-width);
	margin: 0 auto;
	background: var(--bg);
	box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 4px 40px rgba(0,0,0,0.07);
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */

#masthead {
	padding: 40px 40px 28px;
	border-bottom: 1px solid var(--border-light);
}

.site-title {
	font-family: var(--font-serif);
	font-size: 1.78rem;
	font-weight: 400;
	letter-spacing: -0.01em;
	line-height: 1.1;
	margin: 0 0 4px;
}

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

.site-title a:hover {
	color: var(--accent);
	text-decoration: none;
}

.site-description {
	font-family: var(--font-serif);
	font-size: 0.83rem;
	font-weight: 300;
	font-style: italic;
	color: var(--text-muted);
	margin: 0;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

#site-navigation {
	background: var(--bg);
	border-bottom: 1px solid var(--border);
	padding: 0 40px;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
}

.main-navigation li {
	position: relative;
}

.main-navigation li + li {
	margin-left: 24px;
}

.main-navigation a {
	display: block;
	font-family: var(--font-serif);
	font-size: 0.67rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
	text-decoration: none;
	padding: 14px 0;
	transition: color 0.15s ease;
	position: relative;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_item > a,
.main-navigation .current_page_ancestor > a {
	color: var(--text);
	text-decoration: none;
}

.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a {
	color: var(--text);
	border-bottom: 2px solid var(--accent);
	margin-bottom: -1px;
}



/* Dropdown */
.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 99999;
	background: var(--bg);
	border: 1px solid var(--border-light);
	box-shadow: 0 4px 16px rgba(0,0,0,0.08);
	min-width: 180px;
	flex-direction: column;
}

.main-navigation ul ul a {
	padding: 10px 16px;
	font-size: 0.67rem;
	white-space: nowrap;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	display: flex;
}

/* Menu toggle (mobile) */
.menu-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--font-serif);
	font-size: 0.67rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
	padding: 14px 0;
}

/* ==========================================================================
   CONTENT LAYOUT
   ========================================================================== */

#main {
	padding: 0 40px;
}

#primary {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 0;
	padding-top: 44px;
	padding-bottom: 48px;
}

/* Full-width (no sidebar) pages */
.no-sidebar #primary {
	grid-template-columns: 1fr;
}

#content {
	padding-right: 48px;
	border-right: 1px solid var(--border-light);
	min-width: 0;
}

.no-sidebar #content {
	padding-right: 0;
	border-right: none;
	max-width: 720px;
}

/* ==========================================================================
   ARTICLES & POSTS
   ========================================================================== */

.hentry {
	margin-bottom: 48px;
	padding-bottom: 48px;
	border-bottom: 1px solid var(--border-light);
}

.hentry:last-of-type {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.entry-header {
	margin-bottom: 24px;
}

.entry-title {
	font-family: var(--font-serif);
	font-size: 1.89rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--text);
	margin: 0 0 8px;
}

.entry-title a {
	color: var(--text);
	text-decoration: none;
}

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

.entry-meta {
	font-size: 0.78rem;
	color: var(--text-light);
	letter-spacing: 0.02em;
}

.entry-meta a {
	color: var(--text-muted);
	text-decoration: none;
}

.entry-meta a:hover {
	color: var(--accent);
}

.entry-meta .sep {
	margin: 0 5px;
	color: var(--border);
}

.entry-content,
.entry-summary {
	font-size: 0.944rem;
	line-height: 1.8;
	color: #2a2a2a;
}

.entry-content p,
.entry-summary p {
	margin: 0 0 1.2em;
}

.entry-content p:last-child,
.entry-summary p:last-child {
	margin-bottom: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	font-family: var(--font-serif);
	font-weight: 400;
	color: var(--text);
	margin: 1.6em 0 0.6em;
	line-height: 1.25;
	letter-spacing: -0.01em;
}

.entry-content h2 { font-size: 1.44rem; }
.entry-content h3 { font-size: 1.22rem; }
.entry-content h4 { font-size: 1rem; font-weight: 600; }

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.2em 1.4em;
	padding: 0;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content blockquote {
	margin: 1.6em 0;
	padding: 0 0 0 1.4em;
	border-left: 3px solid var(--accent);
	color: var(--text-muted);
	font-style: italic;
}

.entry-content blockquote cite {
	display: block;
	font-style: normal;
	font-size: 0.83rem;
	margin-top: 0.5em;
	color: var(--text-light);
}

.entry-content pre {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.83rem;
	background: #f7f5f2;
	border: 1px solid var(--border-light);
	border-radius: 3px;
	padding: 1.2em;
	overflow-x: auto;
	margin: 0 0 1.2em;
}

.entry-content code {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.83rem;
	background: #f7f5f2;
	border: 1px solid var(--border-light);
	border-radius: 2px;
	padding: 1px 5px;
}

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

.entry-content img {
	border-radius: 3px;
}

.entry-content .wp-caption {
	max-width: 100%;
}

.entry-content .wp-caption-text {
	font-size: 0.78rem;
	color: var(--text-light);
	text-align: center;
	margin-top: 6px;
	font-style: italic;
}

/* Post format: image feature on index */
.entry-content-with-image {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	align-items: start;
}

/* Post thumbnail */
.post-thumbnail {
	margin-bottom: 24px;
}

.post-thumbnail img {
	width: 100%;
	border-radius: 3px;
}

.entry-footer {
	margin-top: 24px;
	font-size: 0.78rem;
	color: var(--text-light);
}

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

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

/* Read more link */
.more-link {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--accent);
	text-decoration: none;
	margin-top: 12px;
	transition: color 0.15s;
}

.more-link:hover {
	color: var(--accent-hover);
	text-decoration: none;
}

/* ==========================================================================
   PAGE HEADER (archive, search)
   ========================================================================== */

.page-header {
	margin-bottom: 32px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--border-light);
}

.page-title {
	font-family: var(--font-serif);
	font-size: 1.44rem;
	font-weight: 400;
	letter-spacing: -0.01em;
	color: var(--text);
	margin: 0 0 6px;
}

.page-description {
	font-size: 0.83rem;
	color: var(--text-muted);
	font-style: italic;
	margin: 0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

#secondary {
	padding-left: 40px;
	min-width: 0;
}

.widget {
	margin-bottom: 36px;
}

.widget-title {
	font-family: var(--font-serif);
	font-size: 0.61rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--text-muted);
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--border-light);
}

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

.widget ul li {
	padding: 7px 0;
	border-bottom: 1px solid var(--border-light);
	font-size: 0.83rem;
	line-height: 1.4;
}

.widget ul li:last-child {
	border-bottom: none;
}

.widget ul li a {
	color: var(--accent);
	text-decoration: none;
	display: block;
}

.widget ul li a:hover {
	color: var(--accent-hover);
}

/* Recent posts widget date */
.widget_recent_entries .post-date {
	display: block;
	font-size: 0.67rem;
	color: var(--text-light);
	margin-top: 2px;
}

/* Search widget */
.widget_search .search-field {
	width: 100%;
	font-family: var(--font-serif);
	font-size: 0.83rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 8px 10px;
	outline: none;
	transition: border-color 0.15s;
}

.widget_search .search-field:focus {
	border-color: var(--accent);
}

.widget_search .search-submit {
	display: none;
}

/* Text widget */
.widget p {
	font-size: 0.83rem;
	line-height: 1.7;
	color: var(--text-muted);
	margin: 0 0 0.8em;
}

.widget p:last-child { margin-bottom: 0; }

/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

#colophon {
	padding: 18px 40px;
	border-top: 1px solid var(--border-light);
	background: var(--bg);
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.site-info {
	font-size: 0.69rem;
	color: var(--text-light);
}

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

.site-info a:hover {
	color: var(--accent-hover);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.navigation {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--border-light);
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.nav-previous,
.nav-next {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
}

.nav-previous a,
.nav-next a {
	color: var(--accent);
	text-decoration: none;
}

.nav-previous a:hover,
.nav-next a:hover {
	color: var(--accent-hover);
}

.page-numbers {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
}

.page-numbers li a,
.page-numbers li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: 0.83rem;
	color: var(--text-muted);
	text-decoration: none;
	border: 1px solid var(--border-light);
	border-radius: 3px;
	transition: border-color 0.15s, color 0.15s;
}

.page-numbers li a:hover {
	border-color: var(--accent);
	color: var(--accent);
}

.page-numbers li .current {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

#comments {
	margin-top: 48px;
	padding-top: 32px;
	border-top: 1px solid var(--border-light);
}

.comments-title {
	font-family: var(--font-serif);
	font-size: 1.22rem;
	font-weight: 400;
	letter-spacing: -0.01em;
	margin: 0 0 28px;
}

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

.comment-list .children {
	list-style: none;
	margin: 0;
	padding-left: 32px;
}

.comment {
	margin-bottom: 28px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--border-light);
}

.comment:last-child {
	border-bottom: none;
}

.comment-body {
	padding: 0;
}

/* footer.comment-meta contains div.comment-author + div.comment-metadata stacked */
.comment-meta {
	display: grid;
	grid-template-columns: 44px 1fr;
	column-gap: 12px;
	margin-bottom: 12px;
}

/* Avatar spans both rows on the left */
.comment-author {
	grid-column: 1;
	grid-row: 1;
	display: flex;
	align-items: flex-start;
}

.comment-author .avatar {
	border-radius: 50%;
	width: 40px;
	height: 40px;
	display: block;
}

/* Name + "sagt:" on the right, first row */
.comment-author .fn {
	display: none; /* shown via comment-meta grid layout below */
}

.comment-meta .comment-author {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.comment-meta .comment-author .avatar {
	border-radius: 50%;
	width: 40px;
	height: 40px;
	flex-shrink: 0;
}

.comment-meta .comment-author .fn {
	display: inline;
	font-weight: 600;
	font-size: 0.94rem;
	color: var(--text);
}

.comment-meta .comment-author .fn a {
	color: var(--accent);
	text-decoration: none;
}

.comment-meta .comment-author .fn a:hover {
	color: var(--accent-hover);
}

.comment-meta .comment-author .says {
	font-weight: 400;
	font-size: 0.94rem;
	color: var(--text-muted);
	margin-left: -4px; /* tighten gap between fn and says */
}

/* Metadata (date) indented to align under the name */
.comment-metadata {
	grid-column: 1 / -1;
	padding-left: 50px; /* 40px avatar + 10px gap */
	font-size: 0.72rem;
	color: var(--text-light);
	margin-top: 1px;
}

.comment-metadata a {
	color: var(--text-light);
	text-decoration: none;
}

.comment-metadata a:hover {
	color: var(--accent);
}

/* Comment text and reply also indented */
.comment-content {
	padding-left: 50px;
	margin-top: 6px;
}

.comment-content p {
	font-size: 0.94rem;
	margin: 0 0 0.8em;
}

.reply {
	margin-top: 8px;
	padding-left: 50px;
}

.comment-content p {
	font-size: 0.94rem;
	margin: 0 0 0.8em;
}

.reply {
	margin-top: 8px;
}

.comment-reply-link {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--text-muted);
	text-decoration: none;
}

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

/* Comment form */
.comment-respond {
	margin-top: 40px;
}

.comment-reply-title {
	font-family: var(--font-serif);
	font-size: 1.22rem;
	font-weight: 400;
	margin: 0 0 24px;
}

.comment-form label {
	display: block;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--text-muted);
	margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	font-family: var(--font-serif);
	font-size: 0.94rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 9px 12px;
	outline: none;
	transition: border-color 0.15s;
	margin-bottom: 16px;
}

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

.comment-form textarea {
	min-height: 140px;
	resize: vertical;
}

.comment-form .form-submit input[type="submit"] {
	font-family: var(--font-serif);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #fff;
	background: var(--accent);
	border: none;
	border-radius: 3px;
	padding: 10px 22px;
	cursor: pointer;
	transition: background 0.15s;
}

.comment-form .form-submit input[type="submit"]:hover {
	background: var(--accent-hover);
}

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */

.search-form {
	display: flex;
	gap: 8px;
}

.search-field {
	flex: 1;
	font-family: var(--font-serif);
	font-size: 0.94rem;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 9px 12px;
	outline: none;
	transition: border-color 0.15s;
}

.search-field:focus {
	border-color: var(--accent);
}

.search-submit {
	font-family: var(--font-serif);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	background: var(--accent);
	border: none;
	border-radius: 3px;
	padding: 9px 16px;
	cursor: pointer;
	transition: background 0.15s;
}

.search-submit:hover {
	background: var(--accent-hover);
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-404 .page-title {
	font-size: 1.89rem;
}

.error-404 .page-content p {
	font-size: 0.94rem;
	color: var(--text-muted);
}

/* ==========================================================================
   STICKY POST
   ========================================================================== */

.sticky {
	background: #faf9f7;
	border: 1px solid var(--border-light);
	border-radius: 4px;
	padding: 28px;
	margin-bottom: 48px;
}

/* ==========================================================================
   SCREEN READER TEXT
   ========================================================================== */

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
	white-space: nowrap;
}

.screen-reader-text:focus {
	background-color: #fff;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0,0,0,0.3);
	clip: auto !important;
	color: var(--accent);
	display: block;
	font-size: 0.875rem;
	font-weight: 600;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 780px) {
	#primary {
		grid-template-columns: 1fr;
	}

	#content {
		padding-right: 0;
		border-right: none;
	}

	#secondary {
		padding-left: 0;
		border-top: 1px solid var(--border-light);
		padding-top: 40px;
		margin-top: 8px;
	}


	.entry-content-with-image {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 600px) {
	#masthead,
	#main,
	#colophon {
		padding-left: 20px;
		padding-right: 20px;
	}

	#site-navigation {
		padding-left: 20px;
		padding-right: 20px;
	}

	.site-title {
		font-size: 1.44rem;
	}

	.entry-title {
		font-size: 1.44rem;
	}

	.menu-toggle {
		display: block;
	}

	.main-navigation ul {
		display: none;
		flex-direction: column;
		padding-bottom: 12px;
	}

	.main-navigation.toggled ul {
		display: flex;
	}

	.main-navigation li + li {
		margin-left: 0;
	}

	.main-navigation a {
		padding: 10px 0;
	}

	.main-navigation .current-menu-item > a {
		border-bottom: none;
	}

	#colophon {
		flex-direction: column;
		align-items: flex-start;
	}
}
