* {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 5px;
    transition: 0.3s all ease-in-out;

}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: lightgray;
    color: gray;
    margin-bottom: 50px;
}

section {
    width: 85%;
    max-width: 1200px;
    margin: auto;
    padding-top: 60px;
    text-align: center;
}

h1, h2, h3 {
    text-transform: uppercase;
    color:rgb(119, 119, 119)
}

h1 {
    letter-spacing: 1ch;
    font-size: 4.5rem;
}

h2 {
    letter-spacing: 0.1ch;
    font-size: 1.5rem;
    margin-bottom: 30px;
    padding: 10px 30px;
    text-align: center;
    color: gray;
    border: 1px gray solid;
    background-color: #ccc;
}

p {
    font-size: 0.8rem;
    line-height: 0.8rem;
    letter-spacing: 0.08rem;
}

section p {
    text-align: left;
}

li {
    list-style-type: none;
}

a {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

a:hover {
    color:cadetblue;
}

button {
    cursor: pointer;
}


/**
HOME
**/

.header {
    position: sticky;
    top: 0;
    padding-left: 40px;
    background-color: inherit;
    transition: 0.3s all ease-in-out;
    margin-bottom: 50px;
}
.small-header {
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1;
}
.small-header h1 {
    font-size: 1.6rem;
}

.title {
    width: 50%;
    
}
nav {
    display: flex;
    font-size: 0.8rem;
}
li {
    padding: 0 5px;
}


/**
PROJECTS / GALLERY
**/

.gallery {
    width: 100%;
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
}

.gallery-item {
    max-width: 1000px;
    margin-bottom: 70px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    border: gray dashed 1px;
    padding: 15px;
    cursor: pointer;
    /* transition: 2s flex ease; */
}

.thumbnail {
    width: 90%;
}

.gallery-item:hover > .caption-title {
    color:cadetblue;
}

.gallery-item .thumbnail:hover {
    scale: 90%;
}

.gallery-item.active .caption-title {
  /* transform: rotate(-90deg); */
  margin-top: 1rem; /* spacing under image */
  /* writing-mode: horizontal-tb; */
  transform: rotate(-90deg) translateY(-100%) translateX(-300%);
}

.caption-title {
    font-size: 2.5rem;
    display: inline-block;
    /* transform: rotate(-90deg); */
    transform-origin: bottom;
    writing-mode: vertical-lr;
    text-orientation: sideways;
    
}


/**
FRAME / ZOOM-IN
**/
.frame {
	background-color: rgba(0, 0, 0, .5);
	width: 100vw;
	height: 100vh;
	z-index: 2;
	position: fixed;
    top: 0px;
    display: flex;
    align-items: center;
    display: none;
}

.frame .project {
    width: 80%;
    margin: auto;
    display: flex;
    background-color: rgb(65, 65, 65);
    padding: 40px 30px;
}

.exit {
    position: absolute;
    top: 15px;
    right: 35px;
    z-index: 2;
    padding: 5px;
}

.frame-img {
    position: relative;
    top: 0;
    margin: auto;
    width: 65%;
}

.frame-img img {
    width: 100%;
}

.prev, .next {
    padding: 5px;
    font-size: 30px;
    transform: translateY(50%);
    user-select: none;
}

.prev {
    position: absolute;
    bottom: 50%;
    left: 5px;
}

.next {
    position: absolute;
    bottom: 50%;
    right: 5px;
}

#img-indicators {
    display: flex;
    position: absolute;
    bottom: 20px;
    left: 50%;
    gap: 10px;
}

.indicator {
    border: solid 1px rgb(65, 65, 65);
    width: 5px;
    height: 5px;
    border-radius: 100%;
}

.indicator.active {
    border: solid 1px cadetblue;
    background-color: cadetblue;
}


.info {
    display: flex;
    flex-direction: column;
    padding-left: 10px;
    margin: auto;
    row-gap: 10px;
    width: 30%;
    max-width: 400px;
}

.proj-header {
    display: flex;
    align-items: end;
    gap: 10px;
}

.proj-title {
    margin-top: 20px;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
    border: 1px solid gray;
    padding: 10px;
}

.description {
    grid-column-start: 2;
    border: 1px solid gray;
    padding: 10px;
}



/**
ABOUT / CONTACT
**/

.row {
    display: flex;
    justify-content: space-between;
    column-gap: 40px;
}

#contact {
    min-width: 300px;
}

/**
MAKE IT FIT PHONES
**/

@media only screen and (max-width: 650px) {
    section {
        width: 90%;
        padding-top: 20px;
    }

    h1 {
        letter-spacing: 1ch;
        font-size: 3rem;
    }
    
    h2 {
        letter-spacing: 0.3ch;
        font-size: 2rem;
        margin-bottom: 30px;
        padding: 10px 30px;
    }

    h3, .caption-title {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1rem;
    }
    
    p, li {
        font-size: 1rem;
        line-height: 1rem;
        letter-spacing: 0.1rem;
    }
    
    .header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
    }

    .title {
        width: auto;
    }

    .small-header h1 {
        font-size: 1.3rem;
    }

    .gallery-item {
        padding: 5px;
        margin-bottom: 20px;
    }

    .thumbnail {
        width: 100%
    }

    .caption-title {
        writing-mode: horizontal-tb;
        padding-top :5px;
    }

    .frame .project {
        flex-wrap: wrap;
        padding: 20px 15px;
        width: 90%;
    }

    .project .frame-img {
        width: 100%;
    }

    .project .info {
        width: 100%;
        margin-left: 0;
        max-width: fit-content;
    }

    .row {
        flex-direction: column;
    }

    #contact {
        padding-top: 40px;
    }
}