@import url('header.css');
@import url('hero.css');
@import url('skills.css');
@import url('projects.css');
@import url('history.css');
@import url('contact.css');

:root {
    color-scheme: dark;
    /* Color Palette - Premium Dark Purple */
    --primary-dark: #0a0a0f;
    /* Deeper dark background */
    --primary-black: #121218;
    /* Section backgrounds */
    --secondary-black: #1a1a24;
    /* Card/Modal backgrounds */
    --accent-purple: #7b3fe4;
    /* Primary accent */
    --accent-lavender: #9d6ff3;
    /* Secondary accent */
    --light-purple: #b89cf5;
    /* Highlights */
    --text-white: #f0e6ff;
    /* Clean off-white text */
    --text-gray: #c2b5d6;
    /* Soft muted text */
    --timeline-color: #5a2db8;

    --bg-dark: var(--primary-dark);
    --bg-card: var(--secondary-black);
    --bg-input: #121218;
    --text-main: var(--text-white);
    --text-muted: var(--text-gray);
    --border: rgba(123, 63, 228, 0.2);
    --success: #2ecc71;
    --danger: #e74c3c;
    --base-radius: 12px;
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Dynamic Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(123, 63, 228, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 70%, rgba(157, 111, 243, 0.1) 0%, transparent 40%),
        var(--primary-dark);
    z-index: -2;
}

/* --- FOOTER --- */
.footer {
    padding: 80px 0 40px;
    background: #08080c;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    background: linear-gradient(90deg, var(--accent-lavender), var(--accent-purple));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.footer-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: var(--accent-lavender);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.footer-socials a {
    width: 45px;
    height: 45px;
    background: var(--secondary-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.footer-socials a:hover {
    background: var(--accent-purple);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(123, 63, 228, 0.4);
}

/* Footer Bottom Layout */
.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.footer-line {
    grid-column: span 3;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin-bottom: 30px;
}

.copyright {
    grid-column: 2;
    color: var(--text-gray);
    font-size: 0.9rem;
    opacity: 0.8;
    text-align: center;
}

/* Login Pill Button */
.footer-admin {
    grid-column: 3;
    display: flex;
    justify-content: flex-end;
    transform: translate(2rem, -85px);
    /* -85px (niżej o ok. 1cm) i 2rem (maksymalnie w prawo poza margines) */
    padding-right: 0;
}

.login-pill {
    background: linear-gradient(135deg, #7b3fe4 0%, #9d6ff3 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(123, 63, 228, 0.3);
}

/* Easter Egg Stealth Login Button */
#login-pill-btn {
    opacity: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    cursor: default !important;
    pointer-events: auto !important;
}

/* Floating & Sidebar Admin */
.floating-btn {
    position: fixed;
    bottom: 50px;
    /* Podniesione o ok. 0.5cm (z 30px) */
    right: 30px;
    background: linear-gradient(135deg, #7b3fe4 0%, #9d6ff3 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(123, 63, 228, 0.4);
    z-index: 1500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.floating-btn:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 40px rgba(123, 63, 228, 0.6);
}

.admin-sidebar {
    position: fixed;
    top: 20px;
    right: -350px;
    /* Hidden by default */
    width: 320px;
    background: var(--secondary-black);
    border: 1px solid var(--border);
    border-radius: 20px;
    z-index: 1600;
    box-shadow: -10px 10px 40px rgba(0, 0, 0, 0.6);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.admin-sidebar.active {
    right: 20px;
}

.sidebar-header {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-lavender));
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.close-sidebar {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.2s;
}

.close-sidebar:hover {
    opacity: 1;
}

.sidebar-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-btn {
    background: var(--primary-black);
    border: 1px solid var(--border);
    color: var(--text-white);
    padding: 15px;
    border-radius: 12px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-btn:hover {
    background: rgba(123, 63, 228, 0.1);
    border-color: var(--accent-lavender);
    transform: translateX(-5px);
}

.sidebar-btn i {
    color: var(--accent-lavender);
    font-size: 1.2rem;
}

.sidebar-btn.logout-btn {
    margin-top: 10px;
    border-color: rgba(231, 76, 60, 0.3);
}

.sidebar-btn.logout-btn:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--danger);
}

.sidebar-btn.logout-btn i {
    color: var(--danger);
}

.btn-tiny {
    padding: 5px 15px;
    font-size: 0.8rem;
    border-radius: 50px;
}

@media (max-width: 600px) {
    .footer-bottom-flex {
        flex-direction: column;
        text-align: center;
    }
}

/* --- MODALS --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--secondary-black);
    border: 1px solid var(--accent-purple);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.wide-modal {
    max-width: 800px;
}

.modal-header {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-lavender));
    padding: 1.5rem;
    text-align: center;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-size: 1.4rem;
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    max-height: 70vh;
    /* Limits height and enables scrolling */
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Form elements in modals */
.form-group {
    margin-bottom: 1.5rem;
}

/* Icon Search Results */
.icon-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: var(--primary-black);
    border-radius: 10px;
}

.icon-result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: var(--secondary-black);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.icon-result-item:hover {
    border-color: var(--accent-lavender);
    background: rgba(123, 63, 228, 0.1);
    transform: translateY(-3px);
}

.icon-result-item i {
    font-size: 1.5rem;
    color: var(--accent-lavender);
}

.icon-result-item span {
    font-size: 0.6rem;
    color: var(--text-gray);
    text-align: center;
    word-break: break-all;
}

/* Fix for DevIcon colors */
i.colored {
    color: unset !important;
}


.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-white);
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--primary-black);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-white);
    font-family: inherit;
    transition: var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-lavender);
    box-shadow: 0 0 0 3px rgba(123, 63, 228, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Admin Item Lists */
.items-list {
    margin-top: 2rem;
}

.skill-edit-row {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    padding-left: 3.5rem;
    /* Space for reorder buttons */
    border-radius: 12px;
    margin-bottom: 1rem;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.skill-reorder-btns {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reorder-btn {
    background: rgba(123, 63, 228, 0.2);
    border: 1px solid var(--accent-purple);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: 0.2s;
}

.reorder-btn:hover:not(:disabled) {
    background: var(--accent-purple);
}

.reorder-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.skill-edit-desc {
    grid-column: span 3;
}

.btn-delete {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 25px;
    height: 25px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* Icon Picker */
.icon-picker {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    background: var(--primary-black);
    padding: 15px;
    border-radius: 10px;
}

.icon-picker label {
    cursor: pointer;
    font-size: 1.2rem;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-picker input:checked+i {
    color: var(--accent-lavender);
}

.icon-picker label:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Level Badges with specified colors */
.level-badge {
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: capitalize;
    display: inline-block;
}

.level-badge.podstawowy {
    border: 1px solid #007bff;
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.level-badge.srednio-zaawansowany {
    border: 1px solid #2ecc71;
    color: #2ecc71;
    background: rgba(46, 204, 113, 0.1);
}

.level-badge.zaawansowany {
    border: 1px solid #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

/* Modal Close Button */
.modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    line-height: 1;
    opacity: 0.7;
    transition: 0.3s;
}

.modal-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
}

.purple-text {
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-lavender));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.purple-btn {
    background: linear-gradient(135deg, var(--accent-lavender) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: var(--base-radius);
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 15px rgba(123, 63, 228, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.purple-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 30px rgba(157, 111, 243, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background-color: var(--secondary-black);
    border: 1px solid var(--border);
    color: var(--text-white);
    padding: 0.8rem 2rem;
    border-radius: var(--base-radius);
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: rgba(123, 63, 228, 0.1);
    border-color: var(--accent-lavender);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--primary-black);
    border: 2px solid var(--accent-purple);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    padding: 0;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: fadeInUp 0.4s ease-out;
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    color: var(--accent-lavender);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-lavender));
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-gray);
    display: block;
    margin-top: 1rem;
    font-weight: 400;
    font-size: 1.1rem;
}