@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/open-sans-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/open-sans-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/open-sans-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    src: url('/fonts/open-sans-bold-italic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-main: #7e8ca5;
    --bg-island: #e4f0ff;
    --bg-secondary: #a5b7d9;
    --text-dark: #161d29;
    --island-r: 24px;
    --btn-r: 8px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: var(--text-dark);
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    text-align: center;
    position: relative;
    padding: 80px 20px 40px 20px;
}

body.page-top {
    justify-content: flex-start;
    padding-bottom: 50px;
}

html:not(.lang-en-active) .lang-en { display: none; }
html.lang-en-active .lang-cs { display: none; }

/* Ostrovy */
.hero-container,
.error-container,
.page-header {
    max-width: 760px;
    width: 100%;
    background: var(--bg-island);
    border-radius: var(--island-r);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-container {
    padding: 45px 40px;
    gap: 12px;
}

.error-container {
    padding: 50px 40px;
    gap: 12px;
}

.page-header {
    padding: 36px 40px;
    gap: 18px;
    margin-bottom: 24px;
}

/* Typografie */
.hero-container h1 {
    font-size: 3rem;
    margin: 0;
    line-height: 1.1;
}

.page-header h1 {
    font-size: 2.75rem;
    margin: 0;
    line-height: 1.1;
}

.error-container h1 {
    font-size: 5.5rem;
    margin: 0;
    line-height: 1;
    opacity: 0.75;
    letter-spacing: 4px;
    font-family: monospace;
}

.error-container h2 {
    font-size: 2rem;
    margin: 8px 0 0 0;
}

.error-container p {
    line-height: 1.8;
    font-size: 1.15rem;
    margin: 10px 0 30px 0;
}

.subtitle {
    font-size: 1.45rem;
    opacity: 0.75;
    margin-top: 0;
    margin-bottom: 24px;
    font-weight: bold;
}

/* Tlačítka */
.action-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: var(--btn-r);
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background: var(--bg-island);
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
}

.project-actions .btn-secondary {
    background: var(--bg-island);
    padding: 12px 24px;
    font-size: 1.05rem;
}

.btn-icon {
    fill: var(--text-dark);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* Projekty */
.projects-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 760px;
    text-align: left;
}

.project-card {
    background: var(--bg-island);
    padding: 32px 36px;
    border-radius: var(--island-r);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.project-title {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.25;
    text-wrap: balance;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.skill-badge {
    background: var(--bg-secondary);
    padding: 6px 12px;
    border-radius: var(--btn-r);
    font-size: 0.88rem;
    font-family: monospace;
    font-weight: bold;
}

.project-desc {
    line-height: 1.75;
    font-size: 1.08rem;
    margin: 4px 0 8px 0;
    text-wrap: balance;
}

.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Navigace a přepínač jazyka */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.lang-btn, .hamburger-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-island);
    color: var(--text-dark);
    border: 2px solid var(--text-dark);
    border-radius: var(--btn-r);
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lang-btn {
    font-size: 0.95rem;
    padding-top: 1px;
    text-box-trim: trim-both;
    text-box-edge: cap alphabetic;
}

.hamburger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
}

.lang-btn:focus-visible, .hamburger-btn:focus-visible {
    outline: 4px solid var(--bg-island);
    outline-offset: 4px;
}

.btn:focus-visible, .menu-link:focus-visible {
    outline: 4px solid var(--text-dark);
    outline-offset: 4px;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-island);
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    padding: 85px 25px;
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 99;
}

.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
}

.menu-link {
    color: var(--text-dark);
    opacity: 0.7;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 20px;
    transition: opacity 0.2s ease;
}

.menu-link.active {
    opacity: 1;
    text-decoration: underline;
}

@media (hover: hover) {
    .lang-btn:hover, .hamburger-btn:hover {
        background: var(--bg-secondary);
    }
    .menu-link:hover {
        opacity: 1;
    }
    .btn-primary:hover,
    .project-actions .btn-secondary:hover {
        background: var(--bg-secondary);
    }
    .btn-secondary:hover {
        background: var(--bg-main);
    }
}

@media (max-width: 600px) {
    :root {
        --island-r: 18px;
        --btn-r: 6px;
    }
    body {
        justify-content: flex-start;
        padding: 75px 15px 30px 15px;
    }
    .hero-container { padding: 30px 20px; }
    .error-container { padding: 36px 20px; }
    .page-header, .project-card { padding: 26px 20px; }
    .hero-container h1 { font-size: 2.3rem; }
    .page-header h1 { font-size: 2.2rem; }
    .error-container h1 { font-size: 4rem; }
    .error-container h2 { font-size: 1.5rem; }
    .error-container p { font-size: 1.05rem; }
    .subtitle { font-size: 1.15rem; }
    .project-title { font-size: 1.25rem; }
    .project-desc { font-size: 1.02rem; }
    .action-buttons { flex-direction: column; width: 100%; gap: 10px; }
    .btn { width: 100%; }
}