/* =========================================================
   Portfolio — Aleksander Kopydłowski
   Motyw: "Midnight & Champagne" — elegancki, dżentelmeński.
   Wspólny dla wszystkich podstron (Home / About / Projects).
   ========================================================= */

:root {
    --bg: #0a0a0c;
    --bg-soft: #101013;
    --panel: rgba(255, 255, 255, 0.022);
    --panel-hover: rgba(255, 255, 255, 0.045);
    --line: rgba(255, 255, 255, 0.09);
    --line-soft: rgba(255, 255, 255, 0.05);
    --fg: #ece9e3;
    --muted: #9a958b;
    --muted-soft: #6f6b63;
    --gold: #c9a96a;
    --gold-bright: #e0c485;
    --gold-dim: rgba(201, 169, 106, 0.16);
    --accent-2: #b98f4e;
    --accent-2-dim: rgba(201, 169, 106, 0.12);
    --grad: linear-gradient(105deg, var(--gold-bright), var(--gold) 48%, #b98f4e);
    --radius: 14px;
    --radius-lg: 22px;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Typografia serif dla dużych tytułów */
.serif {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Modern, geometryczny font dla etykiet, nawigacji i chipów */
.eyebrow,
.card__label,
.nav__links a,
.nav__brand .brand-word,
.tag,
.stack__group h4,
.hero__scroll,
.skill__level,
.lang-switch,
.mini-card__more,
.project__index,
.mini-card__idx {
    font-family: "Space Grotesk", "Inter", sans-serif;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--gold-dim); color: var(--gold-bright); }

/* ---------- Tło: warstwy ---------- */
.bg-aurora {
    position: fixed;
    inset: -25%;
    z-index: -4;
    background:
        radial-gradient(38% 38% at 22% 18%, rgba(201, 169, 106, 0.14), transparent 70%),
        radial-gradient(40% 40% at 80% 72%, rgba(201, 169, 106, 0.08), transparent 72%),
        radial-gradient(42% 42% at 82% 28%, rgba(120, 110, 90, 0.10), transparent 72%),
        radial-gradient(50% 50% at 50% 92%, rgba(201, 169, 106, 0.07), transparent 70%),
        var(--bg);
    filter: blur(30px);
    animation: drift 26s var(--ease) infinite alternate;
}

@keyframes drift {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    50%  { transform: translate3d(1.5%, -2%, 0) scale(1.05); }
    100% { transform: translate3d(-2%, 1.5%, 0) scale(1.03); }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -3;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 78px 78px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 35%, transparent 100%);
}

/* subtelne ziarno */
.bg-grain {
    position: fixed;
    inset: 0;
    z-index: -2;
    opacity: 0.5;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

#dust {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ---------- Nawigacja ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px clamp(20px, 5vw, 56px);
    backdrop-filter: blur(12px);
    background: linear-gradient(to bottom, rgba(10, 10, 12, 0.82), rgba(10, 10, 12, 0));
    border-bottom: 1px solid var(--line-soft);
}

.nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: "Playfair Display", serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
}

.nav__brand .monogram-img {
    height: 30px;
    width: auto;
    display: block;
    transition: transform 0.5s var(--ease), filter 0.4s ease;
}
.nav__brand:hover .monogram-img { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(201, 169, 106, 0.45)); }
.nav__brand .brand-word { color: var(--muted); font-weight: 500; font-family: "Inter", sans-serif; font-size: 0.95rem; letter-spacing: 0.18em; text-transform: uppercase; }

.nav__links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav__links a {
    position: relative;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--muted);
    border-radius: 8px;
    transition: color 0.3s ease;
}
.nav__links a::after {
    content: "";
    position: absolute;
    left: 16px; right: 16px; bottom: 4px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}
.nav__links a:hover { color: var(--fg); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__links a.is-active { color: var(--gold-bright); }
.nav__links a.is-active::after { transform: scaleX(1); }

.nav__contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--fg);
    transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s var(--ease);
}
.nav__contact:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-1px); }

/* ---------- Pełnoekranowy splash: strona w budowie ---------- */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 40px clamp(20px, 5vw, 40px);
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 50% 28%, rgba(201, 169, 106, 0.13), transparent 70%),
        radial-gradient(55% 55% at 72% 82%, rgba(201, 169, 106, 0.07), transparent 72%),
        var(--bg);
    transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.splash::before { /* ziarno */
    content: "";
    position: absolute; inset: 0;
    opacity: 0.5; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
html.previewed .splash { display: none; }

.splash__inner {
    position: relative;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}
.splash__logo {
    width: min(340px, 70vw);
    height: auto;
    margin-bottom: 6px;
    filter: drop-shadow(0 8px 30px rgba(0, 0, 0, 0.5));
}
.splash__title {
    font-size: clamp(3rem, 13vw, 9rem);
    line-height: 0.92;
    font-weight: 600;
}
.splash__title span { display: block; }
.splash__title em {
    display: block;
    font-style: italic;
    background: linear-gradient(105deg, var(--gold-bright), var(--gold) 50%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.splash__sub {
    max-width: 460px;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.15rem);
}
.splash__meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: var(--panel);
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
}
.splash__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 6px;
}
.splash__socials { display: flex; gap: 12px; margin-top: 4px; }
.splash__socials a {
    display: grid; place-items: center;
    width: 40px; height: 40px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease), background 0.3s ease;
}
.splash__socials a:hover { color: var(--gold-bright); border-color: var(--gold); transform: translateY(-2px); background: var(--gold-dim); }
.splash__socials svg { width: 18px; height: 18px; }
.splash__preview {
    margin-top: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-soft);
    font: inherit;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}
.splash__preview:hover { color: var(--gold-bright); }
.splash__preview svg { transition: transform 0.3s var(--ease); }
.splash__preview:hover svg { transform: translateX(3px); }

/* pasek budowy klikalny (powrót do splasha) */
.construction { cursor: pointer; }

/* ---------- Pasek: strona w budowie ---------- */
.construction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    padding: 9px 16px;
    text-align: center;
    font-family: "Space Grotesk", "Inter", sans-serif;
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: var(--gold-bright);
    background: linear-gradient(90deg, transparent, var(--gold-dim) 35%, var(--accent-2-dim) 65%, transparent);
    border-bottom: 1px solid var(--line-soft);
    position: relative;
    overflow: hidden;
}
.construction::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    transform: translateX(-120%);
    animation: sweep 5s var(--ease) infinite;
}
@keyframes sweep {
    0% { transform: translateX(-120%); }
    60%, 100% { transform: translateX(360%); }
}
.construction__dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 0 rgba(201, 169, 106, 0.6);
    animation: ping 2.2s ease-out infinite;
    flex: none;
}
@keyframes ping {
    0% { box-shadow: 0 0 0 0 rgba(201, 169, 106, 0.55); }
    70% { box-shadow: 0 0 0 9px rgba(201, 169, 106, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 169, 106, 0); }
}

.nav__actions { display: flex; align-items: center; gap: 12px; }

/* przełącznik języka PL / EN */
.lang-switch {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 100px;
    overflow: hidden;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
}
.lang-switch button {
    padding: 8px 13px;
    background: transparent;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    transition: color 0.3s ease, background 0.3s ease;
}
.lang-switch button.is-active { color: #0a0a0c; background: var(--gold); }
.lang-switch button:not(.is-active):hover { color: var(--fg); }

.nav__burger { display: none; }

/* ---------- Layout pomocniczy ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
}
.eyebrow::before {
    content: "";
    width: 28px; height: 1px;
    background: var(--gold);
    opacity: 0.6;
}

.section-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    line-height: 1.1;
}

/* ---------- HOME / Hero ---------- */
.hero {
    min-height: calc(100vh - 79px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px clamp(20px, 5vw, 56px) 40px;
    max-width: var(--maxw);
    margin: 0 auto;
}

.hero__eyebrow { margin-bottom: 28px; }

.hero__name {
    font-size: clamp(3rem, 11vw, 8.5rem);
    line-height: 0.95;
    font-weight: 600;
}
.hero__name .ln { display: block; overflow: hidden; }
.hero__name .ln > span { display: inline-block; }
.hero__name em {
    font-style: italic;
    background: linear-gradient(105deg, var(--gold-bright), var(--gold) 50%, var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__role {
    margin-top: 26px;
    font-size: clamp(1rem, 2.3vw, 1.35rem);
    color: var(--muted);
    letter-spacing: 0.02em;
}
.hero__role .sep { color: var(--gold); margin: 0 12px; }

.hero__tagline {
    margin-top: 22px;
    max-width: 560px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero__cta {
    margin-top: 44px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero__scroll {
    margin-top: 64px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.78rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted-soft);
}
.hero__scroll .bar {
    width: 46px; height: 1px; background: var(--line);
    position: relative; overflow: hidden;
}
.hero__scroll .bar::after {
    content: ""; position: absolute; inset: 0;
    background: var(--gold);
    transform: translateX(-100%);
    animation: scrollBar 2.4s var(--ease) infinite;
}
@keyframes scrollBar {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* przegląd "selected work" na home */
.home-feature {
    padding: 60px 0 100px;
    border-top: 1px solid var(--line-soft);
}
.home-feature__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}
.mini-projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.mini-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    transition: transform 0.4s var(--ease), border-color 0.4s ease, background 0.4s ease;
}
.mini-card:hover { transform: translateY(-4px); border-color: var(--gold); background: var(--panel-hover); }
.mini-card__idx { font-family: "Playfair Display", serif; font-style: italic; color: var(--gold); font-size: 1.1rem; }
.mini-card__title { font-size: 1.25rem; }
.mini-card__desc { color: var(--muted); font-size: 0.92rem; }
.mini-card__more { margin-top: auto; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.05em; display: inline-flex; gap: 8px; align-items: center; }
.mini-card:hover .mini-card__more svg { transform: translateX(4px); }
.mini-card__more svg { transition: transform 0.3s var(--ease); }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 100px;
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.35s ease, border-color 0.35s ease;
}
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }

.btn--primary {
    background: var(--grad);
    color: #0a0a0c;
    box-shadow: 0 10px 30px rgba(201, 169, 106, 0.22);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(201, 169, 106, 0.34); filter: brightness(1.06); }

.btn--ghost {
    border-color: var(--line);
    color: var(--fg);
    background: var(--panel);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--gold); background: var(--gold-dim); }

/* ---------- ABOUT ---------- */
.about {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 48px clamp(20px, 5vw, 40px) 100px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 40px;
    align-items: start;
}

/* lewa kolumna: zdjęcie na całą wysokość + dane */
.about__aside {
    position: sticky;
    top: 99px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--panel);
}
.about__photo {
    position: relative;
    aspect-ratio: 3 / 4;
    background:
        linear-gradient(180deg, rgba(201,169,106,0.08), rgba(10,10,12,0.6)),
        repeating-linear-gradient(45deg, #16161a 0 14px, #121216 14px 28px);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.about__photo img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 50% 22%;
    filter: saturate(0.82) contrast(1.04) brightness(0.95);
    transition: transform 0.8s var(--ease);
}
.about__aside:hover .about__photo img { transform: scale(1.04); }
.about__photo .photo-ph {
    text-align: center;
    color: var(--muted-soft);
    padding: 20px;
}
.about__photo .photo-ph svg { width: 56px; height: 56px; opacity: 0.5; }
.about__photo .photo-ph span { display: block; margin-top: 10px; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; }
.about__photo::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(to top, rgba(10,10,12,0.92), transparent 44%),
        linear-gradient(to bottom, rgba(10,10,12,0.35), transparent 28%),
        radial-gradient(120% 80% at 50% 0%, rgba(201,169,106,0.12), transparent 60%);
    pointer-events: none;
}

.about__id { padding: 22px; position: relative; }
.about__id h1 { font-size: 1.6rem; line-height: 1.15; }
.about__id .role { color: var(--gold); font-size: 0.9rem; letter-spacing: 0.04em; margin-top: 4px; }
.about__id .bio { color: var(--muted); font-size: 0.9rem; margin-top: 14px; }

.about__socials { display: flex; gap: 10px; margin-top: 18px; }
.about__socials a {
    display: grid; place-items: center;
    width: 38px; height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease), background 0.3s ease;
}
.about__socials a:hover { color: var(--gold-bright); border-color: var(--gold); transform: translateY(-2px); background: var(--gold-dim); }
.about__socials svg { width: 18px; height: 18px; }

.about__contact {
    margin: 18px 22px 22px;
    justify-content: center;
}

/* prawa kolumna: treść */
.about__main { display: flex; flex-direction: column; gap: 22px; }

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--panel);
    padding: clamp(22px, 3vw, 34px);
    transition: border-color 0.4s ease, background 0.4s ease;
}
.card:hover { border-color: var(--line); }
.card__label {
    font-size: 0.72rem; letter-spacing: 0.28em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}

/* intro / cytat */
.about-intro h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.25; }
.about-intro h2 em { font-style: italic; color: var(--gold); }
.about-intro p { color: var(--muted); margin-top: 14px; max-width: 60ch; }
.about-quote {
    margin-top: 22px;
    padding-left: 18px;
    border-left: 2px solid var(--gold);
    font-family: "Playfair Display", serif;
    font-style: italic;
    color: var(--fg);
    font-size: 1.05rem;
}
.about-quote cite {
    display: block;
    margin-top: 8px;
    font-family: "Space Grotesk", sans-serif;
    font-style: normal;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    color: var(--gold);
}

/* dwie kolumny w obrębie about */
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

/* timeline */
.timeline { display: flex; flex-direction: column; gap: 20px; }
.timeline__item { position: relative; padding-left: 24px; }
.timeline__item::before {
    content: ""; position: absolute; left: 0; top: 6px;
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--gold); box-shadow: 0 0 0 4px var(--gold-dim);
}
.timeline__item::after {
    content: ""; position: absolute; left: 4px; top: 18px; bottom: -20px;
    width: 1px; background: var(--line);
}
.timeline__item:last-child::after { display: none; }
.timeline__top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.timeline__role { font-weight: 600; font-size: 1rem; }
.timeline__date { color: var(--muted-soft); font-size: 0.8rem; white-space: nowrap; }
.timeline__org { color: var(--muted); font-size: 0.88rem; }

/* skills */
.skill { margin-bottom: 18px; }
.skill:last-child { margin-bottom: 0; }
.skill__top { display: flex; justify-content: space-between; font-size: 0.9rem; margin-bottom: 8px; }
.skill__level { color: var(--gold); font-size: 0.82rem; }
.skill__bar { height: 4px; border-radius: 100px; background: var(--line); overflow: hidden; }
.skill__fill { height: 100%; width: 0; border-radius: 100px; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); transition: width 1.4s var(--ease); }

/* hobbies */
.hobbies { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.hobby {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.012);
    transition: transform 0.4s var(--ease), border-color 0.4s ease;
}
.hobby:hover { transform: translateY(-3px); border-color: var(--gold); }
.hobby__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hobby__title { font-weight: 600; }
.hobby__icon { color: var(--gold); }
.hobby p { color: var(--muted); font-size: 0.86rem; }

/* tech stack tagi */
.stack__group { margin-bottom: 18px; }
.stack__group:last-child { margin-bottom: 0; }
.stack__group h4 { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted-soft); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }
.tag {
    padding: 7px 15px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 0.82rem;
    color: var(--fg);
    background: rgba(255,255,255,0.015);
    transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s var(--ease), background 0.3s ease;
}
.tag:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-2px); background: var(--gold-dim); }

/* ---------- PROJECTS ---------- */
.projects {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 60px clamp(20px, 5vw, 40px) 100px;
}
.projects__head { text-align: center; margin-bottom: 64px; }
.projects__head .eyebrow { margin-bottom: 18px; }
.projects__head h1 { font-size: clamp(2.2rem, 7vw, 4rem); }
.projects__head p { color: var(--muted); margin-top: 16px; max-width: 50ch; margin-inline: auto; }

.project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 48px 0;
    border-top: 1px solid var(--line-soft);
}
.project:nth-child(even) .project__media { order: 2; }
.project__index { font-family: "Playfair Display", serif; font-style: italic; color: var(--gold); font-size: 1.1rem; }
.project__title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 10px 0 18px; }
.project__desc { color: var(--muted); }
.project__suitable { margin-top: 18px; font-size: 0.9rem; }
.project__suitable strong { color: var(--fg); font-weight: 600; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.project__cta { margin-top: 30px; }
.project__status {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 30px; padding: 11px 22px;
    border: 1px dashed var(--line); border-radius: 100px;
    color: var(--muted); font-size: 0.88rem;
}

.project__media {
    position: relative;
    aspect-ratio: 16 / 11;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(201,169,106,0.06), transparent 60%),
        repeating-linear-gradient(45deg, #141418 0 16px, #101014 16px 32px);
    display: grid;
    place-items: center;
    transition: transform 0.5s var(--ease), border-color 0.5s ease;
}
.project__media:hover { transform: translateY(-4px); border-color: var(--gold); }
.project__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }


.project__ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.project__ctas .btn { margin: 0; }
.project__media .media-ph { text-align: center; color: var(--muted-soft); }
.project__media .media-ph svg { width: 60px; height: 60px; opacity: 0.4; }
.project__media .media-ph span { display: block; margin-top: 10px; font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- Footer ---------- */
.footer {
    border-top: 1px solid var(--line-soft);
    padding: 40px clamp(20px, 5vw, 56px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: var(--muted-soft);
    font-size: 0.82rem;
}
.footer a:hover { color: var(--gold); }
.footer__socials { display: flex; gap: 18px; }

/* ---------- Reveal ---------- */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Feature: pasek postępu scrolla ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    z-index: 60;
    pointer-events: none;
}
.scroll-progress span {
    display: block;
    height: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: linear-gradient(90deg, var(--gold), var(--gold-bright));
    box-shadow: 0 0 10px rgba(201, 169, 106, 0.6);
}

/* ---------- Feature: spotlight podążający za kursorem ---------- */
.card, .mini-card, .project__media { position: relative; }
.card::after, .mini-card::after, .project__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(201, 169, 106, 0.10), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}
.card:hover::after, .mini-card:hover::after, .project__media:hover::after { opacity: 1; }
/* treść kart nad spotlightem */
.card > *, .mini-card > * { position: relative; z-index: 2; }

/* ---------- Feature: przycisk „do góry" ---------- */
.to-top {
    position: fixed;
    right: clamp(16px, 4vw, 32px);
    bottom: clamp(16px, 4vw, 32px);
    width: 46px; height: 46px;
    display: grid; place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: rgba(16, 16, 19, 0.7);
    backdrop-filter: blur(8px);
    color: var(--gold);
    cursor: pointer;
    z-index: 40;
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), border-color 0.3s ease, background 0.3s ease;
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { border-color: var(--gold); background: var(--gold-dim); transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- Feature: modal kontaktowy + formularz ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
    position: absolute; inset: 0;
    background: rgba(5, 5, 7, 0.72);
    backdrop-filter: blur(6px);
}
.modal__card {
    position: relative;
    width: min(560px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, #131316, #0d0d10);
    padding: clamp(24px, 4vw, 38px);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    transform: translateY(20px) scale(0.98);
    transition: transform 0.4s var(--ease);
}
.modal.is-open .modal__card { transform: none; }
.modal__close {
    position: absolute; top: 16px; right: 16px;
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--line); border-radius: 10px;
    background: var(--panel); color: var(--muted);
    cursor: pointer; font-size: 1.3rem; line-height: 1;
    transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.modal__close:hover { color: var(--gold-bright); border-color: var(--gold); background: var(--gold-dim); }
.modal__card h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin: 12px 0 8px; }
.modal__sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 22px; }

.cform { display: flex; flex-direction: column; gap: 16px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cform__field { display: flex; flex-direction: column; gap: 7px; }
.cform__field span {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.76rem; letter-spacing: 0.06em; color: var(--muted);
}
.cform input, .cform textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--fg);
    font: inherit; font-size: 0.95rem;
    transition: border-color 0.3s ease, background 0.3s ease;
    resize: vertical;
}
.cform input:focus, .cform textarea:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(201, 169, 106, 0.05);
}
.cform__submit { justify-content: center; margin-top: 4px; }
.cform__status { font-size: 0.88rem; min-height: 1.2em; text-align: center; margin: 0; }
.cform__status.ok { color: #76d39a; }
.cform__status.err { color: #ff7a7a; }

.h-captcha { margin-top: 2px; min-height: 70px; }

@media (max-width: 540px) {
    .cform__row { grid-template-columns: 1fr; }
}

/* ---------- Responsywność ---------- */
@media (max-width: 880px) {
    .about { grid-template-columns: 1fr; }
    .about__aside { position: static; max-width: 420px; margin: 0 auto; }
    .about-cols { grid-template-columns: 1fr; }
    .project { grid-template-columns: 1fr; gap: 28px; }
    .project:nth-child(even) .project__media { order: 0; }
}

@media (max-width: 680px) {
    .nav { padding: 15px 18px; }
    .nav__actions { gap: 8px; }
    .nav__links {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        gap: 0;
        background: var(--bg-soft);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
        padding: 8px;
        transform: translateY(-130%);
        opacity: 0;
        transition: transform 0.4s var(--ease), opacity 0.3s ease;
    }
    .nav__links.is-open { transform: translateY(0); opacity: 1; }
    .nav__links a { padding: 15px; width: 100%; }
    .nav__links a::after { display: none; }
    .nav__contact { display: none; }
    .nav__burger {
        display: grid; place-items: center;
        width: 42px; height: 42px;
        border: 1px solid var(--line); border-radius: 10px;
        background: var(--panel); cursor: pointer; gap: 5px;
    }
    .nav__burger span { display: block; width: 18px; height: 1.5px; background: var(--fg); transition: transform 0.3s var(--ease), opacity 0.3s ease; }
    .nav__burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav__burger.is-open span:nth-child(2) { opacity: 0; }
    .nav__burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    /* hero / sekcje */
    .hero { min-height: auto; padding-top: 48px; padding-bottom: 56px; }
    .home-feature { padding: 48px 0 72px; }
    .about { padding-top: 32px; gap: 28px; }
    .projects { padding-top: 40px; }
    .project { padding: 36px 0; }

    /* splash */
    .splash__inner { gap: 16px; }
    .splash__actions { gap: 10px; width: 100%; }
    .splash__sub { font-size: 1rem; }

    /* footer wyśrodkowany */
    .footer { justify-content: center; text-align: center; }
    .footer__socials { width: 100%; justify-content: center; }

    /* mniej intensywny spotlight na dotyku */
    .card::after, .mini-card::after, .project__media::after { display: none; }
}

@media (max-width: 420px) {
    .nav__brand .brand-word { display: none; }
    .lang-switch button { padding: 7px 11px; }
    .hobbies { grid-template-columns: 1fr; }
}

/* ---------- Dostępność ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
