@import url("https://fonts.googleapis.com/css2?family=Muli:wght@400;700&display=swap");

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

:root {
    --color1: #fff;
    --color2: #234;
    --color3: #123;
    --color4: linear-gradient(43deg, #4158D0 0%, #C850C0 46%, #FFCC70 100%);
    --color5: #FFCC70;
}

body {
    background-color: var(--color3);
    color: var(--color1);
    font-family: "Muli", sans-serif;
    padding: 20px;
}

h1 {
    font-size: 3rem;
    font-weight: lighter;
}

section {
    max-width: 700px;
    margin: 0 auto;
    overflow-x: hidden;
}

h1,
h2 {
    margin: 50px 0;
}

h2 {
    padding-right: 50px;
}

p {
    margin-top: 20px;
}

.search-button {
    background-color: var(--color3);
    border: none;
    color: var(--color1);
    position: fixed;
    right: 20px;
    top: 10px;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 110;
    transition: color 0.3s ease;
    opacity: 0.7;
}

.search-button:hover {
    color: var(--color5);
}

.search-icon,
.close-icon {
    width: 30px;
    height: 30px;
}

.search-icon.hide {
    display: none;
}

.close-icon {
    display: none;
}

.close-icon.show {
    display: block;
}

.search-form {
    z-index: 100;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px;
    width: 100%;
    min-height: 100vh;
    background-color: hsla(204, 78%, 12%, 0.9);
    color: var(--color1);
    transition: transform 0.3s ease;
    transform: translateY(-100%);
    backdrop-filter: blur(5px);
}

.search-form.show {
    transform: translateY(0);
}

.form-control {
  position: relative;
  margin: 20px 0 80px;
}

.form-control input {
    background-color: transparent;
    border: 0;
    border-bottom: 2px solid var(--color5);
    width: 100%;
    padding: 15px 0;
    margin: 0 0 10px 0;
    font-size: 2rem;
    color: var(--color1);
    font-weight: bold;
}

.form-control input:focus,
.form-control input:valid {
    outline: 0;
}

.form-control label {
    position: absolute;
    top: 15px;
    left: 0;
}
.form-control label span {
    display: inline-block;
    min-width: 5px;
    transition: 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-control input:focus + label span,
.form-control input:valid + label span {
    color: var(--color1);
    transform: translateY(-30px);
}

.vibe {
    order: 2;
    user-select: none;
    transition: transform 0.3s ease;
    cursor: pointer;
    color: var(--color5);
    font-size: 1.5rem;
    line-height: 2.1rem;
    margin: 0 0 30px;
    position: relative;
}

.vibe::first-letter {
    font-size: 200%;
}

.vibe:active {
    transform: scale(0.98);
}

mark {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 5px;
    background-image: var(--color4);
    color: var(--color3);
    line-height: 1.9;
    animation: bg-anim 5s infinite alternate;
    background-size: 200%;

}

@keyframes bg-anim {
    0% {
        background-position: right;
    }
    100% {
        background-position: left;
    }

}

.projects {
    display: grid;
    grid-template-columns:  repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0 60px 0 0;
    overflow: hidden;
}

.project {
    background-color: var(--color2);
    display: flex;
    padding: 10px;
    gap: 10px;
    align-items: center;
    box-shadow: 2px 4px 5px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s ease, opacity 0.3s ease;
    border-radius: 5px;
    opacity: 0;
}

.emojis {
    font-size: 1.5rem;
}

.project-header div:nth-child(1) {
    width: 200px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    
}

.project-header div:nth-child(1) a {
    text-decoration: none;
    color: var(--color1);
    font-weight: bold;
}

.project-header div:nth-child(1) a:hover {
    text-decoration: underline;
}

.project-header div:nth-child(2) {
    font-size: 0.7rem;
}

.project iframe {
    width: 100%;
    border: none;
}

.project:hover {
    box-shadow: 2px 4px 15px rgba(0, 0, 0, 0.6);
}

.project.show {
    transform: translateY(0);
    opacity: 1;
}

#howManyProjects {
    font-size: 0.8rem;
    color: var(--color5);
}

#btnScrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    opacity: 0;
    display: none;
    transition: opacity 0.3s ease;
}

#btnScrollToTop.show {
    opacity: 0.3;
}

#btnScrollToTop:hover {
    opacity: 0.9;
}

footer a {
    display: inline-block;
    color: var(--color1);
    text-decoration: none;
}
  
footer a::after {
    content: '';
    width: 0;
    height: 1px;
    display: block;
    background: var(--color1);
    transition: 0.3s ease;
}
  
footer a:hover::after {
    width: 100%;
}

.scrolled-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 100%;
    z-index: 10;
}

.scrolled-indicator-fill {
    height: 100%;
    background: dodgerblue;
    transition: width 0.2s linear;
    width: 0%;
    border-radius: 10px;
}