:root {
    --border-radius-layout: 32px;

    --body-background: light-dark(cornsilk, #222);
    --body-color: light-dark(#222, #f8f8f8);
    --main-background: light-dark(#f8f8f8, #333);
    --main-border-color: light-dark(lightgray, #555);
    --heading-color: light-dark(#333, #eee);
    --link-background: light-dark(#0069d98d, #0057b394);
    --link-color: light-dark(whitesmoke, #e0e0e0);
    --link-hover-background: light-dark(#0057b394, #0069d98d);
    --skrime-link-color: light-dark(#2443ac, #8cb4ff);
    --footer-background: light-dark(#383838, #1a1a1a);
    --footer-color: light-dark(#fefefe, #e0e0e0);
    --footer-link-color: light-dark(#90caf9, #a3d9ff);
    --footer-link-hover-color: light-dark(lightblue, #cceeff);

    --project-card-background: light-dark(#ffffff, #444);
    --project-card-border: light-dark(#ddd, #666);
    --project-card-title-color: light-dark(#333, #eee);
    --project-card-description-color: light-dark(#666, #ccc);
    --project-card-link-background: light-dark(#007bff, #5cb85c);
    --project-card-link-color: light-dark(white, white);
    --project-card-link-hover-background: light-dark(#0056b3, #4cae4c);
    --project-card-category-background: light-dark(#e9ecef, #555);
    --project-card-category-color: light-dark(#495057, #ddd);

    --github-streak-background: light-dark(#e6f7ff, #3a4a5a);
    --github-streak-color: light-dark(#0056b3, #8cb4ff);
    --github-streak-border: light-dark(#a0d9ff, #5a7b9c);
    --github-streak-font-weight: bold;

    --chess-last-online-background: light-dark(#ffe0b2, #4a3a2a);
    --chess-last-online-color: light-dark(#e65100, #ffb380);
    --chess-last-online-border: light-dark(#ffcc80, #7a5d3a);
    --chess-last-online-font-weight: bold;

    --chess-dynamic-last-seen-background: light-dark(#e3f2fd, #2a3a4a);
    --chess-dynamic-last-seen-color: light-dark(#1976d2, #a3d9ff);
    --chess-dynamic-last-seen-border: light-dark(#90caf9, #4a6a8a);
    --chess-dynamic-last-seen-font-weight: bold;
}

html, body {
    font-family: Arial, sans-serif;
    background-color: var(--body-background);
    color: var(--body-color);
    line-height: 1.6;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    cursor: url('/assets/vector/arrowhead-rounded-outline.svg') 12 12, auto;
    color-scheme: light dark;
}

a:hover {
    cursor: url('/assets/vector/hand-pointer.svg') 12 12, pointer;
}

main {
    --base-margin: clamp(20px, 10%, 120px);
    padding: 25px;
    padding-top: 0;
    flex-grow: 1;
    background-color: var(--main-background);
    margin: var(--base-margin);
    margin-inline: calc(var(--base-margin) * 0.9);
    margin-top: calc(var(--base-margin) * 0.5);
    margin-bottom: calc(var(--base-margin) - 0.35 * var(--base-margin));
    border-radius: 32px 16px 48px 16px;
    border: 1px solid var(--main-border-color);
    color-scheme: light dark;
}

h2 {
    color: var(--heading-color);
    margin-top: 0;
    margin-bottom: 10px;
    color-scheme: light dark;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    margin-bottom: 10px;
}

ul a {
    text-decoration: none;
    color: var(--link-color);
    background-color: var(--link-background);
    padding: 5px 10px;
    border-radius: 8px;
    transition:
        color 0.3s ease,
        background-color 0.3s ease,
        padding 0.3s ease;
        /*margin: .4s ease-in-out;*/
    color-scheme: light dark;
    /*margin-inline-start: 0;*/
}

ul a:hover {
    padding: 6px 12px;
    /*margin: -1.3px;*/
    background-color: var(--link-hover-background);
}

.skrime-affiliate {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    color-scheme: light dark;
}

.skrime-affiliate img {
    max-width: 100px;
    height: auto;
    margin-right: 15px;
}

.skrime-affiliate a {
    color: var(--skrime-link-color);
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
    color-scheme: light dark;
}

.skrime-affiliate a:hover {
    color: var(--skrime-link-color);
    text-decoration: underline;
}

@media (max-width: 768px) {
    main {
        padding: 15px;
    }
    .skrime-affiliate {
        flex-direction: column;
        text-align: center;
    }
    .skrime-affiliate img {
        margin-bottom: 10px;
        margin-right: 0;
    }
}

.aitchsystems-affiliate a img {
    max-width: 75vw;
}

.affiliate-section a:hover {
    scale: 1.1;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9.87px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.project-card {
    background-color: var(--project-card-background);
    border: 1px solid var(--project-card-border);
    border-radius: 12px;
    padding: 11.111px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    color-scheme: light dark;
}

.project-card:hover {
    transform: translateY(-1.75px);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.25px;
}

.project-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-right: 15px;
    object-fit: cover;
    flex-shrink: 0;
}

.project-card-text-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-card-title {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--project-card-title-color);
    margin: 0;
}

.project-card-description {
    font-size: 0.9em;
    color: var(--project-card-description-color);
    margin: 0;
    flex-grow: 1;
}

.project-card-categories {
    margin-top: 10px;
    margin-bottom: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-card-category {
    background-color: var(--project-card-category-background);
    color: var(--project-card-category-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    white-space: nowrap;
}

.project-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.1px;
}

.project-card-downloads {
    font-size: 0.85em;
    color: var(--project-card-description-color);
}

.project-card-link {
    display: inline-block;
    background-color: var(--project-card-link-background);
    color: var(--project-card-link-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s ease;
    color-scheme: light dark;
}

.project-card-link:hover {
    background-color: var(--project-card-link-hover-background);
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

footer {
    background-color: var(--footer-background);
    color: var(--footer-color);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    text-align: center;
    border-top-left-radius: var(--border-radius-layout);
    border-top-right-radius: var(--border-radius-layout);
    color-scheme: light dark;
}

footer a {
    color: var(--footer-link-color);
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.5s ease;
    color-scheme: light dark;
}

footer a:hover {
    color: var(--footer-link-hover-color);
}

#github-activity-streak {
    background-color: var(--github-streak-background);
    border: 1px solid var(--github-streak-border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    color-scheme: light dark;
    display: flex;
    justify-content: center;
    align-items: center;
}

#github-activity-streak p {
    margin: 0;
    font-size: 1.2em;
    color: var(--github-streak-color);
    font-weight: var(--github-streak-font-weight);
}

#github-activity-streak p strong {
    font-size: 1.3em;
    color: var(--github-streak-color);
}

#chess-com-last-online {
    background-color: var(--chess-last-online-background);
    border: 1px solid var(--chess-last-online-border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    color-scheme: light dark;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chess-com-last-online p {
    margin: 0;
    font-size: 1.2em;
    color: var(--chess-last-online-color);
    font-weight: var(--chess-last-online-font-weight);
}

#chess-com-last-online p strong {
    font-size: 1.3em;
    color: var(--chess-last-online-color);
}

#chess-com-dynamic-last-seen {
    background-color: var(--chess-dynamic-last-seen-background);
    border: 1px solid var(--chess-dynamic-last-seen-border);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    color-scheme: light dark;
    display: flex;
    justify-content: center;
    align-items: center;
}

#chess-com-dynamic-last-seen p {
    margin: 0;
    font-size: 1.2em;
    color: var(--chess-dynamic-last-seen-color);
    font-weight: var(--chess-dynamic-last-seen-font-weight);
}

#chess-com-dynamic-last-seen p strong {
    font-size: 1.3em;
    color: var(--chess-dynamic-last-seen-color);
}

.hidden { visibility: hidden !important; display: none !important; max-height: 0 !important; height: auto !important;}