:root {
    --color-accent: #fd87e4;
    --background-accent: rgba(131, 38, 131, 0.24);
    --color-highlight: #ff94b4;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: #290000;
    color: #fddfea;
    padding: 4rem 2rem;
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 8rem;
}

p, h2 {
    line-height: 1.5rem;
}

p::selection,
h1::selection,
h2::selection,
h3::selection,
h4::selection,
h5::selection,
h6::selection {
    background: var(--color-accent);
    color: #0f172a;
}

.underlay {
    position: fixed;
    background: #172554;
    inset: 0;
    opacity: 0.15;
}

header,
main,
footer {
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
}

header h1, 
header h4,
.lightText
{
    color: var(--color-highlight)
}

header a {
    text-decoration: none;
}

header h1 {
    font-weight: 600;
}

header h4 {
    font-weight: 400;
}

nav a {
    font-size: 0.9rem;
}

.social-link {
    font-size: 1.2rem;
    color: inherit;
    text-decoration: none;
    transition-duration: 200ms;
}

.social-link-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link:hover {
    color: var(--color-highlight);
}

main {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

section {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

section h2,
.experience-card h3 {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;    
}

.sticky-header {
    position: sticky;
    top: 0;
    padding: 1rem 0;
}

.sticky-header h2 {
    position: relative;
    z-index: 2;
}

.sticky-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #101A31;
    opacity: 0.7;
}

.about-contents {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-contents p {
    font-size: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.anchor-text {
    color: var(--color-highlight);
    text-decoration: none;
    transition-duration: 200ms;
}

.anchor-text:hover {
    color: var(--color-accent);
}

.experience-contents,
.project-contents {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.experience-card,
.project-card {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.experience-card {
    gap: 0.5rem;
}

.project-card {
    gap: 1rem;
}

.card-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tenure {
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.experience-card p {
    font-size: 0.9rem;
}

.card-header {
    font-weight: 400;
    font-size: 1rem;
}

.anchor-icon {
    padding-left: 0.5rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

    border-radius: 0.25rem;
    color: var(--color-accent);
}

.tag {
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--background-accent);
}

.tag p {
    font-size: 0.8rem;
}

.project-image-container {
    max-width: 200px;
    overflow: hidden;
    display: grid;
    flex-direction: center;
    aspect-ratio: 16 / 9;
    order: 2;
    border-radius: 0.25rem;
}

.project-image-container img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.project-stat-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.project-archive-link {
    position: relative;
    color: var(--color-highlight);
    text-decoration: none;
    transition-duration: 200ms;
    margin-right: auto;
}

.project-archive-link span {
    transition-duration: 200ms;
}

.project-archive-link:hover span {
    padding-left: 0.5rem;
}

.project-archive-link::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    bottom: 0;
    background: transparent;
    transition-duration: 200ms;
}

.project-archive-link:hover::after {
    background: var(--color-accent);
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

footer p {
    font-size: 0.9rem;
}

.scroll-to-top {
    text-decoration: none;
    color: var(--color-accent);
    background: var(--background-accent);
    padding: 0 0.75rem;
    aspect-ratio: 1/1;
    display: grid;
    place-items: center;
    border-radius: 100%;
    overflow: hidden;
    transition-duration: 200ms;
}

.scroll-to-top:hover {
    opacity: 0.6;
}

@media (min-width: 640px) {
    .project-card,
    .experience-card {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .card-column {
        grid-column: span 3 / span 3;
    }

    .project-image-container {
        order: 0;
    }

    header {
        max-width: unset;
    }

    .social-link-container {
        gap: 2rem;
    }

    .social-link-container i {
        font-size: 2rem;
    }

    header h1 {
        font-size: 3rem;
    }

    header h4 {
        font-size: 1.4rem;
    }

    header p {
        max-width: 300px;
    }

}

@media (min-width: 1024px) {
    body {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        padding: 6rem;
        padding-top: 0;
    }

    header {
        position: sticky;
        top: 0;
        margin-left: auto;
        height: 100vh;
        padding-bottom: 6rem;
    }

    header h1 {
        font-size: 3rem;
    }

    header h4 {
        font-size: 1.4rem;
    }

    header p {
        max-width: 300px;
    }

    nav {
        display: flex;
        flex-direction: column;
        flex: 1;
        gap: 0.5rem;
    }

    nav a {
        font-size: 1rem;
    }

    .social-link-container {
        gap: 2rem;
    }

    .social-link-container i {
        font-size: 2rem;
    }

    header,
    main {
        padding-top: 6rem;
        max-width: 600px;
        width: 100%;
    }

    main {
        margin-right: auto;
    }

    .sticky-header {
        display: none;
    }

    footer {
        grid-column: span 2 / span 2;
        flex-direction: row;
        max-width: 1200px;
        margin: 0 auto;
        width: 100%;
    }
}