:root {
    --clr-prim: #09090b;
    --clr-sec: #1e293b;
    --clr-other: #334155;
    --clr-text: #cbd5e1;
    --clr-titles: #e2e8f0;
    --clr-side: #cbd5e1;
    --filter: invert(96%) sepia(98%) saturate(507%) hue-rotate(175deg) brightness(95%) contrast(85%);
    --box-shadow: 5px 5px 4px 4px rgb(0, 0, 0, 0.3);

    --gap-main: 1rem;
    --border-radius: 16px;
    --header-footer-height: clamp(100px, 100px + 5vh, 150px);
    --font-size: clamp(0.55rem, 0.6rem + 0.2vw, 1.2rem);
}

:root.light {
    --clr-prim: #bfdbfe;
    --clr-sec: #dbeafe;
    --clr-other: #2563eb;
    --clr-text: #172554;
    --clr-titles: #1d4ed8;
    --clr-side: #cbd5e1;
    --filter: invert(11%) sepia(49%) saturate(2532%) hue-rotate(211deg) brightness(94%) contrast(94%);
    --box-shadow: 5px 5px 4px 4px rgb(2, 27, 70, 0.4);
}

*,
*::before,
*::after {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    color: var(--clr-text);
    line-height: 1.5;
}

*:not(i) {
    font-family: quicksand;
}

ul,
li {
    list-style-type: none;
}

a {
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--clr-titles)
}

body {
    background-color: var(--clr-prim);
    min-height: 100vh;
}

.wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: var(--font-size);
}

.header {
    background-color: var(--clr-sec);
    filter: drop-shadow(5px 4px 4px rgb(2, 27, 60, 0.4));
    padding: var(--gap-main) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-main);
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 calc(2 * var(--gap-main));
    height: 100%;
}

.archive-title {
    font-size: 2.5em;
    margin: 0;
}

.header-buttons {
    display: flex;
    gap: 2em;
}

.header-button i {
    font-size: 2.5em;
    transition: transform 0.2s ease;
}

.header-button:hover i {
    transform: scale(1.1);
}

.main {
    flex: 1;
    padding: calc(2 * var(--gap-main));
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.main h2 {
    margin: calc(2 * var(--gap-main)) 0 var(--gap-main) 0;
    font-size: 1.8em;
}

.projects {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-auto-rows: max-content;
    gap: calc(3 * var(--gap-main));
    margin-bottom: calc(3 * var(--gap-main));
}

.card {
    position: relative;
    background-color: var(--clr-sec);
    display: grid;
    grid-template-rows: 2em 250px 1fr 3em;
    gap: 1em;
    padding: 1em 1.5em;
    border-radius: var(--border-radius);
    font-size: 1.3em;
    box-shadow: var(--box-shadow);
}

.card-img-link {
    place-self: center;
}

.card-img {
    position: relative;
    height: 250px;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.2s ease-in-out;
}

.card-img:hover {
    transform: translate(7px, -7px) scale(1.03);
    box-shadow: 6px 6px 4px 4px rgb(0, 0, 0, 0.9);
    opacity: 0.7;
    cursor: pointer;
}

.card-links {
    place-self: end;
}

.card-links>* {
    padding: 0.25em;
}

.card::before {
    position: absolute;
    content: '';
    z-index: -1;
    top: 0%;
    left: -2px;
    height: 100%;
    width: 100%;
    background-color: var(--clr-titles);
    border-radius: var(--border-radius);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(3 * var(--gap-main));
}

.content-column {
    display: flex;
    flex-direction: column;
}

.other {
    display: flex;
    flex-direction: column;
    align-self: start;
    background-color: var(--clr-sec);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1em;
    height: fit-content;
}

.other__item {
    display: flex;
    flex-direction: column;
    padding: 1.5em 0.7em;
    gap: 0.5em;
}

.other__item:not(:last-child) {
    border-bottom: 2px solid var(--clr-prim);
}

.other__item-header {
    display: flex;
    align-items: center;
    gap: 1em;
}

.other__item-title {
    color: var(--clr-titles);
    flex: 1;
}

.other__item-org {
    text-align: center;
}

.other__item-completion {
    font-style: italic;
}

.other__item-desc {
    font-size: 1.2em;
}

.other__item-link {
    margin-right: 0.2em;
    margin-left: auto;
}

.other__item-link img {
    width: 2em;
    height: 2em;
    filter: var(--filter);
}

.footer {
    background-color: var(--clr-sec);
    display: grid;
    place-content: center;
    font-size: 1.3em;
    padding: var(--gap-main) 0;
}

.footer-text {
    display: flex;
    align-items: center;
    gap: 0.5em;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 calc(2 * var(--gap-main));
    width: 100%;
}

.footer i {
    font-size: 1em;
}

a:not(:has(img)) {
    transition: all 0.035s ease-in-out;
}

a:not(:has(img)):hover {
    transform: translate(8%, -8%) scale(1.1);
}

.card-links a {
    display: inline-block;
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: calc(2 * var(--gap-main));
    }
}

@media (max-width: 768px) {
    .row {
        flex-direction: column;
        gap: 1em;
        text-align: center;
        padding: 0 var(--gap-main);
    }

    .archive-title {
        font-size: 2em;
    }

    .header-buttons {
        justify-content: center;
    }

    .main {
        padding: var(--gap-main);
    }

    .projects {
        grid-template-columns: 1fr;
        gap: var(--gap-main);
    }

    .footer-text {
        padding: 0 var(--gap-main);
    }
}

@media (max-width: 480px) {
    :root {
        --gap-main: 0.8rem;
    }

    .header-button i {
        font-size: 2em;
    }

    .archive-title {
        font-size: 1.8em;
    }

    .main h2 {
        font-size: 1.5em;
        text-align: center;
    }

    .card {
        padding: 1em;
        font-size: 1.1em;
    }

    .footer-text {
        flex-direction: column;
        gap: 0.5em;
    }

    .other__item-header {
        flex-direction: column;
        gap: 0.5em;
        text-align: center;
    }

    .other__item-link {
        margin: 0.5em auto 0 auto;
    }
}