@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');

/* 1. ZÁKLADNÍ BARVY A RESET */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    color: #d6deeb;
    font-family: 'Inter', -apple-system, sans-serif;
    margin: 0;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overscroll-behavior: none;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: transparent;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;

    background-color: #011627;
    background-image: url("desktop-wp.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 768px) {
    body::before {
        background-position: 20% center;
    }
}

/* 2. LAYOUT */
.container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

/* 3. HLAVNÍ OBSAH */
.content {
    flex: 1;
    padding: 1.5rem;
    width: 90%;
    max-width: 800px;
    margin: 5vh auto 120px auto;
    box-sizing: border-box;
}

@media (min-width: 1100px) {
    .content {
        margin: 15vh auto;
        padding-bottom: 5rem;
    }
}

h1, h2, h3 {
    color: #82aaff;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2, h3, h4, h5 {
    margin-top: 3em;
}

/* 4. SIDEBAR / MENU */
/* Mobilní a Tabletové zobrazení (do 1100px šířky) */
.sidebar {
    background-color: #011627;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    border-top: 1px solid #1d3b53;
    z-index: 1000;
}

/* Desktopové zobrazení (pouze na širokých monitorech, kde menu nepřekáží) */
@media (min-width: 1100px) {
    .sidebar {
        left: auto;
        bottom: auto;
        border-top: none;
        right: calc(50% - 580px);
        top: 55vh;
        width: 150px;
        height: auto;
        background: transparent;
        display: flex;
    }
}

/* 5. MENU POLOŽKY */
.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: flex-end;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

@media (min-width: 1100px) {
    .menu {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 0.8rem;
        padding: 0;
        padding-left: 0.8rem;
    }
}

/* 6. ODKAZY A STYLY MENU */
a {
    color: #ecc48d;
    text-decoration: none;
}

.menu-item {
    font-size: 1.1rem;
    transition: 0.2s;
    color: #d6deeb;
}

.menu-item:hover { color: #82aaff; }
.menu-item.active {
    color: #addb67;
    font-weight: 600;
    border-left: 2px solid #addb67;
    padding-left: 8px;
}

/* 7. NIGHT OWL SYNTAX */
.codehilite {
    background-color: #010e17 !important;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1.5rem 0;
    border: 1px solid #1d3b53;
    font-family: 'JetBrains Mono', monospace;
}

/* 8. BLOG LIST */
.blog-list {
    list-style: none;
    padding: 0;
}

.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0.1rem 0;
    border-bottom: 1px solid transparent;
}

.blog-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 0 0.5rem 0.3rem 0.5rem;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    font-size: 1.1rem;
    color: #ecc48d;
}

.blog-item:hover { border-bottom: 1px solid #ecc48d; }

.blog-item:hover .blog-link {
    color: #82aaff;
}

.blog-title {
    color: #ecc48d;
    font-weight: 500;
    font-size: 1.1rem;
    flex: 1;
    margin-right: 1.5rem;
}

.blog-date {
    color: #637777;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.blog-item:hover .blog-date {
    color: #ecc48d;
}

.activity-list {
    margin-top: 8em;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.activity-link {
    text-decoration: none;
    color: #ecc48d;
    display: inline-block;
    padding: 4px 0;
}

.activity-link:hover {
    text-decoration: underline;
}

.activity-date {
    color: #888;
    font-size: 0.85em;
    margin-left: 8px;
}

.activity-link:hover .activity-date {
    color: #ecc48d;
}

/* 9. WORKOUT LIST */
.workout-list {
    padding-left: 25px;
}

.workout-list li {
    margin-bottom: 15px;
}

.workout-list li::marker {
    color: #82aaff;
    font-weight: bold;
    font-size: 1.1em;
}

.exercise-meta {
    color: #d6deeb;
}

.exercise-weights small {
    padding-left: 1em;
    color: #888;
    font-size: 0.8em;
}


/* 10. CITACE */
blockquote {
    background-color: rgba(0, 0, 0, 0.2);
    border-left: 4px solid #ecc48d;
    margin: 1em 0;
    padding: 0.5em 1.5em 1.5em 1.5em;
    color: #ccc;
    font-style: italic;

    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

blockquote p {
    margin-bottom: 0;
}

/* 11. TABULKY */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

table th {
    color: #82aaff;
    text-align: left;
    padding: 10px;
    border-bottom: 2px solid #1d3b53;
}

table td {
    padding: 10px;
    border-bottom: 1px solid #1d3b53;
}

/* 12. INLINE KÓD */
:not(pre) > code {
    font-family: 'JetBrains Mono', monospace;
    background-color: rgba(130, 170, 255, 0.1);
    color: #addb67;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

/* 13. PYGMENTS COLORS - Rozšířeno pro C/C++ a JS */
.codehilite .k  { color: #c792ea; font-style: italic; } /* keywords */
.codehilite .kc { color: #c792ea; }                    /* keywords constant */
.codehilite .kt { color: #addb67; }                    /* keyword type (C: int, char) */
.codehilite .nf { color: #82aaff; }                    /* functions */
.codehilite .nc { color: #addb67; }                    /* class names */
.codehilite .s1, .codehilite .s2 { color: #ecc48d; }   /* strings */
.codehilite .nd { color: #addb67; font-style: italic; }/* decorators */
.codehilite .o  { color: #c792ea; }                    /* operators */
.codehilite .mi { color: #f78c6c; }                    /* numbers */
.codehilite .c1 { color: #637777; font-style: italic; }/* comments */
.codehilite .kn { color: #c792ea; font-style: italic; }/* keyword namespace */
.codehilite .nn { color: #addb67; }                    /* names */
.codehilite .cp { color: #82aaff; }                    /* preprocessor (C: #include) */

/* 14. MINIWIN SECTION */
.miniwin-section {
    margin-top: 4em;
    padding: 1.5rem;
    background-color: rgba(1, 14, 23, 0.6); /* Tmavší pozadí jako kód */
    border-left: 3px solid #addb67; /* Zelená barva z menu active */
    border-radius: 0 4px 4px 0;
}

.miniwin-header {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.miniwin-subtitle {
    color: #637777; /* Barva komentářů z tvého CSS */
    margin-bottom: 1.5rem;
}

.miniwin-content {
    color: #ecc48d; /* Oranžovo-žlutá barva stringů */
    font-style: italic;
    line-height: 1.6;
}

/* 15. PROJECT CARDS */
.project-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-card {
    display: flex;
    flex-direction: column; /* Mobile first: pod sebou */
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent; /* Aby se karta nehýbala při hoveru */
}

/* Hover efekt: jemné pozadí a link barva pro titulek */
.project-card:hover {
    background-color: rgba(130, 170, 255, 0.05);
    border: 1px solid rgba(130, 170, 255, 0.1);
}

.project-card:hover .project-title {
    color: #addb67; /* Změna barvy titulku při hoveru */
}

/* Obrázek */
.project-image {
    display: none;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #1d3b53;
    display: block;
}

/* Textové informace */
.project-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-title {
    margin: 0 0 0.5rem 0 !important; /* Reset horního marginu z vašeho h3 */
    font-size: 1.4rem;
    color: #82aaff;
    transition: color 0.2s ease;
}

.project-description {
    margin: 0;
    color: #d6deeb;
    font-size: 0.95rem;
    line-height: 1.5;
}

.project-link-text {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #ecc48d;
    font-family: 'JetBrains Mono', monospace;
}

@media (min-width: 600px) {
    .project-card {
        flex-direction: row;
        align-items: center;
    }

    .project-image {
        display: block;
        width: 180px;
        flex: 0 0 180px;
    }
}

/* 16. STYLIZACE OBRÁZKŮ V TEXTU */
.content img:not(.project-card img) {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 2rem auto; /* Vycentrování a prostor kolem */

    /* Zaoblení a ohraničení ladící s .codehilite */
    border-radius: 6px;
    border: 1px solid #1d3b53;

    /* Jemný stín, aby obrázek "neplaval" v prostoru */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    /* Přechod pro případné hover efekty */
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.content img:hover {
    border-color: #82aaff; /* Modrá barva nadpisů */
    transform: scale(1.01); /* Velmi lehké zvětšení */
}

.content img + em {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #637777; /* Barva komentářů */
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}
