/*
  Kod źródłowy poniśzego stylu należy do właściciela strony D4TECH.pl
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body::-webkit-scrollbar {
    width: 5px;
}

body::-webkit-scrollbar-track {
    background: #042547;
}

body::-webkit-scrollbar-thumb {
    background: #007BFF;
    border-radius: 5px;
}

body::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

body.dark-mode::-webkit-scrollbar-track {
    background: #1a1a1a;
}

body.dark-mode::-webkit-scrollbar-thumb {
    background: #00a8ff;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: #007BFF;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    transition: background-color 0.6s, color 0.6s;
}

body.dark-mode {
    background-color: #1a1a1a;
    color: #f4f4f4;
    transition: background-color 0.6s, color 0.6s;
}

.section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section.visible {
    opacity: 1;
    transform: translateY(0);
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.dark-mode .theme-toggle {
    background-color: rgba(0, 0, 0, 0.1);
    color: #f4f4f4;
}

.dark-mode .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: #007BFF;
    width: 0%;
    z-index: 1000;
}

.me-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 2rem;
}

.me-section .background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://wallpapers.com/images/hd/cool-javascript-code-8tctio4amzli9c5m.jpg') no-repeat center center/cover;
    filter: blur(8px);
    z-index: -1;
}

.me-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 123, 255, 0.5);
    z-index: -1;
}

.me-section .content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.me-section .logo-icon {
    font-size: 2.5rem;
    animation: spin 5s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.me-section .logo {
    margin-bottom: 1.5rem;
}

.me-section .logo-text {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 6s steps(150, end) infinite;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: -2vh;
}

@keyframes typing {
    0% { width: 0; }
    25% { width: 50%; }
    50% { width: 100%; }
    100% { width: 0; }
}

.logo-text {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

.me-section .description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #ebe8e8;
}

.me-section .description span {
    font-weight: 600;
    color: #fff;
}

.me-section .social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.me-section .social-links a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

/* Tooltip z adresem URL */
.me-section .social-links a::before {
    content: attr(href);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Animacja hover */
.me-section .social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.me-section .social-links a:hover::before {
    opacity: 1;
}

.me-section .social-links a:hover::after {
    width: 100%;
}

/* Animacja ikon */
.me-section .social-links a i {
    transition: transform 0.3s ease;
}

.me-section .social-links a:hover i {
    transform: rotate(360deg) scale(1.2);
}

/* Dark mode */
.dark-mode .me-section .social-links a {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode .me-section .social-links a::before {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
}

/* Feedback po kopiowaniu */
.copied-feedback {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #007BFF;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.copied-feedback.show {
    opacity: 1;
}

.techwave-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-left: 2px solid #00a8ff;
    border-bottom: 2px dashed #00a8ff;
}

.techwave-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 20%, rgba(255,255,255,0.1) 50%, transparent 80%);
    animation: buttonShine 3s infinite;
    transform: rotate(45deg);
    top: -50%;
    left: -50%;
}

@keyframes buttonShine {
    0% { left: -100%; }
    100% { left: 150%; }
}

.techwave-card p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.techwave-card .techwave-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    padding: 0.5rem 0;
    transition: opacity 0.3s ease;
}

.techwave-card .techwave-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%; 
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease, left 0.3s ease; 
    transform: translateX(-50%); 
}

.techwave-card .techwave-link:hover::after {
    width: 100%; 
    left: 50%; 
}

.techwave-card .techwave-link:hover {
    opacity: 0.8;
}

.dark-mode .techwave-card .techwave-link::after {
    background-color: #00a8ff; 
}


/* Sekcja "Moje projekty" */
.portfolio-section {
    padding: 4rem 2rem;
    background-color: #ececec;
    position: relative;
    overflow: hidden;
}

.dark-mode .portfolio-section {
    background-color: #2d2d2d;
}

.dots-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.dots-background::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.2) 10%, transparent 10%);
    background-size: 20px 20px;
    animation: moveDots 25s linear infinite;
}

.dark-mode .dots-background::before {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10%);
    background-size: 20px 20px;
}

@keyframes moveDots {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(25%);
    }
    100% {
        transform: translateY(50%);
    }
}

.portfolio-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #007BFF;
}

.dark-mode .portfolio-section h2 {
    color: #fff;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(
        to right,
        rgba(0, 123, 255, 0) 0%,    
        rgba(0, 123, 255, 1) 50%,    
        rgba(0, 123, 255, 0) 100%    
    );
}

.dark-mode h2::after {
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,  
        rgb(119, 119, 119) 50%, 
        rgba(255, 255, 255, 0) 100% 
    );
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.portfolio-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 2px solid #d4d4d4;
    border-bottom: 2px solid #d4d4d4;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dark-mode .portfolio-card {
    background-color: #2d2d2d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-left: 2px solid #202020;
    border-bottom: 2px solid #202020;
}

.dark-mode .portfolio-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.portfolio-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    text-align: left;
}

.card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    color: #007BFF;
}

.dark-mode .card-content h3 {
    color: #00a8ff;
}

.card-content p {
    font-size: 1rem;
    color: #666;
}

.dark-mode .card-content p {
    color: #ccc;
}

/* Sekcja "Moje umiejętności" */
.skills-section {
    padding: 4rem 2rem;
    background-color: #f9f9f9;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.skills-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode .skills-section {
    background-color: #1a1a1a;
}

.skills-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #007BFF;
}

.dark-mode .skills-section h2 {
    color: #fff;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
}

.skill-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    border-left: 2px solid #dadada;
    border-bottom: 2px solid #dadada;
}

.dark-mode .skill-card {
    background-color: #2d2d2d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-left: 2px solid #202020;
    border-bottom: 2px solid #202020;
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dark-mode .skill-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.skill-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #007BFF;
}

.dark-mode .skill-card h3 {
    color: #00a8ff;
}

.skill-card p {
    font-size: 1rem;
    color: #666;
    margin-bottom: 1rem;
}

.skill-card i {
    margin-right: 0.5rem;
    color: #007BFF;
}

.dark-mode .skill-card i {
    color: #00a8ff;
}

.dark-mode .skill-card p {
    color: #ccc;
}

.skill-card ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    color: #333;
}

.dark-mode .skill-card ul {
    color: #f4f4f4;
}

.skill-card ul li {
    margin-bottom: 0.5rem;
}

/* Kontakt */
.contact-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6 ease-out;
    text-align: center;
    padding: 4rem 2rem;
    background-color: #ececec;
    position: relative;
    overflow: hidden;
}

.contact-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.dark-mode .contact-section {
    background-color: #1a1a1a;
}

.contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #007BFF
}

.dark-mode .contact-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #fff;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 600px;
    margin: 0 auto 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dark-mode .contact-form {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.contact-form input,
.contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark-mode .contact-form input,
.dark-mode .contact-form textarea {
    background-color: #2d2d2d;
    color: #ccc;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #007Bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
    outline: none;
}

.dark-mode .contact-form input:focus,
.dark-mode .contact-form textarea:focus {
    border-color: #00a0ff;
    box-shadow: 0 0 8px rgba(0, 168, 255, 0.5);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transform: translateY(-2px);
}

.contact-form button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.dark-mode .contact-form button {
    background-color: #0056b3;

}

.dark-mode .contact-form button:hover {
    background-color: #004080;
}

.contact-info {
    margin-top: 2rem;
    font-size: 1.1rem;
    color: #333;
}

.dark-mode .contact-info {
    color: #007bff;
}

.contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.dark-mode .contact-info p {
    color: #ccc;
}

.contact-info i {
    color: #007bff;
    transition: transform 0.2s ease, color 0.3s ease;
}

.contact-info i:hover {
    transform: scale(1.2);
    color: #00a8ff;
}

.dark-mode .contact-info i {
    color: #007bff;
    transition: transform 0.2s ease, color 0.3s ease;
}

.dark-mode .contact-info i:hover {
    transform: scale(1.2);
    color: #004080;
}

/* Stopka */
footer {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #007BFF, #0056b3);
    color: #fff;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-social-links a:hover {
    transform: translateY(-5px);
    color: #0056b3;
}

.dark-mode .footer-social-links a:hover {
    transform: translateY(-5px);
    color: #004080;
}

footer p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

footer button {
    background-color: #fff;
    color: #007BFF;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

footer button:hover {
    background-color: #0056b3;
    color: #fff;
}

.dark-mode footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
}

.dark-mode .footer-social-links a:hover {
    color: #00a8ff;
}

.dark-mode footer button {
    background-color: #00a8ff;
    color: #fff;
}

.dark-mode footer button:hover {
    background-color: #007BFF;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    padding: 2rem;
}

.modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.modal-content #modal-description {
    font-size: 1.2rem;
    color: #333;
}

.dark-mode .modal-content {
    background-color: #2d2d2d;
}

.dark-mode .modal-content #modal-description {
    color: #f4f4f4;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #007BFF;
}

.dark-mode .close-modal {
    color: #f4f4f4;
}

.dark-mode .close-modal:hover {
    color: #00a8ff;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.section {
    animation: fadeIn 1s ease-in;
}

/* Przyciski */
#back-to-top {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

#back-to-top:hover {
    background-color: #0056b3;
}

.dark-mode #back-to-top {
    background-color: #0056b3; 
    color: #f4f4f4;
}

.dark-mode #back-to-top:hover {
    background-color: #004080; 
}

.details-button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.details-button:hover {
    background-color: #0056b3;
}

.dark-mode .details-button {
    background-color: #0056b3; 
    color: #f4f4f4;
}

.dark-mode .details-button:hover {
    background-color: #004080; 
}

@media (max-width: 768px) {
    .me-section .logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .me-section .logo-icon {
        font-size: 2rem;
    }

    .me-section .description {
        font-size: 1rem;
    }

    .me-section .social-links {
        flex-direction: column;
        gap: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}