/* ============================================================
   DarkScript.pl — Główny arkusz stylów
   ============================================================ */

:root {
    --bg:       #0a0a0a;
    --surface:  #111111;
    --surface2: #181818;
    --border:   #222222;
    --accent:   #00ff88;
    --accent2:  #00ccff;
    --text:     #e8e8e8;
    --muted:    #666;
    --danger:   #ff4444;
    --mono:     'Space Mono', monospace;
    --sans:     'Sora', sans-serif;
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* ── NAV ─────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw;
    height: 64px;
    background: rgba(10,10,10,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-family: var(--mono);
    font-size: 1.1rem;
    color: var(--accent);
    cursor: pointer;
    letter-spacing: -0.5px;
    user-select: none;
    text-decoration: none;
}
.logo span { color: var(--text); }

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
    content: '';
    display: block;
    height: 1px;
    background: var(--accent);
    margin-top: 2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--text);
    transition: all 0.3s;
}

/* ── MOBILE MENU ─────────────────────────────────── */
.mobile-menu {
    display: none;
    position: fixed;
    top: 64px; left: 0; right: 0; bottom: 0;
    background: rgba(10,10,10,0.97);
    backdrop-filter: blur(20px);
    z-index: 99;
    padding: 3rem 5vw;
    flex-direction: column;
    gap: 2rem;
}
.mobile-menu.open { display: flex; animation: fadeUp 0.3s both; }
.mobile-menu a {
    font-size: 2rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--accent); }

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
@keyframes pulse {
    0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(0,255,136,.4); }
    50%      { opacity:.7; box-shadow: 0 0 0 4px rgba(0,255,136,0); }
}

.page-enter { animation: fadeUp 0.5s ease both; }

/* ── HERO ────────────────────────────────────────── */
.hero {
    min-height: calc(100vh - 64px);
    padding-top: 64px;
    display: flex;
    align-items: center;
    padding-left: 5vw;
    padding-right: 5vw;
    position: relative;
    overflow: hidden;
}
.hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}
.hero-glow {
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,255,136,.06) 0%, transparent 70%);
    top: 50%; left: 40%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.hero-content { position: relative; max-width: 700px; }
.hero-tag {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.hero-tag::before {
    content: '';
    display: block;
    width: 32px; height: 1px;
    background: var(--accent);
}
.hero h1 {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
}
.hero h1 .line { overflow: hidden; display: block; }
.hero h1 .line span { display: block; animation: slideUp 0.8s cubic-bezier(.16,1,.3,1) both; }
.hero h1 .line:nth-child(2) span { animation-delay: 0.1s; }
.hero h1 .line:nth-child(3) span { animation-delay: 0.2s; }
.hero h1 em { font-style: normal; color: transparent; -webkit-text-stroke: 1px var(--accent); }
.hero-desc {
    font-size: 1rem;
    color: var(--muted);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 2.5rem;
    animation: fadeUp 0.8s 0.4s both;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeUp 0.8s 0.5s both;
}

/* ── BUTTONS ─────────────────────────────────────── */
.btn {
    padding: 0.75rem 1.75rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-primary {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: #00e07a;
    box-shadow: 0 0 30px rgba(0,255,136,.3);
    transform: translateY(-1px);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-1px); }

/* ── STATS STRIP ─────────────────────────────────── */
.stats-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    padding: 0 5vw;
}
.stat-item {
    padding: 2rem 1.5rem;
    border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}
.stat-label {
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ── SECTIONS ────────────────────────────────────── */
.section { padding: 5rem 5vw; }
.section-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 3rem;
}

/* ── PROJECT CARDS ───────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.project-card {
    background: var(--surface);
    padding: 2rem;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
    transform: scaleX(0);
    transition: transform 0.3s;
    transform-origin: left;
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover { background: var(--surface2); }
.project-tag {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    background: rgba(0,255,136,.08);
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}
.project-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}
.project-desc {
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.project-tech { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tech-badge {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}
.project-link {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: gap 0.2s;
}
.project-link:hover { gap: 0.5rem; }

/* ── ABOUT ───────────────────────────────────────── */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.about-visual {
    position: relative;
    aspect-ratio: 4/5;
    max-width: 400px;
}
.about-img-placeholder {
    width: 100%; height: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.about-img-placeholder img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.about-img-placeholder::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0,255,136,.04));
    pointer-events: none;
}
.about-badge {
    position: absolute;
    bottom: -1rem; right: -1rem;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    font-family: var(--mono);
    font-size: 0.75rem;
}
.about-badge .num {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 700;
}
.about-text p {
    color: var(--muted);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}
.skills-list { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem; }
.skill-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-family: var(--mono);
    color: var(--text);
    transition: border-color 0.2s, color 0.2s;
}
.skill-chip:hover { border-color: var(--accent); color: var(--accent); }

/* ── CONTACT BOX ─────────────────────────────────── */
.contact-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}
.contact-box::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 200px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.contact-box h2 { font-size: 2rem; margin-bottom: 1rem; }
.contact-box p  { color: var(--muted); margin-bottom: 2rem; }

/* ── FOOTER ──────────────────────────────────────── */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
    font-family: var(--mono);
    flex-wrap: wrap;
    gap: 1rem;
}
footer span { color: var(--accent); }
footer a { color: var(--muted); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }

/* ── ADMIN LAYOUT ────────────────────────────────── */
.admin-wrap { padding-top: 64px; }
.admin-layout {
    display: flex;
    min-height: calc(100vh - 64px);
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
}
.admin-logo {
    padding: 0 1.5rem 2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.admin-logo strong {
    color: var(--accent);
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.admin-nav-item {
    padding: 0.7rem 1.5rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 2px solid transparent;
    text-decoration: none;
}
.admin-nav-item:hover { color: var(--text); background: rgba(255,255,255,.03); }
.admin-nav-item.active { color: var(--text); border-left-color: var(--accent); background: rgba(0,255,136,.04); }
.admin-nav-item.danger { color: var(--danger) !important; }
.admin-main { flex: 1; padding: 2.5rem; overflow-y: auto; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}
.admin-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-subtitle { color: var(--muted); font-size: 0.85rem; margin-top: 0.25rem; }

/* ── STATS CARDS ─────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color .2s;
}
.stat-card:hover { border-color: #333; }
.stat-card-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    font-family: var(--mono);
}
.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--mono);
    color: var(--text);
    margin-bottom: 0.4rem;
}
.stat-card-change { font-size: 0.75rem; color: var(--accent); font-family: var(--mono); }
.stat-card-change.down { color: var(--danger); }
.stat-card-icon { position: absolute; right: 1.25rem; top: 1.25rem; font-size: 1.5rem; opacity: .15; }

/* ── CHART ───────────────────────────────────────── */
.chart-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.chart-title { font-weight: 600; font-size: 0.9rem; }

/* ── TABLE ───────────────────────────────────────── */
.table-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
}
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
thead th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    color: var(--muted);
    font-weight: 400;
    font-family: var(--mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(255,255,255,.02);
    border-bottom: 1px solid var(--border);
}
tbody td {
    padding: 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.03);
    color: var(--muted);
}
tbody tr:hover td { background: rgba(255,255,255,.02); color: var(--text); }
tbody tr:last-child td { border-bottom: none; }
.badge {
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-family: var(--mono);
    font-size: 0.65rem;
}
.badge-green { background: rgba(0,255,136,.1); color: var(--accent); }
.badge-blue  { background: rgba(0,204,255,.1); color: var(--accent2); }
.badge-gray  { background: rgba(255,255,255,.06); color: var(--muted); }

/* ── FORMS ───────────────────────────────────────── */
.form-group { margin-bottom: 1.5rem; }
.form-label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.form-input, .form-textarea, .form-select {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text);
    font-family: var(--sans);
    font-size: 0.9rem;
    transition: border-color .2s;
    outline: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,255,136,.08);
}
.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.6;
}
.form-select option { background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── SAVE BUTTON & TOAST ─────────────────────────── */
.save-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0.7rem 1.75rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--sans);
}
.save-btn:hover { background: #00e07a; box-shadow: 0 0 20px rgba(0,255,136,.25); }
.del-btn {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 0.4rem 0.85rem;
    border-radius: 5px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background .2s;
    font-family: var(--sans);
}
.del-btn:hover { background: rgba(255,68,68,.1); }

.alert {
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    font-family: var(--mono);
}
.alert-success { background: rgba(0,255,136,.08); border: 1px solid rgba(0,255,136,.3); color: var(--accent); }
.alert-error   { background: rgba(255,68,68,.08);  border: 1px solid rgba(255,68,68,.3);  color: var(--danger); }

/* ── LOGIN ───────────────────────────────────────── */
.login-screen {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    position: relative;
}
.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 100px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.login-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.4rem; }
.login-sub   { font-size: 0.8rem; color: var(--muted); margin-bottom: 2rem; font-family: var(--mono); }

/* ── LIVE DOT ────────────────────────────────────── */
.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-family: var(--mono);
    color: var(--accent);
}
.live-dot::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 2s infinite;
}

/* ── PROGRESS BARS ───────────────────────────────── */
.progress-row { margin-bottom: 0.75rem; }
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}
.progress-label span:first-child { font-family: var(--mono); color: var(--text); }
.progress-label span:last-child  { color: var(--accent); }
.progress-bar { background: var(--border); border-radius: 2px; height: 4px; }
.progress-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width .8s; }
.progress-fill.blue { background: var(--accent2); }

/* ── SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
::selection { background: rgba(0,255,136,.2); }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
    .about-layout { grid-template-columns: 1fr; }
    .about-visual { display: none; }
    .admin-sidebar { display: none; }
    .form-row { grid-template-columns: 1fr; }
    .bottom-stats { grid-template-columns: 1fr !important; }
}
@media (max-width: 640px) {
    .nav-links { display: none; }
    .hamburger { display: flex; }
    .hero h1 { font-size: 2.4rem; }
    .stats-strip { grid-template-columns: 1fr 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; text-align: center; }
}
