html {
    scroll-behavior: smooth;
    /* scroll-behavior: auto; */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 900px;
    margin: 32px auto;
    padding: 0 18px;
    background: linear-gradient(120deg, #e3f2fd 0%, #f9f9f9 100%);
    color: #222;
    /* Fade-in animace celé stránky */
    animation: fadeInBody 1.2s cubic-bezier(.77, 0, .18, 1) 1;
}

@keyframes fadeInBody {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

header {
    /* text-align: center; */
    margin-bottom: 48px;
    padding: 20px 20px 18px 20px;
    background: #1769aa;
    color: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgb(23 105 170 / 0.08);
    /* Slide-down animace */
    animation: slideDown 1s cubic-bezier(.77, 0, .18, 1) 0.2s both;
}

#headerRow {
    display: flex;
    flex-direction: row;
    gap: 50px;
    min-height: 120px;
    margin-left: 20px;
}

#headerColumn {
    display: flex;
    flex-direction: column;
    margin-left: 20px;
}

#profilImg {
    /* max-width: 20%; */
    width: 200px;
    height: auto;
    border-radius: 20%;
    object-fit: cover;
    image-rendering: auto;
}

#links {
    display: flex;
    gap: 15px;
    /* mezera mezi odkazy */
    margin-top: 10px;
}


#links a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
}

#links .icon {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    margin-bottom: 44px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgb(23 105 170 / 0.06);
    padding: 28px 24px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 0.9s cubic-bezier(.77, 0, .18, 1) forwards;
}

section:nth-of-type(1) {
    animation-delay: 0.5s;
}

section:nth-of-type(2) {
    animation-delay: 0.7s;
}

section:nth-of-type(3) {
    animation-delay: 0.9s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    border-bottom: 2px solid #1769aa;
    padding-bottom: 8px;
    margin-bottom: 22px;
    color: #1769aa;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

.project {
    background: #f5faff;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgb(23 105 170 / 0.07);
    transition: box-shadow 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: fadeProject 0.7s cubic-bezier(.77, 0, .18, 1) forwards;
}

.project:nth-child(1) {
    animation-delay: 1.1s;
}

.project:nth-child(2) {
    animation-delay: 1.25s;
}

.project:nth-child(3) {
    animation-delay: 1.4s;
}

@keyframes fadeProject {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.project:hover {
    box-shadow: 0 10px 32px rgb(23 105 170 / 0.18);
    transform: translateY(-4px) scale(1.025);
}

.project h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #0a2239;
    transition: color 0.2s;
}

.project:hover h3 {
    color: #1769aa;
}

.project p {
    margin: 0 0 12px 0;
    color: #333;
}

.project a {
    color: #1769aa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s, text-decoration 0.2s;
    position: relative;
}

.project a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #1769aa;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: -2px;
}

.project a:hover {
    color: #0a2239;
    text-decoration: none;
}

.project a:hover::after {
    width: 100%;
}

footer {
    text-align: center;
    font-size: 1rem;
    color: #888;
    margin-top: 70px;
    padding-bottom: 36px;
    letter-spacing: 0.5px;
    opacity: 0;
    animation: fadeInFooter 1s 1.7s forwards;
}

@keyframes fadeInFooter {
    to {
        opacity: 1;
    }
}

nav {
    background: #0a2239;
    border-radius: 16px;
    margin-bottom: 36px;
    box-shadow: 0 4px 16px rgb(10 34 57 / 0.08);
    padding: 14px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    opacity: 0;
    animation: fadeInNav 0.8s 0.1s forwards;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@keyframes fadeInNav {
    to {
        opacity: 1;
    }
}

nav ul {
    display: flex;
    justify-content: center;
    gap: 38px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.12rem;
    letter-spacing: 0.5px;
    padding: 8px 18px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    position: relative;
}

nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
    position: absolute;
    left: 0;
    bottom: 2px;
}

nav a:hover,
nav a:focus {
    background: #1769aa;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
}

nav a:hover::after,
nav a:focus::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.skills-list li {
    background: linear-gradient(90deg, #e3f2fd 60%, #bbdefb 100%);
    color: #1769aa;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 500;
    font-size: 1.05rem;
    box-shadow: 0 1px 4px rgb(23 105 170 / 0.08);
    transition: background 0.2s, color 0.2s, transform 0.2s;
    opacity: 0;
    transform: scale(0.95);
    animation: fadeSkill 0.7s cubic-bezier(.77, 0, .18, 1) forwards;
}

.skills-list li:nth-child(1) {
    animation-delay: 0.8s;
}

.skills-list li:nth-child(2) {
    animation-delay: 0.9s;
}

.skills-list li:nth-child(3) {
    animation-delay: 1s;
}

.skills-list li:nth-child(4) {
    animation-delay: 1.1s;
}

.skills-list li:nth-child(5) {
    animation-delay: 1.2s;
}

@keyframes fadeSkill {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.skills-list li:hover {
    background: #1769aa;
    color: #fff;
    transform: scale(1.07) rotate(-2deg);
}




.project {
    background: #f5faff;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgb(23 105 170 / 0.07);
    transition: box-shadow 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    animation: fadeProject 0.7s cubic-bezier(.77, 0, .18, 1) forwards;
    cursor: pointer;
}

.project-filter {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
}

.project-filter button {
    background: #e3f2fd;
    color: #1769aa;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.project-filter button:hover,
.project-filter button.active {
    background: #1769aa;
    color: #fff;
    transform: scale(1.07);
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 34, 57, 0.25);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    box-shadow: 0 8px 32px rgb(23 105 170 / 0.18);
    max-width: 400px;
    margin: 80px auto;
    position: relative;
    animation: fadeInBody 0.5s;
}

.modal .close {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 2rem;
    color: #1769aa;
    cursor: pointer;
}



@media (max-width: 768px) {
    nav ul {
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        gap: 18px;
        padding: 0 10px;
        scrollbar-width: none;
        /* schová posuvník ve Firefoxu */
    }

    nav ul::-webkit-scrollbar {
        display: none;
        /* schová posuvník v Chrome */
    }

    nav a {
        font-size: 0.95rem;
        padding: 8px 12px;
        flex-shrink: 0;
    }

    #headerRow {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-left: 0;
        text-align: center;
    }

    #profilImg {
        max-width: 60%;
        border-radius: 20%;
    }

    #headerColumn {
        margin-left: 0;
    }

    #links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    section {
        padding: 20px 16px;
    }
}

@media (max-width: 480px) {
    body {
        margin: 20px auto;
        padding: 0 10px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h4 {
        font-size: 1rem;
    }
}



#theme-toggle {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}
body.dark-mode #theme-toggle {
    background: transparent;
}
body.dark-mode #theme-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}

/* Dark mode */
body.dark-mode {
    background: linear-gradient(120deg, #121212 0%, #1c1c1c 100%);
    color: #eee;
}

body.dark-mode section {
    background: #1e1e1e;
    box-shadow: 0 2px 12px rgb(255 255 255 / 0.05);
}

body.dark-mode nav {
    background: #0a0a0a;
    box-shadow: 0 4px 16px rgb(255 255 255 / 0.08);
}

body.dark-mode nav a:hover,
body.dark-mode nav a:focus {
    background: #0a2239;
    color: #fff;
    transform: translateY(-2px) scale(1.05);
}

body.dark-mode header {
    background: #0a2239;
}

body.dark-mode h2 {
    border-bottom-color: #90caf9;
    color: #90caf9;
}

body.dark-mode a {
    color: #90caf9;
}

body.dark-mode footer {
    color: #aaa;
}



/* Projekty */
body.dark-mode .project {
    background: #0a2239;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.25);
}

body.dark-mode .project h3 {
    color: #bbdefb;
}
body.dark-mode .project p {
    color: #bbdefb70;
}
body.dark-mode .project a:hover {
    color: #bbeefb;
}
body.dark-mode .project:hover {
    box-shadow: 0 10px 32px rgb(23 105 170 / 0.18);
    transform: translateY(-4px) scale(1.025);
}
body.dark-mode .project:hover h3 {
    color: #1769aa;
}


/* Dovednosti */
body.dark-mode .skills-list li {
    background: linear-gradient(90deg, #1e4585 60%, #0a2239 100%);
    border: 1px solid #3a3a3a;
    color: #ddd;
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.25);
}

body.dark-mode .skills-list li:hover {
    background: #1769aa;
}

/* Filtry */
body.dark-mode .filter,
body.dark-mode .project-filter button {
    background: #0a2239;
    color: #cfd8dc;
    /* border: 1px solid #2a3b65; */
}

body.dark-mode .filter:hover,
body.dark-mode .project-filter button:hover {
    background: #2b3b6b;
    color: #fff;
}

body.dark-mode .filter.active,
body.dark-mode .project-filter button.active {
    background: #1769aa;
    color: #fff;
    border-color: #1769aa;
}

/* MODAL*/
body.dark-mode .modal {
    background: rgba(10, 10, 10, 0.6);
    backdrop-filter: blur(4px);
}

body.dark-mode .modal-content {
    background: #0a2239;
    color: #e3f2fd;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.4);
}

body.dark-mode .modal-content h3 {
    color: #1769aa;
}

body.dark-mode .modal-content p {
    color: #bbdefb;
}

body.dark-mode .modal .close {
    color: #90caf9;
}
body.dark-mode .modal .close:hover {
    color: #1769aa;
    transform: scale(1.1);
}




/* EN tlacitko */
#lang-toggle {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
#lang-toggle:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.1);
}
body.dark-mode #lang-toggle {
    background: transparent;
}
body.dark-mode #lang-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}
