/**
 * TuzMektup Theme — independent modern design
 * Colors: navy + gold #C5A059
 * Type: Fraunces (headings) + Manrope (body)
 */

:root {
	--tm-ink: #142033;
	--tm-ink-soft: #2a3548;
	--tm-gold: #c5a059;
	--tm-gold-deep: #a8863f;
	--tm-gold-soft: rgba(197, 160, 89, 0.14);
	--tm-paper: #f0f1f4;
	--tm-panel: #fbfbfc;
	--tm-line: #dde1e8;
	--tm-mute: #6b7382;
	--tm-rank: #c5a059;
	--tm-radius: 14px;
	--tm-pill: 999px;
	--tm-display: "Fraunces", Georgia, "Times New Roman", serif;
	--tm-body: "Manrope", system-ui, sans-serif;
	--tm-max: 1200px;
	--tm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--tm-body);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.65;
	color: var(--tm-ink);
	background:
		radial-gradient(1200px 500px at 10% -10%, rgba(197, 160, 89, 0.09), transparent 55%),
		radial-gradient(900px 400px at 100% 0%, rgba(20, 32, 51, 0.05), transparent 50%),
		var(--tm-paper);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s var(--tm-ease);
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--tm-display);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--tm-ink);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.tm-skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	z-index: 999;
	padding: 0.75rem 1rem;
	background: var(--tm-gold);
	color: var(--tm-ink);
	border-radius: var(--tm-pill);
}

.tm-skip-link:focus {
	left: 1rem;
	top: 1rem;
}

/* —— Actions / forms —— */
.tm-action,
button[type="submit"],
input[type="submit"],
.comment-form .submit,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 2.5rem;
	padding: 0.55rem 1.35rem;
	border: 1px solid var(--tm-gold);
	border-radius: var(--tm-pill);
	background: var(--tm-gold);
	color: var(--tm-ink);
	font-family: var(--tm-body);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: transform 0.2s var(--tm-ease), background 0.2s ease, border-color 0.2s ease;
}

.tm-action:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	background: var(--tm-gold-deep);
	border-color: var(--tm-gold-deep);
	color: #fff;
	transform: translateY(-1px);
}

.tm-action--ghost {
	background: transparent;
	color: #f4efe4;
	border-color: rgba(197, 160, 89, 0.55);
}

.tm-action--ghost:hover {
	background: var(--tm-gold);
	color: var(--tm-ink);
}

.tm-text-link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--tm-gold-deep);
}

.tm-text-link::after {
	content: "→";
	transition: transform 0.2s var(--tm-ease);
}

.tm-text-link:hover::after {
	transform: translateX(3px);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--tm-line);
	border-radius: 12px;
	background: #fff;
	font: inherit;
	color: var(--tm-ink);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--tm-gold);
	box-shadow: 0 0 0 3px var(--tm-gold-soft);
}

.tm-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.2rem 0.55rem;
	border-radius: 6px;
	background: var(--tm-gold-soft);
	color: var(--tm-ink-soft);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.tm-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.45rem 0.85rem;
	font-size: 0.8125rem;
	color: var(--tm-mute);
}

/* —— Header —— */
.tm-site-header {
	position: sticky;
	top: 0;
	z-index: 80;
	background: linear-gradient(180deg, #101926 0%, var(--tm-ink) 100%);
	color: #f4efe4;
	border-bottom: 1px solid rgba(197, 160, 89, 0.22);
	backdrop-filter: blur(8px);
}

.tm-site-header__bar {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	width: min(100% - 1.5rem, var(--tm-max));
	margin-inline: auto;
	min-height: 4.25rem;
}

.tm-site-header__brand .custom-logo-link img,
.tm-site-header__brand .custom-logo {
	max-height: 48px;
	width: auto;
}

.tm-logo-text {
	font-family: var(--tm-display);
	font-size: 1.45rem;
	font-weight: 700;
	color: var(--tm-gold);
	letter-spacing: -0.02em;
}

.tm-site-header__nav {
	flex: 1;
	min-width: 0;
}

.tm-primary-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.15rem 1.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-primary-nav a {
	color: rgba(244, 239, 228, 0.82);
	font-size: 0.875rem;
	font-weight: 600;
}

.tm-primary-nav a:hover,
.tm-primary-nav .current-menu-item > a {
	color: var(--tm-gold);
}

.tm-site-header__tools {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-left: auto;
}

.tm-live-search {
	position: relative;
	width: min(220px, 28vw);
}

.tm-live-search input {
	border: 0;
	border-radius: var(--tm-pill);
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	padding: 0.55rem 1rem;
	font-size: 0.875rem;
}

.tm-live-search input::placeholder {
	color: rgba(244, 239, 228, 0.55);
}

.tm-live-search__panel {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 90;
	max-height: 340px;
	overflow: auto;
	background: #fff;
	color: var(--tm-ink);
	border: 1px solid var(--tm-line);
	border-radius: 14px;
	box-shadow: 0 18px 40px rgba(16, 25, 38, 0.22);
}

.tm-live-search__group {
	padding: 0.45rem 0.85rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tm-mute);
	background: #f6f7f9;
}

.tm-live-search__item {
	display: block;
	padding: 0.65rem 0.85rem;
	border-top: 1px solid var(--tm-line);
	font-size: 0.9rem;
	font-weight: 600;
}

.tm-live-search__item:hover {
	background: var(--tm-gold-soft);
}

.tm-site-header__auth {
	display: flex;
	gap: 0.4rem;
}

.tm-burger {
	display: none;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.tm-burger span {
	display: block;
	width: 1.2rem;
	height: 2px;
	margin: 5px auto;
	background: var(--tm-gold);
	border-radius: 2px;
}

.tm-site-header__topics {
	border-top: 1px solid rgba(255, 255, 255, 0.06);
	background: rgba(0, 0, 0, 0.18);
}

.tm-topic-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	width: min(100% - 1.5rem, var(--tm-max));
	margin: 0 auto;
	padding: 0.55rem 0;
}

.tm-topic-nav a {
	display: inline-flex;
	padding: 0.3rem 0.8rem;
	border-radius: var(--tm-pill);
	background: var(--tm-gold-soft);
	color: var(--tm-gold);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.tm-topic-nav a:hover {
	background: var(--tm-gold);
	color: var(--tm-ink);
}

.tm-drawer {
	display: none;
	padding: 1rem 1.25rem 1.5rem;
	background: #0d1520;
	border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.tm-drawer.is-open {
	display: block;
}

.tm-drawer-nav {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.tm-drawer-nav a {
	display: block;
	padding: 0.75rem 0;
	color: #f4efe4;
	font-weight: 600;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tm-drawer__auth {
	display: flex;
	gap: 0.5rem;
}

/* —— Quote —— */
.tm-marquee {
	background: linear-gradient(90deg, #9aa3af, #b0b7c1 50%, #9aa3af);
	border-top: 3px solid var(--tm-ink);
	padding: 0.95rem 1.25rem;
	text-align: center;
}

.tm-marquee p {
	margin: 0;
	font-family: var(--tm-display);
	font-size: clamp(0.95rem, 2vw, 1.15rem);
	font-weight: 600;
	color: var(--tm-ink);
}

/* —— Shell 67 / 33 —— */
.tm-shell {
	padding: 2rem 0 3.5rem;
}

.tm-shell__grid {
	display: grid;
	grid-template-columns: minmax(0, 67fr) minmax(0, 33fr);
	gap: 2rem;
	width: min(100% - 1.5rem, var(--tm-max));
	margin-inline: auto;
	align-items: start;
}

.tm-shell__content {
	min-width: 0;
}

.tm-sidebar {
	position: sticky;
	top: 6.5rem;
	min-width: 0;
}

.tm-page-head {
	margin-bottom: 1.5rem;
}

.tm-page-head h1 {
	margin: 0;
	font-size: clamp(1.75rem, 3vw, 2.4rem);
}

.tm-page-head__desc {
	margin-top: 0.5rem;
	color: var(--tm-mute);
}

/* —— Feed —— */
.tm-feed {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tm-feed-item {
	display: grid;
	grid-template-columns: 150px 1fr;
	gap: 1.15rem;
	padding: 1.1rem;
	background: var(--tm-panel);
	border: 1px solid var(--tm-line);
	border-radius: var(--tm-radius);
	transition: border-color 0.2s ease, box-shadow 0.25s var(--tm-ease);
}

.tm-feed-item:hover {
	border-color: rgba(197, 160, 89, 0.45);
	box-shadow: 0 12px 28px rgba(20, 32, 51, 0.06);
}

.tm-feed-item__media {
	overflow: hidden;
	border-radius: 10px;
	aspect-ratio: 1;
	background: #e5e7eb;
}

.tm-feed-item__media img,
.tm-feed-item__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tm-feed-item__ph {
	display: block;
	background: linear-gradient(135deg, #e8eaef, #d5d9e0);
}

.tm-feed-item__title {
	margin: 0.4rem 0 0.45rem;
	font-size: 1.25rem;
}

.tm-feed-item__title a:hover {
	color: var(--tm-gold-deep);
}

.tm-feed-item__excerpt {
	margin: 0 0 0.75rem;
	color: var(--tm-mute);
	font-size: 0.925rem;
}

/* —— Single —— */
.tm-post {
	background: var(--tm-panel);
	border: 1px solid var(--tm-line);
	border-radius: calc(var(--tm-radius) + 2px);
	padding: 1.75rem 1.5rem 2rem;
}

.tm-post__title {
	margin: 0.65rem 0 0.75rem;
	font-size: clamp(1.85rem, 3.4vw, 2.65rem);
}

.tm-post__dek {
	margin: 0 0 1rem;
	font-size: 1.05rem;
	color: var(--tm-mute);
}

.tm-post__byline {
	margin-bottom: 1.15rem;
}

.tm-share {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
}

.tm-share a,
.tm-share button {
	padding: 0.35rem 0.75rem;
	border-radius: var(--tm-pill);
	border: 1px solid var(--tm-line);
	background: #fff;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	cursor: pointer;
	color: var(--tm-ink-soft);
}

.tm-share a:hover,
.tm-share button:hover {
	border-color: var(--tm-gold);
	color: var(--tm-gold-deep);
}

.tm-post__hero {
	margin: 0 0 1.5rem;
	overflow: hidden;
	border-radius: 12px;
}

.tm-post__hero img {
	width: 100%;
}

.tm-prose {
	font-size: 1.05rem;
	line-height: 1.8;
}

.tm-prose > *:first-child {
	margin-top: 0;
}

.tm-prose p {
	margin: 0 0 1.15rem;
}

.tm-prose h2,
.tm-prose h3 {
	margin: 1.75rem 0 0.7rem;
}

.tm-prose a {
	color: var(--tm-gold-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tm-prose ul,
.tm-prose ol {
	padding-left: 1.2rem;
}

.tm-comments {
	margin-top: 2.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--tm-line);
}

/* —— Sidebar —— */
.tm-side-block {
	margin-bottom: 1.15rem;
	padding: 1.15rem;
	background: var(--tm-panel);
	border: 1px solid var(--tm-line);
	border-radius: var(--tm-radius);
}

.tm-side-block__title {
	margin: 0 0 0.9rem;
	font-size: 1rem;
	padding-bottom: 0.65rem;
	border-bottom: 1px solid var(--tm-line);
}

.tm-side-posts {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-side-posts__item {
	display: grid;
	grid-template-columns: 68px 1fr;
	gap: 0.7rem;
	padding: 0.7rem 0;
	border-bottom: 1px solid var(--tm-line);
}

.tm-side-posts__item:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.tm-side-posts__media {
	position: relative;
	overflow: hidden;
	border-radius: 8px;
	aspect-ratio: 1;
	background: #e5e7eb;
}

.tm-side-posts__media img,
.tm-side-posts__ph {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tm-side-posts__ph {
	display: block;
	background: #e8eaef;
}

.tm-side-posts__rank {
	position: absolute;
	left: 4px;
	top: 4px;
	z-index: 1;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--tm-rank);
	color: var(--tm-ink);
	font-size: 0.65rem;
	font-weight: 800;
	display: grid;
	place-items: center;
}

.tm-side-posts__title {
	display: block;
	font-family: var(--tm-display);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.3;
	margin-bottom: 0.3rem;
}

.tm-side-posts__title:hover {
	color: var(--tm-gold-deep);
}

/* —— Footer —— */
.tm-site-footer {
	margin-top: auto;
	background: var(--tm-ink);
	color: rgba(244, 239, 228, 0.78);
	padding-top: 3rem;
}

.tm-site-footer__grid {
	display: grid;
	grid-template-columns: 1.35fr 1fr 1fr 1fr;
	gap: 2rem;
	width: min(100% - 1.5rem, var(--tm-max));
	margin-inline: auto;
	padding-bottom: 2.5rem;
}

.tm-site-footer__logo .tm-logo-text,
.tm-site-footer__logo .custom-logo-link {
	color: var(--tm-gold);
}

.tm-site-footer__logo img {
	max-height: 52px;
	width: auto;
}

.tm-site-footer__about {
	margin: 0.85rem 0 1rem;
	font-size: 0.9rem;
	line-height: 1.55;
}

.tm-site-footer__col h3 {
	margin: 0 0 0.85rem;
	font-size: 0.95rem;
	color: var(--tm-gold);
}

.tm-site-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-site-footer__menu a {
	display: block;
	padding: 0.28rem 0;
	font-size: 0.9rem;
	color: rgba(244, 239, 228, 0.72);
}

.tm-site-footer__menu a:hover {
	color: var(--tm-gold);
}

.tm-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.tm-socials a {
	display: grid;
	place-items: center;
	width: 2.15rem;
	height: 2.15rem;
	border-radius: 50%;
	background: var(--tm-gold-soft);
	color: var(--tm-gold);
	font-size: 0.75rem;
	font-weight: 800;
}

.tm-socials a:hover {
	background: var(--tm-gold);
	color: var(--tm-ink);
}

.tm-site-footer__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 1rem;
	text-align: center;
	font-size: 0.85rem;
	opacity: 0.7;
}

.tm-empty {
	padding: 2.5rem 1rem;
	text-align: center;
	background: var(--tm-panel);
	border: 1px solid var(--tm-line);
	border-radius: var(--tm-radius);
}

.pagination .nav-links,
.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	margin-top: 1.75rem;
}

.page-numbers {
	display: inline-flex;
	min-width: 2.25rem;
	min-height: 2.25rem;
	align-items: center;
	justify-content: center;
	padding: 0.35rem 0.7rem;
	border-radius: var(--tm-pill);
	border: 1px solid var(--tm-line);
	background: #fff;
	font-size: 0.85rem;
	font-weight: 700;
}

.page-numbers.current {
	background: var(--tm-gold);
	border-color: var(--tm-gold);
	color: var(--tm-ink);
}

/* Plugin buttons align with theme */
.tm-btn,
.tm-list-author__more,
.tm-widget-cta .tm-btn {
	border-radius: var(--tm-pill) !important;
	background: var(--tm-gold) !important;
	border-color: var(--tm-gold) !important;
	color: var(--tm-ink) !important;
	font-family: var(--tm-body);
	font-weight: 700;
}

/* —— Responsive —— */
@media (max-width: 980px) {
	.tm-shell__grid {
		grid-template-columns: 1fr;
	}

	.tm-sidebar {
		position: static;
	}

	.tm-site-header__nav {
		display: none;
	}

	.tm-burger {
		display: inline-grid;
		place-items: center;
	}

	.tm-site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 720px) {
	.tm-feed-item {
		grid-template-columns: 1fr;
	}

	.tm-live-search {
		width: 140px;
	}

	.tm-site-header__auth .tm-action--ghost {
		display: none;
	}

	.tm-site-footer__grid {
		grid-template-columns: 1fr;
	}

	.tm-topic-nav {
		display: none;
	}
}
