/* ═══════════════════════════════════════════════
   Mateusz Portfolio — main.css
   Design: jasny motyw, akcent pomarańczowy
════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* ─── ZMIENNE ─── */
:root {
    --bg:           #f7f5f0;
    --surface:      #ffffff;
    --border:       #e0dbd3;
    --accent:       #caa00c;
    --accent-light: #fff0ea;
    --dark:         #141414;
    --text:         #1c1c1c;
    --muted:        #888880;
    --card:         #ffffff;
    --wp:           #21759b;
    --woo:          #96588a;
    --js:           #c4920e;

    --font-display: 'Syne', sans-serif;
    --font-mono:    'JetBrains Mono', monospace;

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;

    --shadow-sm:  0 2px 12px rgba(0,0,0,0.06);
    --shadow-md:  0 8px 32px rgba(0,0,0,0.10);
    --shadow-accent: 0 8px 32px rgba(232,80,10,0.25);
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { background: var(--bg); color: var(--text); font-family: var(--font-mono); overflow-x: hidden; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
pre { font-family: inherit; white-space: pre-wrap; }

/* ─── UTILITY ─── */
.section-label {
    font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
}
.section-label::before { content: ''; width: 20px; height: 2px; background: var(--accent); display: block; flex-shrink: 0; }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; transition-delay: var(--delay, 0s); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── BUTTONS ─── */
.btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent); color: #fff;
    padding: 15px 32px; border-radius: var(--radius-sm);
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
    box-shadow: var(--shadow-accent);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232,80,10,0.4); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: transparent; color: var(--text);
    padding: 13px 28px; border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    font-family: var(--font-display); font-size: 14px;
    transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--dark); }

/* ═══════════════════════════════════════════════
   NAV
════════════════════════════════════════════════ */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 52px;
    background: rgba(247,245,240,0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
.site-nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.nav-logo {
    font-family: var(--font-display); font-weight: 800; font-size: 20px;
    color: var(--dark); letter-spacing: -0.03em; z-index: 999;
}
.nav-logo span { color: var(--accent); }

.nav-menu { display: flex; gap: 36px; align-items: center; }
.nav-menu a { color: var(--dark); font-size: 16px; letter-spacing: 0.06em; transition: color 0.2s; }
.nav-menu a:hover { color: var(--accent); }
.nav-menu .nav-cta a:hover { color: var(--dark); }

.nav-cta {
    background: var(--accent) !important; color: #fff !important;
    padding: 9px 22px; border-radius: var(--radius-sm);
    font-family: var(--font-display) !important; font-weight: 700;
    font-size: 13px !important; letter-spacing: 0 !important;
    box-shadow: 0 4px 16px rgba(232,80,10,0.25);
    transition: transform 0.15s, box-shadow 0.15s !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(232,80,10,0.35) !important; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   HERO
════════════════════════════════════════════════ */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding: 100px 52px 60px; position: relative; overflow: hidden;
}

.hero-bg-text {
    position: absolute;
    font-family: var(--font-display);
    font-size: clamp(120px, 18vw, 260px);
    font-weight: 800; color: rgba(0,0,0,0.04);
    letter-spacing: -0.04em;
    top: 50%; left: -10px; transform: translateY(-50%);
    pointer-events: none; user-select: none; white-space: nowrap;
    z-index: 0;
}

.hero-inner {
    max-width: 1200px; margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1fr 460px; gap: 60px; align-items: center;
    position: relative; z-index: 1;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--accent-light); border: 1px solid rgba(232,80,10,0.2);
    color: var(--accent); font-size: 12px; padding: 7px 16px;
    border-radius: 20px; margin-bottom: 24px;
}
.hero-eyebrow::before { content: '●'; font-size: 8px; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(52px, 6vw, 86px);
    font-weight: 800; line-height: 0.93;
    letter-spacing: -0.04em; margin-bottom: 30px; color: var(--dark);
}
.hero-title .accent { color: var(--accent); }
.hero-title .light { color: var(--muted); font-weight: 400; }

.hero-desc { color: var(--muted); font-size: 14px; line-height: 1.9; max-width: 480px; margin-bottom: 36px; }
.hero-desc strong { color: var(--text); }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

/* Code card */
.hero-code {
    background: #1e1e2e; border-radius: 14px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}
.code-bar {
    background: #181825; padding: 14px 20px;
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid #2a2a3e;
}
.dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot.r { background: #ff5f57; } .dot.y { background: #febc2e; } .dot.g { background: #28c840; }
.code-title { font-size: 11px; color: #585b70; margin: 0 auto; }
.code-body { padding: 24px 28px; font-size: 13px; line-height: 2.1; }
.code-body pre { font-family: var(--font-mono); }

.c-kw { color: #cba6f7; } .c-fn { color: #89dceb; } .c-str { color: #a6e3a1; }
.c-muted { color: #45475a; } .c-var { color: #89b4fa; }

.cursor-blink {
    display: inline-block; width: 8px; height: 14px;
    background: var(--accent); animation: blink 1s steps(1) infinite; vertical-align: middle;
}
@keyframes blink { 50% { opacity: 0; } }

/* ─── MARQUEE ─── */
.marquee-wrap { background: var(--accent); overflow: hidden; padding: 14px 0; white-space: nowrap; }
.marquee-track {
    display: inline-block;
    animation: marquee 22s linear infinite;
    font-family: var(--font-display); font-weight: 700; font-size: 14px;
    color: rgba(255,255,255,0.9); letter-spacing: 0.05em;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── STATS ─── */
.stats-strip { background: var(--dark); padding: 40px 52px; }
.stats-inner { max-width: 1200px; margin: 0 auto; display: flex; }
.stat { flex: 1; text-align: center; padding: 0 24px; border-right: 1px solid #2a2a2a; }
.stat:last-child { border-right: none; }
.stat-num { font-family: var(--font-display); font-size: 48px; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label { font-size: 12px; color: #555; margin-top: 6px; letter-spacing: 0.08em; }

/* ═══════════════════════════════════════════════
   O MNIE
════════════════════════════════════════════════ */
.about { padding: 120px 52px; max-width: 1200px; margin: 0 auto; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }

.about h2 {
    font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px);
    font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 24px; color: var(--dark);
}
.about h2 em { font-style: normal; color: var(--accent); }
.about p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 16px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
    background: var(--bg); border: 1px solid var(--border);
    color: var(--muted); font-size: 12px; padding: 7px 16px; border-radius: 20px;
    transition: border-color 0.2s, color 0.2s; cursor: default;
}
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag.wp { border-color: rgba(33,117,155,0.3); color: var(--wp); background: rgba(33,117,155,0.06); }

.about-photo { border-radius: var(--radius-lg); overflow: hidden; }
.about-img { width: 100%; max-height: 500px; object-fit: cover; border-radius: var(--radius-lg); border-radius: 999px; }
.photo-placeholder {
    background: linear-gradient(135deg, #f0ede6, #e8e3da);
    border-radius: var(--radius-lg); aspect-ratio: 4/5;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: 2px dashed var(--border); gap: 12px;
}
.photo-icon { font-size: 64px; opacity: 0.4; }
.photo-placeholder p { font-size: 13px; color: var(--muted); text-align: center; }

/* ═══════════════════════════════════════════════
   UMIEJĘTNOŚCI
════════════════════════════════════════════════ */
.skills-section { background: var(--dark); padding: 100px 52px; }
.skills-inner { max-width: 1200px; margin: 0 auto; }
.skills-inner .section-label { color: var(--accent); }
.skills-inner .section-label::before { background: var(--accent); }
.skills-inner h2 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; color: #fff; margin-bottom: 60px; }

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.skill-card {
    background: #1e1e1e; border: 1px solid #2a2a2a; border-radius: var(--radius-md);
    padding: 28px; transition: border-color 0.2s, transform 0.2s; cursor: default;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.skill-icon { font-size: 32px; margin-bottom: 14px; }
.skill-card h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; margin-bottom: 8px; color: #fff; }
.skill-card p { font-size: 12px; color: #585b70; line-height: 1.7; margin-bottom: 18px; }
.skill-bar-wrap { background: #2a2a2a; border-radius: 99px; height: 4px; overflow: hidden; }
.skill-bar { height: 100%; border-radius: 99px; transition: width 1.2s cubic-bezier(0.4,0,0.2,1); }
.skill-bar.b-accent  { background: var(--accent); }
.skill-bar.b-blue    { background: var(--wp); }
.skill-bar.b-yellow  { background: #f7c948; }

/* ═══════════════════════════════════════════════
   PROJEKTY
════════════════════════════════════════════════ */
.projects { padding: 120px 52px; max-width: 1200px; margin: 0 auto; }
.projects h2 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; color: var(--dark); margin-bottom: 12px; }
.projects-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1.5px solid var(--border); color: var(--muted);
    font-family: var(--font-mono); font-size: 12px;
    padding: 8px 18px; border-radius: 20px; transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--dark); color: var(--dark); background: var(--accent-light); }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.projects-empty { grid-column: span 2; text-align: center; padding: 60px; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--radius-md); }

.project-card {
    background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md);
    overflow: hidden; box-shadow: var(--shadow-sm);
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 16px 40px rgba(232,80,10,0.1); }
.project-card.featured { grid-column: span 2; }
.project-card.hidden { display: none; }

.project-thumb { aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--border); }
.project-thumb img { width: 100%; height: 100%; object-fit: contain; padding:50px; transform 0.4s; }
.project-card:hover .project-thumb img { transform: scale(1.04); }
.project-card.featured .project-thumb { aspect-ratio: 21/9; }

.project-thumb--empty {
    background: linear-gradient(135deg, #f0ede6, #e8e3da);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; color: var(--muted); font-size: 13px;
}
.project-thumb--empty span { font-size: 36px; opacity: 0.4; }

.project-info { padding: 22px 26px; }
.project-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.ptag { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 12px; border-radius: 20px; background: var(--accent-light); color: var(--dark); }

.project-info h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.project-info p { font-size: 13px; color: var(--muted); line-height: 1.7; }
.project-links { display: flex; gap: 16px; margin-top: 16px; }
.plink { font-size: 12px; color: var(--accent); transition: opacity 0.2s; }
.plink:hover { opacity: 0.7; }

.projects-more { text-align: center; margin-top: 36px; }

/* ═══════════════════════════════════════════════
   KONTAKT
════════════════════════════════════════════════ */
.contact-section { background: var(--bg); padding: 100px 52px; border-top: 1px solid var(--border); }
.contact-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }

.contact-info h2 { font-family: var(--font-display); font-size: clamp(36px, 4vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; margin-bottom: 20px; color: var(--dark); }
.contact-info h2 em { font-style: normal; color: var(--accent); }
.contact-info > p { color: var(--muted); font-size: 14px; line-height: 1.9; margin-bottom: 28px; }

.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-link {
    display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted);
    padding: 16px 20px; border: 1.5px solid var(--border); border-radius: 10px;
    background: var(--surface); transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.contact-link:hover { border-color: var(--accent); color: var(--accent); box-shadow: 0 4px 20px rgba(232,80,10,0.08); }
.clink-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }

/* FORM */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form-group label span { color: var(--accent); }
.form-group input, .form-group textarea {
    background: var(--surface); border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); padding: 13px 16px;
    color: var(--text); font-family: var(--font-mono); font-size: 13px;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s; resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,80,10,0.1); }
.form-group input.error, .form-group textarea.error { border-color: #e53e3e; }
.form-group textarea { min-height: 130px; }

.form-status { font-size: 13px; padding: 0; min-height: 0; transition: all 0.3s; }
.form-status.success { color: #22863a; background: #f0fff4; border: 1px solid #9ae6b4; padding: 12px 16px; border-radius: var(--radius-sm); }
.form-status.error   { color: #e53e3e; background: #fff5f5; border: 1px solid #fed7d7; padding: 12px 16px; border-radius: var(--radius-sm); }

/* ═══════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════ */
.site-footer { background: var(--dark); padding: 28px 52px; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #555; }
.footer-inner strong { color: var(--accent); }
.footer-stack { color: #333; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-inner    { grid-template-columns: 1fr; gap: 48px; }
    .hero-right    { display: none; }
    .about-grid    { grid-template-columns: 1fr; }
    .about-photo   { display: none; }
    .skills-grid   { grid-template-columns: repeat(2, 1fr); }
    .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .site-nav   { padding: 16px 24px; }
    .nav-toggle { display: flex; z-index: 999;}
    .nav-menu   {
        display: none; flex-direction: column; gap: 0;
        position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: var(--bg); padding: 100px 24px 40px;
        z-index: 100; height: 100vh;
    }
    .nav-menu.open { display: flex; }
    .nav-menu li a { font-size: 28px; font-family: var(--font-display); font-weight: 700; padding: 16px 0; display: block; border-bottom: 0px solid var(--border); }
    .nav-cta { margin-top: 24px; text-align: center; width: fit-content; padding: 0px 13px !important; }

    .hero        { padding: 100px 24px 60px; min-height: 50vh;}
    .hero-title  { font-size: clamp(44px, 10vw, 64px); }

    .marquee-wrap { padding: 12px 0; }

    .stats-inner { flex-wrap: wrap; flex-direction: column;}
    .stat        { flex: 0 0 50%; border-right: none; border-bottom: 0px solid #2a2a2a; padding: 20px; }
    .stat:nth-child(odd) { border-right: 0px solid #2a2a2a; }
    .stat:nth-last-child(-n+2) { border-bottom: none; }

    .about, .projects, .contact-section, .skills-section { padding: 80px 24px; }

    .skills-grid   { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .project-card.featured { grid-column: span 1; }

    .projects-header { flex-direction: column; align-items: flex-start; gap: 24px; }

    .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; }
    .btn-primary, .btn-ghost { text-align: center; justify-content: center; }
}
