@font-face {
    font-family: "BYekan";
    src: url("assets/fonts/BYekan.ttf");
    font-weight: 300;
}

@font-face {
    font-family: "BYekan";
    src: url("assets/fonts/BYekan-Bold.ttf");
    font-weight: 600;
}

@font-face {
    font-family: "Roboto";
    src: url("./assets/fonts/Roboto-Light.ttf");
    font-weight: 300;
}

@font-face {
    font-family: "Roboto";
    src: url("./assets/fonts/Roboto-Medium.ttf");
    font-weight: 500;
}

@font-face {
    font-family: "Roboto";
    src: url("./assets/fonts/Roboto-Bold.ttf");
    font-weight: 600;
}

@font-face {
    font-family: "Roboto";
    src: url("./assets/fonts/Roboto-Italic.ttf");
    font-weight: 300;
    font-style: italic;
}

@font-face {
    font-family: "Roboto";
    src: url("./assets/fonts/Roboto-BlackItalic.ttf");
    font-weight: 600;
    font-style: italic;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --main-background: #f8bb00;
    --toggle-language-background: #3b3939;
    --toggle-language-options-hover: #f8bb00;
    --toggle-theme-background: #3b3939;
    --toggle-theme-circle-border: #3b3939;
    --toggle-button-closed: black;
    --text-primary: #3d3d3d;
    --text-secondary: black;
    --menu-background: #f8bb00;
    --menu-items-color: black;
    --menu-items-hover: #dbe8d8;
    --intro-wrapper-background: rgba(255, 255, 255, 0.6);
    --wrappers-background: white;
    --header-line: red;
    --red-color: #e63946;
    --education-item-prefix: green;
    --education-logo-color: black;
    --education-item-title: black;
    --education-item-date: green;
    --education-item-degree: black;
    --education-item-place: red;
    --education-item-location: black;
    --skillbar-background: #a8dadc;
    --form-input-focus: #fdf0d5;
    --form-input-focus-shadow: #2ec4b6;
    --footer-icon: #f4e6d5;
}

body {
    font-family: "Roboto", sans-serif;
    font-weight: 300;
    margin: 0;
    color: var(--text-primary);
}

body.dark-mode {
    --main-background: #212529;
    --toggle-language-background: #949c9c;
    --toggle-language-options-hover: #212529;
    --toggle-theme-background: #00c3ff;
    --toggle-theme-circle-border: #00c3ff;
    --toggle-button-closed: white;
    --text-primary: white;
    --text-secondary: white;
    --menu-background: #d84e4b;
    --menu-items-color: white;
    --menu-items-hover: #949c9c;
    --intro-wrapper-background: rgba(44,48,54,0.8);
    --wrappers-background: #2c3036;
    --header-line: #ffbc2c;
    --red-color: #d84e4b;
    --education-item-prefix: #949c9c;
    --education-logo-color: wheat;
    --education-item-title: white;
    --education-item-date: #f8bb00;
    --education-item-degree: wheat;
    --education-item-place: #d84e4b;
    --education-item-location: #949c9c;
    --skillbar-background: wheat;
    --form-input-focus: #ffd986;
    --form-input-focus-shadow: #d84e4b;
    --footer-icon: white;
}

body.persian {
    direction: rtl;
    font-family: "BYekan";
    font-weight: 300;
}

.backdrop {
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
}

.shadow {
    background: rgba(0, 0, 0, 0.502);
    z-index: -1;
}

.backdrop,
.shadow {
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.backdrop--opened,
.shadow--opened {
    display: block;
    opacity: 1;
}

.header {
    width: 100%;
    min-width: 20rem;
    justify-content: space-between;
    background: var(--main-background);
    padding: 0.5rem 1rem 0.5rem 4rem;
    top: 0;
    left: 0;
    box-shadow: 0 2px 5px 0 rgba(32, 32, 32, 0.541);
    z-index: 100;
}

body.persian .header {
    padding-right: 4rem;
    padding-left: 1rem;
}

.toggle-button {
    top: 0.3rem;
    left: 1rem;
    width: 2.5rem;
    height: 2rem;
    cursor: pointer;
    background: transparent;
    border: none;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 250;
}

body.persian .toggle-button {
    left: unset;
    right: 1rem;
}

.toggle-button__bar {
    display: block;
    width: 100%;
    height: 0.2rem;
    background: #fff;
    margin: 0.5rem 0;
    transition: all 0.5s ease;
}

.toggle-button--close .toggle-button__bar {
    position: absolute;
    top: 0.5rem;
    background: var(--toggle-button-closed);
}

.toggle-button--close .toggle-button__bar:first-child {
    transform: rotateZ(45deg);
}

.toggle-button--close .toggle-button__bar:nth-child(2) {
    width: 0;
}

.toggle-button--close .toggle-button__bar:last-child {
    transform: rotateZ(-45deg);
}

.toggle-theme {
    position: relative;
    justify-content: space-between;
    width: 5rem;
    height: 2rem;
    cursor: pointer;
    border-radius: 50px;
    background: var(--toggle-theme-background); 
    padding: 0 0.5rem;
    font-size: 1.2rem;
    transition: all 5s ease;
}

body.persian .toggle-theme {
    direction: ltr;
}

.toggle-theme,
.toggle-language {
    border: 2px solid #fff;
    transition: border-color 0.4s ease;
}

.toggle-theme:hover,
.toggle-theme:active {
    border-color: #c03e27;
}

.toggle-theme__option--light-mode {
    color: #fcbf49;
}

.toggle-theme__option--dark-mode {
    color: #fff;
}

.toggle-theme__circle {
    position: absolute;
    left: 50%;
    width: 50%;
    height: 100%;
    background: #2bff00;
    border-radius: inherit;
    border: 2px solid var(--toggle-theme-circle-border);
    transition: left 0.2s ease-out;
}

.toggle-language {
    border-radius: 10px;
    padding: 0rem 0.5rem;
    background: var(--toggle-language-background);
    color: #fff;
    width: 4rem;
    height: 2rem;
    text-align: center;
    font-family: "BYekan";
    font-weight: 300;
}

.toggle-language__option {
    text-decoration: none;
    color: inherit;
    vertical-align: middle;
    transition: color 0.2s ease;
}

.toggle-language__option:hover,
.toggle-language__option:active {
    color: var(--toggle-language-options-hover);
}

.toggle-language span {
    vertical-align: middle;
}

.menu-nav {
    left: 0;
    top: 0;
    width: 0;
    height: 100vh;
    background: var(--menu-background);
    z-index: 200;
    transition: width 0.5s ease-out;
    overflow: hidden;
}

body.persian .menu-nav {
    right: 0;
    left: unset;
}

.menu-nav--opened {
    width: 13.5rem;
}

.menu-nav ul {
    min-width: 100%;
    margin-top: 3.5rem;
    padding: 0;
    flex-shrink: 0;
}

.menu-nav__item {
    margin: 0;
    padding: 0 0 0 1rem;
    list-style: none;
    transition: all 0.2s ease;
}

body.persian .menu-nav__item {
    padding-right: 1rem;
    padding-left: 0;
}

.menu-nav__item:hover,
.menu-nav__item:active {
    background: var(--menu-items-hover);
}

.menu-nav__item a {
    text-decoration: none;
    padding: 0 0.5rem;
    color: var(--menu-items-color);
}

.menu-nav__item .item__logo {
    font-size: 1.5rem;
    color: var(--menu-items-color);
}

.menu-nav__item .item__title {
    margin-left: 0.5rem;
}

body.persian .menu-nav__item .item__title {
    margin-left: 0;
    margin-right: 0.5rem;
}

.footer {
    padding: 0.5rem;
    background: var(--main-background);
}

.footer__nav ul {
    justify-content: space-between;
    margin: 0;
    padding: 0;
}

.footer__nav ul li {
    list-style: none;
    margin: 0 1rem;
    padding: 0;
}

.footer__link {
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    text-decoration: none;
    transition: all 0.5s ease;
    color: var(--footer-icon);
}

.footer__link:hover,
.footer__link:active {
    transform: rotateZ(360deg);
    background: var(--red-color);
}

.footer__link span {
    font-size: 2rem;
}

.header,
.buttons-container,
.toggle-theme,
.menu-nav--opened,
.menu-nav__item a,
.footer,
.footer__nav ul,
.footer__link {
    display: flex;
}


.backdrop,
.shadow,
.header,
.toggle-button,
.menu-nav {
    position: fixed;
}

.backdrop,
.shadow,
.menu-nav {
    display: none;
}

.footer,
.footer__link {
    justify-content: center;
}

.header,
.buttons-container,
.toggle-theme,
.menu-nav,
.menu-nav__item a,
.footer__link {
    align-items: center;
}