/*
Theme Name: Kevin Theme
Theme URI: https://www.kevinplugins.com
Author: Kevin Plugins
Author URI: https://www.kevinplugins.com
Description: A fast, self-contained theme for a small plugin studio. No build step, no external requests, no tracking.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kevintheme
Tags: one-column, custom-menu, custom-logo, translation-ready, block-styles, wide-blocks
*/

/* ---------------------------------------------------------------------------
   Tokens
   --------------------------------------------------------------------------- */
:root {
	--kt-ink: #0f1115;
	--kt-ink-soft: #3d4351;
	--kt-muted: #6b7280;
	--kt-line: #e6e8ee;
	--kt-line-soft: #f0f2f6;
	--kt-bg: #ffffff;
	--kt-bg-alt: #f7f8fb;
	--kt-primary: #2f6bff;
	--kt-primary-dark: #1d4fd8;
	--kt-primary-wash: #eef3ff;
	--kt-accent: #ff9e2c;
	--kt-accent-wash: #fff4e6;
	--kt-ok: #12a150;
	--kt-ok-wash: #e9f8ef;
	--kt-warn: #b45309;
	--kt-warn-wash: #fdf3e3;
	--kt-stop: #d93636;
	--kt-stop-wash: #fdeced;

	--kt-radius: 14px;
	--kt-radius-lg: 22px;
	--kt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px -12px rgba(16, 24, 40, .12);
	--kt-shadow-lg: 0 2px 4px rgba(16, 24, 40, .04), 0 24px 48px -24px rgba(16, 24, 40, .22);

	--kt-max: 1180px;
	--kt-gap: clamp(1.5rem, 4vw, 3rem);
	--kt-section: clamp(4rem, 9vw, 7.5rem);

	--kt-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--kt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

h1, h2, h3, h4 {
	margin: 0 0 .5em;
	color: var(--kt-ink);
	line-height: 1.15;
	letter-spacing: -.022em;
	font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5.4vw, 3.9rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--kt-primary); text-decoration: none; }
a:hover { color: var(--kt-primary-dark); }

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

code {
	font-family: var(--kt-mono);
	font-size: .88em;
	background: var(--kt-line-soft);
	border: 1px solid var(--kt-line);
	border-radius: 6px;
	padding: .12em .42em;
	color: var(--kt-ink);
}

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

.kt-skip {
	position: absolute; left: -9999px; top: 0;
	background: var(--kt-ink); color: #fff; padding: .75rem 1.25rem; z-index: 999;
	border-radius: 0 0 8px 0;
}
.kt-skip:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--kt-primary); outline-offset: 2px; border-radius: 4px; }

/* ---------------------------------------------------------------------------
   Layout
   --------------------------------------------------------------------------- */
.kt-wrap { width: 100%; max-width: var(--kt-max); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.kt-narrow { max-width: 760px; }
.kt-section { padding-block: var(--kt-section); }
.kt-section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.kt-alt { background: var(--kt-bg-alt); border-block: 1px solid var(--kt-line); }

.kt-grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.kt-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kt-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.kt-eyebrow {
	display: inline-flex; align-items: center; gap: .5rem;
	font-size: .78rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
	color: var(--kt-primary); margin: 0 0 1rem;
}
.kt-eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

.kt-lead { font-size: clamp(1.05rem, 1.7vw, 1.24rem); color: var(--kt-ink-soft); max-width: 62ch; }
.kt-center { text-align: center; }
.kt-center .kt-lead { margin-inline: auto; }
.kt-center .kt-eyebrow { justify-content: center; }

/* ---------------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------------- */
.kt-btns { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.kt-center .kt-btns { justify-content: center; }

.kt-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .82rem 1.5rem;
	border-radius: 999px;
	font-weight: 600; font-size: .97rem;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.kt-btn--primary { background: var(--kt-primary); color: #fff; box-shadow: 0 8px 20px -8px rgba(47, 107, 255, .7); }
.kt-btn--primary:hover { background: var(--kt-primary-dark); color: #fff; transform: translateY(-1px); }
.kt-btn--ghost { background: #fff; color: var(--kt-ink); border-color: var(--kt-line); }
.kt-btn--ghost:hover { border-color: #c9cede; color: var(--kt-ink); transform: translateY(-1px); }
.kt-btn--dark { background: var(--kt-ink); color: #fff; }
.kt-btn--dark:hover { background: #23262e; color: #fff; transform: translateY(-1px); }

/* ---------------------------------------------------------------------------
   Header
   --------------------------------------------------------------------------- */
.kt-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, .82);
	backdrop-filter: saturate(180%) blur(14px);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid var(--kt-line);
}
.kt-header__inner { display: flex; align-items: center; gap: 1.25rem; min-height: 68px; }

.kt-brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 750; color: var(--kt-ink); letter-spacing: -.02em; font-size: 1.06rem; }
.kt-brand:hover { color: var(--kt-ink); }
.kt-brand__mark {
	width: 30px; height: 30px; border-radius: 9px; flex: none;
	background: linear-gradient(140deg, var(--kt-primary), #7aa2ff 60%, var(--kt-accent));
	display: grid; place-items: center; color: #fff; font-size: .86rem; font-weight: 800;
	box-shadow: 0 6px 14px -6px rgba(47, 107, 255, .8);
}

.kt-nav { margin-left: auto; display: flex; align-items: center; gap: .3rem; }
.kt-nav ul { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.kt-nav a {
	display: block; padding: .5rem .85rem; border-radius: 9px;
	color: var(--kt-ink-soft); font-weight: 550; font-size: .95rem;
}
.kt-nav a:hover { background: var(--kt-line-soft); color: var(--kt-ink); }
.kt-nav .current-menu-item > a { color: var(--kt-ink); background: var(--kt-line-soft); }
.kt-header__cta { margin-left: .4rem; }

.kt-burger {
	display: none; margin-left: auto;
	background: none; border: 1px solid var(--kt-line); border-radius: 10px;
	width: 40px; height: 40px; cursor: pointer; padding: 0;
	align-items: center; justify-content: center;
}
.kt-burger span { display: block; width: 17px; height: 2px; background: var(--kt-ink); border-radius: 2px; position: relative; }
.kt-burger span::before, .kt-burger span::after { content: ""; position: absolute; left: 0; width: 17px; height: 2px; background: var(--kt-ink); border-radius: 2px; }
.kt-burger span::before { top: -5.5px; }
.kt-burger span::after { top: 5.5px; }

@media (max-width: 860px) {
	.kt-burger { display: inline-flex; }
	.kt-nav {
		position: fixed; inset: 68px 0 auto; margin: 0;
		background: #fff; border-bottom: 1px solid var(--kt-line);
		flex-direction: column; align-items: stretch; gap: 0;
		padding: .75rem clamp(1.1rem, 4vw, 2rem) 1.25rem;
		box-shadow: var(--kt-shadow-lg);
		display: none;
	}
	.kt-nav.is-open { display: flex; }
	.kt-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.kt-nav a { padding: .7rem .25rem; border-radius: 0; border-bottom: 1px solid var(--kt-line-soft); }
	.kt-header__cta { margin: .9rem 0 0; }
	.kt-header__cta .kt-btn { width: 100%; }
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.kt-hero { position: relative; overflow: hidden; padding-block: clamp(4rem, 9vw, 7rem) clamp(3.5rem, 7vw, 5.5rem); }
.kt-hero::before {
	content: ""; position: absolute; inset: -30% -10% auto; height: 620px; z-index: -1;
	background:
		radial-gradient(46% 52% at 22% 30%, rgba(47, 107, 255, .16), transparent 70%),
		radial-gradient(40% 46% at 82% 18%, rgba(255, 158, 44, .16), transparent 70%);
	filter: blur(6px);
}
.kt-hero h1 { max-width: 17ch; }
.kt-hero .kt-lead { margin-top: 1.2rem; }
.kt-hero--center h1, .kt-hero--center .kt-lead { margin-inline: auto; }

.kt-pill {
	display: inline-flex; align-items: center; gap: .55rem;
	background: #fff; border: 1px solid var(--kt-line);
	border-radius: 999px; padding: .38rem .9rem .38rem .45rem;
	font-size: .84rem; font-weight: 550; color: var(--kt-ink-soft);
	box-shadow: var(--kt-shadow); margin-bottom: 1.5rem;
}
.kt-pill b { background: var(--kt-primary-wash); color: var(--kt-primary-dark); font-weight: 650; border-radius: 999px; padding: .16rem .6rem; font-size: .78rem; }

/* ---------------------------------------------------------------------------
   Cards
   --------------------------------------------------------------------------- */
.kt-card {
	background: #fff; border: 1px solid var(--kt-line);
	border-radius: var(--kt-radius-lg); padding: clamp(1.5rem, 3vw, 2.1rem);
	box-shadow: var(--kt-shadow);
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.kt-card--hover:hover { transform: translateY(-3px); box-shadow: var(--kt-shadow-lg); border-color: #d7dcea; }
.kt-card h3 { margin-bottom: .45rem; }
.kt-card p { color: var(--kt-muted); font-size: .97rem; }

.kt-icon {
	width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
	margin-bottom: 1.1rem; font-size: 1.15rem; background: var(--kt-primary-wash); color: var(--kt-primary-dark);
}
.kt-icon--ok { background: var(--kt-ok-wash); color: var(--kt-ok); }
.kt-icon--warn { background: var(--kt-warn-wash); color: var(--kt-warn); }
.kt-icon--stop { background: var(--kt-stop-wash); color: var(--kt-stop); }

.kt-tag {
	display: inline-block; font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
	padding: .28rem .62rem; border-radius: 999px; background: var(--kt-ok-wash); color: var(--kt-ok);
	margin-bottom: .9rem;
}

/* Plugin card */
.kt-plugin { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 820px) { .kt-plugin { grid-template-columns: 1.35fr .65fr; gap: 2.5rem; } }
.kt-plugin__meta { display: grid; gap: .55rem; font-size: .92rem; }
.kt-plugin__meta div { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--kt-line); }
.kt-plugin__meta div:last-child { border-bottom: 0; }
.kt-plugin__meta dt, .kt-plugin__meta span:first-child { color: var(--kt-muted); }
.kt-plugin__meta b { color: var(--kt-ink); font-weight: 600; }

/* ---------------------------------------------------------------------------
   Steps
   --------------------------------------------------------------------------- */
.kt-steps { counter-reset: kt; display: grid; gap: 1.1rem; }
.kt-step { display: grid; grid-template-columns: 42px 1fr; gap: 1.1rem; align-items: start; }
.kt-step::before {
	counter-increment: kt; content: counter(kt);
	width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
	background: var(--kt-ink); color: #fff; font-weight: 700; font-size: .95rem;
}
.kt-step h3 { font-size: 1.08rem; margin-bottom: .3rem; }
.kt-step p { color: var(--kt-muted); font-size: .97rem; margin: 0; }

/* ---------------------------------------------------------------------------
   Callout / quote
   --------------------------------------------------------------------------- */
.kt-callout {
	border-radius: var(--kt-radius-lg);
	background: linear-gradient(135deg, #101319, #1b2130);
	color: #d8dde8; padding: clamp(1.8rem, 4vw, 2.8rem);
	position: relative; overflow: hidden;
}
.kt-callout::after {
	content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px; border-radius: 50%;
	background: radial-gradient(circle, rgba(47, 107, 255, .35), transparent 68%);
}
.kt-callout h2, .kt-callout h3 { color: #fff; }
.kt-callout p { color: #aab3c4; }
.kt-callout strong { color: #fff; }

/* ---------------------------------------------------------------------------
   Lists
   --------------------------------------------------------------------------- */
.kt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.kt-list li { position: relative; padding-left: 1.9rem; color: var(--kt-ink-soft); font-size: .99rem; }
.kt-list li::before {
	content: ""; position: absolute; left: 0; top: .42em;
	width: 18px; height: 18px; border-radius: 50%;
	background: var(--kt-ok-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2312a150'%3E%3Cpath fill-rule='evenodd' d='M16.7 5.3a1 1 0 010 1.4l-7.5 7.5a1 1 0 01-1.4 0L3.3 9.7a1 1 0 111.4-1.4l3.8 3.8 6.8-6.8a1 1 0 011.4 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/12px no-repeat;
}
.kt-list--no li::before {
	background: var(--kt-stop-wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23d93636'%3E%3Cpath fill-rule='evenodd' d='M4.3 4.3a1 1 0 011.4 0L10 8.6l4.3-4.3a1 1 0 111.4 1.4L11.4 10l4.3 4.3a1 1 0 01-1.4 1.4L10 11.4l-4.3 4.3a1 1 0 01-1.4-1.4L8.6 10 4.3 5.7a1 1 0 010-1.4z' clip-rule='evenodd'/%3E%3C/svg%3E") center/11px no-repeat;
}

/* ---------------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------------- */
.kt-faq { display: grid; gap: .75rem; }
.kt-faq details {
	background: #fff; border: 1px solid var(--kt-line); border-radius: var(--kt-radius);
	padding: 1.05rem 1.3rem; transition: border-color .16s ease, box-shadow .16s ease;
}
.kt-faq details[open] { border-color: #d3daea; box-shadow: var(--kt-shadow); }
.kt-faq summary {
	cursor: pointer; font-weight: 620; color: var(--kt-ink); list-style: none;
	display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 1.01rem;
}
.kt-faq summary::-webkit-details-marker { display: none; }
.kt-faq summary::after {
	content: ""; flex: none; width: 11px; height: 11px;
	border-right: 2px solid var(--kt-muted); border-bottom: 2px solid var(--kt-muted);
	transform: rotate(45deg); transition: transform .18s ease; margin-top: -4px;
}
.kt-faq details[open] summary::after { transform: rotate(225deg); margin-top: 3px; }
.kt-faq details p { margin: .85rem 0 0; color: var(--kt-muted); font-size: .97rem; }

/* ---------------------------------------------------------------------------
   Code block
   --------------------------------------------------------------------------- */
.kt-code {
	background: #0f1115; color: #dfe5f0; border-radius: var(--kt-radius);
	padding: 1.1rem 1.3rem; overflow-x: auto; font-family: var(--kt-mono);
	font-size: .86rem; line-height: 1.75; border: 1px solid #1e2430;
}
.kt-code b { color: #7fb0ff; font-weight: 600; }
.kt-code i { color: #6f7a8d; font-style: normal; }

/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
.kt-footer { background: var(--kt-bg-alt); border-top: 1px solid var(--kt-line); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; margin-top: 0; }
.kt-footer__grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .kt-footer__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 3rem; } }
.kt-footer h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--kt-ink); margin-bottom: 1rem; font-weight: 650; }
.kt-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.kt-footer a { color: var(--kt-muted); font-size: .95rem; }
.kt-footer a:hover { color: var(--kt-primary); }
.kt-footer__about p { color: var(--kt-muted); font-size: .95rem; max-width: 42ch; margin-top: 1rem; }
.kt-footer__bottom {
	margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.5rem; border-top: 1px solid var(--kt-line);
	display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
	font-size: .89rem; color: var(--kt-muted);
}

/* ---------------------------------------------------------------------------
   Editor content (page.php / single.php)
   --------------------------------------------------------------------------- */
.kt-entry { padding-block: clamp(3rem, 7vw, 5rem); }
.kt-entry__body > * { max-width: 760px; margin-inline: auto; }
.kt-entry__body > .alignwide { max-width: 1080px; }
.kt-entry__body > .alignfull { max-width: none; }
.kt-entry__body h2 { margin-top: 2.4rem; }
.kt-entry__body h3 { margin-top: 1.9rem; }
.kt-entry__body ul, .kt-entry__body ol { padding-left: 1.3rem; }
.kt-entry__body li { margin-bottom: .5rem; }
.kt-entry__body img { border-radius: var(--kt-radius); }
.kt-entry__body blockquote {
	border-left: 3px solid var(--kt-primary); margin: 2rem auto; padding: .2rem 0 .2rem 1.4rem;
	color: var(--kt-ink); font-size: 1.1rem;
}

.kt-pagination { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 3rem; }
.kt-pagination .page-numbers {
	padding: .5rem .9rem; border: 1px solid var(--kt-line); border-radius: 10px; color: var(--kt-ink-soft);
}
.kt-pagination .current { background: var(--kt-ink); color: #fff; border-color: var(--kt-ink); }

/* Post list */
.kt-posts { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.kt-post time { display: block; font-size: .85rem; color: var(--kt-muted); margin-bottom: .5rem; }
.kt-post h2 { font-size: 1.25rem; margin-bottom: .5rem; }
.kt-post h2 a { color: var(--kt-ink); }
.kt-post h2 a:hover { color: var(--kt-primary); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
