/* Global Rules Start */
:root {
    --theme-color: #0f4c75;
    --landing-color: #171f24;
    --burger-menu-color: #303f47;
    --first-color: #1b262c;
    --second-color: #25323a;
    --third-color: #3282b8;
    --fourth-color: #bbe1fa;
    --short-transition-time: 0.3s;
    --long-transition-time: 0.5s;
    --main-padding: 40px 0;
}

::-webkit-scrollbar {
    width: 5px;
    background-color: #0c1414;
}

::-webkit-scrollbar-thumb {
    background: var(--theme-color);
    border-radius: 100vw;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f3f5f;
}

@supports (scrollbar-color: red blue) {
    * {
        scrollbar-color: var(--theme-color) #1b262c;
        scrollbar-width: thin;
    }
}

* {
    color: whitesmoke;
}

*,
*::before,
*::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    overflow: overlay;
}

a {
    text-decoration: none;
}

section[id] {
    scroll-margin-top: 63px;
}

.important {
    color: var(--theme-color);
    letter-spacing: 0.3px;
}

.title {
    text-align: center;
    margin: auto;
    width: fit-content;
    position: relative;
    cursor: default;
}

.title h2 {
    margin: 0;
    color: var(--theme-color);
    font-size: 85px;
    transition: transform var(--long-transition-time);
}

.title::before {
    content: attr(info);
    color: var(--third-color);
    opacity: 0;
    position: absolute;
    font-size: 20px;
    width: 100%;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
    transition:
        transform var(--long-transition-time),
        opacity var(--short-transition-time);
}

.title:hover h2 {
    transform: translate(0, -18px);
}

.title:hover::before {
    transform: translate(50%, 18px);
    opacity: 0.6;
}

@media (max-width: 480px) {
    .title h2 {
        font-size: 70px;
    }

    .title::before {
        font-size: 18px;
    }

    .title:hover h2 {
        transform: translate(0, -14px);
    }

    .title:hover::before {
        transform: translate(50%, 14px);
        opacity: 0.6;
    }
}

@media (max-width: 400px) {
    .title h2 {
        font-size: 60px;
    }
}

.card {
    position: relative;
    transition:
        background-color var(--long-transition-time),
        transform var(--short-transition-time);
}

.card > .card-title,
.card > p:first-of-type {
    position: absolute;
    top: 50%;
    right: 50%;
    transform: translate(50%, -50%);
}

.card-title {
    transition: transform var(--long-transition-time);
}

.card-title h3 {
    color: var(--theme-color);
    font-size: 30px;
    margin: 12px 0;
    letter-spacing: 1px;
}

.card > p:first-of-type {
    opacity: 0;
    padding: 0 15px;
    width: 100%;
    transition:
        transform var(--long-transition-time),
        opacity var(--short-transition-time);
}

.card:hover {
    background-color: var(--theme-color);
    transform: scale(1.1);
    box-shadow: 0 5px 8px 2px rgba(0, 0, 0, 0.1);
}

.card:hover .card-title {
    transform: translate(50%, -75%);
}

.card:hover .card-title * {
    color: var(--third-color);
}

.card:hover i {
    animation: bounce 0.6s linear alternate infinite;
}

.card:hover > p:first-of-type {
    opacity: 1;
    transform: translate(50%, 25%);
}

@media (max-width: 400px) {
    .card {
        width: 250px;
    }

    .card-title h3 {
        font-size: 25px;
    }
}

.container {
    padding-left: 15px;
    padding-right: 15px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .container {
        width: 750px;
    }
}

@media (min-width: 992px) {
    .container {
        width: 970px;
    }
}

@media (min-width: 1200px) {
    .container {
        width: 1170px;
    }
}
/* Global Rules End */

/* Top Arrow Start */
.top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    bottom: 20px;
    right: 20px;
    background-color: #0c1414;
    padding: 10px;
    text-align: center;
    border-radius: 50%;
    transition:
        transform var(--short-transition-time),
        opacity var(--short-transition-time);
    cursor: pointer;
    z-index: 9999;
}

.top:hover {
    transform: scale(1.1);
}

.top:hover i {
    animation: bounce-arrow 0.4s linear alternate infinite;
}

@media (max-width: 480px) {
    .top {
        right: 12px;
        bottom: 12px;
    }
}
/* Top Arrow End*/

/* Header Start */
header {
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(7px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header a {
    transition:
        color var(--short-transition-time),
        transform var(--short-transition-time);
    display: inline-block;
    position: relative;
}

header a:hover {
    color: var(--third-color);
}

header .logo {
    letter-spacing: 3px;
    font-size: 20px;
}

nav.words a:not(:first-child) {
    margin-left: 20px;
}

nav.words a::after {
    content: "";
    position: absolute;
    top: 125%;
    width: 100%;
    visibility: hidden;
    right: 0;
    height: 2px;
    background-position: right;
    background: linear-gradient(
            to left,
            transparent 50%,
            var(--theme-color) 50%
        )
        right;
    background-size: 200%;
    transition:
        background-position var(--short-transition-time),
        visibility var(--short-transition-time);
}

nav.words a:hover::after {
    background-position: left;
    visibility: visible;
}

nav.burger-menu {
    position: relative;
}

nav.burger-menu i {
    color: whitesmoke;
}

nav.burger-menu .links {
    visibility: hidden;
    position: absolute;
    list-style: none;
    top: 150%;
    background-color: var(--burger-menu-color);
    right: 0;
    margin: 0;
    padding: 0;
    border-radius: 3px;
}

nav.burger-menu:hover .links {
    visibility: visible;
}

nav.burger-menu::before {
    position: absolute;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 20px solid var(--burger-menu-color);
    bottom: -20px;
    right: 0;
}

nav.burger-menu:hover::before {
    content: "";
}

nav.burger-menu li:not(:last-child) {
    border-bottom: 1px solid var(--first-color);
}

nav.burger-menu a {
    display: block;
    padding: 18px 90px 18px 10px;
    height: 100%;
}

nav.burger-menu li:hover a {
    transform: translate(5px);
    color: var(--third-color);
}

@media (min-width: 491px) {
    nav.burger-menu {
        display: none;
    }
}

@media (max-width: 490px) {
    nav.words {
        display: none;
    }

    nav.burger-menu {
        display: block;
    }
}
/* Header End */

/* Landing Start */
.landing {
    height: 100vh;
    height: 100svh;
    font-size: 28px;
    text-align: center;
    background-color: var(--landing-color);
}

.landing-content {
    min-height: 100vh;
    min-height: 100svh;
    padding-top: 63px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    justify-content: center;
    align-items: center;
}

.landing-text p {
    letter-spacing: 0.5px;
    margin: 0;
}

.landing .links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-button {
    color: var(--theme-color);
    border: 1px solid var(--theme-color);
    padding: 18px;
    border-radius: 5px;
    background: linear-gradient(
            to left,
            transparent 50%,
            var(--theme-color) 50%
        )
        right;
    background-size: 200%;
    transition:
        background-position var(--long-transition-time),
        color var(--long-transition-time);
}

.landing-button:nth-child(2) {
    color: #009688;
    border-color: #009688;
    background-image: linear-gradient(to left, transparent 50%, #009688 50%);
}

.landing-button:hover {
    background-position: left;
    color: whitesmoke;
}

@media (max-width: 400px), (max-height: 470px) {
    .landing {
        font-size: 22px;
    }
}

@media (max-height: 370px) {
    .landing-content {
        gap: 0;
        justify-content: space-evenly;
    }
}
/* Landing End */

/* Services Start */
.services {
    background-color: var(--first-color);
    padding: var(--main-padding);
}

.services .container {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 35px;
}

.serv {
    width: 320px;
    height: 250px;
    border: 1px solid var(--theme-color);
    border-radius: 8px;
    text-align: center;
}
/* Services End */

/* Skills Start */
.skills {
    background-color: var(--second-color);
    padding: var(--main-padding);
}

.skills .container {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 35px;
}

.skill {
    width: 320px;
    height: 280px;
    border: 1px solid var(--theme-color);
    border-radius: 8px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.skill span {
    color: var(--third-color);
}

.skill i {
    transition: calc(var(--long-transition-time) + 0.3s);
}

.exp {
    font-size: large;
    position: absolute;
}

p.years {
    transform: translate(-100%);
}

p.level {
    transform: translate(50%);
}

.skill:hover .exp {
    color: var(--third-color);
}

.skill:hover i {
    rotate: y 0.5turn;
}
/* Skills End */

/* Projects Start */
.projects {
    background-color: var(--first-color);
    padding: var(--main-padding);
}

.projects .container {
    margin-top: 50px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 40px;
}

.pro {
    width: 320px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    border: 1px solid var(--theme-color);
    gap: 22px;
    padding-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    transition:
        background-color var(--long-transition-time),
        transform var(--short-transition-time);
}

.pro .tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.pro .tags * {
    background-color: var(--theme-color);
    padding: 5px;
    font-size: small;
    border-radius: 8px;
    margin: 0;
    transition:
        background-color var(--short-transition-time),
        color var(--short-transition-time);
}

.pro:hover .tags * {
    background-color: var(--third-color);
}

.tags *:hover {
    background-color: var(--fourth-color) !important;
    cursor: default;
    color: var(--third-color);
}

.pro:hover {
    background-color: var(--theme-color);
    transform: scale(1.1);
    box-shadow: 0 5px 8px 2px rgba(0, 0, 0, 0.1);
}

.pro .important {
    transition: color var(--short-transition-time);
    width: fit-content;
}

.pro:hover .important {
    color: var(--third-color);
}

.pro .important:hover,
.pro .important:hover * {
    color: var(--fourth-color);
}

.pro i {
    margin-left: 5px;
}

.pro:hover i {
    animation: bounce-vertical 0.5s linear alternate infinite;
}

.pro .img {
    height: 225px;
}

.pro img {
    width: 100%;
    height: 100%;
}

.pro .content {
    margin: 0 12px;
    font-size: large;
}

.pro .link {
    font-size: 33px;
}

@media (max-width: 400px) {
    .pro .content {
        font-size: medium;
    }

    .pro .link {
        font-size: 25px;
    }
}
/* Projects End */

/* Footer Start */
footer {
    padding: 25px;
    background-color: var(--landing-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 18px;
}

footer .start {
    width: 240px;
    text-align: center;
    margin: auto;
    position: relative;
}

footer > p {
    margin: 15px auto 0;
    font-size: 18px;
}

footer .start h3 {
    font-size: 35px;
    margin: 0 auto 15px;
}

footer .start span {
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: var(--landing-color);
    border-radius: 50%;
    border: 2px dotted whitesmoke;
    animation: rotate 5s linear infinite;
}

.start::before {
    content: "";
    height: 2px;
    width: 0;
    background-color: whitesmoke;
    position: absolute;
    top: calc(100% - 12.5px);
    right: calc(50% + 7.5px);
    animation: width-increase 1.5s linear infinite alternate;
}

.start::after {
    content: "";
    height: 2px;
    width: 0;
    background-color: whitesmoke;
    position: absolute;
    top: calc(100% - 12.5px);
    left: calc(50% + 7.5px);
    animation: width-increase 1.5s linear infinite alternate;
}

.social {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}

.social i {
    transition:
        color var(--short-transition-time),
        transform var(--short-transition-time);
}

.social a:hover i {
    color: var(--third-color);
    transform: scale(1.1);
}
/* Footer End */

/* Animation Start */
@keyframes bounce {
    0% {
        transform: translate(0, 4px);
    }

    100% {
        transform: translate(0, -4px);
    }
}

@keyframes bounce-arrow {
    100% {
        transform: translate(0, -4px);
    }
}

@keyframes bounce-vertical {
    0% {
        transform: translate(2px, 0);
    }

    100% {
        transform: translate(-2px, 0);
    }
}

@keyframes rotate {
    100% {
        transform: rotate(1turn);
    }
}

@keyframes width-increase {
    100% {
        width: 50%;
    }
}
/* Animation End */
