:root,
[data-theme="light"] {
	--bg: #ffffff;
	--bg-subtle: #fafafa;
	--bg-card: rgba(255, 255, 255, 0.75);
	--bg-card-solid: #ffffff;
	--border: #e5e7eb;
	--border-light: #f0f0f0;
	--border-hover: #d4d4d4;
	--text: #0a0a0a;
	--text-secondary: #525252;
	--text-muted: #737373;
	--btn-primary-bg: #0a0a0a;
	--btn-primary-text: #ffffff;
	--btn-primary-shadow: rgba(0, 0, 0, 0.15);
	--btn-primary-shadow-hover: rgba(0, 0, 0, 0.2);
	--tag-bg: #0a0a0a;
	--tag-text: #ffffff;
	--grid-line: rgba(0, 0, 0, 0.14);
	--grid-fade-mid: rgba(255, 255, 255, 0.55);
	--grid-fade-end: rgba(255, 255, 255, 0.92);
	--vignette-1: rgba(0, 0, 0, 0.04);
	--vignette-2: rgba(0, 0, 0, 0.03);
	--vignette-3: rgba(0, 0, 0, 0.05);
	--orb-opacity: 0.55;
	--card-shadow: rgba(0, 0, 0, 0.04);
	--card-shadow-hover: rgba(0, 0, 0, 0.06);
	--badge-shadow: rgba(0, 0, 0, 0.06);
	--footer-bg: rgba(255, 255, 255, 0.6);
	--skeleton-1: #f0f0f0;
	--skeleton-2: #e8e8e8;
	--tok-kw: #cf222e;
	--tok-type: #8250df;
	--tok-fn: #0550ae;
	--tok-var: #953800;
	--tok-str: #0a3069;
	--tok-comment: #6e7781;
	--error: #dc2626;
	--term-bg: #f4f4f6;
	--term-chrome: #eaeaee;
	--term-border: rgba(0, 0, 0, 0.1);
	--term-shadow: rgba(0, 0, 0, 0.12);
	--term-title: rgba(0, 0, 0, 0.42);
	--term-prompt: #16a34a;
	--term-cmd: #18181b;
	--term-cursor: #18181b;
	--mono: "JetBrains Mono", ui-monospace, monospace;
	--sans: "Inter", system-ui, -apple-system, sans-serif;
	--radius: 12px;
	--radius-pill: 999px;
	--max: 960px;
	--max-wide: 1100px;
}

[data-theme="dark"] {
	--bg: #09090b;
	--bg-subtle: #141418;
	--bg-card: rgba(18, 18, 24, 0.82);
	--bg-card-solid: #141418;
	--border: rgba(255, 255, 255, 0.1);
	--border-light: rgba(255, 255, 255, 0.06);
	--border-hover: rgba(255, 255, 255, 0.18);
	--text: #f4f4f5;
	--text-secondary: #a1a1aa;
	--text-muted: #71717a;
	--btn-primary-bg: #fafafa;
	--btn-primary-text: #09090b;
	--btn-primary-shadow: rgba(255, 255, 255, 0.08);
	--btn-primary-shadow-hover: rgba(255, 255, 255, 0.14);
	--tag-bg: #fafafa;
	--tag-text: #09090b;
	--grid-line: rgba(255, 255, 255, 0.07);
	--grid-fade-mid: rgba(9, 9, 11, 0.55);
	--grid-fade-end: rgba(9, 9, 11, 0.92);
	--vignette-1: rgba(0, 0, 0, 0.35);
	--vignette-2: rgba(0, 0, 0, 0.2);
	--vignette-3: rgba(0, 0, 0, 0.4);
	--orb-opacity: 0.4;
	--card-shadow: rgba(0, 0, 0, 0.25);
	--card-shadow-hover: rgba(0, 0, 0, 0.35);
	--badge-shadow: rgba(0, 0, 0, 0.3);
	--footer-bg: rgba(9, 9, 11, 0.75);
	--skeleton-1: #1c1c22;
	--skeleton-2: #27272f;
	--tok-kw: #ff7b72;
	--tok-type: #d2a8ff;
	--tok-fn: #79c0ff;
	--tok-var: #ffa657;
	--tok-str: #a5d6ff;
	--tok-comment: #8b949e;
	--error: #f87171;
	--term-bg: #0a0a0e;
	--term-chrome: #18181f;
	--term-border: rgba(255, 255, 255, 0.08);
	--term-shadow: rgba(0, 0, 0, 0.35);
	--term-title: rgba(255, 255, 255, 0.35);
	--term-prompt: #4ade80;
	--term-cmd: #f4f4f5;
	--term-cursor: #f4f4f5;
	--mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
	margin: 0;
	min-height: 100vh;
	font-family: var(--sans);
	color: var(--text);
	background: var(--bg);
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	transition: background-color 0.35s ease, color 0.35s ease;
}

/* Theme toggle */
.theme-toggle {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-pill);
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	color: var(--text);
	cursor: pointer;
	box-shadow: 0 2px 12px var(--card-shadow);
	transition: border-color 0.2s, transform 0.15s, background-color 0.35s, color 0.35s;
}

.theme-toggle:hover {
	border-color: var(--border-hover);
	transform: scale(1.05);
}

.theme-toggle__icon {
	position: absolute;
	transition: opacity 0.25s, transform 0.25s;
}

.theme-toggle__icon--sun {
	opacity: 1;
	transform: rotate(0deg);
}

.theme-toggle__icon--moon {
	opacity: 0;
	transform: rotate(-30deg) scale(0.8);
}

[data-theme="dark"] .theme-toggle__icon--sun {
	opacity: 0;
	transform: rotate(30deg) scale(0.8);
}

[data-theme="dark"] .theme-toggle__icon--moon {
	opacity: 1;
	transform: rotate(0deg);
}

/* Animated background scene */
.bg-scene {
	position: fixed;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.bg-grid {
	position: absolute;
	inset: -80px;
	background-image:
		linear-gradient(var(--grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
	background-size: 48px 48px;
	animation: grid-drift 24s linear infinite;
	will-change: transform;
}

.bg-grid--fade {
	inset: 0;
	background-image: none;
	background: radial-gradient(
		ellipse 90% 70% at 50% 30%,
		transparent 0%,
		var(--grid-fade-mid) 55%,
		var(--grid-fade-end) 100%
	);
	animation: none;
	mask-image: radial-gradient(ellipse 85% 65% at 50% 25%, black 15%, transparent 72%);
}

.bg-vignette {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse 120% 80% at 50% 0%, transparent 30%, var(--vignette-1) 100%),
		linear-gradient(180deg, var(--vignette-2) 0%, transparent 40%, var(--vignette-3) 100%);
}

/* Floating orbs */
.bg-orb {
	position: absolute;
	border-radius: 50%;
	filter: blur(80px);
	opacity: var(--orb-opacity);
	will-change: transform;
	transition: opacity 0.35s ease;
}

.bg-orb--1 {
	width: 420px;
	height: 420px;
	top: -8%;
	left: 18%;
	background: radial-gradient(circle, #c084fc 0%, transparent 68%);
	animation: orb-float-1 18s ease-in-out infinite;
}

.bg-orb--2 {
	width: 360px;
	height: 360px;
	top: 5%;
	right: 12%;
	background: radial-gradient(circle, #fb7185 0%, transparent 68%);
	animation: orb-float-2 22s ease-in-out infinite;
}

.bg-orb--3 {
	width: 300px;
	height: 300px;
	top: 28%;
	left: 42%;
	background: radial-gradient(circle, #fbbf24 0%, transparent 68%);
	animation: orb-float-3 20s ease-in-out infinite;
}

.bg-orb--4 {
	width: 480px;
	height: 480px;
	bottom: 10%;
	left: -4%;
	background: radial-gradient(circle, #38bdf8 0%, transparent 68%);
	animation: orb-float-4 26s ease-in-out infinite;
}

.bg-orb--5 {
	width: 340px;
	height: 340px;
	bottom: 18%;
	right: 8%;
	background: radial-gradient(circle, #34d399 0%, transparent 68%);
	animation: orb-float-5 21s ease-in-out infinite;
}

@keyframes grid-drift {
	0% { transform: translate(0, 0); }
	100% { transform: translate(48px, 48px); }
}

@keyframes orb-float-1 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	33% { transform: translate(60px, 40px) scale(1.08); }
	66% { transform: translate(-30px, 70px) scale(0.95); }
}

@keyframes orb-float-2 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	40% { transform: translate(-70px, 50px) scale(1.1); }
	70% { transform: translate(40px, -30px) scale(0.92); }
}

@keyframes orb-float-3 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(50px, -40px) scale(1.06); }
	60% { transform: translate(-60px, 30px) scale(1.12); }
}

@keyframes orb-float-4 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	35% { transform: translate(80px, -50px) scale(1.05); }
	75% { transform: translate(-40px, -20px) scale(0.9); }
}

@keyframes orb-float-5 {
	0%, 100% { transform: translate(0, 0) scale(1); }
	45% { transform: translate(-50px, -60px) scale(1.08); }
	80% { transform: translate(30px, 40px) scale(0.94); }
}

@media (prefers-reduced-motion: reduce) {
	.bg-grid { animation: none; }
	.bg-orb { animation: none; }
}

main {
	position: relative;
	z-index: 1;
	max-width: var(--max-wide);
	margin: 0 auto;
	padding: 3.5rem 1.5rem 4rem;
}

/* Hero */
.hero {
	text-align: center;
	max-width: var(--max);
	margin: 0 auto 5rem;
	padding-top: 2rem;
}

.hero__title {
	font-size: clamp(2.25rem, 5.5vw, 3.5rem);
	line-height: 1.1;
	margin: 0 0 1.25rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	color: var(--text);
}

.hero__title-accent {
	background: linear-gradient(
		90deg,
		#9d174d 0%,
		#db2777 18%,
		#ec4899 36%,
		#f9a8d4 52%,
		#fda4af 68%,
		#e879f9 84%,
		#9d174d 100%
	);
	background-size: 250% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	animation: accent-shimmer 5s ease-in-out infinite;
}

@keyframes accent-shimmer {
	0%, 100% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
	.hero__title-accent { animation: none; }
}

.hero__desc {
	max-width: 540px;
	margin: 0 auto 2rem;
	color: var(--text-secondary);
	font-size: 1.05rem;
	line-height: 1.7;
}

.hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
	position: relative;
}

.hero__actions::before {
	content: "";
	position: absolute;
	bottom: -8px;
	left: 50%;
	transform: translateX(-50%);
	width: 200px;
	height: 40px;
	background: linear-gradient(90deg, #fda4af, #fde68a, #a5f3fc);
	filter: blur(24px);
	opacity: 0.5;
	z-index: -1;
}

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.4rem;
	border-radius: var(--radius-pill);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn--primary {
	background: var(--btn-primary-bg);
	color: var(--btn-primary-text);
	box-shadow: 0 4px 20px var(--btn-primary-shadow);
}

.btn--primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 28px var(--btn-primary-shadow-hover);
}

.btn--secondary {
	background: var(--bg-card-solid);
	color: var(--text);
	border: 1px solid var(--border);
}

.btn--secondary:hover {
	background: var(--bg-subtle);
	border-color: var(--border-hover);
}

/* Terminal section */
.terminal-section {
	max-width: 820px;
	margin: 0 auto 5rem;
}

.terminal-section__intro {
	text-align: center;
	margin-bottom: 2rem;
}

.terminal-section__title {
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin: 0 0 0.6rem;
}

.terminal-section__desc {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.95rem;
}

.terminal {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--term-border);
	box-shadow: 0 20px 50px var(--term-shadow);
	background: var(--term-bg);
	transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.terminal__chrome {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.75rem 1rem;
	background: var(--term-chrome);
	border-bottom: 1px solid var(--term-border);
	transition: background-color 0.35s ease, border-color 0.35s ease;
}

.terminal__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}

.terminal__dot--red { background: #ff5f57; }
.terminal__dot--yellow { background: #febc2e; }
.terminal__dot--green { background: #28c840; }

.terminal__title {
	margin-left: 0.5rem;
	font-family: var(--mono);
	font-size: 0.72rem;
	color: var(--term-title);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.terminal__body {
	padding: 1.1rem 1.25rem 1.25rem;
	background: var(--term-bg);
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	transition: background-color 0.35s ease;
}

.terminal__line {
	font-family: var(--mono);
	font-size: 0.82rem;
	line-height: 1.5;
	margin-bottom: 0.85rem;
	white-space: nowrap;
}

.terminal__line--cmd {
	margin-bottom: 1rem;
}

.terminal__logs {
	font-family: var(--mono);
	font-size: 0.72rem;
	line-height: 1.55;
}

.term-banner {
	margin-bottom: 0.75rem;
	font-family: var(--mono);
	font-size: 0.62rem;
	line-height: 1.15;
	white-space: pre;
}

.term-banner__line {
	white-space: pre;
	height: 1.15em;
}

.term-line {
	display: block;
	white-space: pre-wrap;
	word-break: break-word;
	margin-bottom: 0.1rem;
}

.term-prompt {
	color: var(--term-prompt);
	font-weight: 600;
	margin-right: 0.5rem;
}

.term-cmd {
	color: var(--term-cmd);
}

.term-cursor {
	color: var(--term-cursor);
	animation: cursor-blink 1.1s step-end infinite;
}

@keyframes cursor-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

.terminal__cursor-line {
	margin-top: 0.25rem;
}

/* Stats */
.stats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	max-width: var(--max-wide);
	margin: 0 auto 2.5rem;
}

.stat-card {
	padding: 1.25rem 1.35rem;
	border-radius: var(--radius);
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	border: 1px solid var(--border);
	transition: background-color 0.35s ease, border-color 0.35s ease;
}

.stat-card__label {
	margin: 0 0 0.35rem;
	font-size: 0.75rem;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 500;
}

.stat-card__value {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.stat-card__value--mono {
	font-family: var(--mono);
	font-size: 1.1rem;
	font-weight: 600;
}

.stat-card__hint {
	margin: 0.35rem 0 0;
	font-size: 0.82rem;
	color: var(--text-muted);
}

/* Panels */
.panel {
	max-width: var(--max-wide);
	margin: 0 auto 1.25rem;
	padding: 1.5rem;
	border-radius: var(--radius);
	background: var(--bg-card);
	backdrop-filter: blur(14px);
	border: 1px solid var(--border);
	transition: background-color 0.35s ease, border-color 0.35s ease;
}

.panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.25rem;
}

.panel__head h2 {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.panel__status {
	font-size: 0.78rem;
	color: var(--text-muted);
	padding: 0.25rem 0.65rem;
	border-radius: var(--radius-pill);
	background: var(--bg-subtle);
	border: 1px solid var(--border-light);
}

.release__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.release__tag {
	font-family: var(--mono);
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--text);
}

.release__date {
	color: var(--text-muted);
	font-size: 0.88rem;
}

.release__assets {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin-bottom: 1rem;
}

.asset-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.5rem 0.85rem;
	border-radius: var(--radius-pill);
	background: var(--bg-subtle);
	border: 1px solid var(--border);
	color: var(--text);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
	transition: background 0.15s, border-color 0.15s;
}

.asset-chip:hover {
	background: var(--bg-subtle);
	border-color: var(--border-hover);
}

.asset-chip__size {
	color: var(--text-muted);
	font-size: 0.78rem;
	font-weight: 400;
}

.release__body {
	white-space: pre-wrap;
	color: var(--text-secondary);
	font-size: 0.9rem;
	line-height: 1.65;
	max-height: 260px;
	overflow: auto;
	padding: 1rem;
	border-radius: 8px;
	background: var(--bg-subtle);
	border: 1px solid var(--border-light);
}

.git-info__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: baseline;
	margin-bottom: 0.75rem;
}

.git-info__sha {
	font-family: var(--mono);
	color: var(--text);
	text-decoration: none;
	font-weight: 600;
}

.git-info__sha:hover { text-decoration: underline; }

.git-info__message {
	margin: 0 0 0.5rem;
	font-size: 0.98rem;
}

.git-info__meta {
	margin: 0;
	color: var(--text-muted);
	font-size: 0.86rem;
}

.git-info__meta a {
	color: var(--text-secondary);
}

.releases-table-wrap { overflow-x: auto; }

.releases-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
}

.releases-table th,
.releases-table td {
	padding: 0.75rem 0.5rem;
	text-align: left;
	border-bottom: 1px solid var(--border-light);
}

.releases-table th {
	color: var(--text-muted);
	font-weight: 500;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.releases-table tr:last-child td { border-bottom: none; }

.releases-table a {
	color: var(--text);
	text-decoration: none;
	font-weight: 500;
}

.releases-table a:hover { text-decoration: underline; }

/* Links */
.links {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 1rem;
	max-width: var(--max-wide);
	margin: 2.5rem auto 0;
}

.link-card {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 1.15rem 1.25rem;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--bg-card);
	backdrop-filter: blur(12px);
	text-decoration: none;
	color: var(--text);
	transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s, background-color 0.35s ease;
}

.link-card:hover {
	border-color: var(--border-hover);
	box-shadow: 0 4px 16px var(--card-shadow-hover);
	transform: translateY(-2px);
}

.link-card strong {
	font-size: 0.95rem;
	font-weight: 600;
}

.link-card__title {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
}

.link-card__icon {
	flex-shrink: 0;
}

.link-card__icon--vk {
	color: #0077ff;
}

.link-card__icon--gh {
	color: var(--text);
}

.link-card__icon--tg {
	color: #2aabee;
}

.link-card__icon--forum {
	color: #ec4899;
}

.link-card span {
	color: var(--text-muted);
	font-size: 0.85rem;
}

/* Footer */
.footer {
	position: relative;
	z-index: 1;
	text-align: center;
	padding: 2.5rem 1.5rem 3rem;
	color: var(--text-muted);
	font-size: 0.84rem;
	border-top: 1px solid var(--border-light);
	background: var(--footer-bg);
	backdrop-filter: blur(10px);
	transition: background-color 0.35s ease, border-color 0.35s ease;
}

.footer p { margin: 0.3rem 0; }

/* Skeleton */
.skeleton {
	background: linear-gradient(90deg, var(--skeleton-1), var(--skeleton-2), var(--skeleton-1));
	background-size: 200% 100%;
	animation: shimmer 1.2s infinite;
	border-radius: 6px;
}

.skeleton--block { height: 72px; margin-bottom: 0.75rem; }
.skeleton--line { height: 14px; margin-bottom: 0.5rem; }
.skeleton--short { width: 55%; }

@keyframes shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

.error-msg {
	color: var(--error);
	font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 900px) {
	.stats { grid-template-columns: repeat(2, 1fr); }
	.links { grid-template-columns: repeat(2, 1fr); }
	.terminal-section { margin-bottom: 3.5rem; }
}

@media (max-width: 540px) {
	.stats { grid-template-columns: 1fr; }
	.hero { padding-top: 0.5rem; margin-bottom: 3rem; }
	main { padding: 1.25rem 1rem 3rem; }
	.hero__title { font-size: clamp(1.85rem, 8vw, 2.5rem); }
	.hero__desc { font-size: 0.95rem; margin-bottom: 1.5rem; }
	.hero__actions {
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		max-width: 360px;
		margin-left: auto;
		margin-right: auto;
	}
	.hero__actions .btn { width: 100%; }
	.theme-toggle {
		top: 0.75rem;
		right: 0.75rem;
		width: 38px;
		height: 38px;
	}
	.terminal-section { margin-bottom: 2.5rem; }
	.terminal-section__intro { margin-bottom: 1.25rem; }
	.terminal { border-radius: 12px; }
	.terminal__body { padding: 0.85rem 0.75rem 1rem; }
	.terminal__line { font-size: 0.75rem; white-space: normal; }
	.terminal__logs { font-size: 0.62rem; }
	.term-banner { font-size: 0.48rem; }
	.panel { padding: 1.15rem; }
	.releases-table { font-size: 0.82rem; }
	.releases-table th,
	.releases-table td { padding: 0.6rem 0.35rem; }
}
