* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #0c0c0e; --surface: #141416; --border: #222225; --border-hover: #facc15;
    --text-main: #f3f4f6; --text-muted: #a1a1aa; --text-dim: #52525b; --accent: #facc15;
    --font-sans: 'Inter', sans-serif; --font-mono: 'Fira Code', monospace;
}
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg); color: var(--text-main);
    font-family: var(--font-sans); line-height: 1.6;
    letter-spacing: -0.01em; padding-top: 70px;
    transition: opacity 0.3s ease;
}
body.fade-out { opacity: 0; }
.container { max-width: 780px; margin: 0 auto; padding: 0 16px; }

/* Navbar */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 0; z-index: 9999; box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.nav-links { list-style: none; display: flex; gap: 28px; padding: 0; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
    font-weight: 500; transition: color 0.2s ease, transform 0.2s ease;
    border-bottom: 2px solid transparent; padding-bottom: 2px;
}

/* --- Kluczowe podkreślenia --- */
/* Działa automatycznie, gdy klikniesz w link z #about lub #projects */
.nav-links a:hover, 
.nav-links a.active-link,
.nav-links a:focus {
    color: #ffffff !important;
    border-bottom-color: var(--accent) !important;
    transform: translateY(-1px);
}

/* Dzięki :target podkreśla się idealnie przy kliknięciu */
#about:target ~ * #nav-about,
#projects:target ~ * #nav-projects,
#hero:target ~ * #nav-home {
    color: #ffffff !important;
    border-bottom-color: var(--accent) !important;
    transform: translateY(-1px);
}

/* Typo */
.section-label { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 6px; }
.section-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: #ffffff; margin-bottom: 32px; }

/* Animacje wejścia */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

/* Hero */
.hero { padding: 20px 0 40px; }
.badge { display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); color: var(--accent); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; padding: 4px 14px; border-radius: 4px; margin-bottom: 24px; letter-spacing: 0.05em; }
.hero h1 { font-size: 3.2rem; font-weight: 800; letter-spacing: -0.04em; color: #ffffff; margin-bottom: 16px; line-height: 1.1; }
.hero-text { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin-bottom: 32px; font-weight: 400; }
.hero-buttons { display: flex; gap: 24px; flex-wrap: wrap; }
.btn-primary, .btn-secondary {
    display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 8px 0; border-bottom: 2px solid var(--border); transition: all 0.2s ease;
}
.btn-primary { color: var(--accent); }
.btn-primary:hover { color: #ffffff; border-bottom-color: var(--accent); }
.btn-secondary { color: var(--text-muted); }
.btn-secondary:hover { color: #ffffff; border-bottom-color: #ffffff; }

/* Sekcje */
.features, .about { padding: 120px 0; border-top: 1px solid var(--border); }
#hero, #about, #projects { scroll-margin-top: 70px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 24px; transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.card:hover { border-color: var(--border-hover); transform: translateY(-4px) scale(1.02); box-shadow: 0 8px 24px rgba(250, 204, 21, 0.15); }
.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-num { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--accent); opacity: 0.7; }
.card h3 { font-size: 1.05rem; font-weight: 600; color: #ffffff; }
.card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* Footer */
footer { padding: 40px 0; border-top: 1px solid var(--border); margin-top: 20px; }
.footer-content { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-brand { font-family: var(--font-mono); color: var(--text-dim); font-size: 0.8rem; }
.footer-license { color: var(--text-dim); }

@media (max-width: 640px) {
    body { padding-top: 60px; }
    #hero, #about, #projects { scroll-margin-top: 60px; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 0.75rem; }
    .hero h1 { font-size: 2.2rem; }
    .grid { grid-template-columns: 1fr; }
}
