/* ITfolio — минималистичные стили */

:root {
	--accent: #2563eb;
	--bg: #ffffff;
	--bg-soft: #f6f7f9;
	--text: #111318;
	--muted: #5e6472;
	--line: #e5e7eb;
	--radius: 12px;
	--max: 1120px;
	--narrow: 760px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0e1014;
		--bg-soft: #161921;
		--text: #e8eaee;
		--muted: #9aa1ae;
		--line: #262a33;
		color-scheme: dark;
	}
}

:root[data-theme="dark"] {
	--bg: #0e1014;
	--bg-soft: #161921;
	--text: #e8eaee;
	--muted: #9aa1ae;
	--line: #262a33;
	color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 17px/1.65 var(--font);
	-webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow, .container.narrow { max-width: var(--narrow); }
.center { text-align: center; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; z-index: 1000;
	top: 8px; left: 8px; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line);
}

/* ---------- Шапка ---------- */

.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .custom-logo { max-height: 36px; width: auto; }
.site-title { color: var(--text); font-weight: 700; font-size: 18px; }
.site-title:hover { text-decoration: none; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 8px 12px; color: var(--muted); border-radius: 8px; font-size: 15px; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.site-nav .sub-menu {
	display: none; position: absolute; top: 100%; left: 0; min-width: 200px; flex-direction: column;
	background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px;
}
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu { display: flex; }

.menu-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--text); }
.menu-toggle-bar, .menu-toggle-bar::before, .menu-toggle-bar::after {
	display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: .2s;
}
.menu-toggle-bar::before, .menu-toggle-bar::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bar::before { top: -7px; }
.menu-toggle-bar::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
	.menu-toggle { display: block; }
	.site-nav {
		display: none; position: absolute; top: 64px; left: 0; right: 0;
		background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 24px 20px;
	}
	.site-nav.is-open { display: block; }
	.site-nav ul { flex-direction: column; }
	.site-nav .sub-menu { display: flex; position: static; border: 0; padding: 0 0 0 12px; }
}

/* ---------- Кнопки ---------- */

.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent);
	background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--accent); }

/* ---------- Первый экран ---------- */

.hero { padding: 96px 0 40px; }
.hero-inner { display: grid; gap: 48px; align-items: center; }
.hero-inner.has-photo { grid-template-columns: 1fr 280px; }
.hero-kicker { font-family: var(--mono); font-size: 14px; color: var(--accent); margin: 0 0 12px; letter-spacing: .02em; }
.hero-title { font-size: clamp(40px, 6vw, 64px); margin-bottom: 20px; letter-spacing: -.03em; }
.hero-intro { font-size: 20px; color: var(--muted); max-width: 640px; }
.hero-intro p { margin: 0 0 1em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-photo img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; }
.about { margin-top: 48px; max-width: var(--narrow); }

@media (max-width: 720px) {
	.hero { padding-top: 56px; }
	.hero-inner.has-photo { grid-template-columns: 1fr; }
	.hero-photo { order: -1; max-width: 160px; }
}

/* ---------- Разделы ---------- */

.section { padding: 64px 0; }
.site-main > .section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.section-title { font-size: 28px; margin: 0; }
.section-more { font-size: 15px; white-space: nowrap; }

.page-head { margin-bottom: 40px; }
.page-title { font-size: clamp(32px, 4vw, 44px); }
.archive-description { color: var(--muted); }
.empty { color: var(--muted); }

/* ---------- Навыки ---------- */

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.skill-group { background: var(--bg-soft); border-radius: var(--radius); padding: 24px; }
.skill-group-title { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 16px; }
.skill-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.skill-group .skill-list:not(:has(.has-level)) { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.skill-group .skill-list:not(:has(.has-level)) .skill { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 15px; }
.skill-row { display: flex; justify-content: space-between; gap: 8px; }
.skill-name { font-weight: 500; }
.skill-level { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.skill-bar { height: 4px; background: var(--line); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.skill-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.skill-note { margin: 4px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Таймлайн опыта ---------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline-item {
	display: grid; grid-template-columns: 220px 1fr; gap: 32px;
	padding: 28px 0; border-bottom: 1px solid var(--line); position: relative;
}
.timeline-item:first-child { padding-top: 0; }
.timeline-item:last-child { border-bottom: 0; }
.timeline-when { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.timeline-where { display: block; margin-top: 4px; font-family: var(--font); }
.is-current .timeline-when::before {
	content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
	background: #16a34a; margin-right: 8px; vertical-align: middle;
}
.timeline-logo img { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; margin-bottom: 12px; }
.timeline-title { font-size: 20px; margin-bottom: 2px; }
.timeline-company { margin: 0 0 12px; color: var(--muted); font-weight: 500; }
.timeline-desc { color: var(--text); font-size: 16px; }

@media (max-width: 720px) {
	.timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Карточки портфолио ---------- */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card {
	display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; background: var(--bg); transition: border-color .2s, transform .2s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-2px); }
.card-link { color: inherit; flex: 1; display: flex; flex-direction: column; }
.card-link:hover { text-decoration: none; }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 20px 8px; }
.card.no-image .card-body { padding-top: 24px; border-top: 3px solid var(--accent); }
.card-kicker { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.card-title { font-size: 19px; margin-bottom: 8px; }
.card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.card-foot { padding: 8px 20px 20px; }

.tags { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li, .tags a {
	font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px;
	background: var(--bg-soft); color: var(--muted);
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.filters a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 15px; }
.filters a:hover { text-decoration: none; color: var(--text); }
.filters a.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Достижения ---------- */

.achievements { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.achievement { display: flex; gap: 16px; padding: 20px; background: var(--bg-soft); border-radius: var(--radius); }
.achievement-media img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.achievement-icon {
	flex: none; width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center;
	background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-size: 22px;
}
.achievement-title { font-size: 17px; margin-bottom: 4px; }
.achievement-title a { color: var(--text); }
.achievement-meta { margin: 0; font-size: 14px; color: var(--muted); }
.achievement-excerpt { margin: 8px 0 0; font-size: 15px; }

/* ---------- Блог ---------- */

.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 32px 24px; }
.posts-list { grid-template-columns: 1fr; max-width: var(--narrow); gap: 0; }
.posts-list .post-card { display: grid; grid-template-columns: 1fr 200px; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.posts-list .post-card.no-image { grid-template-columns: 1fr; }
.posts-list .post-card-media { order: 2; }
.post-card-media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; margin-bottom: 16px; background: var(--bg-soft); }
.posts-list .post-card-media { margin: 0; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-title { font-size: 20px; margin: 6px 0 8px; }
.post-card-title a { color: var(--text); }
.post-card-excerpt { color: var(--muted); font-size: 15px; margin: 0; }
.entry-meta { font-size: 14px; color: var(--muted); }
.entry-meta a { color: var(--muted); }
.sep { opacity: .6; }

@media (max-width: 600px) {
	.posts-list .post-card { grid-template-columns: 1fr; }
	.posts-list .post-card-media { order: -1; }
}

/* ---------- Контакты ---------- */

.contacts-text { max-width: var(--narrow); color: var(--muted); font-size: 19px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 24px 0 0; }
.contacts dt { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.contacts dd { margin: 4px 0 0; font-size: 18px; font-weight: 500; }

/* ---------- Отдельная запись ---------- */

.single-entry { padding: 56px 0 72px; }
.entry-head { margin-bottom: 32px; }
.entry-title { font-size: clamp(32px, 4.5vw, 48px); letter-spacing: -.02em; }
.entry-lead { font-size: 20px; color: var(--muted); }
.entry-cover { margin: 0 auto 40px; }
.entry-cover img { border-radius: var(--radius); width: 100%; }
.entry-figure { margin: 0 0 32px; }
.entry-figure img { border-radius: var(--radius); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 0 0 8px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; }

.entry-content > * { margin-top: 0; margin-bottom: 1.2em; }
.entry-content h2 { font-size: 28px; margin-top: 1.8em; }
.entry-content h3 { font-size: 22px; margin-top: 1.5em; }
.entry-content img, .entry-content figure { border-radius: 8px; }
.entry-content blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--accent); color: var(--muted); }
.entry-content code { font-family: var(--mono); font-size: .9em; background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; }
.entry-content pre { font-family: var(--mono); font-size: 14px; background: var(--bg-soft); padding: 16px 20px; border-radius: 8px; overflow-x: auto; }
.entry-content pre code { background: none; padding: 0; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.alignwide { max-width: var(--max); }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); }

.post-navigation { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.post-navigation .nav-next { text-align: right; }
.nav-label { display: block; font-size: 13px; color: var(--muted); }
.nav-title { color: var(--text); font-weight: 600; }

.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.page-numbers.current { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ---------- Формы, комментарии ---------- */

input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line);
	border-radius: 8px; background: var(--bg); color: var(--text);
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.search-form { display: flex; gap: 8px; max-width: 480px; margin: 16px 0; }
.center .search-form { margin: 24px auto; }

.comments { margin-top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-meta { font-size: 14px; color: var(--muted); }
.comment-meta .avatar { float: left; border-radius: 50%; margin-right: 12px; }

/* ---------- Подвал ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 15px; color: var(--muted); }
.footer-widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.footer-nav ul, .social-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a, .social-nav a { color: var(--muted); }
.footer-nav a:hover, .social-nav a:hover { color: var(--text); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

.comment-form .submit {
	padding: 11px 20px; border-radius: 10px; border: 1px solid var(--accent);
	background: var(--accent); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: baseline; font-size: 15px; }
