body {
    font-family: sans-serif;
    padding: 0 8px;
}

nav, .small-content {
    margin: 0 auto;
    max-width: 736px;
}

@media screen and (max-width: 768px) {
    nav, .small-content {
        max-width: 448px;  /* For tablets */
    }
}

@media screen and (max-width: 480px) {
    nav, .small-content {
        max-width: 320px;  /* For small phones */
    }
}

.job-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: start;
    margin-bottom: 0.5rem;
}

.job-header h4 {
    margin: 0;
    padding: 0;
}

.job-date {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .job-header {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .job-date {
        text-align: left;
        font-size: 0.9em;
    }
}

.wide-content {
    width: 90dvw;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0.75rem 0;
}

li {
    padding: 0.25rem 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 25px;
    grid-auto-flow: dense;
    max-width: 90dvw;
    padding: 15px;
}

.grid-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 4px;
    margin: 4px;
    grid-row: span var(--rows);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 32px;
}

@media screen and (max-width: 1280px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (prefers-color-scheme: dark) {
    html {
        background: #1c1c1c;
        color: white;
    }

    .grid-item {
        background: #1c1c1c;;
    }

    a {
        color: #6bf;
        &:visited { color: #f8f; }
        &:active { color: red; }
    }
}