@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,700&display=swap');

:root {
    --color-white: hsl(0, 0%, 100%);
    --color-black: hsl(0, 0%, 0%);
    --color-indigo-100: hsl(226, 100%, 94%);
    --color-indigo-600: hsl(243, 75%, 59%);
    --color-yellow-100: hsl(55, 97%, 88%);
    --color-yellow-400: hsl(48, 96%, 53%);
    --color-cyan-700: hsl(193, 82%, 31%);
    --color-cyan-600: hsl(192, 91%, 36%);
    --color-zinc-50: hsl(0, 0%, 98%);
    --color-zinc-100: hsl(240, 5%, 96%);
    --color-zinc-200: hsl(240, 6%, 90%);
    --color-zinc-300: hsl(240, 5%, 84%);
    --color-zinc-400: hsl(240, 5%, 65%);
    --color-zinc-600: hsl(240, 5%, 34%);
    --color-zinc-700: hsl(240, 5%, 26%);
    --color-zinc-800: hsl(240, 4%, 16%);
    --color-zinc-900: hsl(240, 6%, 10%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: scroll 0.5s;
    font-family: Verdana, Geneva, Tahoma, sans-serif;

}

body {
    background-color: var(--color-zinc-50);
    width: 100vw;
    overflow-x: hidden;
}

nav {
    box-shadow: 3px 3px 15px 1px rgba(0, 0, 0, 0.2);
    /* display: none; */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 10;
    background-color: var(--color-zinc-100);

}

nav .logo {
    flex-basis: 80px;
}

nav .logo-name {
    display: none;

}

nav .logo svg {
    text-align: center;
    height: 75px;
    padding: 5px;
    stroke: none;
    fill: var(--color-cyan-700);
    filter: drop-shadow(0px 0px 1px #fff);
    z-index: 100;
    transition: 0.5s;
}

svg {
    height: 100%;
    width: 100%;
    position: relative;
}

@media (max-width: 1279px) {
    nav .nav-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;

        /* fix for browser that doesn't support clip-path (e.g. iPhone 6) */
        height: 3em;
        width: 3em;
        right: 0;
        top: 0;

        position: fixed;
        text-align: center;
        background-color: var(--color-zinc-900);
        clip-path: circle(10% at 90% 10%);
        transition: 0.3s ease-out;
        opacity: 0;
        z-index: 1;
    }

    nav .nav-menu li {
        transform: scale(0.2) translate(45em, -70em);
        line-height: 0em;
        transition: 0.3s ease-out;
        list-style: none;
    }

    nav .nav-menu a {
        display: block;
        text-decoration: none;
        font-size: 2rem;
        padding: 0.5em 0;
        color: var(--color-zinc-300);
        transition: 0.3s ease-out;
    }

    nav .nav-menu a:hover {
        transform: scale(1.1);
        text-decoration: underline;
    }



    nav .toggle-menu {
        position: fixed;
        display: block;
        top: 1em;
        right: 1em;
        height: 3em;
        width: 3em;
        padding: 0.5em;
        border-radius: 10px;
        z-index: 1000;
    }

    /* toggle-Menu SVG.active animation */
    #menu-toggle-svg .top-line,
    #menu-toggle-svg .middle-line,
    #menu-toggle-svg .bottom-line {
        stroke: var(--color-zinc-900);
        transition: 0.5s;
    }

    #menu-toggle-svg.active .top-line,
    #menu-toggle-svg.active .bottom-line {
        stroke: var(--color-zinc-300);
    }

    #menu-toggle-svg.active .top-line {
        transform: rotateZ(45deg) translate(5.5%, -8%) scaleX(1.3);
    }

    #menu-toggle-svg.active .middle-line {
        opacity: 0;
    }

    #menu-toggle-svg.active .bottom-line {
        transform: rotateZ(-45deg) translate(-63%, -20.5%) scaleX(1.3);
    }



    /* Navbar Mobile Active*/

    nav.active .logo svg {
        transform: translateY(90%);
    }

    nav.active .nav-menu {
        clip-path: circle(100%);
        height: 100vh;
        width: 100vw;
        opacity: 0.95;
    }

    nav.active .nav-menu li {
        transform: inherit;
        line-height: inherit;
    }
}

/* Welcome Section */

#welcome-section {
    max-width: 100vw;
    background-color: var(--color-zinc-100);
    height: 100vh;
}

#welcome-section .welcome-text {
    position: relative;
    top: 45vh;
}

#welcome-section h1 {
    font-family: 'Playfair Display', serif;
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    text-align: center;
    color: var(--color-zinc-800);
}

#welcome-section h1::before {
    font-family: 'Playfair Display', serif;
    content: "Hi, I'm";
    font-size: 0.5em;
    top: -1.7em;
    left: 1.5em;
    position: relative;
    color: var(--color-zinc-600);
}

#welcome-section h2 {
    font-family: 'Playfair Display', serif;
    left: 50vw;
    width: 50%;
    color: var(--color-zinc-700);
    position: relative;
    font-size: 1.5rem;
    text-align: left;
}

#welcome-section h2:after {
    content: "Designer, Developer, Dreamer";
    animation: typing 5s infinite;
    color: var(--color-yellow-400);
}

@keyframes typing {
    0% {
        content: "";
    }

    2% {
        content: "D";
    }

    4% {
        content: "De";
    }

    8% {
        content: "Des";
    }

    10% {
        content: "Desi";
    }

    12% {
        content: "Desig";
    }

    14% {
        content: "Design";
    }

    26% {
        content: "Designer";
    }

    28% {
        content: "Designe";
    }

    29% {
        content: "Design";
    }

    30% {
        content: "Desig";
    }

    31% {
        content: "Desi";
    }

    32% {
        content: "Des";
    }

    33% {
        content: "De";
    }

    34% {
        content: "D";
    }

    36% {
        content: "De";
    }

    38% {
        content: "Dev";
    }

    40% {
        content: "Deve";
    }

    42% {
        content: "Devel";
    }

    44% {
        content: "Develo";
    }

    46% {
        content: "Develop";
    }

    48% {
        content: "Develope";
    }

    62% {
        content: "Developer";
    }

    64% {
        content: "Develope";
    }

    65% {
        content: "Develop";
    }

    66% {
        content: "Develo";
    }

    67% {
        content: "Devel";
    }

    68% {
        content: "Deve";
    }

    69% {
        content: "Dev";
    }

    70% {
        content: "De";
    }

    71% {
        content: "D";
    }

    73% {
        content: "Dr";
    }

    75% {
        content: "Dre";
    }

    77% {
        content: "Drea";
    }

    79% {
        content: "Dream";
    }

    81% {
        content: "Dreame";
    }

    93% {
        content: "Dreamer";
    }

    95% {
        content: "Dreame";
    }

    96% {
        content: "Dream";
    }

    97% {
        content: "Drea";
    }

    98% {
        content: "Dre";
    }

    99% {
        content: "Dr";
    }

    100% {
        content: "D";
    }
}

/* I should use SVG here, maybe I will update in future */
#welcome-section .ws-graphics-main,
#welcome-section .ws-graphics-main::before,
#welcome-section .ws-graphics-main::after {
    display: block;
    position: absolute;
    margin: auto;
    background-color: var(--color-cyan-700);
    top: 25vh;
    bottom: 25vh;
    left: 25vw;
    right: 25vw;
    width: 50vw;
    height: 50vh;
    max-width: 400px;
    border-radius: 2em;
    transform: skew(-10deg);
    transition: 1s;
    opacity: 0.7;
}

#welcome-section .ws-graphics-main::before {
    content: "";
    background-color: var(--color-yellow-100);
    width: 50%;
    height: 50%;
    transform: translate(-150%, -90%);
    transition: 1s;


}

#welcome-section .ws-graphics-main::after {
    content: "";
    background-color: var(--color-indigo-600);
    width: 50%;
    height: 50%;
    transform: translate(50%, 90%);
    transition: 1s;

}

#projects {
    background-color: var(--color-indigo-100);
    padding-bottom: 2em;
}

#contact-me .heading h2,
#projects h2 {
    text-align: center;
    padding: 1em;
    text-decoration: underline;
    color: var(--color-zinc-900);


}



#projects .showcase img {
    width: 100%;
    border-radius: 5px 5px 0 0;
}



#projects a {
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 2em;
    padding: 0.75em;
    border-radius: 15px;
    background-color: var(--color-white);
    box-shadow: 3px 3px 25px 2px rgba(0, 0, 0, 0.2);
    transition: 300ms;
    color: var(--color-zinc-900);
}

#projects a:hover {
    box-shadow: 5px 5px 25px 2px rgba(0, 0, 0, 0.5);
}

#contact-me {
    color: var(--color-zinc-50);
    background-color: var(--color-zinc-800);
}

#contact-me .heading h2,
#contact-me .heading {
    text-align: center;
    color: var(--color-zinc-50);

}

.contact-method ul {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 5em;
    list-style: none;
    gap: 2em;
    position: relative;
    flex-wrap: wrap;
}


.contact-method li a {
    display: inline-block;
    text-decoration: none;
    color: var(--color-zinc-100);
    padding: 0.5em;
    transition: 0.3s;
    position: relative;
}

.contact-method li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 10%;
    transition: 0.5s;
    background-color: var(--color-zinc-100);
}

.contact-method svg {
    width: 1.5em;
    height: 1.5em;
    bottom: -0.4em;
    margin-right: 0.5em;
    fill: var(--color-zinc-100);
}

.contact-method li a:hover::after {
    width: 80%;
}

.form {
    background-color: var(--color-zinc-200);
    color: var(--color-zinc-800);
    width: 80vw;
    padding: 3em 1em 2em;
    position: relative;
    margin: auto;
    max-width: 550px;
    margin-bottom: 5em;
    border-radius: 5px;
    box-shadow: 1px 1px 5px 2px rgba(255, 255, 255, 0.3);

}

.form::before {
    content: "OR";
    background-color: var(--color-zinc-200);
    color: var(--color-zinc-800);
    position: absolute;
    padding: 1em;
    width: 1.7em;
    top: -1.5em;
    left: 0;
    right: 0;
    margin: auto;
    border-radius: 50%;
    font-weight: 700;
    box-shadow: 4px 4px 10px rgba(14, 116, 144, 0.1);
}

.form h3,
p {
    text-align: center;
}

.form p {
    font-size: 0.8rem;
}

.form span {
    color: red;

}


.form input,
textarea {
    padding: 1em;
    width: 100%;
    margin-top: 0.25em;
    margin-bottom: 2em;
    border-radius: 5px;
    transition: 0.3s;
    border: none;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2), inset 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.form input[type=text]:focus,
.form input[type=email]:focus,
textarea:focus {
    outline: 1.5px solid var(--color-zinc-400);
}

.form input[type=submit] {
    background-color: var(--color-cyan-600);
    color: var(--color-zinc-100);
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0.6em;
    cursor: pointer;

}

.form input:hover,
textarea:hover {
    box-shadow: 3px 3px 10px 2px rgba(0, 0, 0, 0.2);
}

.form input[type=submit]:hover {
    background-color: var(--color-cyan-700);
}

.alert {
    display: none;
    transition: 0.3s;
    cursor: default;
}

.alert.active {
    display: block;
    position: fixed;
    height: 100vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0.92);
    top: 0;
    z-index: 11;
}

.alert-msg {
    position: relative;
    width: 350px;
    height: 200px;
    margin: auto;
    top: 30vh;
    border-radius: 15px;
    background-color: var(--color-zinc-100);

}

.alert-msg h3 {
    padding: 1em;
    display: inline-block;
}

.alert-msg span {
    position: absolute;
    padding: 1.4em;
    right: 1em;
    cursor: pointer;
}

.alert-msg p {
    padding: 3em;
}


footer {
    position: relative;
    background-color: var(--color-zinc-700);
    text-align: center;
    box-shadow: 3px 3px 16px 2px rgba(14, 116, 144, 0.3);
}

footer p {
    padding: 1.5em;
    color: var(--color-white);
    font-weight: 700;
}

@media (min-width:720px) {
    #projects .showcase {
        display: flex;
        align-items: center;
        justify-content: space-around;
        flex-wrap: wrap;
    }



    #projects .showcase a {
        flex-basis: 40%;
    }

}

@media (min-width:1280px) {
    #projects .showcase a {
        flex-basis: 20%;
    }

    #navbar .toggle-menu {
        display: none;
    }

    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-left: 100px;
    }

    nav .nav-menu {
        display: flex;
        justify-content: center;
        list-style: none;
    }

    nav .nav-menu a {
        display: inline-block;
        padding: 0.7em 1.2em;
        font-size: 1.6vw;
        text-decoration: none;
        color: var(--color-cyan-700);
        position: relative;
    }


    nav .nav-menu a::after {
        content: "";
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0.5em;
        left: 20%;
        transition: 0.5s;
        background-color: var(--color-cyan-700);
    }

    nav .nav-menu a::before {
        content: "";
        position: absolute;
        height: 1em;
        width: 1px;
        background-color: var(--color-zinc-400);
        left: 0;
        bottom: 0.8em;
    }

    nav .nav-menu a:hover::after {
        width: 62%;
    }

    nav .logo-icon {
        width: 80px;
    }

    nav .logo-name {
        max-width: 200px;
        display: inline;
    }

    nav .logo {
        flex-grow: 1;
    }


}

@media (min-width:1440px) {
    nav .nav-menu a {

        font-size: 1.3vw;

    }

}

@font-face {
    font-family: 'stranger-back-in-the-night';
    src: url("./fonts/stranger-back-in-the-night.woff2") format('woff2');
}