@import url('https://fonts.googleapis.com/css2?family=Epilogue:ital,wght@0,100..900;1,100..900&family=Gloock&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --neutral-green2: #A5A58D;
    --neutral-green3: #636856; /* nav */
    --neutral-green4: #3F4238;
    --earthy-grey: #DAD7CD; /* base */
    --forest-green5: #111D13; /* font */

    --dur-1: 150ms;
    --dur-2: 300ms;
    --dur-3: 600ms;
    --ease: cubic-bezier(.2,.7,.2,1);
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

@media (min-width: 481px) {
    .nav { display: none; }
    .hamburger { display: none; }
    #site-nav ul{ display: none;}
}

@media (max-width: 480px) {
    header{ position:relative; padding-inline:4svw; }

    .nav{ width:100%; }
    .hamburger{
        display:inline-flex;
        padding:.6rem .8rem;
        border-radius:.6rem;
        background: rgba(0,0,0,.06);
        cursor:pointer;
        user-select:none;
    }

    /* Make the 3 lines (pure CSS) */
    .hamburger::after{
        content:""; display:inline-block; width:19px; height:3px; background:currentColor;
        box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;  /* three bars */
    }

    /* Menu panel is collapsed when <details> is closed */
    nav ul{
        max-height:0; overflow:hidden; transition:max-height 250ms ease;
        margin-top:.6rem; margin-bottom: 1rem; padding:.2rem; list-style:none; display:flex; flex-direction:column; gap:.4rem;
        border-radius:.6rem;
    }

    /* Open state: expands when the user toggles <summary> */
    .nav[open] #site-nav ul{ max-height:60dvh; }

    /* Optional: style summary focus visibly */
    .hamburger:focus { outline: 2px solid currentColor; outline-offset: 2px; }

    #about-me-content {
        width: min(92svw, 48rem);
        margin-top: 4rem; 
    }

    #about-me-content section:nth-child(1) {
        flex-direction: column;
        gap: 1rem;
    }

    #project-cards {
        flex-direction: column;
    }

    a {
        text-decoration: underline !important;   /* always visible */
        text-underline-offset: 0.12em;
    }

    header nav a::after { display: none; }

    #experiences-content article{
        /* keep logo column small, give text room */
        display: grid;
        grid-template-columns: 3rem 1fr;
        grid-auto-rows: min-content;
        column-gap: .9rem;
        row-gap: .25rem;
        margin-block: 1.2rem;
    }

    /* Make the disclosure text span full width under the header row */
    #experiences-content{
        /* Logo smaller & rounded */
        img {
            width: 3rem;
            height: 3rem;
            border-radius: .6rem;
            object-fit: cover;
            grid-row: 1; /* sit next to the title row */
        }

        /* Company name + date: stack date, remove float */
        h3 {
            font-size: 1rem;
            line-height: 1.3;
            overflow-wrap: anywhere;        /* prevent overflow on tiny screens */

            span {
                display: block;
                float: none;                    /* kill the desktop float */
                font-weight: 400;
                font-size: .9rem;
                opacity: .8;
                margin-top: .15rem;
            }
        }

        details {
            grid-column: 1 / -1;

            p {
                line-height: 1.6;
                font-size: .95rem;
            }
        }

        summary {
            padding: .5rem .25rem;
            border-radius: .4rem;
            background: rgba(0,0,0,.05);
            cursor: pointer;                /* clearer affordance */
        }

    }
}

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

html {
    background-color: var(--earthy-grey);
    min-height: 100%;
    font-family: "Bitter", sans-serif;

}

body{
    min-height: 100vh;
    min-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: var(--forest-green5, black);
}

nav, ul {
    list-style: none;
}

a {
    text-decoration: none;
}

header {
    width: 100%;
    background-color: var(--neutral-green3, grey);
    color: var(--earthy-grey, white);
    display: flex;
    justify-content: space-between;
    align-items: center;

    nav {
        ul {
            width: 24rem;
            display: flex;
            justify-content: space-between;
            margin-left: 5rem;
            font-size: 1.3rem;
            
            a {
                color: inherit;
                position: relative;
                text-decoration: none;
            }
    
            a:hover {
                color: white;
            }

            a::after {
                content:"";
                position: absolute;
                left: 0;
                right: 0;
                bottom: -0.25rem;
                height: 2px;
                background-color: currentColor;
                transform: scaleX(0);
                transform-origin: left;
                transition: transform var(--dur-2) var(--ease);
            }

            a:hover::after{ 
                transform: scaleX(1);
            }
        }

    }

    theme-toggle {
        background-color: var(--earthy-grey, white);
        display: inline-flex;
        gap: 1rem;
        border: 2px solid grey;
        margin: 2rem 4rem;
        padding: .25rem .4rem;
        border-radius: .5rem;
    }
    theme-toggle button {
        background-color: var(--earthy-grey, white);
        border: 0;
        padding: .25rem;
        cursor: pointer;
    }
}

#landing-page {
    background-image: url("/assets/bg.png");
}

/* Layout for landing page */
#landing-text {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    width: 100vw;
    color: inherit;
    backdrop-filter: blur(18px);

    h1 {
        text-align: center;
        font-family: "epilogue";
        font-size: 8rem;
    }

    h2 {
        text-align: center;
        font-family: "Gloock", sans-serif;
        font-size: 4rem;
        font-weight: normal;
    }
}

/* Layout for about me page */
#about-me-content {
    width: 75%;
    margin-top: 8rem;
    color: inherit;

    section:nth-child(1) {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        line-height: 1.8rem;
        margin-bottom: 8rem;

        hgroup {
            width: 60%;

            h1 {
                margin-bottom: 0.5rem;
            }
        }

        picture img{
            display: block;
            border-radius: 10%;
        }
    }

    section:nth-child(2) {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        margin-bottom: 10rem;

        hgroup {
            width: 91%;
            margin-bottom: 0.5rem;
            line-height: 2rem;
        }

        iframe {
            width: 92%;
            border-radius: 2%;
        }
    }

}

/* Layout for expertise page */
#expertise-content {
    width: 70%;
    margin-top: 6rem;
    color: inherit;
    
    a {
        text-decoration: none;
        color: inherit;
    }

    a:hover {
        filter: brightness(1.1);
    }

    #experiences-content {
        margin-bottom: 6rem;

        article {
            display: grid;
            grid-template-columns: 4rem 1fr;  /* logo | text */
            column-gap: 1rem;
            align-items: start;
            margin-block: 2rem;

            a:hover {
                text-decoration: underline;
            }

            details p {
                line-height: 1.4rem;
            }
        }

        img {
            grid-row: 1 / span 2;  /* occupy logo column for both rows */
            width: 3.5rem;
            height: 3.5rem;
            border-radius: 10%;
            object-fit: cover;
        }

        article:nth-child(4) img {
            background-color: white;
        }
    }

    #projects-content {
        margin-bottom: 6rem;
        
        #project-cards {
            display: flex;
            justify-content: space-between;
            gap: 1.2rem;
            margin-top: 1.4rem;
        }

        article {
            background-color: var(--neutral-green2, grey);
            display: flex;
            flex-direction: column;
            justify-content: space-between;

            border: 0.1px solid var(--earthy-grey, white);
            border-radius: 10%;
            overflow: clip;

            img {
                width: 100%;
                height: auto;
                display: block;
            }

            h3, p, ul {
                margin: 0.2rem 0.5rem;
            }

            h3 {
                margin-top: 0.7rem;
            }

            ul {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
                margin-top: 0.3rem;

                li {
                    background-color: var(--earthy-grey, white);
                    border: 0.1px solid var(--earthy-grey white);
                    border-radius: 0.8rem;
                    padding: 0.1rem 0.3rem;
                    font-size: 0.7rem;
                }
            }

            a, .coming-soon {
                background-color: var(--earthy-grey, white);
                border: 0.1px solid var(--earthy-grey, white);
                border-radius: 0.4rem;
                margin: 0.7rem 3rem 1.3rem;
                padding: .4rem 0.3rem;
                text-align: center;
            }
        }
    }
}

/* Layout for contact page */
#contact-form {
    margin: 6rem;
    
    h1 {
        text-align: center;
        margin-bottom: 0.5rem;
    }

    form {
        display: flex;
        flex-direction: column;
    }

    /* inputs & textarea share the same look */
    input[type="text"], input[type="email"], textarea {
        width: 100%;
        padding: 0.7rem 1rem;
        border-radius: 12px;
        border: 1.5px solid rgba(0,0,0,.15);
        background: rgba(0,0,0,.05);
        outline: none;
        font-size: 1rem;
    }

    textarea {
        min-height: 7rem;
        resize: vertical; /* allow user to expand if needed */
    }

    /* focus styles for accessibility */
    input:focus, textarea:focus {
        border-color: var(--neutral-green3, grey);
        box-shadow: 0 0 0 3px rgba(63,66,56,.15);
    }

    input[type="submit"] {
        align-self: center;  
        padding: 0.9rem 2.5rem;
        border-radius: 0.7rem;
        border: none;
        background-color: var(--neutral-green4, black);
        color: var(--earthy-grey, white);
        font-weight: 700;
        cursor: pointer;
        font-family: inherit;
    }

    input[type="submit"]:hover {
        filter: brightness(1.2);
    }

    :has(:invalid) label::after {
        content: " *";
        color: #b00020;
        font-weight: 700;
    }
}


footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background-color: var(--neutral-green3, grey);
    color: var(--earthy-grey);
    font-size: 0.9rem;

    div {
        width: 75%;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        padding-top: 1.6rem;
        margin-left: -5rem;

        section:nth-child(1) {
            width: 30%;
            line-height: 1.1rem;

            p {
                font-size: 0.8rem;
            }
        }

        section:nth-child(2) {
            line-height: 1.2rem;
            margin-left: -4rem;

            ul {
                width: 18vw;
                display: flex;
                flex-wrap: wrap;
                justify-content: flex-start;

                li {
                    margin: 0rem 0.3rem;
                    
                    a {
                        color: inherit;
                    }
        
                    a:hover {
                        color: white;
                    }
                }
            }

        }

        section:nth-child(3) {
            margin-left: -5rem;

            ul {
                display: flex;
                width: 8vw;
                justify-content: flex-start;
                align-items: center;
                
                li {
                    margin: 0rem 0.3rem;
                } 
            }
        }
    }

    hr {
        border: none;
        height: 0.5px;
        background-color: var(--earthy-grey, white);
        width: 95%;
        margin: 1rem 0rem;
    }

    small {
        padding-bottom: 1.5rem;
    }
}

