/* =========================================================================
   TESRA THEME — main.css
   Terminal / IDE estetiğinde karanlık tema.
   Renk paleti "One Dark / Dracula" esintili syntax-highlight tonlarındadır.
   ========================================================================= */

:root {
	--bg: #0d1117;
	--bg-elevated: #11161d;
	--bg-panel: #161b22;
	--border: #21262d;
	--border-soft: #30363d;
	--text: #c9d1d9;
	--text-muted: #8b949e;
	--text-dim: #6e7681;
	--accent: #58a6ff;      /* mavi — linkler / anahtar kelime */
	--accent-2: #79c0ff;    /* açık mavi */
	--green: #7ee787;       /* string / başarı */
	--purple: #d2a8ff;      /* keyword */
	--orange: #ffa657;      /* sayı / uyarı */
	--pink: #ff7b72;        /* hata / etiket */
	--yellow: #e3b341;      /* comment vurgusu */
	--radius: 8px;
	--font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, Menlo, monospace;
	--max-width: 900px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-mono);
	font-size: 15.5px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-2); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
	margin: 1.8em 0 0.6em;
}
h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

blockquote {
	margin: 1.5em 0;
	padding: 0.8em 1.2em;
	border-left: 3px solid var(--accent);
	background: var(--bg-panel);
	color: var(--text-muted);
	border-radius: 0 var(--radius) var(--radius) 0;
}

code, kbd, samp {
	font-family: var(--font-mono);
	background: var(--bg-panel);
	color: var(--orange);
	padding: 0.15em 0.4em;
	border-radius: 4px;
	font-size: 0.92em;
}

pre {
	background: var(--bg-panel);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 1.2em;
	overflow-x: auto;
	margin: 1.5em 0;
}
pre code { background: none; padding: 0; color: var(--text); }

hr { border: none; border-top: 1px dashed var(--border-soft); margin: 2.5em 0; }

::selection { background: var(--accent); color: #0d1117; }

/* Skip link */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: #0d1117;
	padding: 0.6em 1em;
	z-index: 999;
}
.skip-link:focus { left: 1em; top: 1em; }

/* ------------------------------------------------------------------ */
/* Layout                                                              */
/* ------------------------------------------------------------------ */
.site-wrapper {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 1.4em;
}

.terminal-window {
	background: var(--bg-elevated);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.terminal-titlebar {
	display: flex;
	align-items: center;
	gap: 0.5em;
	padding: 0.7em 1em;
	background: var(--bg-panel);
	border-bottom: 1px solid var(--border-soft);
}
.terminal-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }
.terminal-titlebar-label {
	margin-left: 0.6em;
	color: var(--text-dim);
	font-size: 0.85em;
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */
.site-header {
	border-bottom: 1px solid var(--border);
	background: var(--bg-elevated);
	position: sticky;
	top: 0;
	z-index: 50;
}
.site-header-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1em 1.4em;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
}
.site-branding { display: flex; align-items: baseline; gap: 0.4em; }
.site-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: #fff;
	margin: 0;
}
.site-title a { color: #fff; }
.site-title a:hover { color: var(--accent); text-decoration: none; }
.site-title::before { content: "~/"; color: var(--accent); font-weight: 400; }
.site-description {
	font-size: 0.8rem;
	color: var(--text-dim);
	margin: 0.2em 0 0;
}

.cursor-blink {
	display: inline-block;
	width: 8px;
	height: 1.1em;
	background: var(--accent);
	margin-left: 3px;
	animation: blink 1s steps(1) infinite;
	vertical-align: text-bottom;
}
@keyframes blink { 50% { opacity: 0; } }

/* Nav */
.primary-navigation ul {
	list-style: none;
	display: flex;
	gap: 1.4em;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}
.primary-navigation a {
	color: var(--text-muted);
	font-size: 0.92rem;
}
.primary-navigation a:hover,
.primary-navigation .current-menu-item > a { color: var(--accent); text-decoration: none; }
.primary-navigation li > a::before { content: "// "; color: var(--text-dim); }

.menu-toggle {
	display: none;
	background: var(--bg-panel);
	border: 1px solid var(--border-soft);
	color: var(--text);
	font-family: var(--font-mono);
	padding: 0.4em 0.7em;
	border-radius: 6px;
	cursor: pointer;
}

/* ------------------------------------------------------------------ */
/* Hero / front page                                                   */
/* ------------------------------------------------------------------ */
.hero {
	padding: 3em 0 1em;
}
.hero .terminal-body { padding: 1.4em 1.6em; }
.hero-line { margin: 0 0 0.5em; }
.hero-prompt { color: var(--green); }
.hero-prompt::after { content: " $"; color: var(--text-dim); }
.hero-command { color: var(--text); }
.hero-output { color: var(--text-muted); margin-top: 0.8em; }
.hero-output .key { color: var(--purple); }
.hero-output .val { color: var(--green); }

.section-heading {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin-top: 2.5em;
}
.section-heading::before { content: attr(data-tag); color: var(--purple); font-size: 0.85em; }
.section-heading h2 { margin: 0; }

/* ------------------------------------------------------------------ */
/* Cards: posts / projects                                             */
/* ------------------------------------------------------------------ */
.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 1.2em;
	margin: 1.4em 0 2em;
}

.card {
	background: var(--bg-elevated);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 1.2em;
	transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-meta { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.4em; }
.card-meta .badge {
	display: inline-block;
	background: var(--bg-panel);
	color: var(--purple);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	padding: 0.1em 0.5em;
	margin-right: 0.4em;
	font-size: 0.75rem;
}
.card h3 { margin: 0.2em 0 0.4em; font-size: 1.05rem; }
.card h3 a { color: #fff; }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.6em; }
.card .read-more { font-size: 0.85rem; color: var(--green); }
.card .read-more::before { content: "→ "; }

/* Post list (article) */
.entry {
	border-bottom: 1px solid var(--border);
	padding: 1.6em 0;
}
.entry:first-child { padding-top: 0; }
.entry-title { font-size: 1.35rem; margin: 0 0 0.3em; }
.entry-title a { color: #fff; }
.entry-title a:hover { color: var(--accent); text-decoration: none; }
.entry-meta {
	color: var(--text-dim);
	font-size: 0.82rem;
	margin-bottom: 0.8em;
	display: flex;
	gap: 0.9em;
	flex-wrap: wrap;
}
.entry-meta span:not(:last-child)::after { content: "•"; margin-left: 0.9em; color: var(--border-soft); }
.entry-meta a { color: var(--text-dim); }
.entry-meta a:hover { color: var(--accent); }
.entry-thumbnail { margin: 0.8em 0; }
.entry-summary p:last-child { margin-bottom: 0; }

.entry-content { margin-top: 1em; }
.entry-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.4em 0;
	font-size: 0.9rem;
}
.entry-content th, .entry-content td {
	border: 1px solid var(--border-soft);
	padding: 0.5em 0.8em;
	text-align: left;
}
.entry-content th { background: var(--bg-panel); color: var(--purple); }

.entry-tags { margin-top: 1.4em; }
.entry-tags a {
	display: inline-block;
	font-size: 0.8rem;
	color: var(--text-muted);
	background: var(--bg-panel);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	padding: 0.15em 0.6em;
	margin: 0 0.3em 0.3em 0;
}
.entry-tags a::before { content: "#"; color: var(--pink); }

/* Pagination */
.pagination, .post-navigation {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin: 2em 0;
	flex-wrap: wrap;
}
.pagination a, .pagination span.current,
.post-navigation a {
	border: 1px solid var(--border-soft);
	border-radius: 6px;
	padding: 0.5em 1em;
	color: var(--text);
	font-size: 0.88rem;
}
.pagination span.current { background: var(--accent); color: #0d1117; border-color: var(--accent); }
.pagination a:hover, .post-navigation a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Comments */
.comments-area { margin-top: 2.5em; }
.comment-list { list-style: none; padding: 0; }
.comment-body {
	background: var(--bg-elevated);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 1em 1.2em;
	margin-bottom: 1em;
}
.comment-author { color: var(--accent); font-size: 0.9rem; }
.comment-metadata { color: var(--text-dim); font-size: 0.78rem; }
.comment-reply-link {
	font-size: 0.8rem;
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	padding: 0.1em 0.6em;
}
.comment-form input, .comment-form textarea {
	width: 100%;
	background: var(--bg-panel);
	border: 1px solid var(--border-soft);
	border-radius: 6px;
	color: var(--text);
	font-family: var(--font-mono);
	padding: 0.6em 0.8em;
	margin-bottom: 1em;
}
.comment-form label { display: block; margin-bottom: 0.3em; font-size: 0.85rem; color: var(--text-muted); }
.btn, input[type="submit"], button, .comment-form input[type="submit"] {
	display: inline-block;
	background: var(--accent);
	color: #0d1117;
	border: none;
	border-radius: 6px;
	padding: 0.6em 1.3em;
	font-family: var(--font-mono);
	font-weight: 600;
	cursor: pointer;
}
.btn:hover, input[type="submit"]:hover, button:hover { background: var(--accent-2); }

/* ------------------------------------------------------------------ */
/* Sidebar / widgets                                                   */
/* ------------------------------------------------------------------ */
.content-layout { display: grid; grid-template-columns: 1fr; gap: 2em; }
.content-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 280px; }

.widget {
	background: var(--bg-elevated);
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	padding: 1.1em 1.2em;
	margin-bottom: 1.4em;
}
.widget-title {
	font-size: 0.95rem;
	color: var(--purple);
	margin: 0 0 0.8em;
	font-weight: 600;
}
.widget-title::before { content: "# "; color: var(--text-dim); }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 0.3em 0; border-bottom: 1px dashed var(--border); font-size: 0.88rem; }
.widget li:last-child { border-bottom: none; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */
.site-footer {
	border-top: 1px solid var(--border);
	margin-top: 3em;
	background: var(--bg-elevated);
}
.site-footer-inner {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 1.6em 1.4em;
	display: flex;
	justify-content: space-between;
	gap: 1em;
	flex-wrap: wrap;
	color: var(--text-dim);
	font-size: 0.82rem;
}
.footer-social a { margin-left: 0.8em; color: var(--text-dim); }
.footer-social a:hover { color: var(--accent); }

/* 404 */
.error-404 { text-align: center; padding: 3em 0; }
.error-404 .error-code {
	font-size: 4rem;
	color: var(--pink);
	font-weight: 700;
	margin-bottom: 0.2em;
}

/* Search form */
.search-form {
	display: flex;
	gap: 0.5em;
	margin: 1em 0;
}
.search-form input[type="search"] {
	flex: 1;
	background: var(--bg-panel);
	border: 1px solid var(--border-soft);
	border-radius: 6px;
	padding: 0.5em 0.8em;
	color: var(--text);
	font-family: var(--font-mono);
}

/* Alignments (Gutenberg support) */
.alignleft { float: left; margin: 0.4em 1.4em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.4em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption-text { color: var(--text-dim); font-size: 0.8rem; text-align: center; }

/* Screen reader text */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px,1px,1px,1px);
	white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* İçindekiler (TOC)                                                   */
/* ------------------------------------------------------------------ */
.toc { margin: 1.6em 0 2em; }
.toc .toc-body { padding: 1.1em 1.4em; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc-counter; }
.toc li { counter-increment: toc-counter; padding: 0.25em 0; font-size: 0.9rem; }
.toc li::before {
	content: counter(toc-counter) ".";
	color: var(--purple);
	margin-right: 0.5em;
}
.toc li.toc-level-3 { padding-left: 1.4em; font-size: 0.85rem; }
.toc a { color: var(--text-muted); }
.toc a:hover { color: var(--accent); text-decoration: none; }

/* Başlıklara "kalıcı bağlantı" hissi veren anchor işareti */
.entry-content h2[id]:hover::after,
.entry-content h3[id]:hover::after {
	content: " #";
	color: var(--text-dim);
	font-weight: 400;
}

/* ------------------------------------------------------------------ */
/* Kod bloğu (Prism.js) ince ayarları                                  */
/* ------------------------------------------------------------------ */
.entry-content pre[class*="language-"] {
	border: 1px solid var(--border-soft);
	border-radius: var(--radius);
	font-size: 0.88rem;
}

/* ------------------------------------------------------------------ */
/* Tech Stack widget                                                   */
/* ------------------------------------------------------------------ */
.tech-stack-badges { display: flex; flex-wrap: wrap; gap: 0.4em; }
.tech-stack-badges .badge {
	background: var(--bg-panel);
	color: var(--purple);
	border: 1px solid var(--border-soft);
	border-radius: 4px;
	padding: 0.2em 0.6em;
	font-size: 0.8rem;
}

/* İlgili yazılar */
.related-posts { margin-top: 2.5em; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 720px) {
	.content-layout.has-sidebar { grid-template-columns: 1fr; }
	.menu-toggle { display: inline-block; }
	.primary-navigation { display: none; width: 100%; }
	.primary-navigation.is-open { display: block; }
	.primary-navigation ul { flex-direction: column; gap: 0.2em; padding-top: 0.6em; }
	.site-header-inner { flex-direction: column; align-items: flex-start; }
}
