:root {
    --color-accent: #5eead4;
    --background-accent: rgba(45, 212, 191, .1);
    --color-highlight: #e2e8f0;
}

html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 2rem;                                   /*-Just pushes everything in a little-*/
    display: grid;                                        /*-I think we do this first because of mobile-first-*/
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 6rem;                                            /*-Spreads sections out-*/
}

h2 {
    font-size: 1rem;                                    /*-All p slightly smaller than normal size-*/
}

p {
    line-height: 1.5rem;
}

p::selection,                                             /*-Selects everything-*/
h1::selection,
h2::selection,
h3::selection,
h4::selection,
h5::selection,
h6::selection {
    background-color: var(--color-accent);
    color: #0f172a;
}

.underlay {                                               /*-Note this was all done to make the background color. It lays a translucent sheet over everything*/
    position: fixed;                                      /*-If you just set background then you can't change the transparency without effecting everything*/
    background: #172554;
    inset: 0;                                             /*-Stretches to all edges of the webpage-*/
    opacity: 0;
}

#torch-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;                                 /* Allows you to click through it*/
    z-index: 9999; 
}

header,
main,
footer {
    position: relative;                                   /*-Important for setting the z-index-*/
    z-index: 10;
}

header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 300px;                                     /*-Keeps everything on the left and about the same size as the h1 name-*/
}

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 {
    display: none;                                        /*-For the mobile display-*/
}

nav a {
    font-size: 0.9rem;
}

.social-link-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.social-link {
    font-size: 1.2rem;
    color: inherit;                                       /*-Inherists rest of the document-*/
    text-decoration: none;
    transition-duration: 200ms;
}

.social-link:hover {
    color: var(--color-highlight);
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

main {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}

section {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

section h2 {
    text-transform: uppercase;
    font-size: 1rem;                                      /*-Normal size-*/
    font-weight: 500;
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

.sticky-header {
    position: sticky;                                     /*-Creates bar on top with h2 header. Super easy-*/
    top: 0;                                               /*-Stick to the top-*/
    padding: 1rem 0;
}

.sticky-header h2 {
    position: relative;                                   /*-For z-index to work-*/
    z-index: 2;                                           /*-We need to do this because the h2 is now behind the pseudo element below-*/
}

.sticky-header::before {                                  /*-Creates element which allows us to make the background translucent and not the text as well-*/
    content: '';                                          /*-Pseudo element is a fake html element-*/
    position: absolute;
    inset: 0;                                             /*-To occupy the same dimensions as the parent element-*/
    background: #0f172a;
    opacity: 0.8;
} 

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.about-content p {
    font-size: 1rem;
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

.anchor-link {
    text-decoration: none;
}

.anchor-text {
    color: var(--color-highlight);
    transition: 200ms;
    text-decoration: none;
}

.anchor-text:hover {
    color: var(--color-accent);
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

.experience-content,
.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;
}

.tenure {
    opacity: 0.7;
    text-transform: uppercase;
}

.card-column {                                            /*-This part alone will be in flexible container in bigger screen size-*/
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card-p,
.tenure {
    font-size: 0.9rem;
}

.card-header {
    font-weight: 400;
    font-size: 1rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;                                
    color: var(--color-accent);
    
}

.tag {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    background: var(--background-accent);
}

.tag {
    font-size: 0.8rem;
}

.resume {
    text-align: center;
    text-decoration: none;
}

.project-image-container {
    max-width: 200px;
    overflow: hidden;
    display: grid;                                        /*-Easiest way to place image in center-*/
    place-items: center;
    aspect-ratio: 16 / 9;
    order: 2;                                             /*-Puts the image below the div (possible with grid layout)-*/
    border-radius: 0.25rem;
}

.project-image-container img {
    object-fit: cover;                                    /*-Covers every part of the container-*/ 
    width: 100%;
    height: 100%;
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

footer {
    display: flex;
    flex-direction: column;                                /*-For mobile. NOTE this was done after justify and align-*/
    gap: 2rem;
    justify-content: space-between;
    align-items: flex-start;                               /*-Alighns to the top of flex container, shrinking the background shade-*/ 
}

footer p {
    font-size: 0.9rem;
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/
/*-Everything before 640 is mobile and is all the css on top-*/
@media (min-width: 640px) {                                   /*-Everything after 640 does this-*/
    .project-card,
    .experience-card {                                   
        grid-template-columns: repeat(4, minmax(0, 1fr));     /*-Makes 4 columns in total-*/
    }

    .card-column {
        grid-column: span 3 / span 3;                         /*-Occupies 3 latter columns-*/
    }

    .project-image-container {
        order: 0;
    }

    header {
        max-width: unset;                                      /*-Disables the 300px max-width-*/
    }

    header h1 {
        font-size: 3rem;
        font-weight: 800;
    }
    header h4 {
        font-size: 1.3rem;
    }
    header p {
        max-width: 300px;
    }

    .social-link-container {
        gap: 1.5rem;
    }
    .social-link-container i {
        font-size: 1.4rem;
    }
}

/*-----------------------------------------------------------------------------------------------------------------------------------------*/

@media (min-width: 1024px) {                                  /*-Everything after 1024 does this-*/
    body {                                                      
        grid-template-columns: repeat(2, minmax(0, 1fr));  
        gap: 2rem;    
        padding: 0 6rem;                  
    }

    #torch-overlay {
        display: block;
    }

    /*-This part here ensures that when screen gets bigger and bigger, things don't keep stretching but keeps holding together-*/
    header,
    main {
        padding-top: 6rem;                                    /*-After sticking header down, you pad the top to push stuff down a bit-*/
        max-width: 600px;                                    
        width: 100%;                                        
    }
    main {
        margin-right: auto;                                    /*-Automatically allocates space to the right-hand side keeping it left-aligned-*/
    }

    .sticky-header {
        display: none;  
    }

    header {
        position: sticky;                                     /*-First you stick it down-*/
        top: 0;                                               /*-In this position-*/
        margin-left: auto;                                    /*-Automatically allocates space to the lefth-hand side keeping it right-aligned-*/
        height: fit-content;                                  /*-Give it the height it needs only, and not scroll entire height-*/   
        padding-bottom: 6rem;                                 /*-To balance 6rem top-*/
    }

    header h1 {
        font-size: 3rem;
    }

    header h4 {
        font-size: 1.3rem;
    }

    header p {
        max-width: 300px;
    }

    nav {
        display: flex;                                        /*-It was set to none before-*/
        flex-direction: column;
        gap: 1rem;
        padding-top: 4rem;
    }

    nav .anchor-text::before {
        content: "";
        width: 3rem;
        height: 1px;
        background-color: var(--color-highlight);
        margin-right: 0.75rem;
        display: inline-block;
    }

    nav .anchor-text {
        display: flex;
        align-items: center;
    }

    nav p {
        font-size: 1rem;
    }

    footer {
        padding: 1rem;
    }

    .social-link-container {
        position: fixed;
        bottom: 0;
        padding-bottom: 6rem;
    }

    .social-link-container i {
        font-size: 1.5rem;
    }

    .experience-card,
    .project-card {
        padding: 1rem;
        border: 1px solid transparent;
        border-radius: 0.5rem;
        transition-duration: 200ms;
    }
    
    .experience-card:hover,
    .project-card:hover {
        background: #1b2541;
        border: 1px solid #94a3b826;
        box-shadow: 0 0 20px 3px #0f172a;
    }

}








