
:root.theme-cozy {
    --header-footer-bg: #c7e9fb;
    --main-bg: #f5f9ff;
    --aside-bg: #e6f4ea;
    --text-color: #4a4a4a;
    --api-bg: #e1f3ff;
    --api-border: #b8e0ff;
    --highlight-color: #8eb5fd;
    --header-text-color: #000000;
}

:root.theme-cyberpunk {
    --header-footer-bg: #1a1a2e;
    --main-bg: #0f3460;
    --aside-bg: #16213e;
    --text-color: #e94560;
    --api-bg: #0f3460;
    --api-border: #e94560;
    --highlight-color: #8c52ff;
    --header-text-color: #e94560;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Roboto, "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--main-bg);
    color: var(--text-color);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1em;
    background-color: var(--header-footer-bg);
    text-align: center;
    border-bottom: 2px solid var(--api-border);
    border-top: 2px solid var(--api-border);
    color: var(--text-color);
}

header h1 {
    margin: 0;
}

a {
    color: var(--highlight-color);
    text-decoration: none;
    margin-inline: 5px;
}

a:hover {
    text-decoration: underline;
}

header,
footer {
    background-color: var(--header-footer-bg);
    text-align: center;
    border-bottom: 2px solid var(--api-border);
    border-top: 2px solid var(--api-border);
}

footer {
    margin-top: auto;
    padding: 0.15em 1em;
}

footer p {
    margin: 0;
    line-height: 1.5;
}

main {
    display: grid;
    grid-template-columns: minmax(230px, 22%) minmax(0, 1fr);
    gap: 1em;
    padding: 1em;
    align-items: flex-start;
}


aside {
    width: auto;
    padding: 1.5em;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
    margin: 0;
}

aside.left-aside {
    background-color: var(--aside-bg);
}


.aside-section {
    background-color: var(--api-bg);
    border-radius: 8px;
    padding: 1em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.aside-section h2,
.aside-section h3 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: var(--highlight-color);
}

.aside-section h2 {
    font-size: 1.4em;
}

.aside-section h3 {
    font-size: 1em;
}

.aside-section p {
    margin: 0 0 1em;
    line-height: 1.55;
}

.aside-section p:last-child {
    margin-bottom: 0;
}

.aside-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aside-section ul li {
    margin-bottom: 1em;
}

.aside-section ul li:last-child {
    margin-bottom: 0;
}

.aside-section ul li a {
    color: var(--highlight-color);
    font-weight: bold;
}

.primary-column {
    display: flex;
    margin: 0;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    align-items: center;
}

.main-content {
    padding: 2em;
    background-color: var(--main-bg);
    color: var(--text-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 94%;
    text-align: left;
}

.hub-overview {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--header-footer-bg);
    border-radius: 8px;
    padding: 1em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.hub-overview h2,
.hub-overview p {
    margin: 0;
}

.hub-overview h2 {
    color: var(--highlight-color);
    margin-bottom: 0.35em;
    font-size: 1.8em;
}

.site-image-container {
    margin: 1.5em auto;
    max-width: 660px;
    padding: 1em;
    border-radius: 8px;
    background-color: var(--api-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.site-image-container img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: cover;
    border-radius: 6px;
}

.projects-heading {
    margin: 1.5em 0 1em;
    text-align: center;
}

.projects-heading h2 {
    color: var(--highlight-color);
    margin: 0 0 0.35em;
    font-size: 1.8em;
}

.projects-heading p {
    margin: 0;
    line-height: 1.5;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15em;
}

.project-card {
    min-width: 0;
    background-color: var(--api-bg);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-card > img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    background: var(--main-bg);
    border-bottom: 1px solid var(--api-border);
}

.project-card-body {
    padding: 0.9em;
    display: flex;
    flex-direction: column;
    gap: 0.65em;
    flex: 1;
}

.project-card h3 {
    margin: 0;
    color: var(--highlight-color);
    font-size: 1.05em;
}

.project-card p {
    margin: 0;
    line-height: 1.45;
    font-size: 0.9em;
}

.project-card .project-tech {
    font-size: 0.78em;
    opacity: 0.85;
}

.project-links {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
}

.project-links a {
    margin-inline: 0;
    font-weight: 700;
    font-size: 0.86em;
}

.theme-switcher {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 1em;
}

.theme-switcher label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-family: inherit;
    color: var(--text-color);
}

.theme-label {
    display: inline-block;
    min-width: 1.2em;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    font-weight: normal;
    line-height: 1;
    text-align: center;
}

.theme-switcher input[type="checkbox"] {
    display: none;
}

.theme-switcher .slider {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    background-color: var(--api-bg);
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.theme-switcher .slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--text-color);
    border-radius: 50%;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    transition: left 0.3s ease;
}

.theme-switcher input[type="checkbox"]:checked + .slider {
    background-color: var(--highlight-color);
}

.theme-switcher input[type="checkbox"]:checked + .slider::before {
    left: calc(100% - 25px);
}


@media (max-width: 1100px) {
    main {
        grid-template-columns: 1fr;
    }

    .left-aside,
    .primary-column {
        width: 100%;
        max-width: none;
    }

    .main-content {
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    body {
        background-attachment: scroll;
    }

    header {
        flex-direction: column;
        gap: 0.75em;
        padding: 0.85em;
    }

    header h1 {
        font-size: 1.45rem;
        order: 1;
    }

    .theme-switcher {
        position: static;
        transform: none;
    }

    main {
        grid-template-columns: 1fr;
        padding: 0.65em;
        gap: 0.75em;
    }

    .left-aside,
    .primary-column {
        width: 100%;
        max-width: none;
    }

    aside {
        padding: 0.85em;
        gap: 0.85em;
    }

    .main-content {
        padding: 0.85em;
        width: 100%;
    }

    .site-image-container {
        margin: 1em auto;
        padding: 0.65em;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.85em;
    }

    .project-card > img {
        max-height: 230px;
    }
}

.site-title-link {
    color: inherit;
    text-decoration: none;
}

.site-title-link:hover,
.site-title-link:focus-visible {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
}
.contact-link {
    appearance: none;
    border: 0;
    padding: 0;
    margin-inline: 5px;
    background: transparent;
    color: var(--highlight-color);
    font: inherit;
    cursor: pointer;
}

.contact-link:hover,
.contact-link:focus-visible {
    text-decoration: underline;
}
