/* Dotted page background */
body {
    --bg-color: #ffffff;
    --bg-circle-color: #c4c4c4;
    --bg-circle-size: 1px;
    --bg-section-size: 10px;

    background-color: var(--bg-color);
    background-image: radial-gradient(
        50% 50% at center,
        var(--bg-circle-color) var(--bg-circle-size),
        var(--bg-color) var(--bg-circle-size)
    );
    background-size: var(--bg-section-size) var(--bg-section-size);
}

/* "Skip to content" link, visible only when focused with the keyboard */
.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1080;
    padding: 0.5rem 1rem;
    background: var(--bs-body-bg);
    border-radius: var(--bs-border-radius);
    box-shadow: var(--bs-box-shadow);
}

main:focus {
    outline: none;
}

/* Home: profile card on the hero banner */
.hero-banner {
    background: url("/img/hero.webp") center / cover no-repeat;
}
.profile-card {
    max-width: 600px;
}
.profile-photo {
    max-height: 40vh;
}

/* Home: sections with a diagonal image */
.home-section-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0 0;
}
@media (min-width: 992px) {
    .home-section-img[width][height] {
        height: 100%;
        object-fit: cover;
    }
    .home-section-img.image-start {
        clip-path: polygon(0% 0%, 100% 0%, 50% 100%, 0% 100%);
        border-radius: var(--bs-border-radius-lg) 0 0 var(--bs-border-radius-lg);
    }
    .home-section-img.image-end {
        clip-path: polygon(50% 0%, 100% 0%, 100% 100%, 0% 100%);
        border-radius: 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg) 0;
    }
}
/* Section text is justified ("do bloku"); hyphenation keeps the word spacing even */
.home-section-text p {
    text-align: justify;
    hyphens: auto;
}
.experience-card {
    width: 16rem;
}

/* Projects and collections */
.tile-card {
    max-width: 24rem;
}
.tile-media img {
    max-height: 40vh;
    min-width: 50px;
}
.tile-icon {
    display: block;
    font-size: 4.5rem;
    line-height: 1;
}

/* Contact */
.contact-card {
    max-width: 20rem;
}

/* Long-form text (blog posts, privacy policy): keep lines readable */
.post {
    max-width: 75ch;
}
.post h2 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

abbr[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Footer */
.footer-avatar {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* width/height attributes reserve space while loading; keep the real aspect ratio */
img[width][height] {
    height: auto;
}
