:root {
    --color-accent: #d9814e;
    --color-highlight: #8c583a;
    --color-link: #472e1f;
    --color-text: #0b0c0d;
    --color-background: #f2f2f2;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif;
}

body {
    background-color: var(--color-background);
    color: var(--color-text);
    padding: 4rem 2rem;
    display: grid;
    grid-template: repeat(1, minmax(0,1fr));
    gap: 3rem;
}

body a {
    color: var(--color-link);
}

.header-image {
    width: 30%;
    overflow: hidden;
    object-fit: cover;
    border-radius: 50%;
}

nav a,
header a {
    text-decoration: none;
    color: var(--color-text);
}

p {
    line-height: 1.5rem;
}

header,
main,
footer {
    position: relative;
    z-index: 10;
}

header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;
}

header h1,
header h4,
.darkText {
    color: var(--color-text);
}

header a {
    text-decoration: none;
}

header h1 {
    font-weight: 600;
    border-bottom: 2px dotted var(--color-link);
    max-width: fit-content;
}

header h4 {
    font-weight: 400;
}

nav a {
    font-size: 0.9rem;
}

.social-link {
    font-size: 1.2rem;
    color: var(--color-link);
    text-decoration: none;
    transition-duration: 200ms;
}

.social-link:hover {
    color: var(--color-accent);
}

.social-link-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

main {
    display: flex;
    flex-direction: column;
    gap: 5rem;
}

main a {
    text-decoration: none;
}

section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

section h2,
.experience-card h3 {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 500;
}

.sticky-header {
    position: sticky;
    top: 0;
}

.sticky-header h2 {
    position: relative;
    padding: 1rem 0rem;
    z-index: 2;
    border-bottom: 2px dotted var(--color-link);
}

.sticky-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-background);
    opacity: 0.8;
}

.about-contents,
.skills-contents {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-contents p,
.skills-contents p {
    font-size: 1rem;
}

.resume-text {
    color: var(--color-link);
    text-decoration: none;
    transition-duration: 200ms;
    text-align: center;
}

.resume-text:hover {
    color: var(--color-accent);
}

.anchor-text {
    color: var(--color-link);
    text-decoration: none;
    transition-duration: 200ms;
}

.anchor-text:hover {
    color: var(--color-accent);
}

.skills-contents,
.publication-contents,
.project-contents {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.publication-card,
.project-card {
    display: grid;
    grid-template: repeat(1, minmax(0,1fr));
}

.card-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.published,
.skills-titles {
    opacity: 0.7;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.publication-card p {
    font-size: 0.9rem;
    gap: 0.5rem;
}

.project-card {
    gap: 1rem;
}

.card-header {
    font-weight: 400;
    font-size: 1rem;
    color: var(--color-link);
}

.card-header:hover {
    color: var(--color-accent);
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: var(--color-accent);
    padding-bottom: 2rem;
}

.tag-container-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    padding: 0.25rem;
    border-radius: 0.25rem;
    color: var(--color-accent);
    padding-bottom: 1rem;
}

.tag {
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: var(--color-link);
}

.tag p {
    font-size: 0.7rem;
    color: var(--color-background);
}

.tag:hover {
    opacity: 0.7;
}

.project-image-container {
    max-width: 200px;
    overflow: hidden;
    display: grid;
    flex-direction: column;
    place-items: right;
    aspect-ratio: 16 /9;
    order: 2;
    border-radius: 0.25rem;
}

.project-image-container img {
    object-fit: cover;
    width: 150%;
    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:hover {
    color: var(--color-accent)
}

.project-archive-link span {
    transition-duration: 200ms;
}
.project-archive-link:hover span {
    color: var(--color-accent);
    padding-left: 0.5rem;
}

.project-archive-link::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 1px;
    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;
    flex-direction: column;
    gap: 2rem;
}

.scroll-to-top {
    text-decoration: none;
    color: var(--color-background);
    background: var(--color-link);
    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;
    }

    header h1 {
        font-size: 3.2rem;
    }

    header h4 {
        font-size: 1.2rem;
    }

    header p {
        max-width: 240px;
    }

    
    .social-link-container { 
        gap: 1.5rem;
    }

    .social-link-container i {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) {
    body {
        grid-template-columns: repeat(2, minmax(0,1fr));
        gap: 2rem;
        padding: 4rem;
        padding-top: 0;
    }

    header {
        position: sticky;
        top: 0;
        margin-left: auto;
        height: 100vh;
        padding-bottom: 6rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header h4 {
        font-size: 0.85rem;
    }

    header p {
        max-width: 240px;
    }
    
    .header-image {
        width: 20%
    }

    nav {
        display: flex;
        flex-direction: column;
    }

    .social-link-container { 
        gap: 1.5rem;

    }

    .social-link-container i {
        font-size: 2rem;
    }

    header, 
    main {
        max-width: 600px;
        width: 100%;
        height: fit-content;
        padding-top: 6rem;
    }

    main {
        margin-right: auto;
    }

    .sticky-header h2 {
        font-size: 2rem;
        text-align: center;
    }

    footer {
        grid-column: span 2 / span 2;
        flex-direction: row;
        max-width: 1200px;
        margin: -4rem auto;
        width: 100%;
    }
}

