/*
Theme Name: metinagaoglu
Theme URI: https://metinagaoglu.com
Author: Metin Ağaoğlu
Author URI: https://metinagaoglu.com
Description: Editorial, koyu mod öncelikli, blog odaklı kişisel WordPress teması. Numaralandırılmış arşiv, sticky meta kolonu, TR/EN destekli yapı. Twenty Seventeen yerine kullanılmak üzere kişiye özel.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
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: metinagaoglu
Tags: dark-mode, blog, editorial, two-columns, custom-colors, custom-menu, threaded-comments, translation-ready
*/

/* =====================================================================
   metinagaoglu — design tokens
   ===================================================================== */

:root {
	--bg: #0e0c0a;
	--surface: #16130f;
	--surface-2: #1d1a14;
	--ink: #ebe5d7;
	--ink-soft: #9a9286;
	--ink-faint: #5e5851;
	--rule: #2a251f;
	--rule-strong: #3a342c;
	--accent: #d6a76b;
	--accent-soft: rgba(214, 167, 107, 0.12);
	--code-bg: #0a0907;
	--code-keyword: #8ca5c6;
	--code-string: #c8a37a;
	--code-comment: #5e5851;

	--serif: "Fraunces", "Iowan Old Style", "Georgia", serif;
	--mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

	--max-w: 1120px;
	--left-w: 280px;
	--gap-x: 80px;
	--side-pad: 56px;
	--vrhythm: 1;
}

html.light {
	--bg: #f5f0e4;
	--surface: #ede7d6;
	--surface-2: #e3dcc8;
	--ink: #1a1612;
	--ink-soft: #5e5851;
	--ink-faint: #918a7d;
	--rule: #d4cdb8;
	--rule-strong: #bdb59e;
	--code-bg: #1a1612;
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg);
	color: var(--ink);
}

body {
	font-family: var(--serif);
	font-feature-settings: "ss01", "ss02", "kern", "liga";
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	min-height: 100vh;
	transition: background 240ms ease, color 240ms ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--accent); color: #1a1612; }

.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); }

.uplabel {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.rule { height: 1px; background: var(--rule); width: 100%; }
.rule-dash {
	height: 1px;
	width: 100%;
	background-image: linear-gradient(to right, var(--rule-strong) 50%, transparent 50%);
	background-size: 8px 1px;
	background-repeat: repeat-x;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	background: var(--accent);
	color: #1a1612;
	padding: 8px 14px;
	font-family: var(--mono);
	font-size: 12px;
	z-index: 100;
}
.skip-link:focus { left: 8px; }

/* =====================================================================
   shell: two-column layout
   ===================================================================== */

.shell {
	max-width: var(--max-w);
	margin: 0 auto;
	padding: 56px var(--side-pad) 120px;
	display: grid;
	grid-template-columns: var(--left-w) 1fr;
	gap: var(--gap-x);
	align-items: start;
}

.col-left {
	position: sticky;
	top: 56px;
	align-self: start;
}

.col-right { min-width: 0; }

/* =====================================================================
   identity (left column on home)
   ===================================================================== */

.identity-stamp {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.32em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.identity-name {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 38px;
	line-height: 0.98;
	letter-spacing: -0.025em;
	margin: 14px 0 0;
	font-variation-settings: "opsz" 144;
}
.identity-name .role { color: var(--accent); font-style: italic; font-weight: 500; }
.identity-name .end { color: var(--ink-soft); }

.bio {
	margin-top: 22px;
	font-family: var(--serif);
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink-soft);
	font-variation-settings: "opsz" 14;
	text-wrap: pretty;
}

.links {
	margin-top: 24px;
	font-family: var(--mono);
	font-size: 12px;
	letter-spacing: 0.02em;
	color: var(--ink-soft);
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.links a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: color 160ms ease;
	width: fit-content;
}
.links a .arrow {
	transition: transform 200ms ease, color 200ms ease;
	color: var(--ink-faint);
}
.links a:hover { color: var(--accent); }
.links a:hover .arrow { transform: translate(2px, -2px); color: var(--accent); }

/* github block */
.gh-block { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--rule-strong); }
.gh-grid {
	margin-top: 12px;
	display: grid;
	grid-template-columns: repeat(28, 1fr);
	gap: 3px;
}
.gh-cell {
	aspect-ratio: 1;
	border-radius: 1.5px;
	background: var(--rule);
}
.gh-cell[data-lvl="1"] { background: color-mix(in oklab, var(--accent) 20%, var(--rule)); }
.gh-cell[data-lvl="2"] { background: color-mix(in oklab, var(--accent) 40%, var(--rule)); }
.gh-cell[data-lvl="3"] { background: color-mix(in oklab, var(--accent) 70%, var(--rule)); }
.gh-cell[data-lvl="4"] { background: var(--accent); }

.gh-meta {
	margin-top: 10px;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--ink-faint);
	display: flex;
	justify-content: space-between;
}

/* lang & mode toggles */
.toggle-row {
	margin-top: 28px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.15em;
	color: var(--ink-faint);
	display: flex;
	gap: 18px;
	flex-wrap: wrap;
}
.toggle-row .group {
	display: flex;
	gap: 8px;
}
.toggle-row button {
	background: transparent;
	border: none;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	color: var(--ink-faint);
	cursor: pointer;
	transition: color 160ms ease;
}
.toggle-row button.on { color: var(--accent); }
.toggle-row button:not(.on):hover { color: var(--ink); }
.toggle-row .sep { color: var(--ink-faint); }

/* =====================================================================
   home — numbered archive
   ===================================================================== */

.right-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--rule);
}
.right-head .label {
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.post-list { display: flex; flex-direction: column; }

.post-row {
	display: grid;
	grid-template-columns: 56px 1fr 96px 56px;
	gap: 20px;
	align-items: baseline;
	padding: calc(18px * var(--vrhythm)) 12px;
	margin: 0 -12px;
	border-bottom: 1px solid var(--rule);
	position: relative;
	transition: background 180ms ease;
	color: inherit;
}
.post-row::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--accent-soft);
	opacity: 0;
	transition: opacity 180ms ease;
	pointer-events: none;
}
.post-row:hover::before { opacity: 1; }
.post-row .num {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-faint);
	letter-spacing: 0.05em;
	position: relative;
}
.post-row.featured .num { color: var(--accent); }
.post-row .title {
	font-family: var(--serif);
	font-weight: 500;
	font-size: 19px;
	line-height: 1.3;
	letter-spacing: -0.015em;
	color: var(--ink);
	font-variation-settings: "opsz" 24;
	position: relative;
	text-wrap: balance;
	transition: color 160ms ease;
}
.post-row.featured .title { font-weight: 600; }
.post-row:hover .title { color: var(--accent); }
.post-row .date {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-soft);
	position: relative;
}
.post-row .mins {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-faint);
	text-align: right;
	position: relative;
}
.post-row .tag-strip {
	grid-column: 2 / -1;
	margin-top: 4px;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
	position: relative;
}
.post-row .tag-strip a {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px 7px;
	border-radius: 3px;
	background: var(--surface-2);
	border: 1px solid var(--rule-strong);
	font-family: var(--mono);
	font-size: 10px;
	color: var(--ink-faint);
	letter-spacing: 0.04em;
	transition: color 160ms ease, border-color 160ms ease;
}
.post-row .tag-strip a::before { content: "#"; opacity: 0.5; }
.post-row .tag-strip a:hover { color: var(--accent); border-color: rgba(214,167,107,0.3); }

.year-row {
	display: grid;
	grid-template-columns: 56px 1fr 96px 56px;
	gap: 20px;
	align-items: center;
	padding: 30px 0 12px;
}
.year-row .year-num {
	font-family: var(--serif);
	font-size: 28px;
	font-weight: 600;
	color: var(--ink-faint);
	line-height: 1;
	letter-spacing: -0.02em;
}
.year-row .year-meta {
	grid-column: 2 / -1;
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--ink-faint);
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.archive-foot {
	margin-top: 28px;
	font-family: var(--mono);
	font-size: 11.5px;
	color: var(--ink-soft);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}
.archive-foot a { color: var(--accent); }
.archive-foot a:hover { text-decoration: underline; text-underline-offset: 4px; }
.archive-foot .pagination { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.archive-foot .pagination .page-numbers {
	color: var(--ink-faint);
}
.archive-foot .pagination .page-numbers.current,
.archive-foot .pagination a.page-numbers:hover { color: var(--accent); }

.empty-state {
	padding: 60px 0;
	font-family: var(--serif);
	font-size: 18px;
	color: var(--ink-soft);
	text-align: center;
}

/* =====================================================================
   single post
   ===================================================================== */

.back-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-soft);
	letter-spacing: 0.1em;
	margin-bottom: 28px;
	cursor: pointer;
	transition: color 160ms ease;
}
.back-link:hover { color: var(--accent); }

.post-num {
	font-family: var(--mono);
	font-size: 72px;
	font-weight: 300;
	color: var(--ink-faint);
	line-height: 0.9;
	letter-spacing: -0.04em;
	margin-bottom: 10px;
}
.post-title {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 44px;
	line-height: 1.05;
	letter-spacing: -0.025em;
	margin: 0 0 22px;
	font-variation-settings: "opsz" 144;
	text-wrap: balance;
}
.post-dek {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-size: 21px;
	line-height: 1.45;
	color: var(--ink-soft);
	margin: 0 0 36px;
	font-variation-settings: "opsz" 32;
	text-wrap: pretty;
}

.prose { max-width: 640px; }
.prose p {
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink);
	margin: 0 0 22px;
	font-variation-settings: "opsz" 14;
	text-wrap: pretty;
}
.prose > p:first-of-type::first-letter {
	font-family: var(--serif);
	font-weight: 700;
	font-size: 68px;
	line-height: 0.85;
	float: left;
	margin: 6px 10px 0 0;
	color: var(--accent);
	font-variation-settings: "opsz" 144;
}
.prose h2 {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 24px;
	line-height: 1.2;
	letter-spacing: -0.015em;
	margin: 44px 0 18px;
	color: var(--ink);
	font-variation-settings: "opsz" 48;
}
.prose h3 {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 19px;
	margin: 36px 0 14px;
	color: var(--ink);
}
.prose blockquote {
	margin: 28px 0;
	padding: 4px 0 4px 20px;
	border-left: 2px solid var(--accent);
	font-family: var(--serif);
	font-style: italic;
	font-size: 19px;
	line-height: 1.5;
	color: var(--ink-soft);
}
.prose ul, .prose ol {
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink);
	padding-left: 22px;
	margin: 0 0 22px;
}
.prose li { margin-bottom: 6px; }
.prose a {
	color: var(--accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent);
	transition: text-decoration-color 160ms ease;
}
.prose a:hover { text-decoration-color: var(--accent); }

.prose pre {
	margin: 22px 0;
	padding: 16px 18px;
	background: var(--code-bg);
	border: 1px solid var(--rule);
	border-left: 2px solid var(--accent);
	font-family: var(--mono);
	font-size: 12.5px;
	line-height: 1.75;
	color: var(--ink-soft);
	overflow-x: auto;
}
.prose pre code { background: transparent; padding: 0; color: inherit; }

.prose code {
	font-family: var(--mono);
	font-size: 0.86em;
	background: var(--surface-2);
	padding: 1px 6px;
	border-radius: 2px;
	color: var(--accent);
}

.prose img,
.prose .wp-block-image {
	margin: 28px 0;
}
.prose figcaption {
	font-family: var(--mono);
	font-size: 11px;
	color: var(--ink-soft);
	margin-top: 8px;
	text-align: center;
}

.prose .wp-block-quote { margin: 28px 0; }

.callout {
	margin: 28px 0;
	padding: 18px 22px 20px;
	border: 1px dashed var(--accent);
	background: var(--accent-soft);
}
.callout .callout-label {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.28em;
	color: var(--accent);
	text-transform: uppercase;
	margin-bottom: 8px;
}
.callout p { font-size: 16px; margin: 0; color: var(--ink); }

/* post nav */
.post-nav {
	margin-top: 56px;
	padding-top: 22px;
	border-top: 1px dashed var(--rule-strong);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 32px;
	font-family: var(--mono);
	font-size: 11.5px;
}
.post-nav .pn-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	color: var(--ink-soft);
	transition: color 160ms ease;
}
.post-nav .pn-card.right { text-align: right; align-items: flex-end; }
.post-nav .pn-card:hover { color: var(--accent); }
.post-nav .pn-card.empty { color: var(--ink-faint); }
.post-nav .pn-meta {
	font-size: 10px;
	letter-spacing: 0.22em;
	color: var(--ink-faint);
}
.post-nav .pn-title {
	font-family: var(--serif);
	font-size: 17px;
	line-height: 1.25;
	color: var(--ink);
	font-weight: 500;
	text-wrap: balance;
}
.post-nav .pn-card:hover .pn-title { color: var(--accent); }
.post-nav .pn-card.empty .pn-title { color: var(--ink-faint); }

/* meta card on post page (left column) */
.meta-card {
	margin-top: 18px;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.18em;
	color: var(--ink-faint);
}
.meta-card .meta-row {
	display: grid;
	grid-template-columns: 70px 1fr;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--rule);
}
.meta-card .meta-row:last-child { border-bottom: none; }
.meta-card .meta-row .v {
	color: var(--ink);
	letter-spacing: 0.02em;
	text-transform: none;
	font-size: 11.5px;
}
.meta-card .meta-row .v.accent { color: var(--accent); }
.meta-card .tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.meta-card .tag-list a {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 2px 8px;
	border-radius: 3px;
	background: var(--accent-soft);
	border: 1px solid rgba(214, 167, 107, 0.2);
	color: var(--accent);
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.04em;
	transition: opacity 160ms ease;
}
.meta-card .tag-list a::before { content: "#"; opacity: 0.55; }
.meta-card .tag-list a:hover { opacity: 0.7; }

/* =====================================================================
   comments
   ===================================================================== */

.comments-area {
	max-width: 640px;
	margin: 64px 0 0;
	padding-top: 24px;
	border-top: 1px dashed var(--rule-strong);
}
.comments-title {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0 0 22px;
}
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .comment {
	padding: 18px 0;
	border-bottom: 1px solid var(--rule);
}
.comment-list .comment .comment-author {
	font-family: var(--serif);
	font-size: 16px;
	font-weight: 600;
	color: var(--ink);
}
.comment-list .comment-metadata {
	font-family: var(--mono);
	font-size: 10.5px;
	color: var(--ink-faint);
	margin-top: 2px;
}
.comment-list .comment-content {
	margin-top: 10px;
	font-family: var(--serif);
	font-size: 16px;
	line-height: 1.55;
	color: var(--ink);
}
.comment-list .children {
	list-style: none;
	padding-left: 20px;
	border-left: 1px dashed var(--rule);
	margin-top: 12px;
}
.comment-respond {
	margin-top: 32px;
}
.comment-respond .comment-reply-title {
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin: 0 0 16px;
}
.comment-form label {
	display: block;
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 12px 0 6px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	background: var(--surface);
	border: 1px solid var(--rule);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 15px;
	padding: 10px 12px;
	border-radius: 0;
	transition: border-color 160ms ease;
}
.comment-form input:focus, .comment-form textarea:focus {
	outline: none;
	border-color: var(--accent);
}
.comment-form textarea { min-height: 120px; }
.comment-form .submit,
button[type="submit"],
input[type="submit"] {
	background: var(--accent);
	color: #1a1612;
	border: none;
	padding: 10px 22px;
	font-family: var(--mono);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 160ms ease;
	margin-top: 16px;
}
.comment-form .submit:hover { opacity: 0.85; }

/* =====================================================================
   archive (tag / category)
   ===================================================================== */

.archive-head {
	margin-bottom: 24px;
}
.archive-head .arc-stamp {
	font-family: var(--mono);
	font-size: 10px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--ink-soft);
}
.archive-head h1 {
	font-family: var(--serif);
	font-weight: 600;
	font-size: 38px;
	letter-spacing: -0.025em;
	margin: 12px 0 8px;
}
.archive-head .arc-desc {
	font-family: var(--serif);
	font-size: 16px;
	color: var(--ink-soft);
	margin: 0;
}

/* =====================================================================
   404, search
   ===================================================================== */

.simple-message {
	font-family: var(--serif);
	font-size: 20px;
	line-height: 1.5;
	color: var(--ink-soft);
	margin-top: 8px;
	text-wrap: pretty;
}

.search-form {
	display: flex;
	gap: 8px;
	margin-top: 18px;
}
.search-form input[type="search"] {
	background: var(--surface);
	border: 1px solid var(--rule);
	color: var(--ink);
	font-family: var(--serif);
	font-size: 15px;
	padding: 10px 12px;
	flex: 1;
}
.search-form input[type="search"]:focus { outline: none; border-color: var(--accent); }

/* =====================================================================
   responsive
   ===================================================================== */

@media (max-width: 900px) {
	.shell {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 36px 24px 80px;
	}
	.col-left {
		position: static;
	}
	.identity-name { font-size: 32px; }
	.post-row { grid-template-columns: 40px 1fr 70px; }
	.post-row .mins { display: none; }
	.year-row { grid-template-columns: 40px 1fr 70px; }
	.post-title { font-size: 34px; }
	.post-num { font-size: 56px; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav .pn-card.right { text-align: left; align-items: flex-start; }
}

@media (max-width: 480px) {
	.shell { padding: 28px 18px 60px; }
	.identity-name { font-size: 28px; }
	.post-title { font-size: 28px; }
	.post-dek { font-size: 18px; }
	.prose p, .prose ul, .prose ol { font-size: 17px; }
}
