:root {
    --glass_background: rgba(80, 80, 80, 0.2);
    --glass_border: rgba(255, 255, 255, 0.2);
    --hover_background: rgba(100, 100, 100, 0.3);
    --hover_border: rgba(255, 255, 255, 0.4);
    --active_background: rgba(80, 80, 80, 0.5);

    --section_padding: 60px 40px;
    --border_radius: 20px;
    --button_radius: 100px;

    --font_title: 64px;
    --font_section: 48px;
    --font_body: 16px;
    --font_small: 14px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    overflow-x: hidden;
}

html {
    height: 100%;
    font-family: 'Inter', sans-serif;
    color: white;
}

main {
    text-align: center;
    background: linear-gradient(to bottom, #000000, #292929);
    padding-top: 90px;
}

.glass {
    background: var(--glass_background);
    backdrop-filter: blur(10px);
    border: 0.5px solid var(--glass_border);
}

.hover_glow:hover {
    background: var(--hover_background);
    border-color: var(--hover_border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

nav {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    text-transform: uppercase;
}

.homepage_link {
    padding: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
}

.homepage_link:hover { 
    background: transparent; 
    opacity: 0.5; 
}

.page_link {
    color: white;
    text-decoration: none;
    font-weight: 400;
    padding: 10px 15px;
    border-radius: var(--border_radius);
    transition: all 0.3s ease;
}

.page_link:hover { 
    background: white; 
    color: black; 
}

.page_link.active {
    background: var(--glass_background);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass_border);
}

.page_link.active:hover { 
    background: var(--glass_background); 
    color: white; 
}

.homepage_intro {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 0 60px;
}

.homepage_title {
    font-weight: 300;
    font-size: clamp(40px, 6vw, 80px);
}

.display_bar {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 50%;           
    margin: 0 auto;
    padding: 16px 40px;   
    border-radius: var(--button_radius);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 18px;
}

.homepage_summary {
    width: 70%;
    margin: 0 auto;
    font-size: var(--font_body); 
}

.scrolling_bar {
    padding: 30px 0;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 1px;
    font-size: var(--font_body);
    width: 100vw;
    position: relative;
}

.scrolling_content {
    display: inline-block;
    animation: scroll 45s linear infinite;
}

.scrolling_content span { 
    display: inline-block; 
    padding-right: 80px; 
}

@keyframes scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.homepage_projects {
    padding: var(--section_padding);
}

.title {
    font-weight: 300;
    font-size: clamp(36px, 5vw, var(--font_title));
    text-align: center;
    margin-bottom: 50px;
}

.section_title {
    font-weight: 300;
    font-size: clamp(28px, 4vw, var(--font_section));
    margin-bottom: 60px;
    text-align: center;
    grid-column: 1 / -1;
}

.projects_grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

.projects_grid a {
    color: white;
    text-decoration: none;
}

.projects_grid a:visited {
    color: white;
}

.circle_icon {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.circle_icon span {
    font-size: var(--font_small);
    padding: 10px;
    text-align: center;
}

.homepage_about_me {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--section_padding);
}

.home_headshot {
    grid-column: 1;
    grid-row: span 2;
    border-radius: var(--border_radius);
    overflow: hidden;
    min-height: 500px;
    position: relative;
    transition: all 0.3s ease;
    color: white;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.home_headshot img:first-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.home_headshot img:last-child {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
    opacity: 0;
    object-position: center 20%;
}

.home_headshot:hover img:first-child {
    opacity: 0;
}

.home_headshot:hover img:last-child {
    opacity: 1;
}

.home_headshot::before,
.home_headshot::after {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--border_radius);
}

.home_headshot::before {
    content: '';
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.home_headshot::after {
    content: 'My Story';
    top: 50%; 
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    font-weight: 500;
    z-index: 2;
}

.home_headshot:hover::before,
.home_headshot:hover::after { 
    opacity: 1; 
}

.home_headshot:hover { 
    border-color: var(--hover_border); 
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);  
}

.photo_card {
    border-radius: var(--border_radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo_card span {
    position: absolute;
    bottom: 20px;
    font-size: var(--font_body);
    padding: 8px 16px;
    border-radius: 10px;
}

.page_section {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--section_padding);
}

.about_grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    gap: 40px;
}

.headshot {
    border-radius: var(--border_radius);
    overflow: hidden;
}

.headshot img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: top; 
    display: block;
}

.about_story {
    border-radius: var(--border_radius);
    padding: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my_story { 
    font-weight: 600; 
    font-size: 24px; 
}

.about_summary { 
    font-size: 15px; 
    line-height: 2; 
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline_line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: grey;
    z-index: 0;
    top: 83px;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        white 8%,
        white 92%,
        transparent 100%
    );
}

.timeline_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    position: relative;
    z-index: 1;
    padding: 0 40px;
}

.timeline_node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.timeline_label {
    font-size: var(--font_small);
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: flex-end;
}

.timeline_dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
}

.timeline_year {
    font-size: var(--font_small);
    text-align: center;
}

.interests_grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    justify-items: center;
}

.hobbies_grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.hobby_card {
    border-radius: var(--border_radius);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 200px;
}

.hobby_card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    border-radius: var(--border_radius);
}

.hobby_card span {
    z-index: 1;
    font-size: var(--font_small);
    color: white;
    padding: 8px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.filter_bar {
    display: inline-flex;
    gap: 10px;
    border-radius: var(--button_radius);
    padding: 8px 16px;
    margin-bottom: 60px;
}

.button {
    font-size: var(--font_small);
    font-weight: 400;
    padding: 10px 20px;
    border-radius: var(--button_radius);
    transition: all 0.3s ease;
}

.button:hover {
    background: white;
    color: black;
}

.active_filter {
    background: var(--active_background);
    border: 1px solid var(--glass_border);
}

.active_filter:hover {
    background: var(--active_background);
    color: white;
}

.projects_cards_grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.project_card {
    border-radius: var(--border_radius);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 200px;
    transition: all 0.3s ease;
}

.project_card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    border-radius: var(--border_radius);
}

.project_card span {
    position: relative;
    z-index: 1;
    font-size: var(--font_small);
    padding: 8px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.resume_section {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--section_padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.resume_preview {
    width: 100%;
    border-radius: var(--border_radius);
    overflow: hidden;
    padding: 40px;
}

.resume_preview img {
    width: 100%;
    display: block;
}

.resume_bar {
    display: flex;
    align-items: center;
    gap: 20px;
}

.resume_toggle {
    display: inline-flex;
    gap: 10px;
    border-radius: var(--button_radius);
    padding: 6px 10px;
}

.download_button {
    font-size: var(--font_small);
    font-weight: 500;
    border-radius: var(--button_radius);
    padding: 14px 40px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.download_button:hover {
    background: white;
    color: black;
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    line-height: 2;
}

.footer_text { 
    text-align: left; 
}

.footer_title { 
    font-weight: 500; 
    margin-bottom: 8px; 
}

footer img { 
    flex-shrink: 0; 
}

@media (max-width: 768px) {
    :root {
        --section_padding: 40px 20px;
    }

    nav {
        padding: 10px 20px;
    }

    nav img {
        width: 60px;
        height: 60px;
    }

    .page_link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .display_bar {
        width: 80%;
        padding: 12px 20px;
        font-size: 16px;
    }

    .homepage_summary {
        width: 80%;
        font-size: 14px;
    }

    .scrolling_content {
        font-size: 14px;
    }

    .projects_grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .homepage_about_me {
        grid-template-columns: 1fr 1fr;
    }

    .home_headshot {
        grid-column: 1 / -1;
        grid-row: auto;
        min-height: 300px;
    }

    .photo_card {
        min-height: 200px;
        position: relative;
    }

    .about_grid {
        grid-template-columns: 1fr;
    }

    .timeline {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0 20px;
    }

    .timeline_line {
        display: none;
    }

    .timeline_grid {
        display: flex;
        flex-direction: column;
        width: 100%;
        position: relative;
    }

    .timeline_grid::before {
        content: '';
        position: absolute;
        left: 50%;
        top: 0;
        bottom: 0;
        width: 2px;
        background: grey;
        transform: translateX(-50%);
        mask-image: linear-gradient(
            to bottom,
            transparent 0%,
            white 8%,
            white 92%,
            transparent 100%
        );
    }

    .timeline_node {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 16px;
        padding: 16px 0;
        width: 100%;
    }

    .timeline_label {
        text-align: right;
        font-size: 13px;
        min-height: auto;
        display: block;
    }

    .timeline_dot {
        width: 12px;
        height: 12px;
        z-index: 1;
    }

    .timeline_year {
        text-align: left;
        font-size: 13px;
    }

    .interests_grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hobbies_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects_cards_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .resume_bar {
        gap: 12px;
    }

    .download_button {
        padding: 0 20px;
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    footer {
        padding: 24px 20px;
        font-size: 13px;
    }

    footer img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 520px) {
    :root {
        --section_padding: 30px 16px;
    }

    nav {
        padding: 10px 16px;
    }

    nav img {
        width: 50px;
        height: 50px;
    }

    .page_link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .display_bar {
        width: 80%;
        padding: 12px 20px;
        font-size: 12px;
    }

    .homepage_summary {
        width: 80%;
        font-size: 12px;
    }

    .scrolling_content {
        font-size: 12px;
    }

    .projects_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .photo_card {
        min-height: 160px;
        position: relative;
    }

    .interests_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hobbies_grid {
        grid-template-columns: 1fr;
    }

    .projects_cards_grid {
        grid-template-columns: 1fr;
    }

    .resume_bar {
        gap: 8px;
    }

    .download_button {
        padding: 0 16px;
        font-size: 12px;
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    .button {
        padding: 8px 12px;
    }

    footer {
        padding: 20px 16px;
        font-size: 12px;
    }

    footer img {
        width: 100px;
        height: 100px;
    }    

}

.animations_intro {
    text-align: center;
    font-size: var(--font_body);
    margin-bottom: 60px;
}

.animation_demo {
    margin-bottom: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.demo_title {
    font-size: 24px;
    font-weight: 500;
    text-align: center;
}