/********** Universal declarations **********/
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

* {
    margin: 0;
    box-sizing: border-box;
}

body {
    background-color: #fff;
    color: #1e272d;
    font-family: "Figtree", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

 h2 {
    text-align: center;
    font-size: 2.5rem;
    font-family: 'Aoboshi One', serif;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #1e272d;
}

/********** Button **********/
.each-section > .case-studies-container > div > a.button, 
.each-section > .writing-samples-container > .each-writing-sample > .writing-sample-blurb > a.button {
    width: 9rem;
    height: 3rem;
    line-height: 3rem;
    text-align: center;
    background-color: #1e272d;
    font-family: 'Figtree', sans-serif;
    font-size: 0.85rem;
    color: #fff;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}

.each-section > .case-studies-container > div > a.button:hover, 
.each-section > .writing-samples-container > .each-writing-sample > .writing-sample-blurb > a.button:hover {
    background-color: #5b7688;
    
    color: #fff;
}

/********** Navigation **********/
nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    height: 75px;
    background-color: #1e272d;
    border-bottom: 1px solid rgba(152, 197, 227, 0.3);
    position: fixed;
    z-index: 5;
}

.logo-section {
    margin-left: 25px;
}

.logo-section > .logo {
    display: flex;
    justify-content:center;
    align-items: end;
}

.logo-section > .logo > img {
    width: 55px;
    height: auto;
    border-radius: 15px;
}

.logo-section > .logo:hover {
    background-color: unset;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 25px;
    padding-right: 25px;
    margin: 0;
}

.nav-bar > ul {
    display: flex;
    list-style-type: none;
    justify-content: space-around;
    padding: 0;
}

.nav-bar > ul > li {
    display: inline-block;
    padding-left: 25px;
}

.nav-bar > ul > li > a:link, .nav-bar > ul > li > a:visited {
    text-decoration: none; 
    color: #98C5E3;
}

.nav-bar > ul > li > a:hover {
    color: #fff;
    cursor: pointer;
}

.ham-menu {
    display: none;
}

/********** Jumbotron **********/
.jumbotron {
    background-color: #1e272d;
    margin: 0;
}

.jumbotron-content {
    width: 80%;
    height: 700px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
} 

.blurb {
    color: #98C5E3;
    text-align: center;
    margin-bottom: 1rem;
}

.blurb > h1 {
    font-family: "Aoboshi One", serif;
    font-weight: 400;
    font-style: normal;
    font-size: 6rem;
}

.blurb > p {
    font-size: 1.5rem;
}

/* Define the keyframe animation for blurb*/
@keyframes slide-in-from-right {
  from {
    transform: translateX(100%); /* Start off-screen to the right */
  }
  to {
    transform: translateX(0); /* End at its original position */
  }
}

/* Apply the animation to an element */
.blurb-animation {
  animation-name: slide-in-from-right;
  animation-duration: 1.75s; /* The duration of the animation */
  animation-timing-function: ease-out; /* The speed curve of the animation */
  animation-fill-mode: forwards; /* Keeps the final state of the animation */
}

/*** Arrow ***/

/* Define the keyframe animation for the arrow */
@keyframes bouncing-arrow {
  0% {
    transform: translateY(0); /* Starting position */
  }
  50% {
    transform: translateY(10px); /* Move arrow down 20px */
  }
  100% {
    transform: translateY(0); /* Return arrow to starting position */
  }
}

.jumbotron-content > a > #cta-arrow {
    height: 60px;
    width: 60px;
    animation: bouncing-arrow 1.8s infinite alternate linear;
}

.jumbotron-content > a > #cta-arrow > img {
    width: 100%;
    height: auto;
    transition: filter ease;
}

.jumbotron-content > a > #cta-arrow:hover > img {
    filter: brightness(0) invert(1);
}


/********** CSS for all sections **********/

.each-section {
    width: 100%;
    background-color: #fff;
    padding-top: 2rem;
    padding-bottom: 2rem;
} 

/********** ABOUT ME SECTION **********/
.pic-of-todd {
    width: 325px;
    height: auto;
    overflow: hidden;
    border-radius: 30px;
    border: 20px solid #1e272d;
}

.pic-of-todd > img {
    width: 100%;
    height: auto;
    display: block;
}

.about-me-container {
    max-width: 80%;
    margin: 2rem auto;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.about-me-text {
    width: 50%;
    line-height: 1.5;
}

.about-me-text > h3 {
    font-size: 1.5rem;
    margin-top: 1rem;
    }

.skills-and-tools {
    font-style: italic;
}

/********** SEO Cast Studies Section **********/
.case-studies {
    background-color: #98C5E3;
}

.case-studies-container {
    margin-left: auto;
    margin-right: auto;
    max-width: 80%;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
}

.case-studies-container > div {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    width: 400px;
    height: 300px;
    padding: 1rem;
    border-radius: 30px;
    text-align: center;
    background-color: #fff;
}

.case-studies-container > div > h3 {
    font-size: 1.75rem;
}

/********** Writing Samples Section **********/
.writing-samples-container {
    margin: 3rem auto 0 auto;
    max-width: 90%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
}

.writing-samples-container > .each-writing-sample {
    width: 280px;
    height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 30px;
    box-shadow: 1px 3px 6px 0 rgba(26, 45, 57, 0.5);
    overflow: hidden;
}

.each-writing-sample > .writing-sample-image {
    background-color: pink;
    height: 180px;
    overflow: hidden;
}

.each-writing-sample > .writing-sample-image > img {
    max-width: 100%;
    height: auto;
}

.each-writing-sample > .writing-sample-blurb {
    padding: 1rem;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    color: #1e272d;
}

/********** Contact Me Section **********/
.contact-me {
    background-color: #98C5E3;
}

.contact-me-container > h3 {
    font-size: 1.5rem;
}

.contact-me-container {
    margin-left: auto;
    margin-right: auto;
    width: 60%;
    font-size: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    text-align: center;
    line-height: 1.5;
}

.contact-me > .contact-me-container > p > a:link, .contact-me > .contact-me-container > p > a:visited {
    color: #1e272d;
}

.contact-me > .contact-me-container > p > a:hover {
    color: #fff;
}

/********** Footer **********/
.footer-content {
    text-align: center;
    height: 75px;
    background-color: #1e272d;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

/********** Media queries *********/

@media only screen and (min-width:1797px) {
    .writing-samples-container {
        max-width: 55%;
    } 
}

@media only screen and (min-width: 1598px) and (max-width:1796px) {
    .writing-samples-container {
        max-width: 60%;
    } 
}

@media only screen  and (min-width: 1000px) and (max-width: 1434px) {
     .writing-samples-container > .each-writing-sample {
        width: 400px;
        height: 450px;
    }
}

@media only screen and (min-width:1333px) and (max-width: 1433px){
    .writing-samples-container {
        max-width: 75%;
    }
}

@media only screen and (max-width: 999px) {
    
 /********** ABOUT ME SECTION **********/
.pic-of-todd {
    width: 250px;
    }

    .about-me-container {
        flex-direction: column; 
    }

    .about-me-container > .about-me-text {
        width: 85%;
        margin-top: 1.5rem;
    }
    
    .case-studies-container {
        flex-wrap: wrap;
        gap: 0.625rem;
    }

    .case-studies-container > div:nth-of-type(2) {
        margin-top: 1.5rem;
    }

}

@media only screen and (min-width: 585px) and (max-width: 800px) {
    .writing-samples-container > .each-writing-sample {
        width: 400px;
        height: 450px;
    }
}

@media only screen and (max-width: 584px){
    nav .nav-bar {
        width: 100%;
        position: fixed;
        top: 75px;
        right: -100%;
        font-size: 1rem;
        transition: .3s ease; 
        justify-content: space-around;
        align-items: center;
        background-color: #1e272d;
        height: 75vh;
    }

    nav .nav-bar.active {
       right: 0;
    }

    nav:has(.nav-bar.active) {
        z-index: 100;
    }

    nav .nav-bar ul {
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        list-style-type: none;
        height: 300px;
    }
    
    nav .nav-bar ul li {
        display: block; 
        margin-left: 0;
        padding: 0;
        text-align: center;
    }

    nav .ham-menu {
        height: 50px;
        width: 40px;
        margin-left: auto;
        margin-right: 25px;
        position: relative;
        display: block;
    }

    nav .ham-menu span {
        height: 5px;
        width: 100%;
        background-color: #fff;
        border-radius: 25px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        transition: .3s ease;
    }
    nav .ham-menu span:nth-child(1) {
        top: 25%;
    }
   nav .ham-menu span:nth-child(3) {
        top: 75%;
    }
    
   nav .ham-menu.active span:nth-child(1) {
        top: 50%;
        transform: translate(-50%, -50%) rotate(45deg);
    }
   nav .ham-menu.active span:nth-child(2) {
        opacity: 0;
    }
   nav .ham-menu.active span:nth-child(3) {
        top: 50%;
        transform: translate(-50%, -50%) rotate(-45deg);
    }  

    /********** Contact Me Section MQ **********/
    .contact-me-container > h3 {
        margin-bottom: 1rem;
    }
}

@media screen and (max-width: 417px) {
    
    /* Define the keyframe animation for blurb*/
    @keyframes fadeAndSlideInFromTop {
        0% {
            opacity: 0;
            transform: translateY(-100%);
        }
        
        100% {
            opacity: 1;
            transform: translateY(0%);
        }
    }

     /* Apply the animation to an element */
    .blurb-animation {
        animation-name: fadeAndSlideInFromTop;
    }

    /********** H2 **********/
    .each-section > h2 {
        width: 60%;
        margin-left: auto;
        margin-right: auto;
    }
   
    /********** Jumbotron MQ **********/
    .blurb > h1 {
        font-size: 5rem;
    }

    .blurb > p {
        font-size: 1rem;
    }

    /********* Case Studies Section MQ **********/
    .case-studies-container > div {
        height: 400px;
    }

    /********** Writing Samples Section MQ **********/
    
    .each-writing-sample > .writing-sample-image {
        height: 180px;
        overflow: hidden;
    }
    
    .each-writing-sample > .writing-sample-blurb {
        height: 310px;
    }
} 
    



