:root{
    --primary: #0D0D2B;
    --secondary: #1A1A40;
    --text: #E6E6FA;
    --secondarytext: #A1A1C0;
    --highlight: #8B5CF6;

}

*{
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
    font-family: "Rubik", sans-serif;
    font-weight: 600;
    font-style: normal;
    color: var(--text);
}
body{
    background-color: var(--primary);
}
#main, #about, #references{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
}
#main {
    background: linear-gradient(to bottom, #0D0D2B 0%, #121233 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

#about {
    background: linear-gradient(to bottom, #121233 0%, #1A1A40 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
#references {
  background: linear-gradient(to bottom, #121233 0%, #0D0D2B 100%);
}

h1{
    color: var(--text);
    font-size: clamp(2.5rem, 2vw + 2rem, 4rem);
}
h2{
    color: var(--text);
    font-size: clamp(2.2rem, 2vw + 1rem, 3.5rem);
}
.secondary-text{ 
    color: var(--secondarytext);
}
p{
    font-size: clamp(1.5rem, 1vw + 0.1rem, 2rem);
    color: var(--secondarytext);
}
.left{
    width: 50%;
    height: 100%;
    display: flex;
    align-items: start;
    justify-content: center;
    flex-direction: column;
    text-align: left;
    padding-left: 100px;
}
.right{
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#main img{
    width: 60%;
    border-radius: 30px;
}
#about p{
    font-family: "Roboto Mono", monospace;
    text-align: left;
    padding: 0 100px;
} 
#References {
    background: linear-gradient(to bottom, #121233 0%, #0D0D2B 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 50px 20px;
}

.comments-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin-top: 40px;
}

.comment-card {
    background-color: var(--secondary);
    border-radius: 20px;
    padding: 20px 30px;
    border-left: 5px solid var(--highlight);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.comment-card:hover {
    transform: translateY(-5px);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.user-name {
    font-family: "Roboto Mono", monospace;
    color: var(--text);
    font-size: 1rem;
}

.user-tag {
    font-size: 0.8rem;
    background-color: rgba(139, 92, 246, 0.2); /* barva highlight s průhledností */
    color: var(--highlight);
    padding: 4px 10px;
    border-radius: 10px;
    text-transform: uppercase;
}

.comment-body {
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--secondarytext);
}
.warning-text {
    color: #ffb86c !important;
    font-size: 1.2rem !important;
    margin-top: 10px;
}

/* --- Kontejner sekce (Full Screen) --- */
#skills-dashboard {
    background: linear-gradient(to bottom, #1A1A40 0%, #121233 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    box-sizing: border-box;
    overflow: hidden; /* Zabrání nechtěnému scrollu */
}

/* --- Mřížka (Grid Layout) --- */
.bento-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 sloupce */
    grid-template-rows: repeat(3, 1fr);    /* 3 řádky */
    grid-gap: 20px;
    width: 100%;
    max-width: 1000px;
    height: 90%; /* Využije většinu výšky screenu */
}

/* --- Společný styl pro karty --- */
.bento-item {
    background-color: var(--secondary); /* Používá tvou proměnnou #1A1A40 */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.bento-item:hover {
    border-color: var(--highlight);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bento-item h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text);
    font-family: "Rubik", sans-serif;
}

/* --- Specifické rozvržení karet --- */

/* Hlavní pohon (velká karta nahoře) */
.main-drive {
    grid-column: span 2;
    grid-row: span 1;
}

.main-drive p {
    font-size: 0.95rem;
    color: var(--secondarytext);
    max-width: 80%;
    line-height: 1.5;
}

.main-icon {
    position: absolute;
    right: 20px;
    bottom: 20px;
    font-size: 4.5rem !important;
    color: var(--highlight);
    opacity: 0.15;
}

/* System Log (vysoká karta vpravo) */
.logs {
    grid-column: span 1;
    grid-row: span 2;
    justify-content: flex-start;
}

.logs ul {
    list-style: none;
    padding: 0;
    margin-top: 10px;
}

.logs li {
    font-family: "Roboto Mono", monospace;
    font-size: 0.85rem;
    margin-bottom: 12px;
    color: var(--secondarytext);
}

.logs li span {
    color: var(--highlight);
    margin-right: 10px;
    font-weight: bold;
}

/* Status (Baterka/Blesk) */
.status {
    align-items: center;
    text-align: center;
}

.status i {
    font-size: 2.5rem !important;
    color: #ffd700; /* Zlatá pro energii */
    margin-bottom: 10px;
}

.status p {
    font-size: 0.85rem;
    font-family: "Roboto Mono", monospace;
}

/* Statistiky (Kruhové grafy) */
.charts {
    grid-column: span 1;
}

.charts-flex {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.chart {
    text-align: center;
    width: 70px;
}

.chart svg {
    width: 100%;
    transform: rotate(-90deg);
}

.chart span {
    font-size: 0.7rem;
    color: var(--secondarytext);
    display: block;
    margin-top: 8px;
    font-family: "Roboto Mono", monospace;
}

.circle-bg {
    fill: none;
    stroke: #222;
    stroke-width: 4;
}

.circle {
    fill: none;
    stroke: var(--highlight);
    stroke-width: 4;
    stroke-linecap: round;
}

/* Stack (Tagy) */
.stack {
    grid-column: span 1;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tags span {
    font-size: 0.75rem;
    background: rgba(139, 92, 246, 0.15);
    color: var(--highlight);
    padding: 5px 10px;
    border-radius: 8px;
    font-family: "Roboto Mono", monospace;
}

/* Music / Sensors */
.music {
    grid-column: span 2;
    align-items: center;
    text-align: center;
}

.music i {
    font-size: 2.5rem !important;
    color: var(--highlight);
    margin-bottom: 10px;
}

.music p {
    font-size: 0.85rem;
}

/* --- Material Icons Helper --- */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
}

/* Styl pro menší doplňkové boxy v rohu */
.status-box, .uptime {
    text-align: center;
    justify-content: center;
}

.status-box i, .uptime i {
    color: var(--highlight);
    font-size: 2.5rem !important;
    margin-bottom: 5px;
}

.brain-dump p {
    font-style: italic;
    font-size: 0.9rem;
    color: var(--secondarytext);
    line-height: 1.4;
}

/* --- RESPONZIVITA --- */

/* Tablety a menší notebooky */
@media (max-width: 1024px) {
    .left, .right {
        padding-left: 50px;
    }
    #about div {
        padding: 0 50px;
    }
}

/* Mobily a úzké tablety (hlavní změny) */
@media (max-width: 768px) {
    /* 1. Reset fixní výšky - umožníme scroll */
    #main, #about, #skills-dashboard, #references {
        height: auto;
        min-height: auto;
        padding: 60px 20px;
    }

    /* 2. Main Sekce - Fotka nad textem a text přes celé */
    #main {
        flex-direction: column-reverse; /* Fotka nahoře, text dole */
        text-align: center;
        justify-content: flex-start;
    }
    .left, .right {
        width: 100%;
        padding: 0;
        align-items: center;
    }
    .left {
        margin-top: 30px;
    }
    #main img {
        width: 70%; /* Fotka trochu menší */
        max-width: 300px; /* Ale ne moc malá */
    }

    /* 3. Zmenšení textu, aby se vešel */
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    p { font-size: 1rem; }
    #about p {
        padding: 0;
        margin-bottom: 12px;
        font-size: 1rem;
    }
    .warning-text { font-size: 1rem !important; }

    /* 4. Bento Grid -> Jeden sloupec */
    .bento-wrapper {
        grid-template-columns: 1fr; /* Všechno pod sebou */
        grid-template-rows: auto;    /* Výška podle obsahu */
        height: auto;
        grid-gap: 15px;
    }

    /* 5. Zrušit roztahování karet přes sloupce */
    .main-drive, .logs, .music, .charts {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
    .main-drive p { max-width: 100%; }
    .main-icon { font-size: 3rem !important; }

    /* Oprava System Logu pro mobil */
    .logs { justify-content: flex-start; }
    .logs ul { margin-top: 5px; }
    .logs li { font-size: 0.8rem; margin-bottom: 8px; }

    /* Oprava Reference pro mobil */
    .comment-card { padding: 15px; }
    .comment-header { flex-direction: column; align-items: flex-start; gap: 5px; }
    .comment-body { font-size: 1rem; }
}

/* Velmi malé mobily (do 480px) */
@media (max-width: 480px) {
    #main img { width: 90%; }
    .charts-flex { flex-direction: column; gap: 20px; }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
}