:root {
    --bg-dark: #020617;
    --bg-light: #0f172a;
    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa8c2c;
    --gold-glow: rgba(212, 175, 55, 0.25);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(15, 23, 42, 0.75);
    --glass-border: rgba(212, 175, 55, 0.25);
    --grid-size: 25px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body { background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-light) 100%); color: var(--text-main); min-height: 100dvh; overflow-x: hidden; line-height: 1.7; position: relative; }
h1, h2, h3 { text-wrap: balance; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-primary); }

::selection { background: var(--gold-glow); color: var(--gold-light); }
a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px dashed var(--gold-primary); outline-offset: 4px; border-radius: inherit; }
input:focus, textarea:focus { outline: none; }

/* TŁO PCB ZWIĘKSZAJĄCE CZYTELNOŚĆ */
#pcb-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; background-image: linear-gradient(rgba(212, 175, 55, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(212, 175, 55, 0.035) 1px, transparent 1px); background-size: var(--grid-size) var(--grid-size); }
#pcb-canvas { position: absolute; top: 0; left: 0; z-index: -1; pointer-events: none; }

.text-gradient { background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 50%, var(--gold-dark) 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* NAV */
header { position: fixed; width: 100%; top: 0; z-index: 100; }
.header-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(2, 6, 23, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--glass-border); z-index: -1; pointer-events: none; }
header nav { display: flex; justify-content: center; align-items: center; padding: 15px 20px; position: relative; z-index: 1; }
.nav-scroll-wrapper { display: flex; align-items: center; }
.nav-links { display: flex; gap: 15px; align-items: center; }
header nav a.nav-item { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; transition: var(--transition); padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
header nav a.nav-item.active { color: var(--gold-light); background: rgba(212, 175, 55, 0.05); }

/* LANG SWITCHER */
.lang-switcher { position: relative; margin-left: 15px; display: flex; align-items: center; }
.lang-btn { background: transparent; color: var(--text-main); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: var(--transition); text-transform: uppercase; }
.lang-dropdown { position: absolute; top: 130%; right: 0; background: rgba(2, 6, 23, 0.98); border: 1px solid var(--glass-border); border-radius: 12px; min-width: 140px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-10px); transition: var(--transition); box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 1000; }
.lang-switcher.active .lang-dropdown { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: translateY(0) !important; }
.lang-dropdown button { display: block; width: 100%; text-align: left; padding: 12px 16px; background: transparent; border: none; color: var(--text-muted); font-size: 0.85rem; font-weight: 600; transition: var(--transition); cursor: pointer; }
.lang-dropdown button.active { color: var(--gold-light); background: rgba(212, 175, 55, 0.05); }

/* SECTIONS */
section { padding: 120px 20px; max-width: 1200px; margin: 0 auto; text-align: center; position: relative; z-index: 5; }
.section-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 20px; letter-spacing: -0.5px; }
.section-subtitle { color: var(--text-muted); max-width: 700px; margin: 0 auto 60px auto; font-size: 1.15rem; }
.js-active .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.js-active .reveal.active { opacity: 1; transform: translateY(0); }

/* HERO */
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(30px); } 100% { opacity: 1; transform: translateY(0); } }
.animate-on-load { opacity: 0; animation: fadeInUp 0.8s ease-out forwards; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.4s; }

#hero { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100dvh; padding-top: 100px; }
.hero-content { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1200px; padding: 20px; pointer-events: none; }
.hero-content * { pointer-events: auto; }

h1 { font-size: clamp(2.2rem, 5vw, 4rem); font-weight: 800; max-width: 1000px; margin-bottom: 25px; line-height: 1.15; letter-spacing: -0.5px; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4); }
.hero-desc { font-size: clamp(1.1rem, 2vw, 1.25rem); color: var(--text-muted); max-width: 700px; margin-bottom: 45px; text-shadow: 0 4px 15px rgba(0,0,0,1); }

/* LOGO CHIP (PNG) */
.logo-chip-container { width: min(350px, 85vw); height: min(350px, 85vw); perspective: 1500px; margin: 0 auto 40px auto; z-index: 10; cursor: pointer; position: relative; }
.chip-image { 
    width: 100%; 
    height: 100%; 
    object-fit: contain; 
    border-radius: 23%;
    transform-style: preserve-3d; 
    
    /* GWARANCJA PRZEZROCZYSTOŚCI: Brak tła i obramowań, oparcie na pliku PNG */
    background: transparent; 
    border: none;
    
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.9)) drop-shadow(0 0 20px rgba(212, 175, 55, 0.2)); 
}

.logo-chip-container:hover .chip-image { 
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.9)) drop-shadow(0 0 50px rgba(100, 200, 255, 0.6)); 
}

/* Subtelny stan stabilizacji dla obrazka */
.super-glow-overlay {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    border-radius: 23%; 
    background: radial-gradient(circle at center, rgba(100, 200, 255, 0.2) 0%, transparent 70%);
    box-shadow: inset 0 0 30px rgba(100, 200, 255, 0.3);
    opacity: 0; 
    transition: opacity 0.8s ease; 
    pointer-events: none; 
    transform-style: preserve-3d; 
    mix-blend-mode: screen;
}
.super-glow-overlay.super-active { opacity: 1; }

.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.cta-btn { display: inline-block; background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%); color: var(--bg-dark); padding: 18px 45px; font-size: 1.05rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; border-radius: 50px; text-decoration: none; transition: var(--transition); box-shadow: 0 10px 30px var(--gold-glow); border: none; cursor: pointer; }
.cta-btn-outline { display: inline-block; background: transparent; color: var(--gold-primary); border: 2px solid var(--gold-primary); padding: 16px 45px; font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; border-radius: 50px; text-decoration: none; transition: var(--transition); margin-left: 15px; }

/* PCB BOXES (Glassmorphism) */
.pcb-box { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 24px; backdrop-filter: blur(16px); position: relative; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,0.6); transition: var(--transition); }
.pcb-box::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, transparent, var(--gold-primary), transparent); opacity: 0.6; }

#o-mnie .content-wrapper { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; padding: 60px; text-align: left; }
#o-mnie h3 { font-size: 1.5rem; margin-bottom: 20px; font-weight: 600; color: #fff; }
#o-mnie p { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 15px; }

ul.tech-container, ul.project-tags { list-style: none; padding: 0; margin: 20px 0 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
li.tech-badge { background: rgba(2, 6, 23, 0.8); border: 1px solid rgba(212, 175, 55, 0.3); padding: 8px 16px; border-radius: 20px; font-weight: 600; font-size: 0.85rem; transition: var(--transition); color: var(--text-main); }
li.project-tag { font-size: 0.75rem; font-weight: 600; color: var(--gold-light); background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.3); padding: 4px 12px; border-radius: 12px; transition: var(--transition); }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.card { padding: 45px 35px; text-align: left; }
.card-icon { font-size: 2.8rem; margin-bottom: 25px; }
.card h3 { font-size: 1.4rem; margin-bottom: 15px; font-weight: 600; }
.card p { font-size: 1rem; color: var(--text-muted); line-height: 1.6; }

/* FOOTER & FORM */
footer { border-top: 1px solid var(--glass-border); padding: 100px 20px 40px; position: relative; z-index: 5; }
.footer-wrapper { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; text-align: left; padding: 50px; }
.contact-info h2 { font-size: 2.5rem; margin-bottom: 20px; font-weight: 800; line-height: 1.2; }
.contact-info p { color: var(--text-muted); margin-bottom: 10px; font-size: 1.1rem; }
.contact-links { margin-top: 40px; display: flex; flex-direction: column; gap: 15px; }
.contact-links a { display: inline-flex; align-items: center; color: var(--text-main); text-decoration: none; font-weight: 600; font-size: 1.1rem; transition: var(--transition); }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 18px; background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(255, 255, 255, 0.1); color: #fff; border-radius: 12px; font-size: 1rem; transition: var(--transition); }
.contact-form input:not(:placeholder-shown):valid, .contact-form textarea:not(:placeholder-shown):valid { border-color: rgba(46, 204, 113, 0.4); }
.contact-form input:not(:placeholder-shown):invalid { border-color: rgba(231, 76, 60, 0.4); }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--gold-primary); background: rgba(2, 6, 23, 0.9); }
.contact-form textarea { resize: vertical; min-height: 140px; }
.contact-form button { background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-primary) 100%); color: var(--bg-dark); border: none; padding: 18px; border-radius: 12px; font-weight: 800; font-size: 1.05rem; cursor: pointer; transition: var(--transition); text-transform: uppercase; letter-spacing: 1px; }
.contact-form button:disabled { cursor: not-allowed; opacity: 0.9; }

.footer-bottom { text-align: center; margin-top: 80px; padding-top: 30px; border-top: 1px solid rgba(255, 255, 255, 0.05); color: var(--text-muted); font-size: 0.9rem; }
.footer-bottom a { color: var(--text-muted); text-decoration: none; margin-left: 15px; transition: color 0.3s; }
.social-btn { color: var(--gold-primary); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 8px; font-size: 0.9rem; text-decoration: none; transition: var(--transition); }

@media (hover: hover) and (pointer: fine) {
    .lang-switcher:hover .lang-dropdown { opacity: 1 !important; visibility: visible !important; pointer-events: auto !important; transform: translateY(0) !important; }
    header nav a.nav-item:hover { color: var(--gold-light); background: rgba(255, 255, 255, 0.05); }
    .lang-btn:hover { border-color: var(--gold-primary); color: var(--gold-light); }
    .lang-dropdown button:hover { background: rgba(212, 175, 55, 0.1); color: var(--gold-light); }
    .cta-btn:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4); filter: brightness(1.1); }
    .cta-btn-outline:hover { background: rgba(212, 175, 55, 0.1); transform: translateY(-3px); color: var(--gold-light); border-color: var(--gold-light); }
    li.tech-badge:hover { border-color: var(--gold-primary); color: var(--gold-light); transform: translateY(-2px); box-shadow: 0 4px 15px var(--gold-glow); }
    .card:hover { transform: translateY(-8px); border-color: var(--gold-primary); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 25px var(--gold-glow); background: rgba(15, 23, 42, 0.85); }
    .card:hover li.project-tag { border-color: var(--gold-primary); background: rgba(212, 175, 55, 0.15); }
    .contact-links a:hover { color: var(--gold-light); transform: translateX(5px); }
    .contact-form button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 10px 20px var(--gold-glow); filter: brightness(1.1); }
    .footer-bottom a:hover { color: var(--gold-primary); }
    .social-btn:hover { background: rgba(212, 175, 55, 0.1); color: var(--gold-light) !important; }
}

@media (max-width: 992px) { #o-mnie .content-wrapper, .footer-wrapper { grid-template-columns: 1fr; padding: 40px; } }
@media (max-width: 768px) {
    header nav { justify-content: space-between; flex-wrap: nowrap; padding: 10px 15px; }
    .nav-scroll-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-grow: 1; }
    .nav-scroll-wrapper::-webkit-scrollbar { display: none; }
    .nav-links { width: max-content; padding-right: 15px; }
    header nav a.nav-item { flex-shrink: 0; font-size: 0.75rem; padding: 8px 12px; }
    .lang-switcher { margin-left: 5px; flex-shrink: 0; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .cta-btn-outline { margin-left: 0; margin-top: 10px; }
    section { padding: 80px 20px; }
    h1 { font-size: 2.2rem; }
    .contact-form { padding: 25px; }
}