/*
Theme Name: Ciorici 2026
Theme URI: https://ciorici.com
Author: Pavel Ciorici
Author URI: https://ciorici.com
Description: Personal theme for ciorici.com — a static front page with intro, projects, WordPress.org stats, GitHub activity and latest posts.
Version: 1.0.9
Requires at least: 6.0
Tested up to: 7.0
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: ciorici2026
*/

:root {
	--bg: #faf9f7; /* warm off-white — cards stay pure white for subtle depth */
	--bg-card: #ffffff;
	--bg-soft: #f2f1ed;
	--text: #17171a;
	--text-soft: #6b6a63;
	--border: #e8e6e1;
	--accent: #4e70f5;
	--accent-soft: #ecf6fe;
	--link: #17171a;
	--gh-0: #ebedf0;
	--gh-1: #9be9a8;
	--gh-2: #40c463;
	--gh-3: #30a14e;
	--gh-4: #216e39;
	--radius: 14px;
	/*--mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;*/
    --mono: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px; transition: text-decoration-color .15s ease, color .15s ease; }
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

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

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; font-weight: 600;}

::selection { background: var(--accent); color: #fff; }

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--accent);
	color: #fff;
	padding: 8px 16px;
	z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Layout ---- */
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 900px; }

/* ---- Header ---- */
.site-header { padding: 28px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 700; font-size: 18px; }
.site-brand img { border-radius: 50%; display: block; }
.site-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.site-nav a {
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	color: var(--text-soft);
	padding: 4px 0;
}
.site-nav a:hover, .site-nav .current-menu-item a, .site-nav .current_page_item a { color: var(--text); }

/* ---- Sections ---- */
/* Whitespace carries the rhythm — no divider rules between sections. */
.home-section { padding: 62px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
/* Quiet, editorial section labels (arslan.io-style eyebrows). */
.section-head h2 {
	margin: 0;
	font-family: var(--mono);
	font-size: 13px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .14em;
	color: var(--text-soft);
}
.section-head .section-link { font-size: 14px; font-family: var(--mono); color: var(--text-soft); text-decoration: none; white-space: nowrap; }
.section-head .section-link:hover { color: var(--accent); }

/* ---- Hero ---- */
.hero { padding: 80px 0 52px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); display: block; }

.hero-greeting { margin: 0 0 14px; font-size: 17px; font-weight: 500; color: var(--text-soft); }

.hero-display {
	margin: 0 0 28px;
	font-size: clamp(30px, 3.4vw, 42px);
	line-height: 1.1;
	letter-spacing: -0.025em;
	font-weight: 700;
}
.hero-display .line { display: block; }

.hero-featured { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 38px; }
.featured-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); }
.featured-logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; filter: grayscale(1); opacity: .55; transition: filter .15s ease, opacity .15s ease; }
.featured-logo:hover { filter: none; opacity: 1; }
.featured-logo img { height: 24px; width: auto; display: block; }
.featured-logo span { font-weight: 700; font-size: 16px; color: var(--text); letter-spacing: -.01em; }

.hero-intro { max-width: 660px; margin: 0 0 26px; }
.hero-points { list-style: disc; margin: 0 0 18px; padding-left: 22px; }
.hero-points li { margin-bottom: 12px; font-size: 17px; line-height: 1.55; }
.hero-points li::marker { color: var(--accent); }
.hero .hero-bio { margin: 0 0 14px; font-size: 16px; line-height: 1.7; color: var(--text-soft); }
.hero .hero-bio:last-child { margin-bottom: 0; }
/* The icons already mark the project links — underline only on hover. */
.hero-intro a { text-decoration: none; }
.hero-intro a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.hero-links { display: flex; gap: 10px; flex-wrap: wrap; }

.js .hero .wrap { opacity: 0; animation: ciorici-fade-up 0.6s ease 0.05s forwards; }

/* Scroll reveals (JS adds .will-reveal / .in-view) */
.will-reveal { opacity: 0; transform: translateY(16px); }
.will-reveal.in-view { opacity: 1; transform: none; transition: opacity 0.5s ease, transform 0.5s ease; }

@keyframes ciorici-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	.js .hero .wrap { animation: none; opacity: 1; }
	.will-reveal { opacity: 1; transform: none; }
}
.btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 8px 18px;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: var(--bg-card);
	color: var(--text);
	text-decoration: none;
	font-size: 15px;
	font-weight: 500;
	transition: border-color .15s ease;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn svg { width: 17px; height: 17px; display: block; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--accent:hover { color: #fff; opacity: .92; }
/* X button is brand-black in every skin (higher specificity than skin .btn rules). */
.hero-links a.btn--x,
.follow-card a.btn--x { background: #000; border-color: #000; color: #fff; }
.hero-links a.btn--x:hover,
.follow-card a.btn--x:hover { background: #1d1d1d; border-color: #1d1d1d; color: #fff; }

/* ---- Projects ---- */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project-card {
	position: relative;
	display: block;
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px;
	text-decoration: none;
	transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.project-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.06); color: inherit; }
.project-card .project-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; min-height: 30px; }
.project-card .project-logo svg { height: var(--logo-h, 26px); width: auto; display: block; }
.project-card .project-logo img { border-radius: 7px; display: block; }
.project-card .project-name { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.project-card p { margin: 0 0 12px; color: var(--text-soft); font-size: 15.5px; }
.project-card .project-domain { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.revenue-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 18px; }
.revenue-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.revenue-card-head h3 { margin: 0; font-size: 16px; }
.revenue-caption { font-family: var(--mono); font-size: 12px; color: var(--text-soft); display: inline-flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.sw-rev { background: var(--accent); }
.sw-eff { background: var(--text-soft); }
.sw-proj { background: repeating-linear-gradient(90deg, var(--accent) 0 3px, transparent 3px 6px); }
.revenue-card .spark { display: block; width: 100%; height: 96px; color: var(--accent); }
.revenue-months { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-soft); }
.revenue-months span { flex: 1; text-align: center; }
.revenue-months .proj { opacity: .55; }
@media (max-width: 660px) { .revenue-months span:nth-child(even) { display: none; } }

.effort-card .spark { display: block; width: 100%; height: 120px; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.chart-legend .legend-item { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.spark-tip .tip-row { display: flex; align-items: center; gap: 7px; }
.spark-tip .tip-row .dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.spark-tip .tip-head { font-weight: 700; margin-bottom: 3px; }

.project-share { display: block; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.share-row { display: flex; align-items: center; gap: 12px; }
.share-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.share-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.share-label { font-family: var(--mono); font-size: 12px; color: var(--text-soft); white-space: nowrap; }
.project-share .spark { display: block; width: 100%; height: 30px; margin-top: 10px; color: var(--accent); }
.project-share--effort .spark { color: var(--text-soft); }
.share-legend { gap: 14px; margin-top: 6px; }
.share-legend .sw { vertical-align: middle; margin-right: 4px; }
.badge {
	font-size: 11px;
	font-weight: 700;
	font-family: var(--mono);
	text-transform: uppercase;
	letter-spacing: .05em;
	background: var(--accent-soft);
	color: var(--accent);
	padding: 3px 9px;
	border-radius: 99px;
}

/* ---- Stat tiles ---- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-tile { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.stat-tile .stat-num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; display: block; }
.stat-tile .stat-label { font-size: 13px; font-family: var(--mono); color: var(--text-soft); }

.top-products { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.top-products h3 { font-size: 14px; font-family: var(--mono); color: var(--text-soft); font-weight: 500; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.top-products h3 .view-all { font-weight: 500; font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--text-soft); text-decoration: none; }
.top-products h3 .view-all:hover { color: var(--accent); }
.top-products ul { list-style: none; margin: 0; padding: 0; }
.top-products li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 15.5px; }
.top-products li:last-child { border-bottom: 0; }
.top-products .installs { font-family: var(--mono); font-size: 13px; color: var(--text-soft); white-space: nowrap; }
.top-products .product-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-products .product-icon { width: 22px; height: 22px; border-radius: 5px; flex-shrink: 0; }
.top-products .product-icon--svg { display: inline-flex; border-radius: 0; }
.top-products .mini-badge { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); border: 1px solid var(--border); border-radius: 99px; padding: 1px 7px; white-space: nowrap; }
.top-products .product-icon--svg svg { width: 22px; height: 22px; }

/* ---- GitHub graph ---- */
.gh-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.gh-graph-scroll { overflow-x: auto; padding-bottom: 6px; }
.gh-graph {
	display: grid;
	grid-auto-flow: column;
	grid-template-rows: repeat(7, 1fr);
	grid-auto-columns: 1fr;
	gap: 2px;
	width: 100%;
	/* Two years ≈ 105 columns — needs real width; scrolls below that. */
	min-width: 1000px;
}
.gh-day { aspect-ratio: 1 / 1; width: 100%; border-radius: 2px; background: var(--gh-0); }
.gh-legend .gh-day { width: 11px; height: 11px; aspect-ratio: auto; }
.gh-day[data-level="1"] { background: var(--gh-1); }
.gh-day[data-level="2"] { background: var(--gh-2); }
.gh-day[data-level="3"] { background: var(--gh-3); }
.gh-day[data-level="4"] { background: var(--gh-4); }
.gh-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.gh-meta .gh-total { font-family: var(--mono); font-size: 14px; color: var(--text-soft); }
.gh-legend { display: inline-flex; align-items: center; gap: 3px; font-family: var(--mono); font-size: 12px; color: var(--text-soft); }
.gh-legend .gh-day { display: inline-block; }
.gh-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
/* Commits-by-project ranked bars */
.gh-repo-bars { margin-top: 18px; }
.repo-bars-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.repo-bars-head h3 { margin: 0; font-size: 17px; }
.repo-bar-row { display: grid; grid-template-columns: 150px 1fr 120px; align-items: center; gap: 18px; padding: 9px 0; }
.repo-bar-label { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.repo-bar-track { height: 10px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.repo-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .6s ease; }
.repo-bar-value { font-family: var(--mono); font-size: 13px; color: var(--text-soft); text-align: right; white-space: nowrap; }
@media (max-width: 660px) {
	.repo-bar-row { grid-template-columns: 90px 1fr 70px; gap: 10px; }
	.repo-bar-value { font-size: 12px; }
}

.gh-alltime { margin-top: 18px; }
.gh-alltime-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.gh-alltime-total { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.gh-alltime-label { font-family: var(--mono); font-size: 13px; color: var(--text-soft); margin-left: 6px; }
.gh-alltime .spark { display: block; width: 100%; height: 110px; color: var(--gh-3); }
.gh-alltime-years { margin-top: 8px; }
@media (max-width: 660px) { .gh-alltime-years span:nth-child(odd) { display: none; } }
.gh-profiles { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.gh-org { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.gh-org img { border-radius: 10px; display: block; }
.gh-org-text { display: flex; flex-direction: column; }
.gh-org-text > a { font-weight: 600; text-decoration: none; }
.gh-org-meta { font-family: var(--mono); font-size: 13px; color: var(--text-soft); }

/* ---- Post lists ---- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-list li { padding: 14px 0; border-bottom: 1px dashed var(--border); display: flex; align-items: baseline; gap: 20px; }
.post-list li:last-child { border-bottom: 0; }
.post-list time { font-family: var(--mono); font-size: 13px; color: var(--text-soft); white-space: nowrap; min-width: 96px; }
.post-list a { font-size: 17px; font-weight: 500; text-decoration: none; }
.post-list a:hover { color: var(--accent); }
.post-list .post-list-tg { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.post-list .post-list-tg svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ---- Writing elsewhere ---- */
.elsewhere-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.elsewhere-col h3 { font-size: 14px; font-family: var(--mono); font-weight: 500; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; }
.elsewhere-col h3 a { color: var(--text-soft); text-decoration: none; }
.elsewhere-col h3 a:hover { color: var(--accent); }
.elsewhere-col ul { list-style: none; margin: 0; padding: 0; }
.elsewhere-col li { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.elsewhere-col li:last-child { border-bottom: 0; }
.elsewhere-col li a { display: block; font-size: 15px; font-weight: 500; text-decoration: none; line-height: 1.45; }
.elsewhere-col li a:hover { color: var(--accent); }
.elsewhere-col time { font-family: var(--mono); font-size: 12px; color: var(--text-soft); }

/* ---- Follow hub ---- */
.flag { width: 16px; height: 12px; border-radius: 2.5px; display: inline-block; flex-shrink: 0; }
.hero-intro .flag { vertical-align: -1px; }
/* Inline project marks in the bio — quiet by default, full color on hover. */
.bio-icon {
	height: 15px;
	width: auto;
	display: inline-block;
	vertical-align: -2px;
	margin-right: 4px;
	opacity: .8;
	transition: opacity .15s ease;
    filter: grayscale(.7);
}
a:hover .bio-icon { opacity: 1; filter: grayscale(0); }
.channels-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .channels-grid { grid-template-columns: repeat(2, 1fr); } }
.channel-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.channel-card.is-hidden { display: none; }
.channel-head { display: flex; align-items: flex-start; gap: 12px; }
.channel-head .btn { margin-left: auto; }
.channel-icon svg { width: 22px; height: 22px; display: block; }
.channel-id { display: flex; flex-direction: column; line-height: 1.3; gap: 3px;}
.channel-name { font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.channel-handle { font-size: 14px; color: var(--text-soft); }
.channel-topics { margin: 0 0 16px; font-size: 15px; color: var(--text-soft); }
@media (max-width: 820px) { .channels-grid { grid-template-columns: 1fr; } }

/* ---- Tweets ---- */
.tweets-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.tweet-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; min-width: 0; }
.tweet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tweet-head img { border-radius: 50%; display: block; }
.tweet-who { display: flex; flex-direction: column; line-height: 1.3; }
.tweet-name { font-weight: 600; font-size: 15px; }
.tweet-handle { font-family: var(--mono); font-size: 13px; color: var(--text-soft); }
.tweet-x { margin-left: auto; text-decoration: none; font-size: 18px; color: var(--text-soft); }
.tweet-x:hover { color: var(--accent); }
.tweet-text { margin: 0 0 12px; font-size: 15.5px; overflow-wrap: break-word; }
.tweet-text a { color: var(--accent); text-decoration: none; }
.tweet-photo { width: 100%; border-radius: 10px; margin-bottom: 12px; display: block; }
.tweet-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 13px; color: var(--text-soft); }
.tweet-meta a { color: var(--text-soft); text-decoration: none; }
.tweet-meta a:hover { color: var(--accent); }
.tweet-stats { display: inline-flex; gap: 14px; align-items: baseline; }
.tweet-views { color: var(--text-soft); }
.tweet-likes { color: var(--text-soft); display: inline-flex; align-items: center; gap: 5px; }
.tweet-likes svg { width: 13px; height: 13px; }
.follow-card {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 32px;
	text-align: center;
}
.follow-card p { color: var(--text-soft); margin: 0 0 18px; }

/* ---- Projects page ---- */
.projects-page { padding-bottom: 40px; }
.projects-header { padding: 24px 0 8px; max-width: 700px; }
.projects-intro { color: var(--text-soft); font-size: 18px; }
.project-row { padding: 44px 0; border-bottom: 1px solid var(--border); }
.project-row:last-of-type { border-bottom: 0; }
.project-row-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.project-row .project-logo { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.project-row .project-logo svg { height: var(--logo-h, 30px); width: auto; display: block; }
.project-row .project-logo img { border-radius: 7px; display: block; }
.project-row .project-name { font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.project-row-id { display: flex; flex-direction: column; gap: 7px; }
.project-row-tagline { font-family: var(--mono); font-size: 12.5px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }
.project-row-body { max-width: 900px; }
.project-row-body p { margin: 0 0 14px; font-size: 16.5px; color: var(--text); }
.project-row-stats { font-family: var(--mono); font-size: 13px; color: var(--text-soft); margin: 18px 0 0; }
.project-row-effort { max-width: 900px; margin-top: 18px; }
.project-row-effort .share-label { font-family: var(--mono); font-size: 12px; color: var(--text-soft); }
.project-row-effort .spark { display: block; width: 100%; height: 34px; margin-top: 8px; color: var(--text-soft); }
.project-row-wporg { margin-top: 36px; }
.project-row-subhead { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.project-row-subhead h3 { margin: 0; font-size: 18px; }

/* ---- Blog: Telegram strip + Archive ---- */
.tg-strip { margin: 8px 0 40px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.tg-lang { font-size: 15px; vertical-align: 2px; }
.tg-list { list-style: none; margin: 0 0 18px; padding: 0; }
.tg-list li { padding: 12px 0; border-bottom: 1px dashed var(--border); display: flex; gap: 18px; align-items: center; justify-content: space-between; }
.tg-list .tg-msg { min-width: 0; }
.tg-thumb { position: relative; flex-shrink: 0; display: block; }
.tg-thumb img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; display: block; }
.tg-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.tg-list li:last-child { border-bottom: 0; }
.tg-list time { display: block; font-family: var(--mono); font-size: 12px; color: var(--text-soft); margin-bottom: 2px; }
.tg-list a { text-decoration: none; font-size: 16px; }
.tg-list a:hover { color: var(--accent); }
.tg-more { font-size: 14px; }
.blog-archive { margin-top: 48px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ---- Blog archive ---- */
.page-title { font-size: 32px; margin: 24px 0 8px; }
.archive-description { color: var(--text-soft); margin-bottom: 24px; }
.entry-item { padding: 28px 0; border-bottom: 1px solid var(--border); }
.entry-item:last-of-type { border-bottom: 0; }
.entry-item h2 { margin: 0 0 6px; font-size: 24px; }
.entry-item h2 a { text-decoration: none; }
.entry-item h2 a:hover { color: var(--accent); }
.entry-meta { font-family: var(--mono); font-size: 13px; color: var(--text-soft); }
.entry-item .entry-summary { margin-top: 10px; color: var(--text-soft); font-size: 16px; }

/* ---- Single ---- */
.single-article { padding: 24px 0 48px; }
.single-article .entry-title { font-size: 36px; margin: 8px 0 10px; }
.entry-content { font-size: 17.5px; }
.entry-content h2 { font-size: 26px; margin-top: 40px; }
.entry-content h3 { font-size: 21px; margin-top: 32px; }
.entry-content img { border-radius: 10px; }
.entry-content pre { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 18px; overflow-x: auto; font-family: var(--mono); font-size: 14px; }
.entry-content code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content blockquote { margin: 24px 0; padding: 4px 22px; border-left: 3px solid var(--accent); color: var(--text-soft); }
.entry-content a { text-decoration-color: var(--accent); }
.wp-caption, .wp-block-image figcaption { font-size: 14px; color: var(--text-soft); }
.alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }

.post-navigation { display: flex; justify-content: space-between; gap: 24px; padding: 28px 0; border-top: 1px solid var(--border); font-size: 15px; }
.post-navigation a { text-decoration: none; }
.post-navigation .nav-next { text-align: right; margin-left: auto; }

.pagination { display: flex; gap: 8px; justify-content: center; padding: 32px 0; font-size: 14px; }
.pagination .page-numbers { padding: 6px 13px;  text-decoration: none; }
.pagination .page-numbers.current { font-weight: 600; }

/* ---- Comments ---- */
.comments-area { padding: 8px 0 40px; }
.comments-title { font-size: 22px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list > .comment { border: 0; background: none; padding: 26px 0; margin: 0; }
.comment-list > .comment + .comment { border-top: 1px dashed var(--border); }
.comment-body { position: relative; padding-left: 62px; }
.comment-body .avatar { position: absolute; left: 0; top: 2px; width: 44px; height: 44px; border-radius: 50%; }
.comment-author { font-size: 15px; }
.comment-author .says { display: none; }
.comment-author .fn { font-weight: 600; font-style: normal; color: var(--text); }
.comment-metadata { font-family: var(--mono); font-size: 12px; }
.comment-metadata a { color: var(--text-soft); text-decoration: none; }
.comment-metadata a:hover { color: var(--accent); }
.comment-metadata .edit-link { margin-left: 8px; }
.comment-content { margin-top: 8px; font-size: 16px; }
.comment-content p { margin: 0 0 10px; }
.comment-content p:last-child { margin-bottom: 0; }
.comment .reply { margin-top: 8px; }
.comment .reply a { font-family: var(--mono); font-size: 12px; color: var(--text-soft); text-decoration: none; }
.comment .reply a:hover { color: var(--accent); }
.comment-list .children { list-style: none; padding-left: 62px; margin: 14px 0 0; }
.comment-list .children .comment { padding: 18px 0 0; border: 0; }
.comment-form label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--bg-card);
	color: var(--text);
	font: inherit;
}
.comment-form .submit, .search-submit {
	background: var(--accent);
	color: #fff;
	border: 0;
	border-radius: 99px;
	padding: 11px 24px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ---- Search ---- */
.search-form { display: flex; gap: 10px; margin: 20px 0; }
.search-form .search-field { flex: 1; padding: 10px 16px; border: 1px solid var(--border); border-radius: 99px; background: var(--bg-card); color: var(--text); font: inherit; }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; padding: 36px 0 52px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.footer-note { font-size: 14px; color: var(--text-soft); }
.footer-social { display: flex; gap: 16px; }
.footer-social a { font-size: 14px; color: var(--text-soft); text-decoration: none; font-family: var(--mono); }
.footer-social a:hover { color: var(--accent); }

/* ---- Sparkline tooltip ---- */
.spark-tip {
	position: fixed;
	transform: translateX(-50%);
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: 5px 10px;
	font-family: var(--mono);
	font-size: 12px;
	color: var(--text);
	white-space: nowrap;
	pointer-events: none;
	z-index: 100;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}
.spark-tip[hidden] { display: none; }
.project-share[data-spark-values] .spark { cursor: crosshair; }

/* ---- Style switcher ---- */
.style-switcher { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.style-switcher-toggle {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid var(--border);
	background: var(--bg-card);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0,0,0,.12);
	transition: transform .15s ease;
}
.style-switcher-toggle:hover { transform: scale(1.06); }
.style-switcher-panel[hidden] { display: none; }
.style-switcher-panel {
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	box-shadow: 0 8px 28px rgba(0,0,0,.14);
	min-width: 140px;
}
.style-swatch {
	display: flex;
	align-items: center;
	gap: 10px;
	background: none;
	border: 0;
	padding: 8px 10px;
	border-radius: 10px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	color: var(--text);
}
.style-swatch:hover { background: var(--bg-soft); }
.style-swatch.is-active { background: var(--bg-soft); }
.style-swatch.is-active .style-name::after { content: " ✓"; color: var(--accent); }
.style-dot { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.style-dot[data-skin-dot="default"] { background: linear-gradient(135deg, #ffffff 50%, #4e70f5 50%); }
.style-dot[data-skin-dot="uber"] { background: #000; }
.style-dot[data-skin-dot="wise"] { background: linear-gradient(135deg, #e8ebe6 50%, #9fe870 50%); }
.style-dot[data-skin-dot="nike"] { background: linear-gradient(90deg, #ffffff 50%, #111111 50%); }
.style-dot[data-skin-dot="wired"] { background: repeating-linear-gradient(180deg, #ffffff 0 4px, #000000 4px 6px); }
.style-dot[data-skin-dot="arslan"] { background: linear-gradient(135deg, #f0efe6 50%, #6c49b6 50%); }
.style-dot[data-skin-dot="vercel"] { background: linear-gradient(135deg, #fafafa 50%, #0a0a0a 50%); border-color: #d4d4d4; }

/* ---- Responsive ---- */
@media (max-width: 820px) {
	.stats-grid { grid-template-columns: repeat(2, 1fr); }
	.hero { padding-top: 40px; }
	.hero-grid { grid-template-columns: 1fr; gap: 36px; }
	.hero-photo { order: -1; }
	.hero-photo img { aspect-ratio: 1 / 1; max-width: 320px; }
	.elsewhere-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 660px) {
	.projects-grid, .top-products, .tweets-grid, .gh-profiles { grid-template-columns: 1fr; }
	.post-list li { flex-direction: column; gap: 2px; }
	.alignwide { margin-left: 0; margin-right: 0; }
	.site-header .wrap { justify-content: center; }
}

/* ---- Visited countries: floating badge and the /countries/ game ---- */
.countries-fab {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 90;
	display: flex;
	align-items: center;
	height: 48px;
	border: 1px solid var(--border);
	border-radius: 99px;
	background: var(--bg-card);
	color: var(--text);
	text-decoration: none;
	overflow: hidden;
	box-shadow: 0 6px 24px rgba(15, 18, 25, .10);
	animation: fab-in .5s ease .8s backwards;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.countries-fab:hover, .countries-fab:focus-visible { border-color: var(--accent); box-shadow: 0 10px 30px rgba(15, 18, 25, .16); }
.fab-globe { flex: none; width: 46px; height: 46px; display: grid; place-items: center; font-size: 22px; transition: transform .4s ease; }
.countries-fab:hover .fab-globe { transform: rotate(18deg) scale(1.1); }
.fab-label {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
	white-space: nowrap;
	font-family: var(--mono);
	font-size: 12px;
	max-width: 0;
	opacity: 0;
	padding-right: 0;
	transition: max-width .35s ease, opacity .25s ease, padding .35s ease;
}
.fab-label strong { font-size: 13px; }
.fab-label span { color: var(--accent); }
.countries-fab:hover .fab-label, .countries-fab:focus-visible .fab-label { max-width: 240px; opacity: 1; padding-right: 18px; }
@keyframes fab-in {
	from { opacity: 0; transform: translateY(14px); }
}
@media (prefers-reduced-motion: reduce) {
	.countries-fab { animation: none; }
	.countries-fab:hover .fab-globe { transform: none; }
}
@media (max-width: 660px) {
	.countries-fab { left: 14px; bottom: 14px; }
}

.cg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cg-chip {
	padding: 5px 10px;
	font-size: 13px;
	background: var(--bg-soft);
	border: 1px solid var(--border);
	border-radius: 8px;
	white-space: nowrap;
}

.countries-page { padding-top: 40px; padding-bottom: 70px; }
.cg-map { margin: 10px 0 6px; }
.cg-map svg { display: block; width: 100%; height: auto; }
.cg-map path { fill: var(--bg-soft); stroke: var(--border); stroke-width: .4; transition: fill .25s ease; cursor: pointer; }
.cg-map path:hover { stroke: var(--text-soft); stroke-width: .8; }
.cg-map path.cg-found { fill: var(--accent); }
.cg-map path.cg-wrong { fill: #ef4444; }
.cg-map path.cg-missed { fill: #f59e0b; }
.cg-map-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; font-family: var(--mono); font-size: 12px; color: var(--text-soft); }
.cg-map-legend .sw { vertical-align: middle; margin-right: 4px; width: 12px; height: 8px; border-radius: 2px; }
.cg-map-legend .sw-found { background: var(--accent); }
.cg-map-legend .sw-wrong { background: #ef4444; }
.cg-map-legend .sw-missed { background: #f59e0b; }
.cg-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 26px 0 8px; }
.cg-form { flex: 1; min-width: 220px; }
.cg-input {
	width: 100%;
	padding: 12px 16px;
	font-size: 16px;
	font-family: inherit;
	color: var(--text);
	background: var(--bg-card);
	border: 1px solid var(--border);
	border-radius: 10px;
}
.cg-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cg-shake { animation: cg-shake .3s ease; }
@keyframes cg-shake {
	25% { transform: translateX(-5px); }
	50% { transform: translateX(5px); }
	75% { transform: translateX(-3px); }
}
.cg-scoreboard { display: flex; align-items: baseline; gap: 34px; flex-wrap: wrap; margin: 14px 0 4px; }
.cg-scoreboard .cg-stat { display: flex; flex-direction: column; gap: 2px; }
.cg-stat-label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-soft); }
.cg-scoreboard strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.cg-scoreboard .cg-progress { color: var(--accent); }
.cg-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; color: var(--text-soft); }
/* Primary game actions: solid dark so they don't fade into the page (id
   selector outweighs skin .btn rules). */
#country-game .cg-giveup,
#country-game .cg-submit-form .btn { background: var(--text); border-color: var(--text); color: var(--bg); }
#country-game .cg-giveup:hover,
#country-game .cg-submit-form .btn:hover { opacity: .85; color: var(--bg); }
.cg-stat strong { color: var(--text); }
.cg-continent { margin-top: 22px; }
.cg-continent h3 { margin: 0 0 8px; font-size: 13px; font-family: var(--mono); font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .05em; }
.cg-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	min-height: 30px;
	color: var(--text-soft);
	text-align: center;
	background: transparent;
	border-style: dashed;
	transition: background .2s ease, border-color .2s ease;
}
.cg-chip svg { width: 14px; height: 14px; opacity: .45; }
.cg-chip.found { color: var(--text); border-style: solid; border-color: var(--accent); background: var(--accent-soft); }
.cg-chip.home { font-weight: 600; }
.cg-chip.missed { opacity: .6; border-style: dashed; background: var(--bg-soft); }
.cg-end { margin-top: 28px; padding: 22px 24px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.cg-perfect { margin: 0 0 8px; font-weight: 700; }
.cg-result { margin: 0 0 14px; }
.cg-submit-form { display: flex; gap: 10px; flex-wrap: wrap; }
.cg-name {
	flex: 1;
	min-width: 200px;
	padding: 10px 14px;
	font-size: 15px;
	font-family: inherit;
	color: var(--text);
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: 8px;
}
.cg-saved { margin: 8px 0 0; color: var(--text-soft); }
.cg-board-wrap { margin-top: 40px; }
.cg-board-wrap h2 { font-size: 20px; margin-bottom: 4px; }
.cg-board-note { margin: 0 0 14px; font-size: 13px; color: var(--text-soft); }
.cg-board { width: 100%; border-collapse: collapse; font-size: 14px; }
.cg-board th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-soft); padding: 8px 10px; border-bottom: 1px solid var(--border); }
.cg-board td { padding: 9px 10px; border-bottom: 1px dashed var(--border); }
.cg-board .cg-player { font-weight: 600; }
.cg-board tr.is-you td { background: var(--accent-soft); }
