:root {
    --bg-color: #050505;
    --card-bg: #0F0F0F;
    --card-border: #222222;
    --text-main: #FFFFFF;
    --text-muted: #999999;
    --font-main: 'Inter', sans-serif;
    --font-logo: 'Dancing Script', cursive;
    --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
    --anim-curve: cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
    padding-top: 0;
}

strong { color: #fff; font-weight: 600; }
a { text-decoration: none; color: inherit; transition: opacity 0.3s var(--ease-smooth); }
ul { list-style: none; }

.container { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
.section-gap { margin-bottom: 100px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ================= HEADER ================= */
.fixed-header {
    position: fixed; top: 24px; left: 0; width: 100%; z-index: 1000;
    padding: 0 64px; box-sizing: border-box; pointer-events: none;
}
.header-content { width: 100%; display: flex; justify-content: space-between; align-items: center; position: relative; }
.left-nav { display: flex; align-items: center; gap: 30px; pointer-events: auto; }

/* Menu (Prawe) - obsługa znikania */
.right-nav { 
    pointer-events: auto; 
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1; transform: translateY(0);
}
.right-nav.nav-hidden { opacity: 0; transform: translateY(-10px); pointer-events: none; }

.nav-pill, .social-pill {
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(40px) saturate(110%);
    -webkit-backdrop-filter: blur(40px) saturate(110%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 8px; border-radius: 50px; display: flex; align-items: center; gap: 0;
}
.nav-pill a, .social-pill a {
    text-decoration: none; color: #999; font-size: 0.9rem; font-weight: 500;
    padding: 8px 16px; border-radius: 20px; transition: all 0.3s ease;
    display: flex; align-items: center; gap: 6px;
}
.nav-pill a:hover, .social-pill a:hover { color: white; background-color: #1a1a1a; }
.nav-pill a.active { color: white; }
.nav-pill img, .social-pill img { width: 16px; height: 16px; opacity: 0.7; transition: opacity 0.3s; display: block; }
.nav-pill a:hover img, .social-pill a:hover img { opacity: 1; }

/* ================= HERO & SCROLL ================= */
.hero-screen {
    height: 100vh; width: 100%; display: flex; flex-direction: column;
    padding-top: 100px; position: relative; overflow: hidden;
}
.hero-bg-glow {
    position: absolute; width: 1500px; height: 1500px; left: 50%; top: 50%;
    transform: translate(-50%, -50%); z-index: -1; pointer-events: none;
    background: radial-gradient(50% 50% at 50% 50%, rgba(254, 247, 174, 0.2) 0%, rgba(144, 172, 255, 0) 70%, rgba(144, 172, 255, 0) 100%);
}
.hero { padding-top: 100px; padding-bottom: 60px; }

/* --- POPRAWKA LAYOUTU HERO --- */
main {
    flex: 1; display: flex; align-items: center; 
    
    /* Ograniczenie szerokości i centrowanie, żeby pasowało do sekcji Work */
    width: 100%;
    max-width: 1440px; 
    margin: 0 auto; 
    
    /* Paddingi identyczne jak w .work-section */
    padding: 0 40px; 
    
    position: relative; 
}

.hero-content { max-width: 900px; width: 100%; }
.hero-icons { display: flex; gap: 8px; margin-bottom: 40px; align-items: center; }

h1 { 
    font-size: 3.9rem; 
    font-weight: 700; line-height: 1.15; margin-bottom: 16px; letter-spacing: -0.03em; max-width: 910px; color: #fff; 
}
h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 40px; letter-spacing: -0.02em; color: #fff; }
p { color: var(--text-muted); margin-bottom: 16px; font-weight: 400; line-height: 1.4; }

.app-link { 
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px; border-radius: 50%; background-color: #242424;
    transition: transform 0.4s var(--ease-smooth); flex-shrink: 0;
}
.app-link:hover { transform: translateY(-4px); }
.app-icon-img { width: 24px; height: 24px; object-fit: contain; }
.app-icon.more { width: 48px; height: 48px; border-radius: 50%; background: #242424; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 600; color: #fff; }


/* Scroll Instruction */
.scroll-instruction { font-size: 0.95rem; color: #FFFFFF !important; font-weight: 500; }

/* Scroll Button - Wyrównany do prawej krawędzi kontenera 1440px */
.scroll-btn {
    position: absolute; 
    bottom: 40px; 
    right: 40px; /* Wyrównanie do paddingu kontenera */
    width: 50px; height: 50px;
    background-color: #262626; border-radius: 50%; display: flex; justify-content: center; align-items: center;
    color: white; cursor: pointer; z-index: 1000;
    transition: background 0.3s, opacity 0.4s ease, transform 0.4s ease;
    opacity: 1; transform: translateY(0);
}
.scroll-btn:hover { background-color: #333; }
.scroll-btn.btn-hidden { opacity: 0; transform: translateY(20px); pointer-events: none; }
.scroll-icon-svg { width: 24px; height: 24px; }


/* ================= O MNIE ================= */
.profile-header { display: inline-flex; align-items: center; gap: 16px; background-color: #1a1a1a; border: 1px solid #333; padding: 5px 24px 5px 5px; border-radius: 100px; margin-bottom: 32px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.profile-name { font-weight: 600; font-size: 1.1rem; color: #fff; }


/* ================= WORK SECTION (PORTFOLIO) ================= */
.work-section { 
    width: 100%; padding: 100px 40px; display: flex; justify-content: center; background-color: var(--bg-color); 
}
a.project-card {
    text-decoration: none; color: inherit; display: flex; flex-direction: column;
    background-color: #050505; width: 100%; border-radius: 32px;
    overflow: hidden; position: relative; border: 1px solid #222;
}

.preview-badge { 
    position: absolute; top: 30px; right: 30px;
    background-color: rgba(0,0,0,0.6); backdrop-filter: blur(5px);
    padding: 8px 18px; border-radius: 20px; font-size: 0.9rem; color: #fff; z-index: 10; 
}

.card-image-wrapper { 
    padding: 60px 40px 80px 40px; min-height: 500px; 
    display: flex; justify-content: center; align-items: center; 
    background-color: #27272B; position: relative; z-index: 1;
}

/* Okno przeglądarki */
.browser-window { 
    width: 820px; max-width: 100%; aspect-ratio: 16/10;
    background-color: #1e1e1e; border: 1px solid #333; border-radius: 12px; 
    overflow: hidden; box-shadow: 0 40px 80px rgba(0,0,0,0.6); 
    display: flex; flex-direction: column; transition: transform 0.4s var(--ease-smooth); 
}
.browser-header { 
    background-color: #2b2b30; padding: 12px 16px;
    display: flex; align-items: center; gap: 16px; border-bottom: 1px solid #333;
}
.window-controls { display: flex; gap: 8px; }
.window-controls span { width: 10px; height: 10px; border-radius: 50%; background-color: #555; }
.window-controls span:nth-child(1) { background-color: #ff5f56; }
.window-controls span:nth-child(2) { background-color: #ffbd2e; }
.window-controls span:nth-child(3) { background-color: #27c93f; }
.address-bar { 
    flex: 1; background-color: #1a1a1a; color: #888; font-size: 0.75rem;
    padding: 6px 12px; border-radius: 6px; display: flex; align-items: center; gap: 8px;
}
.address-bar::before { content: "\f023"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; }
.project-img, .project-video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Footer Karty */
.card-footer { 
    padding: 32px 40px; display: flex; align-items: center;
    background-color: #050505; border-top: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease; gap: 0;
    margin-top: -100px; position: relative; z-index: 10;
}
.project-card:hover .card-footer { background-color: #161616; border-top: 1px solid #222; }

.footer-logo-box { width: 208px; min-width: 208px; flex-shrink: 0; display: flex; align-items: center; }
.footer-brand-logo { width: 176px; height: auto; object-fit: contain; display: block; }
.footer-content-box { flex: 1; display: flex; flex-direction: column; gap: 6px; padding-left: 0; }
.footer-logo-box + .footer-content-box { padding-left: 32px; }

.f-project-title { font-size: 1.1rem; color: #fff; font-weight: 500; }
.f-project-meta { font-size: 0.85rem; color: #888; display: flex; flex-wrap: wrap; gap: 24px; line-height: 1.4; }
.meta-item strong { color: #aaa; font-weight: 600; margin-right: 4px; }
.footer-action { display: flex; justify-content: flex-end; padding-left: 20px; }
.arrow-circle { 
    width: 48px; height: 48px; border-radius: 50%; background-color: #262626;
    display: flex; justify-content: center; align-items: center; color: #fff;
    transition: background-color 0.3s ease, transform 0.3s ease; cursor: pointer;
}
.arrow-icon-svg { width: 16px; height: 16px; display: block; stroke: #fff; }
.arrow-circle:hover { background-color: #444; }
.project-card:hover .browser-window { transform: scale(1.02); }


/* ================= PROJEKT 2 (TCG) ================= */
.card-bg-phones {
    background-image: url('portfolio/tcg-phones-bg.png');
    background-position: center center; background-repeat: no-repeat;
    background-size: 1100px auto !important;
    background-color: #111;
    display: flex !important; justify-content: center !important; align-items: center !important;
    padding-left: 0 !important; padding-right: 0 !important;
    padding-top: 60px !important; padding-bottom: 80px !important;
}
.small-window {
    width: 720px !important; flex-shrink: 0; border: none !important;
    box-shadow: 0 40px 100px rgba(0,0,0,0.9) !important;
    border-radius: 12px; margin: 0 auto; position: relative; z-index: 2;
}

/* ================= PROJEKT 3 (BOOKS) ================= */
.card-bg-black {
    background-color: #000000 !important;
    display: flex; justify-content: center; align-items: center;
    padding: 80px 40px 140px 40px !important; 
}
.mobile-duo { display: flex; gap: 40px; align-items: center; justify-content: center; }
.mobile-device {
    width: 180px; aspect-ratio: 9 / 19.5; background: #000;
    border-radius: 24px; 
    box-shadow: 0 0 0 4px #2a2a2a, 0 0 0 5px #555, 0 20px 40px rgba(0,0,0,0.8);
    position: relative; overflow: hidden; transform: translateZ(0);
}
.mobile-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.dynamic-island {
    position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
    width: 54px; height: 18px; background-color: black; border-radius: 10px; z-index: 10;
}
@media (max-width: 800px) {
    .mobile-duo { flex-direction: column; gap: 30px; }
    .mobile-device { width: 180px; }
}


/* ================= POZOSTAŁE STYLE ================= */
.layout-grid { display: grid; grid-template-columns: 910px 340px; gap: 80px; margin-bottom: 80px; align-items: start; padding-top: 40px; }
.left-column { display: flex; flex-direction: column; }
.about-text { max-width: 90%; margin-bottom: 60px; }
.highlight-p { color: var(--text-muted); font-size: 1.1rem; line-height: 1.45; margin-bottom: 32px; font-weight: 400; }
.section-label { color: var(--text-muted); margin-bottom: 20px; font-weight: 400; }
.bio-list li { position: relative; padding-left: 24px; margin-bottom: 10px; color: var(--text-muted); font-size: 1rem; font-weight: 400; line-height: 1.4; }
.bio-list li::before { content: "•"; position: absolute; left: 6px; color: var(--text-muted); }
.cards-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; width: 100%; margin-bottom: 100px; }
.action-card { background-color: #262626; border: none; border-radius: 16px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; height: 175px; transition: transform 0.4s var(--ease-smooth), background-color 0.4s; color: inherit; }
.action-card:hover { transform: translateY(-6px); background-color: #333; }
.card-icon-box { margin-bottom: auto; color: #fff; }
.card-title { font-weight: 600; font-size: 1rem; color: #fff; margin-bottom: 4px; }
.card-desc { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }
.right-sidebar { padding-top: 10px; position: sticky; top: 120px; height: fit-content; }
.skill-group { margin-bottom: 40px; }
.skill-group h4 { font-size: 1rem; color: #fff; margin-bottom: 16px; font-weight: 600; }
.skill-item { display: flex; align-items: center; gap: 12px; color: #888; font-size: 0.95rem; margin-bottom: 10px; font-weight: 400; }
.mini-icon { width: 20px; height: 20px; object-fit: contain; }
.big-card { background-color: transparent; border: 1px solid var(--card-border); border-radius: 24px; padding: 48px; margin-bottom: 32px; }
.big-card h2, .section-gap h2 { font-size: 24px; margin-top: 0; margin-bottom: 32px; color: #fff; }
.company-logo-img { height: 19px; width: auto; display: block; margin-bottom: 24px; }
.company-name { font-size: 24px; color: #fff; font-weight: 600; margin-bottom: 32px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 40px; }
.stat-badge { background-color: #1a1a1a; padding: 16px 20px; border-radius: 20px; min-width: auto; }
.stat-value { display: block; font-size: 28px; line-height: 1.2; font-weight: 600; color: #fff; margin-bottom: 4px; }
.stat-label { font-size: 15px; color: #777; }
.role-details { margin-bottom: 30px; max-width: 720px; width: 100%; }
.role-title { color: #fff; font-weight: 400; font-size: 1.35rem; margin-bottom: 6px; }
.role-date { font-style: normal; color: #999; font-size: 0.95rem; font-weight: 400; margin-bottom: 24px; }
.references-section { margin-top: 60px; }
.ref-heading { font-size: 1.3rem; font-weight: 400; margin-bottom: 24px; color: #fff; }
.references-list { display: flex; flex-direction: column; gap: 16px; max-width: 720px; width: 100%; }
.ref-pill { display: flex; align-items: center; justify-content: space-between; background-color: #141414; border: none; border-radius: 100px; padding: 10px; transition: background 0.3s; text-decoration: none; }
.ref-pill:hover { background-color: #1F1F1F; }
.ref-left { display: flex; align-items: center; gap: 16px; }
.ref-img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.ref-info { display: flex; flex-direction: column; }
.ref-name { color: #fff; font-weight: 600; font-size: 1rem; }
.ref-role { color: #666; font-size: 0.85rem; }
.ref-middle { flex-grow: 1; display: flex; justify-content: flex-end; padding-right: 32px; }
.ref-tag { color: #666; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.hands-icon { width: 20px; height: auto; display: inline-block; }
.ref-right { display: flex; align-items: center; gap: 16px; padding-right: 24px; }
.arrow-icon-ref { width: 16px; height: 16px; display: block; opacity: 0.7; transition: 0.3s; }
.ref-pill:hover .arrow-icon-ref { opacity: 1; }
.earlier-row { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.circle-logo-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.startup-card { background-color: #141414; display: flex; justify-content: space-between; align-items: center; }
.startup-logo { opacity: 0.9; padding-bottom: 0; }
.startup-logo-img { height: 90px; width: auto; display: block; }
.tag-row { display: flex; gap: 10px; margin-bottom: 24px; margin-top: 12px; }
.tag-row span { background: #222; padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; color: #888; }

/* FOOTER */
footer { width: 100%; border-top: 1px solid var(--card-border); padding: 80px 0; margin-top: 80px; background-color: var(--bg-color); }
.footer-content { display: flex; justify-content: center; align-items: flex-start; gap: 80px; }
.footer-left { display: flex; flex-direction: column; }
.f-name { font-weight: 700; font-size: 1.1rem; color: #fff; margin-bottom: 12px; }
.f-desc-flex { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: #999; font-size: 0.9rem; line-height: 1.5; }
.f-desc-text { display: flex; flex-direction: column; }
.f-links { display: flex; gap: 24px; }
.f-links a { color: #fff; font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; transition: color 0.5s ease; text-decoration: none; gap: 6px; }
.f-links a:hover { color: #A7A7A7; }
.f-links a svg { transition: transform 0.3s ease; }
.f-links a:hover svg { transform: translate(2px, -2px); }
.footer-right { display: flex; flex-direction: column; }
.contact-box { display: flex; align-items: center; background: #fff; color: #000; padding: 6px 6px 6px 20px; border-radius: 50px; font-weight: 600; min-width: 320px; }
.copy-btn { background-color: #27272B; color: #fff; border: none; padding: 10px 0; border-radius: 30px; font-size: 0.9rem; cursor: pointer; transition: opacity 0.3s ease; font-weight: 500; min-width: 80px; text-align: center; }
.copy-btn:hover { opacity: 0.7; }

/* ANIMACJE */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(40px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.anim-init-up, .anim-init-down { opacity: 0; animation-duration: 1s; animation-timing-function: var(--anim-curve); animation-fill-mode: forwards; }
.anim-init-up { animation-name: fadeInUp; }
.anim-init-down { animation-name: fadeInDown; }
.delay-100 { animation-delay: 0.1s; } .delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; } .delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; } .delay-600 { animation-delay: 0.6s; }
.scroll-trigger { opacity: 0; transform: translateY(60px); transition: all 1s var(--anim-curve); }
.scroll-trigger.is-visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 1024px) {
    .layout-grid { grid-template-columns: 1fr; gap: 60px; padding: 40px 20px; }
    .right-sidebar { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; position: static; }
    .cards-row { grid-template-columns: 1fr; }
    .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 40px; }
    .contact-box { min-width: auto; width: 100%; justify-content: space-between; }
    .fixed-header { padding: 0 20px; }
    .hero-screen, .container { padding-left: 20px; padding-right: 20px; }
    .hero-content { padding: 0; }
    
    .browser-window, .small-window { width: 100% !important; height: auto; aspect-ratio: auto; }
    .card-footer { flex-direction: column; align-items: flex-start; gap: 24px; margin-top: 0; }
    .footer-logo-box { width: 100%; justify-content: flex-start; }
    .footer-logo-box + .footer-content-box { padding-left: 0; }
    .footer-action { width: 100%; justify-content: flex-end; padding-left: 0; }
    .card-image-wrapper { padding: 40px 20px !important; }
}