/*
Theme Name: Portfolio
Description: Ciemny, jednostronicowy motyw portfolio programisty – sekcja główna, projekty, o mnie i kontakt. Treści edytujesz w Wygląd → Dostosuj.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: portfolio
*/

/* ==========================================================================
   Zmienne
   ========================================================================== */
:root {
	--bg: #101719;
	--bg-alt: #1e282b;
	--surface: #172023;
	--border: #2a3538;
	--text: #eef1f1;
	--muted: #a9b3b5;
	--accent: #f5a86e;
	--accent-ink: #1a1410;
	--font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
	--radius: 10px;
	--container: 1060px;
	--grid: rgba(255, 255, 255, 0.025);
}

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

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

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.6;
	color: var(--text);
	background-color: var(--bg);
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 80px 80px;
	-webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0; }

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

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

.container { width: min(100% - 48px, var(--container)); margin-inline: auto; }
.narrow { max-width: 720px; }

.sr-only,
.skip-link:not(:focus) {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 12px; left: 12px; z-index: 100;
	padding: 10px 16px; background: var(--accent); color: var(--accent-ink); border-radius: 6px;
}

/* ==========================================================================
   Nagłówek
   ========================================================================== */
.site-header { border-bottom: 1px solid var(--border); }

.header-inner {
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	min-height: 64px;
}

.logo {
	font-family: var(--mono); font-weight: 700; font-size: 14px;
	text-decoration: none; color: var(--text);
}

.site-nav ul { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.site-nav a { font-size: 15px; text-decoration: none; color: var(--text); opacity: 0.9; transition: color .2s; }
.site-nav a:hover { color: var(--accent); }

/* ==========================================================================
   Przyciski
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 14px 26px; border-radius: 999px; border: 1px solid transparent;
	font: 600 15px/1 var(--font); text-decoration: none; cursor: pointer;
	transition: transform .2s, background-color .2s, border-color .2s, color .2s;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #f8bb8c; transform: translateY(-1px); }
.btn-ghost { border-color: #4a5659; color: var(--text); font-weight: 500; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 12px 20px; font-size: 14px; }

/* ==========================================================================
   Etykiety i tytuły sekcji
   ========================================================================== */
.eyebrow {
	font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
	color: var(--accent); margin-bottom: 18px;
}
.eyebrow-sm { margin: 32px 0 16px; }

.section { padding: 112px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(22px, 2.4vw, 26px); font-weight: 600; max-width: 30ch; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { border-bottom: 1px solid var(--border); padding: 80px 0 96px; }

.hero-grid {
	display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; align-items: center;
}

.hero-title { font-size: clamp(28px, 3.6vw, 34px); font-weight: 700; letter-spacing: -0.03em; }

.accent-bar { display: block; width: 72px; height: 3px; background: var(--accent); margin: 34px 0; border-radius: 2px; }

.lead { color: var(--muted); font-size: 18px; max-width: 500px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.hero-visual { position: relative; padding: 18px 26px 26px 18px; }

.corner {
	position: absolute; top: 0; left: 0; width: 70px; height: 70px;
	border-top: 2px solid var(--accent); border-left: 2px solid var(--accent);
}

.hero-frame {
	position: relative; aspect-ratio: 1 / 1.05;
	transform: rotate(2deg);
	box-shadow: 18px 22px 0 #223033;
	overflow: hidden; background: var(--surface);
}
.hero-img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
	position: absolute; right: 18px; bottom: 6px; z-index: 2;
	padding: 9px 14px; background: var(--accent); color: var(--accent-ink);
	font-size: 11px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
}

/* Okno z kodem – gdy nie ustawiono zdjęcia */
.code-window {
	height: 100%; padding: 22px 26px; font-family: var(--mono); font-size: 13px; line-height: 1.75;
	background: linear-gradient(160deg, #1b2528, #121a1c); color: #c9d3d4;
}
.code-dots { display: flex; gap: 7px; margin-bottom: 22px; }
.code-dots span { width: 10px; height: 10px; border-radius: 50%; background: #3a4649; }
.code-dots span:first-child { background: var(--accent); }
.code-window pre { margin: 0; white-space: pre; overflow: hidden; }
.c-k { color: #f5a86e; }
.c-v { color: #e8ecec; font-weight: 700; }
.c-p { color: #8fc1c9; }
.c-s { color: #b6d68a; }
.c-n { color: #d7a6e8; }
.c-f { color: #f0d58c; }
.caret {
	display: inline-block; width: 8px; height: 1.1em; margin-left: 2px; vertical-align: text-bottom;
	background: var(--accent); animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Projekty
   ========================================================================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }

.card {
	display: flex; flex-direction: column;
	padding: 28px 26px 24px; min-height: 226px;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	transition: border-color .2s, transform .2s;
}
.card:hover { border-color: #4a5659; transform: translateY(-2px); }

.card-label { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.card-title { margin-top: auto; padding-top: 48px; font-size: 18px; }
.card-title a { text-decoration: none; }
.card-title a::after { content: " ↗"; color: var(--accent); }
.card-title a:hover { color: var(--accent); }
.card-desc { margin-top: 10px; font-size: 14.5px; color: var(--muted); }
.card-tags { margin-top: 18px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; color: var(--accent); }

/* Realizacje – szerokie ujęcia ze zrzutem ekranu */
.works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; margin-top: 44px; }

.work { display: flex; flex-direction: column; }

.work-shot {
	display: block; text-decoration: none; overflow: hidden;
	background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
	transition: border-color .25s, transform .25s, box-shadow .25s;
}
a.work-shot:hover { border-color: #4a5659; transform: translateY(-3px); box-shadow: 14px 16px 0 #223033; }

.work-bar {
	display: flex; align-items: center; gap: 14px;
	padding: 10px 14px; border-bottom: 1px solid var(--border); background: #131b1d;
}
.work-bar .code-dots { margin: 0; gap: 6px; }
.work-bar .code-dots span { width: 9px; height: 9px; }
.work-address {
	flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
	padding: 4px 12px; border-radius: 999px; background: var(--bg);
	font-family: var(--mono); font-size: 11px; color: var(--muted);
}

.work-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0d1314; }
.work-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .6s ease; }
a.work-shot:hover .work-img img { transform: scale(1.03); }

.work-placeholder {
	display: grid; place-items: center; height: 100%; padding: 24px; text-align: center;
	font-family: var(--mono); font-size: 15px; color: var(--muted);
	background: linear-gradient(160deg, #1b2528, #121a1c);
}

.work-body { padding: 26px 4px 0; }
.work-title { margin-top: 12px; font-size: 21px; }
.work-title a { text-decoration: none; }
.work-title a::after { content: " ↗"; color: var(--accent); }
.work-title a:hover { color: var(--accent); }
.work-body .card-desc { margin-top: 12px; font-size: 15.5px; max-width: 58ch; }
.work-body .card-tags { margin-top: 16px; letter-spacing: 0.04em; }

/* ==========================================================================
   O mnie
   ========================================================================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.about-text { font-size: 17px; color: #d5dbdc; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chips li { padding: 7px 15px; border: 1px solid #4a5659; border-radius: 999px; font-size: 14.5px; }

/* ==========================================================================
   Kontakt
   ========================================================================== */
.contact-text { margin-top: 18px; font-size: 15px; color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 30px; }
.contact-email { font-size: 18px; text-decoration: none; }
.contact-email:hover { color: var(--accent); }

/* ==========================================================================
   Stopka
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12.5px; color: var(--muted); }

/* ==========================================================================
   Wpisy i strony (index.php)
   ========================================================================== */
.page-content .entry + .entry { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--border); }
.entry-title { font-size: 30px; margin-bottom: 20px; }
.entry-title a { text-decoration: none; }
.entry-title a:hover { color: var(--accent); }
.entry-body { color: #d5dbdc; }
.entry-body > * + * { margin-top: 1em; }
.entry-body a { color: var(--accent); }

/* ==========================================================================
   Responsywność
   ========================================================================== */
@media (max-width: 900px) {
	.hero-grid,
	.about-grid { grid-template-columns: 1fr; gap: 48px; }
	.hero-visual { max-width: 440px; }
	.cards,
	.works { grid-template-columns: 1fr; }
	.works { gap: 48px; }
	.card { min-height: 0; }
	.card-title { padding-top: 28px; }
	.section { padding: 80px 0; }
}

@media (max-width: 560px) {
	body { font-size: 16px; }
	.site-nav ul { gap: 18px; }
	.site-nav a { font-size: 14px; }
	.hero { padding: 56px 0 72px; }
	.lead { font-size: 16.5px; }
}

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