:root {
    font-size: 15px;
    --bg-a-transitionColor: lightgray;
    --bg-a-staticColor: slategray;
    --general-bg-color: maroon;
    --text-color: #ededed;
    --txt-margin: 5vw;
    --navbar-el-height: 2rem;
}

body {
    margin: 0;
    padding: 0;
    color: var(--text-color);
    font-family: "Helvetica", sans-serif;
}

/* Styles for decorative element of top of the page */
#top-hat {
   background-color: black;
}

.central-heading {
    margin: auto 10%;
    z-index: 10;
    position: absolute;
    top: 2.6vw;
    width: 80%;
    color: black;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: black;
}

.central-heading > p {
    width: 10%; /* For each of the 10 characters */
    text-align: center;
    margin: 0;
    padding: 0;
    font-size: 4vw;
}

.brightening {
    animation-name: brighten;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-in;
}

@keyframes brighten {
    0% { color: black; }
    50% { color: white; }
    100% { color: #4949c4; }
}

.twinkle {
    animation: twinkle 1s infinite;
}

@keyframes twinkle {
    0% { color: black; }
    25% { color: white; }
    50% { color: black; }
    75% { color: white; }
    100% { color: black; }
}

.central-heading.not_animated {
    width: 40%;
    color: #4949c4;
    margin-left: 30%;
}

.central-heading.shrink  {
    animation: shrink 1s;
    animation-fill-mode: forwards;
}

@keyframes shrink {
    0% {
        width: 80%;
        margin-left: 10%;
    }
    100% {
        width: 40%;
        margin-left: 30%;
    }
}

/* Background element */
#fixed-bg {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: -11;
    background-image: url(/static/assets/col-bg.jpg);
    background-size: cover;
    overflow: hidden;
}

/* Page navigation elements */
.nav-container {
    position: relative;
    display: grid;
    grid-template-columns: 180px auto;
    height: 3rem;
    border-bottom: 1px solid yellow;
    background-color: var(--general-bg-color);
}

.menu-container {
    height: var(--navbar-el-height);
    margin-top: 0.5rem;
    z-index: 10;
    position: relative;
    overflow: hidden;
}

#lang-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin-top: 0.5rem;
    height: var(--navbar-el-height);
}

.lang {
    border: 2px solid black;
    border-radius: 5px;
    background-color: black;
}

#personal-info-menu {
    display: flex;
    align-items: center;
    justify-content: space-around;
}

a {
    text-decoration: none;
}

nav > a {
    padding: 0 4px;
    color: var(--bg-a-staticColor);
    height: var(--navbar-el-height);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-p {
    font-size: 0.9rem;
}

nav > a:hover {
    border-radius: 0.5rem;
    box-shadow: 0 0 4px 2px yellow;
}

.open-menu {
    animation-name: openMenu;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes openMenu {
    from { height: var(--navbar-el-height); }
    to { height: 12rem; }
}

.open-menu > nav > a {
    color: var(--bg-a-transitionColor);
    animation-name: colorTransition;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;
    animation-timing-function: ease-out;
}

.open-menu > nav > a:nth-child(2) {
    animation-delay: 0.15;
}

.open-menu > nav > a:nth-child(3) {
    animation-delay: 0.30s;
}

.open-menu > nav > a:nth-child(4) {
    animation-delay: 0.45s;
}

@keyframes colorTransition {
    from { color: var(--bg-a-transitionColor); }
    to { color: var(--bg-a-staticColor); }
}

.close-menu {
    animation-name: closeMenu;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes closeMenu {
    from { height: 12rem; }
    to { height: var(--navbar-el-height); }
}

.close-menu > nav > a {
    color: var(--bg-a-staticColor);
    animation-name: colorTransitionReverse;
    animation-duration: 0.2s;
    animation-timing-function: ease-out;
}

.close-menu > nav > a:first-child {
    animation-delay: 0.45s;
}

.close-menu > nav > a:nth-child(2) {
    animation-delay: 0.30s;
}

.close-menu > nav > a:nth-child(3) {
    animation-delay: 0.15s;
}

@keyframes colorTransitionReverse {
    from { color: var(--bg-a-staticColor); }
    to { color: var(--bg-a-transitionColor); }
}

#hamburguer {
    visibility: hidden;
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
}

#hamburguer:hover {
    cursor: pointer;
}

.menu_svg-clicked {
    animation-name: colorTransitionMenu;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;
}

.times_svg-clicked {
    animation-name: colorTransitionTimes;
    animation-duration: 0.2s;
    animation-fill-mode: forwards;
}

/* Change visibility of the inactive svg */
.idle {
    visibility: hidden;
    z-index: -2;
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes colorTransitionMenu {
    from { fill: #4ab054; }
    to { fill: #c5cc04; }
}

@keyframes colorTransitionTimes {
    from { fill: #c5cc04; }
    to { fill: #4ab054; }
}


#msg-when-form-submitted {
    background-color: rgb(102, 255, 51);
    color: darkslategray;
    text-align: center;
    height: auto;
    margin: 0;
}

/* About-me section and its container */
#about_me_container {
    background-color: var(--general-bg-color);
    padding: 3%;
}

#about {
    font-family: "Times New Roman", "Georgia", "serif";
    position: relative;
    padding: 2% 0;
    background-color: brown;
    clip-path: polygon(18% 0%, 18% 5%, 0% 5%, 0% 95%, 18% 95%, 18% 100%, 82% 100%, 82% 95%, 100% 95%, 100% 5%, 82% 5%, 82% 0%);
    -webkit-clip-path: polygon(18% 0%, 18% 5%, 0% 5%, 0% 95%, 18% 95%, 18% 100%, 82% 100%, 82% 95%, 100% 95%, 100% 5%, 82% 5%, 82% 0%);
}

p {
    font-size: 1.2rem;
}

#about > p {
    color: #ffe4e1;
    padding: 0 7%;
    text-align: justify;
}

#about > p:last-child {
    text-align: center;
    margin: 0 auto;
}

h1 {
    color: gold;
    text-align: center;
    margin: 0 auto;
    font-size: 1.8rem;
    padding: 0 5%;
}

/* Works section */ 
#works-heading {
    padding-top: 5%;
    background-color: var(--general-bg-color);
    font-size: 2rem;
}

.work-title {
    font-size: 1.8rem;
}

.work-description {
    color: khaki;
    background-color: var(--general-bg-color);
    display: grid;
    padding: 2% 5%;
}

.work-description-odd {
    grid-template-columns: 30% 70%;
}

.work-description-even {
    grid-template-columns: 70% 30%;
}

.work-text-left {
    text-align: right;
}

.link-container {
    height: 27vw;
    margin: auto 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: radial-gradient(circle at 50% 50%, red 42%, maroon 72%);
}

.link {
    width: 90%;
    height: 90%;
    filter: sepia(70%);
    clip-path: inset(0% round 50%);
    -webkit-clip-path: inset(0% round 50%);
}

img {
    width: 100%;
    height: 100%;
    transform: scale(1);
    transition: transform 0.4s;
}

.link:hover {
    filter: none;
    animation: squeeze 0.4s;
    animation-fill-mode: forwards;
}

.work-text {
    margin: auto 0;
}

.work-summary, .work-technologies {
    padding: 0 1rem;
}

.work-technologies {
    font-style: italic;
}

.ghost-element {
    width: 0;
    float: left;   
}

@keyframes squeeze {
  0% {
    clip-path: inset(0% round 50%);
    -webkit-clip-path: inset(0% round 50%);
  }

  100% {
    clip-path: inset(5% round 35%);
    -webkit-clip-path: inset(5% round 35%);
  }
}

img:hover {
    transform: scale(0.9);
}

.grow {
    animation: grow 0.4s;
}

@keyframes grow {
  0% {
    clip-path: inset(5% round 35%);
    -webkit-clip-path: inset(5% round 35%);
  }

  100% {
    clip-path: inset(0% round 50%);
    -webkit-clip-path: inset(0% round 50%);
  }
}

.link-p {
    padding: 5px;
}

.code-source-link {
    color: beige;
    text-decoration: none;
    border: 1px solid white;
    padding: 5px;
}

.code-source-link:hover {
    background-color: #FF0000;
}

.separator-0, .separator-1 {
    display: grid;
    width: 100%;
    height: 20px;
}

.separator-0 {
    grid-template-columns: 1fr 20px 3fr;
}

.separator-0 > div:first-child {
    background-color: var(--general-bg-color);
}


.separator-0 > div:last-child {
    background-color: transparent;
}


.separator-1 {
    grid-template-columns: 3fr 20px 1fr;
}

.separator-1 > div:last-child {
    background-color: var(--general-bg-color);
}


.separator-1 > div:first-child {
    background-color: transparent;
}

.middle-sep-path {
    fill: var(--general-bg-color);
}

/* --More info-- section */
#more-info {
    padding: 3rem 2rem 0rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 5%;
    background-color: var(--general-bg-color);
}

.more-info_option {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    text-align: center;
    border: 1px dashed darkviolet;
    border-radius: 0.5rem;
}

.more-info_option:hover {
    border: none;
}

.bg-img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1s, transform 1s;
}

.bg-img:hover {
    opacity: 1;
    transform: scale(1.1);
}

#cv-thumbnail {
    background-image: url("/static/assets/cv.PNG");
    background-size: cover;
}

#lit-thumbnail {
    background-image: url("/static/assets/writings.PNG");
    background-size: cover;
}

#prof-option {
    color: #ccccff;
}

#literary-option {
    color: #ccccff;
}

.tooltip {
    background-color: rgba(249, 237, 170, 0.7);
    border: 1px dotted gray;
    border-radius: 5%;
    color: var(--general-bg-color);
    margin-left: 15%;
    margin-right: 15%;
    text-align: center;
}

/* Contact section */
#contact {
    background-image: linear-gradient(var(--general-bg-color) 75%, rgba(126, 0, 0, 0.6));
    padding: 5% 10%;
}

#contact p {
    text-align: center;
}

form {
    background-image: url(/static/assets/bg-envelope.svg);
    background-size: 100% 100%;
    width: 90%;
    margin: 0 auto;
}

.form-row {
    padding-top: 1rem;
}

ul {
    list-style-type: disc;
    margin: 0;
}

input {
    height: 3rem;
}

textarea {
    height: 8rem;
}

input, textarea {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 2px solid red;
    transition: border-color 0.2s ease-in 0.2s;
    color: lightslategray;
}

.row-for-button {
    margin-top: 1rem;
}

button {
    width: 8rem;
    height: 3rem;
    background-color: #d94889;
    border: none;
    color: darkblue;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #ffff80;
}

ul li{
    color: orange;
}

button:focus {
    background-color: #ffff80;
    cursor: progress;
}

.bg-container {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -5;
    border: 2px solid black;
    width: 100%;
    height: 75%;
}

/* Footer els */
footer {
    padding: 2rem 0;
    display: grid;
    grid-template-rows: auto auto;
}

.footer_el {
    margin: 0 auto;
    text-shadow: 0px 1px 4px #FF0000;
}

.fab {
    color: chartreuse;
    transform: scale(1.5);
    padding: 0 1rem;
    transition: text-shadow 0.2s;
}

.fab:hover {
    text-shadow: none;
}

@media screen and (max-width: 800px) {
    .work-summary, .work-technologies {
        padding: 0;
    }
    .txt-content-left {
        padding-right: var(--txt-margin);
    }

    .txt-content-right {
        padding-left: var(--txt-margin);
    }

    .ghost-element-left {
        float: left;
        shape-outside: circle(18.5vw at -13.5vw 50%);
    }

    .ghost-element-right {
        float: right;
        shape-outside: circle(18.5vw at 18.5vw 50%);
    }
    
    .ghost-element {
        width: var(--txt-margin);
    }
}

@media screen and (max-width: 600px) {
    
    #hamburguer {
        visibility: visible;
    }
    
    .nav-container {
        border: none;
    }

    nav {
        flex-direction: column;
        padding: var(--navbar-el-height) 0;
        background-color: var(--bg-a-transitionColor);
    }

    nav > a {
        width: 100%;
    }
    
    nav > a:hover {
        border: none;
        box-shadow: none;
        background-color: lightsteelblue;
    }

    #personal-info-menu {
        flex-direction: column;
        align-items: center;
    }
    
    p {
        font-size: 0.8rem;
    }
    
    #central-heading > p {
        font-size: 5vw;
    }

    #central-heading {
        top: 2.2vw;
    }
    
    h1, .work-title {
        font-size: 1.2rem;    
    }
    
    #works-heading {   
        font-size: 1.3rem;
    }

    .link-container {
        width: 50%;
        height: 45vw;
        margin: 0 auto;
    }

    .work-description {
        grid-template-columns: 1fr;
    }
    
    .work-text {
        text-align: center;
    }
    
    .work-text-left {
        grid-row-start: 2;
    }
    
    .link-container-right {
        grid-row-start: 1;
    }
    
    .ghost-element {
        width: 0;
        shape-outside: none;
    }
    
    .separator-0 {
        grid-template-columns: 1fr 20px 5fr;
    }
    
    .separator-1 {  
        grid-template-columns: 5fr 20px 1fr;
    }
    
    .more-info_option {
        display: grid;
        padding: 1.5rem;
	   border: none;
    }
    
    .more-info_option:hover {
        background-image: url("/static/assets/frame.gif");
        background-size: 100% 100%;
    }

    .bg-img {
        position: relative;
        opacity: 1;
        transition: all 0s;
    }

    .bg-img:hover {
        transform: scale(1);
        background-image: none;
    }
    
    #cv-thumbnail, #lit-thumbnail {
        background-image: none;
    }
    
    .tooltip {
        padding: 5%;
        clip-path: polygon(0% 0%, 20% 5%, 40% 0%, 60% 5%, 80% 0%, 100% 5%, 95% 25%, 100% 50%, 95% 75%, 100% 100%, 80% 95%, 60% 100%, 40% 95%, 20% 100%, 0% 95%, 5% 75%, 0% 50%, 5% 25%);
        -webkit-clip-path: polygon(0% 0%, 20% 5%, 40% 0%, 60% 5%, 80% 0%, 100% 5%, 95% 25%, 100% 50%, 95% 75%, 100% 100%, 80% 95%, 60% 100%, 40% 95%, 20% 100%, 0% 95%, 5% 75%, 0% 50%, 5% 25%);
    }
    
    input {
        height: 2.7rem;
    }

    textarea {
        height: 7.2rem;
    }
    
    button {
        width: 6.4rem;
        height: 2.4rem;
    }
}

@media screen and (max-width: 400px) {
    
    .separator-0 > div:first-child {
        background-color: transparent;
    }
    
    .separator-1 > div:last-child {
        background-color: transparent;
    }
    
    .middle-sep-path {
        fill: transparent;
    }
    
    .separator-0, .separator-1 {
        background-color: rgba(50, 50, 50, 0.7);
    }
    
    #about {
        clip-path: none;
        -webkit-clip-path: none;
    }
    
    .nav-container {
        grid-template-columns: 1fr;
        height: auto;
        border: none;
    }
    
    #more-info {
        grid-template-columns: 1fr;
        padding: 3rem 1vh 1rem 1vh;
    }
    
    .more-info_option {
        background-color: brown;
    }
    
    .more-info_option:hover {
        background-image: none;
    }
    
    #prof-option {
        border-radius: 1rem 1rem 0 0;
        padding: 0.4rem 1vh 0 1vh;
    }
    
    #literary-option {
        border-radius: 0 0 1rem 1rem;
        padding: 0.4rem 1vh 0.4rem 1vh;
    }
    
    .tooltip {
        min-width: 60vw;
        margin: 0 auto;
        padding: 0;
        clip-path: none;
        -webkit-clip-path: none;
    }
    
    input {
        height: 1.8rem;
    }

    textarea {
        height: 4.8rem;
    }
    
    .row-for-button {
        display: flex;
        justify-content: center;
        margin-top: 4vw;
    }
    
    button {
        width: 5.28rem;
        height: 1.98rem;
    }
    
}
