/* Mobile first (default) */
/* =========================
    Variables & Themes    
==========================*/
:root {
    --light-blue: #d5e7fe;
    --charcoal-blue: #454851ff;
    --ink-black: #04080fff;
    --glaucous: #507dbcff;
    --powder-blue: #a1c6eaff;
    --lavender: #DFEBFF;
    --alabaster-grey: #dae3e5ff;
    --white: #fefeffff;
    --tomato: #FE4A49;

    /* Dark Theme Colors */
    --dark-purple: #181627;
    --space-indigo: #171738ff;
    --deep-twilight: #2e1760ff;
    --vivid-royal: #3423a6ff;
    --glaucous: #7180b9ff;
    --apricot-cream: #fed18cff;
    --honeydew: #dff3e4ff;

    /* Active Colors */
    --color-bg: var(--white);
    --color-text: var(--ink-black);
    --color-primary: var(--ink-black);
    --color-secondary: var(--tomato);
    --color-third: var(--lavender);
    --hidden-nav-bg: var(--powder-blue);
    --footer-bg: var(--light-blue);
    --contact-ty-bg: url('../images/light-ocean.jpg');
}

.theme-dark {
    /* Active Colors */
    --color-bg: var(--space-indigo);
    --color-text: var(--white);
    --color-primary: var(--honeydew);
    --color-secondary: var(--apricot-cream);
    --color-third: var(--deep-twilight);
    --hidden-nav-bg: var(--deep-twilight);
    --footer-bg: var(--dark-purple);
    --contact-ty-bg: url('../images/dark-ocean.jpg'); 
}

/* =========================
    Base Styles    
==========================*/
html {
    margin: 0;
    padding: 0;
    height: 100%;
    min-width: 100vw;
    min-height: 100vh;
    font-family: 'Montserrat', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.7s ease, color 0.5s ease;
}

main {
    display: flex;
    flex-direction: column;
    /* min-height: 100vh; */
    /* flex: 1; */
    flex: 1 0 auto;
    justify-content: flex-start;
    align-content: flex-start;

}

main .page-title {
    text-align: center;
    padding-top: 2em;
}

button {
    background: none;
    font-size: 1.25em;
    border: none;
    color: var(--color-secondary);
}

/* =========================
    Header     
==========================*/
/* Top Nav */
.top-nav {
    position: fixed;
    width: 100vw;
    margin: 0.5em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: hidden;
    background: transparent;
    color: var(--color-primary);
    z-index: 50;
}

.top-nav ul{
    display: none;
    background-color: transparent;
    backdrop-filter: blur(10px);
}

#hamburger-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    font-size: 2em;
    border: transparent;
    color: var(--color-secondary);
    backdrop-filter: blur(10px);
    /* border: 2px solid var(--white); */
    border-radius:10px;
}

#hidden-nav {
    position: fixed;
    left: -250px;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--hidden-nav-bg);
    color: var(--color-primary);
    transition: left 0.5s ease;
    z-index: 50;
    font-family: 'Jura', sans-serif;
    overflow: hidden;
}

#hidden-nav.open {
    left: 0;
}

#hidden-nav ul {
    margin: 0;
    padding: 3em 2em;
    width: 100%;
    height: 100%;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 1.5em;
    box-sizing: border-box;
}

#hidden-nav a {
    color: var(--color-primary);
    font-weight:700;
    text-decoration: none;
}

#hidden-nav a:hover {
    color: var(--color-secondary);
}

#hidden-nav a.active {
    color: var(--color-secondary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
}

#nav-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100vw; 
    height: 100vh;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 45;
}

#nav-close-btn {
    position: absolute;
    top: 0.25em;
    right: 0.5em;
    font-size: 2em;
    cursor: pointer;
}

#nav-overlay.show {
    display: block;
}

/* Theme toggle always visible */
#theme-mode-btn {
    position: fixed;
    top: 1rem;
    right: 1rem;
    font-size: 1.5em;
    z-index: 55;
    background-color: transparent;
    border-radius: 1px;
    backdrop-filter: blur(10px);
}

#theme-mode-btn:hover {
    cursor: pointer;
}

@media (min-width: 768px) { 
    .top-nav {
        margin: 0.5em auto;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow-x: hidden;
        background: transparent;
        color: var(--color-primary);
        font-family: 'Jura', sans-serif;
        text-transform: uppercase;
    }

    .top-nav ul {
        margin: 0;
        padding: 0.5em 1.5em;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: center;
        /* width: 100%; */
        gap: 3em;
        background-color: transparent;
        border-radius: 25px;
        backdrop-filter: blur(10px);
        display: inline-flex;
    }

    .top-nav a {
        padding: 0;
        color: var(--color-primary);
        font-weight: 700;
        text-decoration: none;
        transition: color 0.3s ease, text-underline-offset 0.3s ease;
    }

    .top-nav a:hover {
        color: var(--color-secondary);
        cursor: pointer;
    }

    .top-nav a.active {
        color: var(--color-secondary);
        text-decoration: underline;
        text-decoration-thickness: 1.5px;
        text-underline-offset: 5px;
    }

    #hamburger-nav {
        display: none;
    }
}

/* =========================
    Footer    
==========================*/
footer {
    margin-top: 2em;
    padding: 0;
    display: flex;
    flex-shrink: 0;
    justify-content: center;
    width: 100vw;
    overflow-x: hidden;
    background: var(--footer-bg);
}

.footer-containter {
    display: grid;
    grid-template:
        'brand' auto
        'nav' auto
        'connect' auto
        'copy' auto
        / 1fr;

    width: 100%;
    gap: 2em;
    padding: 0;
    align-items: flex-start;
    text-align: center;
    background: transparent;
}

.footer-personal-brand { grid-area: brand; }
.footer-nav { grid-area: nav; }
.footer-connect { grid-area: connect; }

.logo-container {
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
}

.footer-connect img {
    width: 2em;
}

/* Default img are white - dark mode */
.footer-connect img:hover {
    cursor: pointer;
    opacity: 60%;
}

/* Invert to black - light mode */
body:not(.theme-dark) .footer-connect img {
    filter: invert(1);
}

.footer-copyright { 
    grid-area: copy; 
    opacity: 60%;
}

.footer-personal-brand {
    color: var(--color-secondary);
}

.footer-personal-brand p{
    margin: 0;
}

.footer-nav ul{
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 1em;
}

.footer-nav a {
    padding: 0;
    color: var(--color-primary);
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s ease, text-underline-offset 0.3s ease;
}

.footer-nav a:hover {
    cursor: pointer;
    text-decoration: underline var(--color-secondary);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 5px;
}

@media (min-width: 768px) {
    .footer-containter {
        grid-template:
            'brand connect' auto
            'nav nav' auto
            'copy  copy'  auto
            / 1fr  1fr;
        
        gap: 3em;
        padding: 1em 2em;
    }

    .footer-nav ul {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .footer-containter {
        grid-template:
            'brand nav connect' auto
            'copy  copy copy'   auto
            / 1fr  1fr  1fr;
        
        gap: 3em;
        padding: 1em 2em;
    }

    .footer-nav ul {
        flex-direction: column;
    }
}

/* =========================
    Hero Section    
==========================*/
/* Hero Image */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-layers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.2s ease-in-out;
}

.hero-layer {
    width: 100vw;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    will-change: transform;
    pointer-events: none;
    transform-origin: center;
}

/* Hero Overlay */
.hero-overlay {
    z-index:20;
    color: var(--color-primary);
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    margin: 1em;
}

/* =========================
    About Me - Index    
==========================*/
.about-section {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    align-items: center;
    gap: 2em;
    margin: 5em 1em;
}

.about-text {
    margin: 0 1em;
}

.about-text h2 {
    color: var(--color-secondary);
}

.about-text h4 {
    margin-top: 3em;
}

/* Slides */
/* Slideshow wrapper */
.about-slideshow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Main container */
.slide-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 600px;
    overflow: hidden;
}

/* Individual slides */
.slide-home {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    width: 100%;
    height: 100%;
}

.slide-home.active {
    opacity: 1;
    position: relative;
}

/* Images */
.slide-home img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 10px;
}

/* Caption */
/* .caption {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
} */

/* Arrows */
.back,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2em;
    background: var(--ink-black);
    opacity: 60%;
    color: var(--white);
    border: none;
    cursor: pointer;
    padding: 0.2em 0.3em;
    border-radius: 5px;
    z-index: 10;
}

.back { left: 10px; }
.next { right: 10px; }

.back:hover,
.next:hover {
    background: var(--ink-black);
    opacity: 80%;
}

/* Dots */
.dot-container {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-top: 1em;
}

.dot {
    width: 10px;
    height: 10px;
    background: var(--color-primary);
    opacity: 70%;
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: var(--color-secondary);
    opacity: 100%;
}

@media (min-width: 768px) {
    .about-text {
        margin: 0 2em;
    }
}

@media (min-width: 1024px) {
    .about-section {
        grid-template-columns: 1fr 1fr;
    }

    .about-text {
        margin: 1em;
        padding-left: 5em;
    }
}

/* =========================
    Project Section    
==========================*/
.projects-section {
    display: flex;
    flex-direction: column;
    margin: 1em 1em 5em 1em;
    overflow-x: hidden;
}

.projects-grid {
    display: grid;
    justify-items: center;
    align-items: self-start;
    align-self: center;
    /* grid-template-columns: 1fr; */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* margin: 2em; */
    gap: 4em;
    width: 90%;
}

.project-card {
    background: var(--color-third);
    display: flex;
    flex-direction: column;
    padding: 1em;
    border-radius: 0.2em;
    width: 100%;
    max-width: 400px;
    min-height: 200px;
    margin: 1em;
    border: 1.5px solid var(--color-secondary);
}

.project-card img {
    width: 100%;
    /* max-width: 400px; */
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.2em;
    margin: 0 auto;
}

.project-card .project-title {
    text-align: left;
}

.project-card .project-description {
    text-align: left;
    color: var(--color-secondary);
    background: transparent;
    width: fit-content;
    text-decoration: none;
    margin-top: 0.5rem;
    display: inline-block;
    padding: 2px 8px;
    border: 1.5px solid var(--color-secondary);
    border-radius: 5px;
    font-weight: 500;
    align-self: center;
}

.project-card .project-description:hover {
    cursor: pointer;
    color: var(--color-third);
    background: var(--color-secondary);
}

/* @media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1250px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
} */

/* =========================
    Contact Form   
==========================*/
.contact-container {
    display: flex;
    flex-direction: column;
    align-self: center;
    align-content: flex-start;
    margin: 2em;
    /* padding-top: 6em; */
    width: 90%;
    max-width: 30em;
    /* height: 100vh; */
    /* background-color: var(--pale-sky); */
    border-radius: 0.2em;
    letter-spacing: 1px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-items: center;
    /* width: 100%; */
    width: 400px;
    max-width: 30em;
    height: auto;
}

#contact-form label {
    margin-bottom: 0.5em;
    width: 100%;
    font-size: 1em;
    font-weight: 600;
}

#contact-form textarea {
    height: 8em;
}

.submit-btn {
    align-self: center;
    padding: 0.5em 2em;
    font-size: 1em;
    font-weight: 600;
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    border-radius: 0.3em;
    letter-spacing: 1px;
    justify-self: center;
}

#contact-form label, 
.submit-btn{
    display: block;
    font-family: "Montserrat", sans-serif;
}

#contact-form input,
#contact-form textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1.5em;
    font-family: "Montserrat", sans-serif;
    font-size: 1em;
    padding: 0.5em 1em;
}

#validation-message {
    margin: 0;
    padding-bottom: 2em;
}

/* -- Thank You Section */
.thankyou-section {
    display: none;
    flex-direction: column;
    margin: 0;
    padding: 2em;
    max-width: 30em;
    background: var(--contact-ty-bg);
    border: 2px solid var(--footer-bg);
    border-radius: 0.3em;
}

.thankyou-section h3 {
    font-weight: 600;
    backdrop-filter: blur(5px);
    padding: 1em;
    margin: 0;
}

.thankyou-section p {
    font-weight: 600;
    text-align: end;
    margin: 0;
    backdrop-filter: blur(5px);
    padding: 0.5em;
}

.thankyou-section img {
    width: 35px;
    height: auto;
    object-fit: cover;
    align-self: center;
}
@media (min-width: 768px) {
    .contact-form {
        width: 30em;
    }

    .submit-btn:hover {
        cursor: pointer;
        background-color: var(--color-secondary);
        color: var(--color-bg);
    } 
}

/* =========================
    Resume   
==========================*/ 
.resume-container {
    position: relative;
    width: 75%;
    max-width: 800px;
    padding-top: 130%; 
    margin: 2em auto;
}

.resume-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90%;
    border: none;
}

@media (max-width: 768px) {
    .resume-container {
        width: 95%;
        padding-top: 100%; 
    }
}

@media (max-width: 1024px) {
    .resume-container {
        width: 90%;
    }
}

/* =========================
    Reflections   
==========================*/ 
/* Main Reflections Page */
.topic-tiles-container {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: center;
    justify-items: center;
    gap: 4em;
    margin: 2em;
    padding: 1em;
    border-radius: 0.2em;
}

.topic-tiles {
    text-align: center;
    background: var(--color-third);
    padding: 1em 3em 3em 3em;
    margin: 0;
    width: 15em;
    border-radius: 5px;
    border: 1.5px solid var(--color-secondary);
}

.topic-tiles p {
padding-bottom: 2em;
}

.topic-tiles a {
    align-self: center;
    padding: 0.5em 2em;
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    background: transparent;
    color: var(--color-secondary);
    border: 2px solid var(--color-secondary);
    border-radius: 0.3em;
    letter-spacing: 1px;
    justify-self: center;
}


@media (min-width: 768px) {
    .topic-tiles-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        margin: 2em auto;
    }

    .topic-tiles a:hover {
        cursor: pointer;
        background: var(--color-secondary);
        color: var(--color-third);
    }
}

/* R2H Udemy Reflections */
.back-btn {
    color: var(--color-text);
    text-decoration: none;
    margin: 1em;
    width: fit-content;
}

.back-btn:hover {
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

.reflections-grid {
    display: grid;
    /* grid-template-columns: 1fr; */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 2em;
    gap: 4em;
    width: 90%;
    align-self: center;
}

.card {
    background: var(--color-third);
    display: flex;
    flex-direction: column;
    padding: 1em;
    border-radius: 0.2em;
    width: 90%;
    border: 1.5px solid var(--color-secondary);
}

.card img {
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 0.2em;
    margin: 0 auto;
}

.card .reflections-title {
    text-align: left;
}

.card .reflections-p {
    text-align: left;
}

.card .topic {
    color: var(--color-third);
    background-color: var(--color-secondary);
    width: fit-content;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.card .date {
    text-align: right;
    opacity: 60%;
    margin-top: auto;
}

/* @media (min-width: 1024px) {
    .reflections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1250px) {
    .reflections-grid {
        grid-template-columns: repeat(3, 1fr);
    }
} */

/* Gif */
.moving-gif {
    position: fixed;
    width: 60px;
    animation: moveAbrupt 25s infinite;
    transform-origin: center;
    object-fit: cover;
    bottom: 0;
}

/* Abrupt flip animation */
@keyframes moveAbrupt {
    0% {
        left: 0;
        transform: scaleX(1); 
    }
    49.999% {
        left: calc(100% - 125px);
        transform: scaleX(1); 
    }
    50% {
        left: calc(100% - 125px);
        transform: scaleX(-1); 
    }
    99.999% {
        left: 0;
        transform: scaleX(-1); 
    }
    100% {
        left: 0;
        transform: scaleX(1); 
    }
}


