*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background-color: #fff;
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    font-family: system-ui, sans-serif;
    color: #333;
    line-height: 1.6;
}

main {
    flex-grow: 1;
}

h1,
h2,
h3 {
    color: #333;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 1em;
    margin-bottom: 0.5em;
    margin-left: 1.5rem;
    letter-spacing: -0.02em;
    scroll-margin-top: 2rem;
}

h1 {
    margin-top: 0.25em;
    font-size: 3rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.1rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

h1::after,
h2::after,
h3::after {
    content: "";
    display: block;
    width: 50px;
    height: 5px;
    background-color: #fff5ab;
    border-radius: 3px;
    margin-top: 0.1em;
}

h5 {
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1rem 0;
}

a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #000;
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid #333;
    outline-offset: 3px;
}

/* Skip link target is focusable only programmatically, no outline needed */
main:focus-visible {
    outline: none;
}

/* Skip link */
.skip-link {
    position: fixed;
    top: -100%;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background-color: #333;
    color: #fff;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
}

.skip-link:hover {
    color: #fff;
    text-decoration: none;
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
    text-decoration: none;
}

hr {
    border: none;
    width: 200px;
    height: 5px;
    background-color: #e1ffe1;
    border-radius: 3px;
    margin: 2rem auto;
}

.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 2rem;
}

.center {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

/* Header */
header {
    padding: 1rem 0;
    margin-bottom: 2rem;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#site-nav {
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle-bar {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: #333;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}

#nav-home {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none !important;
    color: #333;
    font-weight: 700;
    font-size: 1.1rem;
}

#logo {
    height: 2.5rem;
}

#title {
    height: 2.2rem;
}

nav ul {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: #555;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    display: block;
    content: "";
    width: 0px;
    height: 5px;
    background-color: #fff5ab;
    transition: width 0.3s ease-in-out;
    border-radius: 3px;
    margin-top: 0.2rem
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 50px;
}

.nav-link:hover,
.nav-link.active {
    color: #000;
    text-decoration: none;
}

@media (max-width: 1024px) {
    header {
        margin-bottom: 1rem;
    }

    nav.container {
        flex-wrap: wrap;
        padding: 0 1.25rem;
    }

    .nav-toggle {
        display: flex;
    }

    #nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin: 0;
        padding: 0.5rem;
        position: absolute;
        top: calc(100% + 0.75rem);
        left: 0;
        right: 0;
        background-color: #fff;
        z-index: 100;
        opacity: 0;
        visibility: hidden;
        transition:
            opacity 0.25s ease,
            visibility 0.25s;
        pointer-events: none;
    }

    #site-nav.menu-open #nav-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    #nav-menu li {
        width: 100%;
    }

    #nav-menu .nav-link {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 0.5rem;
    }

    /* Animate hamburger lines into a close "X" */
    #site-nav.menu-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    #site-nav.menu-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    #site-nav.menu-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

/* Footer */
footer {
    background-color: #fdf3f3;
    padding: 2rem 0;
    border-top: 20px solid #fbf8f8;
    margin-top: 3rem;
    color: #555;
    font-size: 0.95rem;
}

footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

footer ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

footer li {
    margin: 0.6rem 0;
}

footer .bi {
    margin-right: 0.2rem;
}

@media (max-width: 1024px) {
    footer .container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Jump shortcode */
.jumpnav {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin: 0 auto;
    padding: 0.5rem;
    width: fit-content;
    max-width: 100%;
    background-color: #edffed;
    border-radius: 2rem;
}

.jump {
    padding: 0.6rem 1.4rem;
    border-radius: 1.5rem;
    color: #333;
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.jump:hover,
.jump:focus-visible {
    background-color: #d4f5d4;
}

/* Never wrap partially: either one row, or one item per line */
@media (max-width: 900px) {
    .jumpnav {
        flex-direction: column;
    }
}

/* Event shortcode */
.event {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 0.25rem 1rem;
    padding: 0.3rem 0;
}

.event-name {
    color: #000;
}

@media (min-width: 601px) {
    .event-name {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .event-name::after {
        content: "";
        flex: 1;
        min-width: 1rem;
        height: 5px;
        background-color: #d9f7d9;
    }
}

.event-date {
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .event {
        grid-template-columns: 1fr;
        padding: 0.6rem 0;
    }
}


/* Contact shortcode */
.contact {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 3rem 4rem;
    width: min(20rem, 100%);
    background-color: #f0f9ff;
    border-radius: 35% 65% 55% 45% / 45% 45% 55% 55%;
    transition: border-radius 0.3s ease-in-out;
}

.contact:hover {
    border-radius: 45% 55% 45% 55% / 55% 45% 65% 45%;
}

.contact img {
    width: min(10rem, 100%);
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #e3f2fd;
    margin-bottom: 0.5rem;
}

.contact h5 {
    text-align: center;
    margin: 0;
}

.contact-role {
    font-size: 0.85rem;
    color: #777;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.85rem;
    width: 100%;
}

.contact-details span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-details a {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex: 1;
}

.contact-details .bi {
    flex-shrink: 0;
    color: #777;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .contact {
        padding: 2rem 1.25rem;
    }
}

/* Info table shortcode */
.info-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 4rem;
    margin: 2rem 0;
    padding: 3rem 4rem;
    background-color: #edffed;
    border-radius: 5rem 8rem 6rem 9rem / 7rem 5rem 9rem 6rem;
    transition: border-radius 0.3s ease-in-out;
}

.info-table:hover {
    border-radius: 9rem 5rem 10rem 6rem / 5rem 9rem 6rem 7rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-item dt {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.info-item dd {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .info-table {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 2.5rem 2rem;
        border-radius: 3rem 4rem 3.5rem 4.5rem / 4rem 3rem 4.5rem 3rem;
    }

    .info-table:hover {
        border-radius: 4rem 3rem 4.5rem 3.5rem / 3rem 4.5rem 3.5rem 4rem;
    }
}

/* File Shortcode */
.file {
    display: inline-block;
    margin: 0.5rem;
    width: fit-content;
    background-color: #f0f9ff;
    border-radius: 2rem 4rem 3rem 3.5rem / 3rem 2rem 2.5rem 3rem;
    transition:
        background-color 0.3s ease,
        border-radius 0.3s ease-in-out;
}

.file:hover {
    border-radius: 2.5rem 3rem 3rem 3.5rem / 2rem 2rem 4rem 2.5rem;
    background-color: #e3f2fd;
}

.file a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
}

.file .file-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
    margin-right: 15px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background-color: #e3f2fd;
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.file-name {
    font-weight: 700;
    color: #333;
}

.file-desc {
    font-size: 0.85rem;
    color: #555;
}

/* Home */
#hero {
    position: relative;
    min-height: 75vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#hero img {
    width: min(80vw, 800px);
}

#subtitle {
    font-size: 1.6rem;
    margin-top: 1rem;
    transition: opacity 0.5s ease;
    opacity: 1;
}

#subtitle.fade-out {
    opacity: 0;
}

@media (max-width: 600px) {
    #subtitle {
        font-size: 1.15rem;
        text-align: center;
        padding: 0 1rem;
    }
}

.blob-primary {
    width: min(100vw, 1000px);
    height: min(60vw, 600px);
    background-color: #e3f2fd;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    animation: blob-anim-primary 16s ease-in-out infinite alternate;
    position: absolute;
    z-index: -1;
}

.blob-secondary {
    width: min(120vw, 1200px);
    height: min(80vw, 800px);
    background-color: #f0f9ff;
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation: blob-anim-secondary 14s ease-in-out infinite alternate-reverse;
    position: absolute;
    z-index: -2;
}

@keyframes blob-anim-primary {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg) scale(1);
    }

    33% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
        transform: rotate(4deg) scale(1.02);
    }

    66% {
        border-radius: 100% 60% 60% 100% / 100% 100% 60% 60%;
        transform: rotate(-4deg) scale(0.98);
    }

    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes blob-anim-secondary {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
        transform: rotate(0deg) scale(1);
    }

    50% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: rotate(-5deg) scale(1.03);
    }

    100% {
        border-radius: 50% 50% 30% 70% / 50% 50% 50% 50%;
        transform: rotate(3deg) scale(0.97);
    }
}

/* 404 */
#notfound {
    position: relative;
    min-height: 70vh;
    min-height: 70svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 2rem 1rem;
}

.jezek {
    width: clamp(7rem, 22vw, 11rem);
    margin-bottom: 1rem;
    transform: rotate(-6deg);
    animation: jezek-float 5s ease-in-out infinite;
}

@keyframes jezek-float {
    0%,
    100% {
        transform: rotate(-6deg) translateY(0);
    }

    50% {
        transform: rotate(-6deg) translateY(-0.75rem);
    }
}

#notfound-code {
    margin: 0;
    font-size: clamp(5rem, 20vw, 11rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: #333;
}

#notfound-title {
    margin: 0.5rem 0 0;
    font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
}

#notfound-title::after {
    content: none;
}

#notfound-home {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 0.9rem 2rem;
    background-color: #333;
    border-radius: 35% 65% 55% 45% / 45% 45% 55% 55%;
    color: #fff;
    font-weight: 600;
    transition:
        background-color 0.3s ease,
        border-radius 0.3s ease-in-out;
}

#notfound-home:hover {
    background-color: #000;
    border-radius: 45% 55% 45% 55% / 55% 45% 65% 45%;
    color: #fff;
    text-decoration: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}