/* ============================================
   CYFROWY OGARNIACZ - Design System v2
   Aligned with index.html design tokens
   ============================================ */

:root {
    --bg: #09090b;
    --bg-alt: #0f0f12;
    --surface: #18181b;
    --surface-hover: #1f1f23;
    --border: #27272a;
    --border-light: #3f3f46;
    --accent: #22c55e;
    --accent-light: #4ade80;
    --accent-glow: rgba(34, 197, 94, 0.12);
    --accent-glow-strong: rgba(34, 197, 94, 0.25);
    --gold: #d4a853;
    --gold-light: #e8c36e;
    --green: #22c55e;
    --green-dim: rgba(34, 197, 94, 0.4);
    --green-muted: rgba(34, 197, 94, 0.15);
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-dim: #a1a1aa;
    --text-muted: #71717a;
    --glass-bg: rgba(9, 9, 11, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --radius: 10px;
    --radius-lg: 16px;
    --radius-full: 100px;
}

/* === Base === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-weight: 400;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

html, body { overflow-x: hidden; position: relative; max-width: 100vw; }

/* === Subtle grid background (replaces body::before in pages that use tech-bg) === */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* === Noise texture overlay === */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* === Scanline Overlay (kept for compat, visually hidden) === */
.scanline {
    display: none;
}

/* === Tech Grid Background === */
.tech-bg {
    background-size: 60px 60px;
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
}

/* === Tech Panel (Glassmorphism — no corner brackets) === */
.tech-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    position: relative;
}

/* Tech dots instead of corner brackets */
.tech-panel::before {
    content: '';
    position: absolute;
    top: -3px; left: -3px;
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
}

.tech-panel::after {
    content: '';
    position: absolute;
    bottom: -3px; right: -3px;
    width: 5px; height: 5px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
}

/* === Gradient Text === */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(34, 197, 94, 0.2));
}

/* === Glow Border === */
.glow-border {
    box-shadow: 0 0 20px var(--accent-glow),
                inset 0 0 20px rgba(34, 197, 94, 0.05);
}

/* === Reveal Animation === */
.reveal {
    opacity: 0; transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.active {
    opacity: 1; transform: translateY(0);
}

/* === Tag / Pill === */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 0.35rem 0.9rem;
    background: var(--accent-glow);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: var(--radius-full);
}

.tag-gold {
    color: var(--gold);
    background: rgba(212, 168, 83, 0.1);
    border-color: rgba(212, 168, 83, 0.2);
}

.tag-muted {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

/* === Corner Decorations (kept for compat, visually hidden) === */
.corner {
    display: none;
}

.corner-tl, .corner-tr, .corner-bl, .corner-br {
    display: none;
}

/* === Card Hover === */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius);
}
.card-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 197, 94, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(34, 197, 94, 0.08);
}

/* === Floating Particles (kept for compat, visually hidden) === */
.particles {
    display: none;
}

.particle {
    display: none;
}

@keyframes float-particle {
    0% { transform: translateY(100vh); opacity: 0; }
    100% { transform: translateY(-100vh); opacity: 0; }
}

/* === Pulse Dot === */
@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; box-shadow: 0 0 2px var(--accent); }
    50% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: 0.4; box-shadow: 0 0 2px var(--accent); }
}

/* === Shake Animation (for errors) === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.shake { animation: shake 0.5s ease; }

/* === Fade Out === */
@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.98); filter: blur(10px); }
}

/* === Blink (cursor) === */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* === Section Number === */
.section-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-num::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
}

/* === Buttons (from index design system) === */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.85rem 1.75rem;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 0 30px var(--accent-glow-strong);
    transform: translateY(-1px);
}

.btn-secondary {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--border-light);
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

/* === Section Label (from index) === */
.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label::before {
    content: '';
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 6px var(--accent);
}

/* === Section Title === */
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

/* === Responsive === */
@media (max-width: 640px) {
    .section-title { font-size: 1.75rem; line-height: 1.1; }
    section { padding-top: 3rem; padding-bottom: 3rem; }
}
