:root {
    --beige: rgb(249, 246, 244);

    --white-dark: hsl(0, 0%, 90%);
    --white-medium: hsl(0, 0%, 95%);
    --white-light: hsl(0, 0%, 100%);

    --grey-light: hsl(0, 0%, 80%);
    --grey-medium: hsl(0, 0%, 70%);
    --grey-dark: hsl(0, 0%, 60%);

    --black-dark: hsl(0, 0%, 0%);
    --black-medium: hsl(0, 0%, 10%);
    --black-light: hsl(0, 0%, 20%);

    --primary-dark: hsl(158, 83%, 16%);
    --primary-medium: hsl(158, 83%, 24%);
    --primary-light: hsl(158, 83%, 32%);

    --header-height: 64px;
}
html {
    scroll-behavior: smooth;
    scrollbar-color: var(--primary-light) var(--white-dark);
    scrollbar-width: thin;
}
body {
    background-color: var(--white-light);
    width: 100%;
    display: flex;
    margin: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: "Montserrat", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }

.ani {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}
.ani.show {
    opacity: 1;
    transform: translateY(0);
}

header {
    height: var(--header-height);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.8); 
    transition: background-color 0.3s ease;

    display: flex;
    justify-content: center;
    align-items: center;
}
nav {
    display: none;
    margin: 0 auto;
    position: relative;
    z-index: 1001;
}
nav a {
    display: block;
    text-decoration: none;
    color: var(--black-light);
    padding: 0px 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}
nav a:hover {
    color: var(--primary-light);
}
header.active {
    background-color: rgb(40, 40, 40);
}
header.active h3 {
    color: white;
}
header #rubik {
    width: 44px;
    margin: 0 4px 0px 12px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
header #rubik img {
    width: 44px;
    margin: 0;
}
header #rubik:hover { transform: scale(1.10); }
header #rubik:active { transform: scale(.90); }
header h2 {
    font-weight: 500;
    margin: 0;
    margin-left: 4px;
}
#resume-link-container { 
    display: none;
    margin: 0 12px;
    padding: 8px 16px;
    background-color: var(--primary-light);
    border-radius: 20px;
}
#resume-link-container:hover {
    background-color: var(--primary-medium);
}
#resume-link-container a {
    color: white;
    font-size: 16px; 
    text-decoration: none;
    font-weight: light;
}
header #menu-icon {
    display: block;
    margin: 0 20px 0 auto;
    cursor: pointer;
}
header #menu-icon #bar1, 
header #menu-icon #bar2, 
header #menu-icon #bar3 {
    width: 24px;
    height: 2px;
    background-color: black;
    margin: 4px 0px;
    transition: all 0.4s ease;
}
header #menu-icon.change #bar1 { 
    transform: translate(0, 6px) rotate(-45deg); 
    background-color: white;
}
header #menu-icon.change #bar2 { opacity: 0; }
header #menu-icon.change #bar3 { 
    transform: translate(0, -6px) rotate(45deg); 
    background-color: white;
}
.menu-overlay {
    z-index: 999;
    position: fixed;
    inset: 0;
    background-color: rgb(40, 40, 40);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    visibility: hidden;
    opacity: 0;

    transition-duration: 0.2s;
}
.menu-overlay a {
    text-decoration: none;
    color: white;
    font-size: 28px;
    margin: 16px 0px;
}
.menu-overlay.active {
    visibility: visible;
    opacity: 1;
}

main {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ========== LANDING PAGE ========== */
#landing {
    width: 100%;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px); /* For mobile devices. Dynamic view height. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#headshot-container {
    background-color: white;
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 12px 30px;
}
#headshot {
    width: min(50vw, 260px);
    border-radius: 50%;
    margin: 0;
}

#intro {
    width: min(90%, 400px);
    margin: 0px 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: left;
}
#intro div {
    height: min(56px, 8vh); 
    display: flex; 
    align-items: center; 
    justify-content: center;
    text-align: center;
}
#intro h2 {
    font-size: min(28px, 4vh);
    font-weight: normal;
    width: fit-content;
    margin: 0;
}
#intro h4 {
    font-size: min(16px, 2.5vh);
    margin-top: min(12px, 1vh);
    margin-bottom: 0px;
    margin-right: auto;
    color: var(--primary-light);
}
#intro p {
    font-size: min(16px, 2.5vh);
    margin: 0px;
    color: var(--black-light);
}
#intro a {
    border-radius: 20px;
    padding: min(12px, 2vh); 
    margin-top: 16px;
    font-size: min(12px, 2vh);
    text-decoration: none;
    color: white;
    background-color: var(--primary-light);
    transition: transform 0.2s ease;
}
#intro a:hover {
    background-color: var(--primary-medium);
    transform: scale(1.05);
}
#intro a:active { transform: scale(.9); }

#arrow-container {
    position: absolute; 
    bottom: 8px;
    height: fit-content;
    cursor: pointer;
    opacity: 0.4;
}
#arrow-container:hover {
    opacity: 80%;
}
#arrow-container #arrow-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: black;
}
#arrow-container #arrow-link #arrow {
    width: 28px;
    height: 20px;
    animation: bounce 1.5s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

/* ========== WORK EXPERIENCE & EDUCATION ========== */
.timeline {
    padding-top: 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.timeline h1 {
    margin: 0;
}
#experience {  scroll-margin-top: calc(var(--header-height)); }
#experience-container {
    position: relative;
    margin: 24px auto;
    padding-left: 32px;
    width: min(80vw, 500px);
    border-left: 2px solid var(--grey-light);
}
.experience-dot {
    position: absolute;
    left: -41px;
    width: 16px;
    height: 16px;
    background: var(--primary-light);
    border-radius: 50%;
}
#education { scroll-margin-top: calc(var(--header-height)); }
#edu-container {
    position: relative;
    margin: 24px auto;
    padding-right: 32px;
    width: min(80vw, 500px);
    border-right: 2px solid var(--grey-light);
}
.edu-dot {
    position: absolute;
    right: -41px;
    width: 16px;
    height: 16px;
    background: var(--primary-light);
    border-radius: 50%;
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
}
.timeline-content {
    background: var(--white-medium);
    padding: 20px;
    border-radius: 12px;
}
.timeline-content h3 {
    margin: 0;
}
.timeline-content .date {
    font-size: 12px;
    color: var(--black-light);
}
.timeline-content p {
    margin: 10px 0px;
    color: var(--black-medium);
}
.timeline-content ul {
    margin: 10px 0px;
    padding-left: 16px;
    list-style-position:outside;
}

/* ========== SKILLS ========== */
#skills {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    margin-bottom: 40px; /* temporary */
}
#skills > h1 {
    margin: 0;
}
.skills-container {
    width: min(90%, 450px);
}
.skills-container h3 {
    margin: 28px 0 16px 0;
}
.skills-items {
    width: 100%;
    flex-wrap: wrap;
    display: flex;
    gap: 4px;
}
.skills-items > div {
    background-color: var(--white-medium);
    color: var(--black-light);
    padding: 4px 12px;
    border-radius: 16px;
    transition: background-color 0.5s ease, color 0.5s ease;
}
.skills-items > div:hover {
    background-color: var(--primary-light);
    color: white;
    border-color: var(--primary-medium);
}

/* ========== CONTACT ========== */
#contact {
    width: 100%;
    background-color: var(--white-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#contact #info {
    padding: 48px 0;
    display: flex;
    flex-direction: column;
    width: fit-content;
}
#contact #info h1 {
    margin: 0 0 4px 0;
    font-weight: 500;
}
#contact #info > a {
    text-decoration: none;
    color: black;
    display: inline-block;
    padding-bottom: 12px; 
}
#contact #info > a:hover {
    color: var(--primary-light);
}
#contact #info #links {
    display: flex;
    gap: 8px;
}
#contact #info #links > a {
    background-color: var(--primary-light);
    padding: 8px 16px;
    margin: 0;
    color: white;
    font-weight: 400;
    text-decoration: none;
    display:inline-block;
    border-radius: 24px;
}
#contact #info #links > a:hover {
    background-color: var(--primary-medium);
}

/* ========== FOOTER ========== */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: var(--primary-dark);
    scroll-margin-top: calc(var(--header-height));
}
footer p {
    font-size: 12px;
    color: white;
    font-weight: 100;
    font-style: italic;
}


@media (min-width: 850px) {
    header #menu-icon { display: none; }
    nav { display: flex; }
    #resume-link-container { display: block; }

    #landing {
        flex-direction: row;
        padding-bottom: 6%;
    }
    #headshot-container {
        margin: 0;
        flex-grow: 0;
        width: max(28vw, 400px);
    }
    #headshot {
        width: min(32vw, 300px);
    }
    #intro {
        margin-left: 0;
        margin-bottom: 0;
        flex-grow: 0;
        width: 36vw;
    }
    #intro h2 { font-size: 32px; }
    #intro h4 { font-size: 18px; }
    #intro p { font-size: 18px; }
    #intro a { font-size: 14px; }
}
