:root {
    --code_color: #282828;
    --personal_color: yellow;
    --main_color: var(--code_color)
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
}

body {
    background: var(--main_color);
    color: #fff;
}

a {
    color: inherit;
    font-weight: bold;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration 0.5s ease 0s;
}

a:hover {
    text-decoration-color: #fff; 
}

/*------------HEADER----------*/
.header {
    /* positioning */
    width: auto;
    height: 15vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2vh;
    padding: 2vh;
    position: sticky;
    top: 0vh;
    z-index: 1;
    /* style */
    background-color: #282828;
    opacity: 80%;
    padding: 0px;
}

#header_name {

    position: absolute;
    /* color: #fff; */
    /* text-decoration-color: linear-gradient(to right, #185050, #2d8a8a, #185050); */
    background-color: inherit;
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);
    width: 39vw;
    padding-left: 4vh;
    transition: transform 0.5s;
}

#header_name h1 {
    animation: header_name_animation 1s ease-in-out;
}

#header_name hr {
    border: 0.25vh solid #282828;
    animation: header_name_bar_animation 1s ease-in-out 1s forwards;
}

#header_name:hover {
    transform: scale(1.05);
}

#header_nothing {
    width: 40vw;
}

#header_animation {
    height: 15vh;
    padding: none;
    background-color: inherit;
    position: absolute;
    right: 0px;
    padding-right: 1vw;
    /* animation: fade-in 1s ease-in-out 1.2s forwards; */
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    transition: scale 0.5s ease-in-out;
}

#header_animation a{
    height: 90%;
}
#header_animation video{
    /* animation: fade-in 1s ease-in-out 1.2s forwards;  */
    margin-top: -1.5vh;
    height: 90%;
    width: auto; 
    filter: invert(84%);
}

#header_animation:hover {
    scale: 1.05;
}

#header_animation p {
    align-items: center;
    font-size: clamp(0.7rem, 1vw, 1rem);
    color: #fff;
}

/*------------SECTIONS-----------*/
.section {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4vw;
    min-height: 70vh;
    padding: 5vh 7vw;
    background-color: inherit;
}

.section-img {
    flex: 1 1 320px;
    display: flex;
    justify-content: center;
}

.section-photo {
    max-width: 100%;
    max-height: 60vh;
    height: auto;
    width: auto;
    border-radius: 2rem;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.section-photo:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.section-text {
    flex: 1 1 320px;
    max-width: 60ch;
    background-color: #777;
    padding: clamp(1.5rem, 2vw, 2.5rem);
    border-radius: 2rem;
    font-size: clamp(1rem, 0.6vw + 0.8rem, 1.4rem);
    align-content: center;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.section-text:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.section-text h3 {
    font-size: clamp(1.6rem, 1.2vw + 1rem, 2.6rem);
    margin-bottom: 0.5rem;
}

/* fade-in helpers (opacity + slide) */
.fade-left {
    opacity: 0;
    animation: fade-in-left2right 1s ease-in-out 1.2s forwards;
}

.fade-right {
    opacity: 0;
    animation: fade-in-right2left 1s ease-in-out 1.2s forwards;
}

.coding_languages {
    height: 20vh;
    width: 100%;
    background: linear-gradient(to right, rgb(23, 75, 75), rgb(43, 130, 130), rgb(23, 75, 75));
    color: red;
    margin-top: 0vh;
    margin-right: 0vh;
    display: flex;
    justify-content: space-around;
    align-content: center;
    padding: 2vh;
    position: relative;
    overflow: hidden;
}

.coding_languages img {
    height: 16vh;
    width: 16vh;
    position: absolute;
    left: -5vh;
    /* transition: scale 0.5s ease-in-out; */
    opacity: 0;
}

/* .coding_languages img:hover {
    scale: 1.1;
} */

#java_pic {
    background: #181818;
    border-radius: 20%;
}

.cl1 {
    animation: scroll-left 24s linear 0s infinite;
}

.cl2 {
    animation: scroll-left 24s linear -4s infinite;
}

.cl3 {
    animation: scroll-left 24s linear -8s infinite;
}

.cl4 {
    animation: scroll-left 24s linear -12s infinite;
}

.cl5 {
    animation: scroll-left 24s linear -16s infinite;
}

.cl6 {
    animation: scroll-left 24s linear -20s infinite;
}

.cl7 {
    animation: scroll-right 24s linear 0s infinite;
}

.cl8 {
    animation: scroll-right 24s linear -4s infinite;
}

.cl9 {
    animation: scroll-right 24s linear -8s infinite;
}

.cl10 {
    animation: scroll-right 24s linear -12s infinite;
}

.cl11 {
    animation: scroll-right 24s linear -16s infinite;
}

.cl12 {
    animation: scroll-right 24s linear -20s infinite;
}

/*========================================================*/
/*========================CODE PART=======================*/
/*========================================================*/
.code_section1 {
    background-color: #282828;
    color: #fff;
    width: 100%;
    margin-top: 20vh;
    padding: 10vh;
    /* padding-top: 17vh; */
    display: inline-block;
}

.code_section1 p {
    font-size: clamp(1.1rem, 3vw, 2.4rem);
    /* text-align: center; */
    color: transparent;
}

#code_intro1 {
    border-left: 5px solid #fff;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    animation: 
        typing 3.5s steps(47) 1.6s forwards,
        cursor 0.4s step-end 4 alternate forwards;
}

#code_intro2 {
    border-right: 5px solid transparent;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    animation: 
        typing2 2.5s steps(30) 5.1s forwards,
        cursor 0.4s step-end 7.6s infinite alternate forwards; 
}

.code_section2 {
    margin-top: 40vh;
    width: 98vw;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

}

.code_section2 h2 {
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight:100;
    text-align: center;
}

#code_section2_bubble {
    height: 100%;
    width: 95%;
    background-color: #888;
    /* display: flex;
    justify-content: space-around; */
    padding: 2vw;
    margin-bottom: 15vh;
    border-radius: 5vh;
    position: relative;
}

.all_courses {
    /* opacity: 0; */
    background-color: red;
    margin-top: 4vh;
    position: relative;
}

.code_section_courses {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5vw;
    justify-content: center;
    /* position: absolute; */
}

.code_section_classes {
    width: 100%;
    display: none;
    justify-content: space-around;
    position: absolute;
    transition-duration: 0.5s;
}

.course_category {
    font-size: clamp(0.85rem, 2vw, 1.5rem);
    color: #eaf2f3;
    background: #235c66;
    border-radius: 2vh;
    padding: 2vh;
    min-height: 6vw;
    text-align: center;
    align-content: center;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease;
}

.course_category:hover {
    font-weight: 400;
    transform: translateY(-6px);
    background: #2f7a86;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.class_category{
    font-size: clamp(0.7rem, 1.4vw, 1.2rem);
    color: #eaf2f3;
    background: #235c66;
    border-radius: 2vh;
    margin-top: 2vh;
    text-align: center;
    padding: 1vh;
    border-right: 4px solid #16414a;
    margin-right: 2vh;
    min-height: 6vw;
    align-content: center;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease;
}

.class_category:hover {
    font-weight: 400;
    transform: translateY(-5px);
    background: #2f7a86;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.display {
    display: flex;
    transition: display 0.5s ease-in-out;
}

.no_display {
    display: none;
    transition-duration: 0.5s;
}

.class_definition {
    /* display: none; */
    margin-top: 11vw;
    background-color: transparent;
    height: 23vh;
    width: 100%;
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    margin-right: 5vh;
}

.class_definition_p {
    position: absolute;
    display: none;
    z-index: 1;
    font-size: clamp(1.05rem, 3vh, 2rem);
    /* font-size:auto; */
}

#oo_programming {
    font-size: clamp(0.95rem, 2.2vh, 1.6rem);
}

.projects {
    height: 12vh;
    /* display: flex;
    justify-content: space-around;
    align-content: center; */
    /* background-color: #fff; */
    position: relative;
    margin-top: 6vh;
    margin-bottom: 6vh;
    overflow: hidden;
}

.projects img {
    position: absolute;
    height: 90%;
    filter: invert(83%);
}

#a1 {
    animation: scroll-left-project 24s linear 0s infinite;
}
#a2 {
    animation: scroll-left-project 24s linear -3s infinite;
}
#a3 {
    animation: scroll-left-project 24s linear -6s infinite;
}
#a4 {
    animation: scroll-left-project 24s linear -9s infinite;
}
#a5 {
    animation: scroll-left-project 24s linear -12s infinite;
}
#a6 {
    animation: scroll-left-project 24s linear -15s infinite;
} 
#a7 {
    animation: scroll-left-project 24s linear -18s infinite;
} 
#a8 {
    animation: scroll-left-project 24s linear -21s infinite;
} 

#follow_me {
    min-height: 15vh;
    font-size: clamp(1.1rem, 3vh, 1.6rem);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 5vh 1rem;
}

.follow_me_icons {
    height: clamp(28px, 5vh, 44px);
    width: auto;
    margin: 0 1rem;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#follow_me h2 {
    margin: 0 1rem;
}

#follow_me a {
    display: flex;
    align-items: center;
    justify-content: center;
}

#gmail_icon {
    height: clamp(22px, 4vh, 36px);
}

.follow_me_icons:hover {
    transform: translateY(-5px) scale(1.05);
}

.technical_jobs {
    min-height: 84vh;
    color: black;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2vw;
    padding: 5vh 2vw;
    margin-top: 8vh;
    overflow-x: auto;
}

.tech_job {
    flex: 0 0 auto;
    width: 340px;
    max-width: 80vw;
    background-color: #353535;
    color: #fff;
    padding: 3vh;
    border-radius: 5%;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
}

.tech_job:hover {
    transform: translateY(-10px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
}

.tech_job h2 {
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    /* text-decoration: underline; */
    margin-top: 2vh;
}

.tech_job p {
    font-size: clamp(0.95rem, 1.6vw, 1.4rem);
}

#thermovision_img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    background-color: #000;
}

.tech_job p.tech_job_subtitle {
    margin-top: 0.5vh;
    margin-bottom: 0;
    font-style: italic;
    color: #bfe6ea;
    font-size: clamp(0.9rem, 1.5vw, 1.25rem);
}

#red_whale_logo {
    height: 10vh;
}

#gambl-it_logo_container {
    display: flex;
    height: 10vh;
    align-items: center;
}

#gambl-it {
    height: 100%;
}

#gambl-it_words {
    height: 50%;
    filter: invert(1) sepia(1) hue-rotate(40deg) saturate(8) brightness(1);
    margin-left: 1vw;
}

#onda_logo {
    height: 7vh;
}

/*------------RESPONSIVE / NARROW SCREENS-----------*/
@media (max-width: 768px) {
    /* stack the image/text sections vertically */
    .section {
        flex-direction: column;
        min-height: auto;
        padding: 4vh 6vw;
    }

    .section-photo {
        max-height: 45vh;
    }

    .section-text {
        max-width: 100%;
    }

    /* header: give it room and keep pieces from overlapping */
    #header_name {
        position: static;
        width: auto;
        padding-left: 2vw;
    }

    #header_animation {
        position: static;
        height: 12vh;
    }

    /* technical jobs stack instead of squeezing side-by-side */
    .technical_jobs {
        flex-direction: column;
        min-height: auto;
    }

    .tech_job {
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 2vh 0;
    }

    /* let follow-me row wrap if needed */
    #follow_me {
        flex-wrap: wrap;
        height: auto;
        padding: 3vh 0;
    }

    /* code page: tighten the big top gaps and let course buttons wrap */
    .code_section1 {
        margin-top: 10vh;
        padding: 6vh 6vw;
    }

    .code_section2 {
        margin-top: 12vh;
        min-height: auto;
    }

    .code_section_courses {
        flex-wrap: wrap;
        gap: 2vh;
    }
}

/*------------ACCESSIBILITY: REDUCED MOTION-----------*/
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    /* keep faded-in content visible when animations are disabled */
    .fade-left,
    .fade-right {
        opacity: 1 !important;
    }
}