html {
    font-size: 8px;
    font-family: sans-serif;

    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

:root {
    /* Pozadí */
    --bg-main: #0b0f17;
    /* Hlavní pozadí webu */
    --bg-scnd: #162032;
    /* Sekundární pozadí webu */
    --bg-card: #161e2e;
    /* Pozadí karet a bloků */

    /* Texty */
    --text-main: #f8fafc;
    /* Hlavní nadpisy (skoro bílá) */
    --text-muted: #94a3b8;
    /* Běžný text / popisy (světle šedá) */

    /* Zelená (Accent) */
    --accent-main: #10b981;
    /* Hlavní zelená barva */
    --accent-bg: rgba(16, 185, 129, 0.1);
    /* Zelená na pozadí tagů */

    /* Rámečky */
    --border: #243044;
    /* Decentní hranice prvků */
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    overflow-x: hidden;
    background-color: var(--bg-main);
}

div[id] {
    scroll-margin-top: 80px;
    /* Výška tvého navbaru */
}

.alert-box {
    display: flex;
    position: fixed;
    z-index: 1000;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    transition: top 0.5s ease-in-out;

    padding: 2rem;
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    font-size: 2rem;
}

.active {
    top: 120px;
}


.navbar {
    background-color: var(--bg-card);
    display: flex;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    padding: 0 5%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2);
}

.nav-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 1500px;
    width: 100%;
}

.nav-header a {

    text-decoration: none;
    color: var(--text-main);
    font-size: 2.5rem;
    transition: text-shadow 0.3s ease, color 0.3s ease;

    letter-spacing: 1px;
}

.nav-header a:active {
    color: #ffffff;
    text-shadow:
        0 0 1px var(--text-main),
        0 0 2px var(--text-main);
}

.nav-buttons {
    display: flex;
    gap: 8rem;
    align-items: center;
}

.nav-button {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 2rem;
    padding: 1.5rem;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--bg-card);
}

.git-button {
    font-size: 4rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: text-shadow 0.2s ease, color 0.2s ease;
}

.git-button:active {
    color: #ffffff;
    text-shadow:
        0 0 1px var(--text-main);
}

.nav-button:active {
    color: var(--accent-main);
    background-color: var(--accent-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.nav-inner-phone {
    display: none;
}

.nav-menu-buttons {
    display: none;
}

.hamburger-button {
    display: none;
    border-radius: 20px;
    gap: 10px;
    font-size: 1.75rem;
    font-weight: 550;
    cursor: pointer;
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;

}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--text-muted);
    border-radius: 2px;
    transition: box-shadow 0.3s ease, color 0.3s ease;
}

.hamburger-button:active .hamburger span {
    background-color: var(--text-main);
    box-shadow:
        0 0 10px var(--text-main);

}

.navbar-menu {
    display: none;
}

.home-wrap {
    display: flex;
    justify-content: center;
    padding: 0 5%;
    height: clamp(500px, calc(100vh - 80px), 1000px);
}

.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1500px;
    width: 100%;
    padding-top: 100px;
    justify-content: space-around;
}

.home-intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home span {
    font-size: 4rem;
    color: var(--text-muted);
    font-weight: 400;
}

.home h1 {
    font-size: 6rem;
    color: var(--accent-main);
    font-weight: 700;
}

.home p {
    font-size: 2.5rem;
    color: var(--text-main);
}

.more-projects {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 4rem;
    padding: 1.5rem;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: 1px solid var(--bg-main);
}

.more-projects:active {
    color: var(--accent-main);
    background-color: var(--accent-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.home a i {
    font-size: 2rem;
}

.projects-wrap {
    display: flex;
    justify-content: center;
    padding: 0 5%;
    min-height: fit-content;
}

.projects {
    border-top: 1px solid var(--border);
    max-width: 1500px;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 2%;

}

.projects-header {
    display: flex;
    justify-content: center;
    color: var(--text-main);
    font-size: 4rem;

    letter-spacing: 1px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: 60px;
    place-items: center;
    /*align-items: stretch;*/
}

.project-card {
    background-color: var(--bg-card);
    width: 100%;
    height: 680px;
    border: 1px solid var(--border);
    border-radius: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    gap: 10px;

}

.project-card:hover {
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.15);
}

.project-card h2 {
    margin: 0;
    color: var(--text-muted);
    font-size: 3rem;
    font-weight: 600;
}

.project-card a {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.project-card img {
    width: 95%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.project-card p {
    color: var(--text-muted);
    font-size: 2rem;
    font-weight: 550;
    margin: 0 20px;
}

.used-languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.used-languages span,
.ability {
    font-size: 2rem;
    color: var(--accent-main);
    background-color: var(--accent-bg);
    padding: 1rem;
    border-radius: 8px;
}

.ability {

    box-shadow: 0 0px 40px -10px rgba(16, 185, 129, 0.15);
}

.links {
    display: flex;
    gap: 15px;
}

.links a {
    color: var(--text-main);
    font-size: 1.75rem;
    cursor: pointer;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    margin: 0;
}

.links a:active {
    color: #ffffff;
    text-shadow:
        0 0 2px var(--text-main);
}

.projects-git-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 4rem;
}

.projects-git-link h2 {
    color: var(--text-muted);
    font-size: 3rem;
}

.projects-git-link a {
    color: var(--text-muted);
    font-size: 3rem;
    font-weight: 550;
    cursor: pointer;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.projects-git-link a:active {
    color: white;
    text-shadow:
        0 0 1px var(--text-main);
}

.technologies-wrap {
    display: flex;
    justify-content: center;
    padding: 0 5%;
    min-height: fit-content;
}

.technologies {
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1500px;
    width: 100%;
}

.technologies h2 {
    color: var(--text-muted);
    font-size: 4rem;
}

.technologies-header {
    display: flex;
    justify-content: center;
    color: var(--text-main);
    font-size: 4rem;

    letter-spacing: 1px;
}

.ability {
    font-size: 4rem;
}

.abilities {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
    padding: 2% 10%;
    border-radius: 26px;
}

.about-wrap {
    display: flex;
    justify-content: center;
    padding: 0 5%;
    margin-bottom: 140px;
}

.about {
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1500px;
    width: 60%;
}

.about-header {
    color: var(--text-main);
    font-size: 4rem;

    letter-spacing: 1px;
}

.about-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--bg-card);
    border-radius: 26px;
    box-shadow: 0 15px 30px -10px rgba(16, 185, 129, 0.15);
    padding-bottom: 2%;
    border: 1px solid var(--border);
}

.header-card {
    background-color: var(--border);
    border-top-left-radius: 26px;
    border-top-right-radius: 26px;
    width: 100%;
}

.header-card i {
    font-size: 2rem;
    padding: 1rem;
}

.header-card span {
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: var(--text-muted);
}

.header-card i:nth-child(1) {
    color: #ff5f56;
}

.header-card i:nth-child(2) {
    color: #ffbd2e;
}

.header-card i:nth-child(3) {
    color: #27c93f;
}

.about-contact-card {
    padding: 0 2%;
    display: flex;
    flex-direction: column;
}

.about-me {
    display: flex;
    flex-direction: column;
    flex: 2;
    gap: 0;
}

.about-me p {
    color: var(--text-main);
    font-size: 3rem;
    margin-top: 16px;
    /* Mezera pod každým odstavcem */
}

.about-me b {
    color: var(--accent-main);
    text-shadow:
        0 0 2px var(--accent-main);
}


.contact {
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: center;
}

.contact h3 {
    color: var(--text-muted);
    font-size: 3rem;
    text-align: center;
}

.contact span {
    color: var(--accent-main);
    background-color: var(--accent-bg);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 3rem;
    padding: 1.5rem;
    border-radius: 26px;
    cursor: pointer;
    transition: text-shadow 0.3s ease, color 0.3s ease;
    transition: box-shadow 0.3s ease, color 0.3s ease;
    width: min-content;
}

.contact span:active {
    color: var(--accent-main);
    text-shadow:
        0 0 1px var(--accent-main);

    box-shadow:
        0 0 10px var(--accent-main);
    /* Střední rozptyl */
}

.contact h4 {
    color: var(--text-muted);
    font-size: 3rem;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.footer-wrap {
    display: flex;

    align-items: center;
    justify-content: center;
    width: 100%;
    height: 52px;
    background-color: var(--bg-scnd);
    border-top: 1px solid var(--border);
}

.footer {
    color: var(--text-muted);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1550px) {
    .nav-inner {
        max-width: 1200px;
    }

    .projects {
        max-width: 1200px;
    }

    .cards {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }

    .project-card {
        height: 620px;
    }

    .cards {
        gap: 20px;
    }

    .about {
        width: 80%;
    }
}

@media (max-width: 1000px) {

    .nav-inner {
        display: none;
    }

    .nav-inner-phone {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        max-width: 1500px;
        width: 100%;

    }

    .navbar-menu {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .hamburger-button {
        display: flex;
    }

    .nav-header {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .navbar-menu {
        background-color: var(--bg-scnd);
        display: flex;
        position: fixed;

        top: 80px;
        left: 0;

        width: 100vw;
        height: fit-content;

        z-index: 900;

        flex-direction: column;

        align-items: self-start;
        justify-content: flex-start;

        overflow-y: auto;

        transform-origin: top center;
        transform: scaleY(0);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);

        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3),
            0 2px 4px -2px rgba(0, 0, 0, 0.2);


    }

    .navbar-menu.active {
        transform: scaleY(1);
        /* Pro Safari support */
    }

    .nav-menu-buttons {
        display: flex;
        flex-direction: column;
        width: 100vw;
        overflow-y: hidden;
    }

    .nav-menu-buttons a {
        border-radius: 0;
    }

    .about {
        width: 100%;
    }
}

@media (max-width: 926px) {
    .project-card {
        height: 750px;
    }
}

@media (max-width: 700px) {
    .nav-header a {
        font-size: 2rem;
    }

    .project-card {
        height: 550px;
    }

    .navbar {
        padding: 0 3%;
    }

    .projects-wrap {
        padding: 0 3%;
    }

    .projects-header {
        font-size: 2.5rem;
    }

    .project-card h2 {
        font-size: 2.5rem;
    }

    .about-wrap {
        padding: 0 3%;
        margin-bottom: 70px;
    }

    .about-header {
        font-size: 2.5rem;
        white-space: nowrap;
    }

    .about-me p {
        font-size: 2.5rem;
    }

    .technologies-header {
        font-size: 2.5rem;
    }

    .contact h3 {
        font-size: 2.5rem;
    }

    .contact h4 {
        font-size: 2.5rem;
    }

    .alert-box {
        width: 250px;
    }
}

@media (max-width: 520px) {
    .home span {
        font-size: 3rem;
    }

    .home h1 {
        font-size: 4.5rem;
    }

    .home p {
        font-size: 2rem;
    }

    .projects-wrap {
        margin-bottom: 30px;
    }

    .technologies-wrap {
        margin-bottom: 30px;
    }

    .technologies h2 {
        font-size: 3.5rem;
    }

    .ability {
        font-size: 3rem;
    }

    .cards {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .about-me p {
        font-size: 2rem;
    }

    .project-header, .technologies-header, .about-header {
        font-size: 2.25rem;
    }
}

@media (hover: hover) {
    .nav-header a:hover {
        color: #ffffff;
        text-shadow:
            0 0 1px var(--text-main),
            0 0 2px var(--text-main);
    }

    .git-button:hover {
        color: #ffffff;
        text-shadow:
            0 0 1px var(--text-main);
    }

    .nav-button:hover {
        color: var(--accent-main);
        background-color: var(--accent-bg);
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .hamburger-button:hover .hamburger span {
        background-color: var(--text-main);
        box-shadow:
            0 0 10px var(--text-main);

    }

    .more-projects:hover {
        color: var(--accent-main);
        background-color: var(--accent-bg);
        border: 1px solid rgba(16, 185, 129, 0.2);
    }

    .links a:hover {
        color: #ffffff;
        text-shadow:
            0 0 2px var(--text-main);
    }

    .projects-git-link a:hover {
        color: white;
        text-shadow:
            0 0 1px var(--text-main);
    }

    .contact span:hover {
        color: var(--accent-main);
        text-shadow:
            0 0 1px var(--accent-main);

        box-shadow:
            0 0 10px var(--accent-main);
        /* Střední rozptyl */
    }
}

@media (max-width: 399px) {
    .home h1 {
        font-size: 4rem;
    }

    .home p {
        font-size: 1.75rem;
    }

    .project-card h2 {
        text-align: center;
    }
}