/* Maciek Nitka – personal site */
:root {
    --ink: #121212;
    --ink-2: #3d3d3d;
    --muted: #6b6b6b;
    --line: #e2e0dc;
    --paper: #faf9f7;
    --grey: #f1efeb;
    --accent: #e8572a;
    --accent-ink: #b8401b;
    --wrap: 1120px;
    --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
ul, ol { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 24px; border-radius: 999px; border: 2px solid var(--ink);
    background: var(--ink); color: #fff; text-decoration: none;
    font-weight: 700; font-size: 15px; letter-spacing: .02em;
    transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn-small { padding: 8px 18px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); border-color: #fff; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250,249,247,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.nav-name { font-weight: 900; font-size: 18px; text-decoration: none; letter-spacing: .01em; margin-right: auto; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { text-decoration: none; font-size: 15px; color: var(--ink-2); }
.nav-links a:hover { color: var(--accent-ink); }

/* hero */
.hero { padding: 88px 0 80px; }
.hero-grid { display: grid; grid-template-columns: 1fr 340px; gap: 64px; align-items: center; }
.eyebrow { margin: 0 0 18px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 900; letter-spacing: -.015em; }
.lead { font-size: 20px; color: var(--ink-2); margin: 24px 0 32px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.availability { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; font-size: 15px; color: var(--muted); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #2fa84f; box-shadow: 0 0 0 4px rgba(47,168,79,.18); flex: none; }
.hero-photo img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; }

/* impact */
.impact { background: var(--ink); color: #fff; padding: 56px 0; }
.stats { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stats strong { display: block; font-size: 56px; font-weight: 900; line-height: 1; color: #fff; }
.stats span { display: block; margin-top: 12px; font-size: 15px; line-height: 1.45; color: #c9c9c9; max-width: 220px; }

/* sections */
.section { padding: 96px 0; }
.section-grey { background: var(--grey); }
.section-dark { background: var(--ink); color: #fff; }
.section-title { font-size: 36px; font-weight: 900; letter-spacing: -.01em; margin-bottom: 40px; }
.section-intro { margin: -24px 0 36px; color: var(--muted); }
.sub-title { font-size: 20px; font-weight: 900; margin: 56px 0 8px; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.card h3 { font-size: 19px; font-weight: 900; margin-bottom: 12px; }
.card h3::before { content: ""; display: block; width: 28px; height: 4px; background: var(--accent); border-radius: 2px; margin-bottom: 18px; }
.card p { margin: 0; font-size: 16px; color: var(--ink-2); }

/* approach */
.approach { display: grid; grid-template-columns: 1fr 1.25fr; gap: 64px; align-items: center; }
.approach blockquote { margin: 0; }
.approach blockquote p { margin: 0; font-size: clamp(30px, 3.6vw, 44px); font-weight: 300; line-height: 1.25; }
.approach .section-title { color: #fff; margin-bottom: 28px; }
.ticks { list-style: none; display: grid; gap: 18px; }
.ticks li { position: relative; padding-left: 30px; color: #d6d6d6; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 10px; width: 14px; height: 3px; background: var(--accent); }
.ticks strong { color: #fff; }

/* experience */
.timeline { list-style: none; }
.job { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 32px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; padding-top: 0; }
.job-date { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.job h3 { font-size: 22px; font-weight: 900; }
.job-org { margin: 6px 0 0; font-weight: 700; color: var(--ink-2); font-size: 15px; }
.job-path { margin: 10px 0 0; font-size: 14px; color: var(--accent-ink); font-weight: 700; }
.job ul { margin: 14px 0 0 18px; display: grid; gap: 6px; color: var(--ink-2); }
.job-tags { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.earlier { list-style: none; }
.earlier li { display: grid; grid-template-columns: 200px 1fr; gap: 32px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
.earlier li > span { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--muted); padding-top: 2px; }
.earlier strong { color: var(--ink); }

/* work */
.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 22px; }
.work { all: unset; cursor: pointer; display: flex; flex-direction: column; justify-content: flex-start; text-align: left; }
.work-media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #222; }
.work-media img, .work-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.work-preview { opacity: 0; transition: opacity .3s; }
.work.is-previewing .work-preview { opacity: 1; }
.work:hover .work-media img { transform: scale(1.04); }
.work-play { position: absolute; left: 14px; bottom: 14px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); }
.work-play::after { content: ""; position: absolute; left: 16px; top: 13px; border-left: 14px solid var(--ink); border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.work:hover .work-play, .work:focus-visible .work-play { background: var(--accent); }
.work:hover .work-play::after, .work:focus-visible .work-play::after { border-left-color: #fff; }
.work:focus-visible .work-media { outline: 3px solid var(--accent); outline-offset: 3px; }
.work-title { display: block; margin-top: 14px; font-weight: 900; font-size: 17px; line-height: 1.3; }
.work-meta { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

/* toolkit */
.toolkit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.toolkit h3, .facts h3 { font-size: 15px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; color: var(--ink-2); }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 15px; }
.chips em { font-style: normal; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; padding-top: 48px; border-top: 1px solid var(--line); }
.plain { list-style: none; display: grid; gap: 10px; font-size: 16px; color: var(--ink-2); }
.plain strong { color: var(--ink); }

/* contact */
.contact { text-align: center; }
.contact h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 900; letter-spacing: -.015em; }
.contact-mail { margin: 28px 0 32px; font-size: clamp(20px, 2.4vw, 28px); }
.contact-mail a { text-decoration-color: var(--accent); text-underline-offset: 6px; }
.contact-actions { justify-content: center; }
.contact-note { margin: 40px 0 0; color: #a9a9a9; font-size: 15px; }

.footer { background: var(--ink); color: #8a8a8a; font-size: 14px; padding: 24px 0 32px; border-top: 1px solid #2a2a2a; }

/* video player */
.player { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 24px; }
.player[hidden] { display: none; }
.player-inner { position: relative; width: min(1200px, 100%); }
.player video { width: 100%; max-height: 80vh; background: #000; border-radius: 8px; }
.player-caption { color: #ddd; margin: 12px 0 0; font-weight: 700; }
.player-close { position: absolute; right: -8px; top: -52px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; cursor: pointer; }
.player-close:hover { background: var(--accent); color: #fff; }

/* responsive */
@media (max-width: 1024px) {
    .cards, .work-grid { grid-template-columns: repeat(2, 1fr); }
    .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .nav-links { display: none; }
    .hero { padding: 56px 0; }
    .hero-grid { grid-template-columns: 1fr; gap: 36px; }
    .hero-photo { order: -1; width: 180px; }
    .approach, .toolkit, .facts { grid-template-columns: 1fr; gap: 36px; }
    .job, .earlier li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
    body { font-size: 16px; }
    .wrap { padding: 0 20px; }
    .section { padding: 64px 0; }
    .section-title { font-size: 28px; margin-bottom: 28px; }
    .lead { font-size: 18px; }
    .cards, .work-grid { grid-template-columns: 1fr; }
    .stats strong { font-size: 44px; }
    .hero-actions .btn { width: 100%; }
    .btn-ghost { word-break: break-all; }
}
