/*_________________ General style settings___________ */

*{
    margin:0;
    padding:0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    --second: #1B4332;
    --second-highlight: #23513e;
    --third-highlight: #ebad66;
    --third: #DDA15E;
    --primary: #F8F5F0;
    --container-bg: hsl(0, 0%, 98%);
    --header-text: hsl(155, 43%, 18%);
    --body-text: hsl(155, 43%, 18%,0.83);
    --sub-text: hsl(155, 43%, 18%,0.5);
    --nav-text: #F8F5F0;
    --accent: #3A86FF;
}

body {
    height:100%;
    background-color: var(--primary);
    font-family:Arial, Helvetica, sans-serif;
    color: var(--body-text);
    margin-top: min(15vw,5rem);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* full viewport height */
}

.content{
    flex: 1;  /* this pushes footer to the bottom if content is short */
    justify-items: center;
    text-align: center;
}

p {
    margin-top: 0;
    margin-bottom: 30px;
}

/* navigation bar on top */

nav {
    justify-content: space-between;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    align-items: center;
    background-color: var(--second);
    box-shadow: 0px 5px 5px rgba(0,0,0,0.01);
    z-index: 100;

}

nav ul {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

nav li {
    height: 50px;
    font-weight: bold;
}

nav a{
    height: 100%;
    padding: 0 30px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nav-text);
}

nav a:hover{
    background-color:var(--second-highlight); 
    transition: 100ms;
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);
}


nav li:first-child{
    margin-right: auto;
}


/* navigation on side (for mobile) */
.sidebar{
    position: fixed;
    top: 0px;
    right: 0;
    width: 250px;
    z-index: 999;
    background-color: var(--second);
    transform: translateX(100%); /* start off-screen to the right */
    transition: transform 0.3s ease-in-out; /* smooth animation */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    border-bottom-left-radius: 0.5rem;
}

.sidebar.show {
    transform: translateX(0); /* slide in */
    box-shadow: 0px 0.2rem 0.75rem rgba(0,0,0,0.5);
}

.sidebar li{
    width: 100%;
}

.sidebar a{
    width: 100%;
    padding: 0 0;

}

.sidebar .close-icon-button{
    width: 100%;
    display: flex;}

.sidebar .close-icon-button img{
    margin-left: auto;  /* push to the right */
    padding: 10px 20px; /* optional padding for click area */
    cursor: pointer;    /* makes it clear it's clickable */
    transition: background 0.2s; /* optional hover transition */}

.sidebar .close-icon-button img:hover {
    background-color: var(--second-highlight);     
    transition: 200ms;
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);

}

.menu-button{
    display: none;
}

body.menu-open .content { 
    filter: blur(10px);
}

/* buttons, hyperlinks and highlight styles */
.highlight{
    color: var(--third);
    font-weight: bold;
}

.hyperlink{
    color: var(--accent);
    text-decoration: none;
}

.hyperlink:hover{
    text-decoration: underline;
}

.buttons{
    text-align: left;
}

.cta-blue {
    display: inline-block;
    color: var(--nav-text);
    border-style: solid;
    border-width: 0.15rem;
    border-color: var(--accent);
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
    margin-right: 10px;
    transition: 0.2s;
    font-size: smaller;
    background-color: var(--accent);
}

.cta-blue:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;  /* 👈 change 0.6s to whatever you want */
    box-shadow: 0 0 0.3rem var(--accent);

}

/* footer */
.footer{
    margin-top:80px;padding:1rem;background:var(--second);color:var(--nav-text);text-align:center;font-size:0.7rem;
}




/* headers */

.h1-parent{
    display: flex;
    flex-direction: row;
    justify-content: center;
}

h1 {
    font-size: clamp(20px,8vw,70px);
    text-align: center;
    color: var(--header-text);
    display: block;
    background-color: var(--primary);
    padding: 20px;
    padding-top: 10px;
    padding-bottom: 10px;
    margin-bottom: min(4vw,2rem);
    position: relative;
    max-width: fit-content;
}

h1::after{
    content: "";
    background: var(--third);
    height: 5px;
    width: 100%;
    position: absolute;
    bottom: 0;
    right: 0;
    box-shadow: 0px 3px 5px rgba(0,0,0,0.05);
    border-radius: 1rem;

}


/* _________________________site specific style_________________ */

.nobreak{
    white-space: nowrap;
}

.factheader{
    justify-items: center; 
    text-align: center;
}

.fact-button{
    padding: clamp(10px,4vw,15px);
    font-size: clamp(10px,4vw,16px);
    background-color: var(--amber);
    color: var(--cream);
    border-style: none;
    border-radius: 10px;
}

.fact-button:hover{
    background-color:var(--amber);
    transition: 200ms;
    box-shadow: inset 2px 2px 3px rgba(0,0,0,0.1);
}

.footer{
    margin-top:80px;padding:1rem;background:var(--green);color:var(--cream);text-align:center;font-size:0.7rem;
}

.hyperlink{
    color: var(--accent);
    text-decoration: none;
}

.hyperlink:hover{
    color: var(--accent);
    text-decoration: underline;
}

#fact{
    margin-top: 20px;
    font-size: clamp(1rem,4vw,2rem);
    text-align: center;
    padding: 20px;
    max-width: 50%;
}


/* _________________ dark mode settings_________________ */

@media (prefers-color-scheme: dark) {
  :root {
    --primary: hsl(120, 0%, 12%);             /* main background */
    --second: #2c2c2c;              /* nav bar / sections monochrome */
    --second-highlight: #3a3a3a;    /* hover / active */
    --third: #DDB571;               /* buttons / highlights */
    --third-highlight: #F0C27A;     /* button hover */
    
    --header-text: hsl(0, 0%, 92%);                /* main text */
    --container-bg: hsl(0, 0%, 17%);

    --body-text: hsl(0, 0%, 80%,0.83);                /* main text */
    --sub-text: hsl(0, 0%, 80%,0.5);                /* main text */

    --nav-text: #EAEAEA;            /* nav text */
    --accent: #5AAEFF;              /* interactive accent */
  }
}



@media(max-width: 800px){
    .hideOnMobile{
        display: none;
    }
    .menu-button{
        display: block;
    }
    .all-skills{
        display: none;
    }
    .all-skills-mobile{
        display: flex;
    }
    .all{
        margin-left: 0;
    }
    .accordion, .person, .description .all-skills-mobile{
        min-width: min(90vw,800px);
    }
    .sidebar{
        width:100%;
        border-radius: 0;
    }

}

@media(max-width: 400px) {
    .sidebar{
        width:100%;
        border-radius: 0;
    }
}


