:root {
    --primary-color: #8990ff;
    --muted-primary: #9a94b0;
    --bright-color: white;
    --very-dark-color: #0a0f1a;
    --dark-color: #1a2a3f;
    --active-block-color: var(--primary-color);

    --grid-gap: 5px;
    --blocks-in-column: 80;
    --blocks-in-row: 50;

    --block-size-v-fit: calc((100vh - ((var(--blocks-in-column) - 1) * var(--grid-gap)) - (2 * var(--grid-gap))) / var(--blocks-in-column));
    --block-size-h-fit: calc((100vw - ((var(--blocks-in-row) - 1) * var(--grid-gap)) - (2 * var(--grid-gap))) / var(--blocks-in-row));
}

body {
    background: linear-gradient(0deg, var(--very-dark-color) 0%, var(--dark-color) 100%);
    color: var(--muted-primary);
    font-family: "Courier", "Courier New", serif;

    margin: 0;
    padding: 0;
    height: 100vh;

    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;

    overflow: hidden;
}

h1, h2, h3, h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;

    color: var(--primary-color);
}

h5, h6, p {
    margin-top: 0.5rem;
    margin-bottom: 0.25rem;
}

b {
    color: var(--primary-color);
}

h1 {
    font-size: 5rem;

    color: var(--bright-color);
}

h2 {
    font-size: 2rem;
}

.title h2 {
    margin-top: 0;
}

a {
    color: inherit;
}

svg path {
    fill: var(--primary-color);
}

svg.scroll-icon path {
    fill: var(--bright-color);
}

svg.header-icon {
    width: 1.5rem;
    height: 1.5rem;
}

svg.inline-icon {
    width: 1rem;
    height: 1rem;
}

svg.skills-category-header-icon {
    width: 1.5rem;
    height: 1.5rem;
}

.headshot {
    width: 12rem;
    height: 12rem;

    object-fit: cover;
    object-position: 50% 30%;

    border-radius: 50%;
    border: 3px solid var(--bright-color);

    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.grid {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;

    width: 100%;
    height: 100%;

    display: grid;

    gap: var(--grid-gap);
    padding: var(--grid-gap);
    box-sizing: border-box;

    grid-template-rows: repeat(var(--blocks-in-column), auto);
    grid-auto-flow: column;
    grid-auto-columns: max-content;
}

.block {
    width: var(--block-size-v-fit);
    aspect-ratio: 1/1;

    background: linear-gradient(180deg, #0a0f1a 0%, #1a2a3f 100%);
}

.active-block {
    background: var(--active-block-color);
}

.overview {
    min-width: 320px;
    height: 100%;

    flex: 1 1 40%;
    padding: 5%;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    text-align: center;
}

.overview .divider ~ div {
    margin-bottom: 0.5rem;
}

.entry-header, .entry-subheader {
    display: flex;
    justify-content: space-between;
    align-items: center;

    width: 100%;
}

.entry-header {
    margin-bottom: 0;
}

.entry-title {
    color: var(--bright-color);
}

.entry-organization {
    color: var(--primary-color);
}

.entry-organization a {
    text-decoration: none;
}

.entry-subheader p {
    margin-top: 0;
}

.name {
    color: var(--bright-color);
}

.details {
    flex: 2 1 55%;
    padding: 30px;
    box-sizing: border-box;

    height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;

    overflow-y: auto;
}

.divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;

    background-color: var(--muted-primary);
}

.v-divider {
    width: 1px;
    height: 100%;
    margin: 0 0.5rem;

    background-color: var(--muted-primary);
}

.email a {
    text-decoration: none;

    color: var(--bright-color);

    display: flex;
    align-items: center;
    gap: 10px;
}

.email svg path {
    fill: var(--bright-color);
}

.location p {
    display: flex;
    align-items: center;
    gap: 5px;
}

.location svg path {
    fill: var(--muted-primary);
}

.skills-categories {
    display: grid;

    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);

    gap: 10px;
}

.skills-category.other {
    grid-column: span 2;
}

.skills-category.other .skills-category-header {
    margin-top: 0;
}

.skill-list {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap
}

.skill {
    box-sizing: border-box;

    border: 1px solid var(--muted-primary);
    border-radius: 9999px;

    background-color: var(--very-dark-color);
    color: var(--muted-primary);

    padding: 0.25rem 0.625rem 0.25rem 0.625rem;
    margin-right: 0.375rem;
    margin-bottom: 0.5rem;

    white-space: nowrap;
}

.download-resume {
    text-decoration: none;

    background-color: var(--primary-color);
    color: var(--bright-color);

    border-radius: 9999px;

    padding: 0.5rem 1.25rem 0.5rem 1.25rem;
    margin: 2rem;

    white-space: nowrap;

    align-self: center;
}

.primary-skill {
    border: 1px solid var(--primary-color) !important;

    background-color: var(--dark-color) !important;
    color: var(--primary-color) !important;
}

.mobile-only {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

.scroll-up-icon-container {
    width: 100%;

    display: flex;
    justify-content: center;
}

.full-width {
    width: 100%;
}

.var-height-icon {
    height: 1.5rem;
}

.scroll-icon {
    opacity: 0;
    transition: opacity 1s ease;
}

@media (max-width: 768px) {
    body {
        overflow: auto;

        height: 100%;
    }

    .var-height-icon {
        height: 3rem;
    }

    .overview {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        height: 95vh;
    }

    .details {
        flex: 0 0 100%;
        max-width: 100%;
        width: 100%;
        height: auto;

        overflow: hidden;
    }

    .mobile-only {
        display: block !important;
    }

    .desktop-only {
        display: none !important;
    }

    .grid {
        grid-template-columns: repeat(var(--blocks-in-row), auto);
        grid-auto-flow: row;
        grid-auto-rows: max-content;
    }

    .block {
        width: var(--block-size-h-fit);
    }
}
