@font-face {
    font-family: 'Nexa-Replica-Ru';
    src: url('../fonts/Nexa-Replica-RU.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Regular';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter-Bold';
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}

:root {
    /* accent colors */
    --accent-area-color: #fa6a37;
    --secondary-accent-color: #305bf1;
    --specific-text-color: #636363;
    --light-yellow: #efd28d;

    /* selection colors */
    --dark-selection-color: #ffaf2e;

    /* langs progresses */
    --width-cs: 85%;
    --width-cpp: 30%;
    --width-python: 20%;
    --width-jsts: 75%;
    --width-java: 40%;
    --width-sql: 80%;
}

[data-theme='dark'] {
    --main-text-color: white;
    --page-background: #000;
    --secondary-background: #121313;
    --additive-background: #3c3c3c;
    --skills-background: #3b3b3b;
    --hover-ref-line: #ffffff63;
}

[data-theme='light'] {
    --main-text-color: black;
    --page-background: white;
    --secondary-background: #eaeaea;
    --additive-background: #c7c7c7;
    --skills-background: #e0d3d3;
    --hover-ref-line: #94949463;
}

/*-----------------------------------*\
  #RESET
\*-----------------------------------*/

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

a {
    text-decoration: none;
}

li {
    list-style: none;
}

img,
ion-icon,
a,
button,
time {
    display: block;
}

button {
    font: inherit;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

input,
textarea {
    display: block;
    width: 100%;
    background: none;
    font: inherit;
}

html {
    font-family: 'Inter-Regular';
}

body {
    background: var(--page-background);
}

moz::selection,
::selection {
    background-color: var(--dark-selection-color);
}

h1::selection {
    text-shadow: var(--accent-area-color) 2px 5px;
}

/*-----------------------------------*\
  #DYNAMIC
\*-----------------------------------*/

.animated-section-background {
    border-radius: 35px;
    animation: background-color-change 1s;
    animation-direction: alternate-reverse;
}

@keyframes background-color-change {
    0% {
        background-color: var(--secondary-background);
        padding: 0px;
    }
    100% {
        background-color: var(--additive-background);
        padding: 10px;
    }
}

/*-----------------------------------*\
  #GLOBALS
\*-----------------------------------*/

.flex-center-wrap-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.main-flex-container {
    margin: 20px;
    gap: 20px;
    display: flex;
    justify-content: center;
}

.accent-span-text {
    color: var(--accent-area-color);
    font-family: 'Inter-Bold';
}

.accent-italic-span-text {
    color: var(--specific-text-color);
    font-style: italic;
}

.formatted-text {
    margin-bottom: 10px;
}

span {
    display: inline;
}

/*-----------------------------------*\
  #SWITCHER
\*-----------------------------------*/

.controls-container {
    margin-left: 20px;
    margin-top: 20px;
    display: flex;
    gap: 0.5rem;
}

#github-link {
    position: absolute;
    top: 1em;
    right: 1.4em;
    width: 45px;
    height: 45px;
    fill: white;
}

#github-link:hover,
#github-link:active {
    scale: 1.1;
}

/* Theme Switch */

.theme-toggle-button {
    background-color: var(--secondary-background);
    width: 45px;
    height: 45px;
    border-radius: 35px;
}

.theme-toggle-button.dark {
    box-shadow: var(--secondary-accent-color);
}

.theme-toggle-button.light {
    box-shadow: var(--light-yellow);
}

.switcher_button {
    width: 50%;
}

.switch-button-content {
    margin: auto;
}

.theme-switch .light:hover,
.theme-switch .light:active {
    animation: move-shadow-light 0.5s cubic-bezier(0.455, 0.03, 0.515, 0.955)
        forwards;
}

@keyframes move-shadow-light {
    0% {
        filter: drop-shadow(0px 0px var(--light-yellow));
        -webkit-filter: drop-shadow(0px 0px var(--light-yellow));
    }
    50% {
        filter: drop-shadow(0px 2px var(--light-yellow));
        -webkit-filter: drop-shadow(0px 2px var(--light-yellow));
    }
    100% {
        filter: drop-shadow(0px 4px var(--light-yellow));
        -webkit-filter: drop-shadow(0px 4px var(--light-yellow));
    }
}

.theme-switch .dark:hover,
.theme-switch .dark:active {
    animation: move-shadow-dark 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes move-shadow-dark {
    0% {
        filter: drop-shadow(0px 0px var(--secondary-accent-color));
        -webkit-filter: drop-shadow(0px 0px var(--secondary-accent-color));
    }
    50% {
        filter: drop-shadow(0px -2px var(--secondary-accent-color));
        -webkit-filter: drop-shadow(0px -2px var(--secondary-accent-color));
    }
    100% {
        filter: drop-shadow(0px -4px var(--secondary-accent-color));
        -webkit-filter: drop-shadow(0px -4px var(--secondary-accent-color));
    }
}

/* Lang Switch */

.lang-switch {
    background-color: var(--secondary-background);
    width: 110px;
    height: 45px;
    border-radius: 35px;
    display: flex;
    align-items: center;
    flex-direction: row;
}

.lang-switch-button {
    text-align: center;
    font-family: 'Inter-Bold';
    font-size: 1em;
    color: var(--main-text-color);
    width: 100%;
    height: 100%;
    border-radius: 35px;
    transition: background-color 1s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

button.lang-switch-button.active {
    background-color: var(--accent-area-color);
}

/*-----------------------------------*\
  #Aside Briefly
\*-----------------------------------*/

.personal-photo {
    margin: 20px;
    border-radius: 35px;
}

.briefly-sidebar {
    width: min-content;
    display: flex;
    flex-direction: column;
}

.briefly-container {
    border-radius: 35px;
    background-color: var(--secondary-background);
    max-width: 550px;
    display: flex;
    align-items: center;
    flex-direction: column;
}

.briefly-header-container {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.separator {
    width: 95%;
    height: 1px;
    background: var(--main-text-color);
    margin: 10px 0;
}

.accent-text {
    font-family: 'Nexa-Replica-Ru';
    letter-spacing: 2px;
}

.speciality {
    color: var(--accent-area-color);
    font-weight: 400;
    font-size: 1em;
    padding: 5px;
}

.fullname {
    padding: 5px;
    color: var(--main-text-color);
    font-size: 3em;
    font-weight: 600;
}

.reference {
    display: flex;
    margin: 2px;
}

.reference > img.light {
    filter: invert(100%);
}

.refs-list {
    margin: 8px;
}

.refs-list img {
    max-width: 25px;
    margin-right: 5px;
}
/* refs styles */

a {
    color: var(--main-text-color);
    text-decoration: none;

    display: inline-block;
    position: relative;
    padding: 5px;
}

a.reference:after {
    background: none repeat scroll 0 0 transparent;
    bottom: 0;
    content: '';
    display: block;
    height: 2px;
    left: 50%;
    position: absolute;
    background: var(--hover-ref-line);
    transition: width 0.5s ease 0s, left 0.3s ease 0s;
    width: 0;
}

a.reference:hover:after,
a.reference:active:after {
    width: 100%;
    left: 0;
}

.categories-list {
    width: 100%;
    margin-top: 20px;
    gap: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.category-button {
    background-color: var(--secondary-background);
    color: var(--main-text-color);
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 35px;
    grid-column: auto;
}

.category-button:hover,
.category-button:active {
    animation-name: category-button-animation;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes category-button-animation {
    0% {
        background-color: var(--secondary-background);
    }
    100% {
        background-color: var(--accent-area-color);
    }
}

/*-----------------------------------*\
  # Articles (Content Part)
\*-----------------------------------*/

div.articles-container {
    height: 85vh;
    overflow-y: scroll;
}

.articles-container {
    border-radius: 35px;
    margin-right: 30;
    color: var(--main-text-color);
    background-color: var(--secondary-background);
}

.article-section {
    margin: 20px;
}

.article-header {
    font-weight: 700;
    font-family: 'Inter-Bold';
    margin-bottom: 5px;
}

.article-content-text {
    font-family: 'Inter-Regular';
    padding-top: 10px;
    text-align: justify;
}

.article-content-text.bio {
    text-indent: 1em;
}

.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Inter-Bold';
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.skill {
    width: max-content;
    padding: 10px;
    margin: 10px;
    border-radius: 35px;
    background-color: var(--skills-background);
    color: var(--accent-area-color);
    text-align: center;
}

p.skill {
    text-align: center;
}

/*-----------------------------------*\
  # Articles (Knowledge degree of prog langs)
\*-----------------------------------*/

.langs-skills-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 20px;
}

.lang-info {
    display: grid;
    align-items: center;
    grid-template-columns: 100px auto;
}

.lang-name {
    font-size: 1em;
    font-weight: 400;
}

.lang-name-double {
    font-size: 0.9em;
    font-weight: 500;
}

.blue-second-text {
    color: var(--secondary-accent-color);
}

.lang-knowledge-degree-container {
    background-color: var(--additive-background);
    height: 1.5rem;
    border-radius: 0 35px 35px 0;
    justify-content: flex-start;
    align-items: center;
    display: flex;
    position: relative;
}

.knowledge-degree__single {
    border-radius: 0 35px 35px 0;
    background-color: var(--accent-area-color);
    height: 100%;
    width: 0;
}

.knowledge-degree__single.cs {
    animation: load-degree-cs 2s normal forwards;
}
.knowledge-degree__single.cpp {
    animation: load-degree-cpp 2s normal forwards;
}
.knowledge-degree__single.python {
    animation: load-degree-python 2s normal forwards;
}
.knowledge-degree__double.jsts {
    animation: load-degree-jsts 2s normal forwards;
}
.knowledge-degree__single.java {
    animation: load-degree-java 2s normal forwards;
}
.knowledge-degree__single.sql {
    animation: load-degree-sql 2s normal forwards;
}

.knowledge-degree__double {
    border-radius: 0 35px 35px 0;
    background-color: var(--accent-area-color);
    background: linear-gradient(
        var(--accent-area-color) 0%,
        var(--secondary-accent-color) 100%
    );
    height: 100%;
    width: 0;
    animation: load-degree 2s normal forwards;
}

@keyframes load-degree-cs {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-cs);
    }
}

@keyframes load-degree-cpp {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-cpp);
    }
}

@keyframes load-degree-python {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-python);
    }
}

@keyframes load-degree-jsts {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-jsts);
    }
}

@keyframes load-degree-java {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-java);
    }
}

@keyframes load-degree-sql {
    0% {
        width: 0;
    }
    100% {
        width: var(--width-sql);
    }
}

/*-----------------------------------*\
  # Articles (Education)
\*-----------------------------------*/

a.accent-span-text {
    text-align: justify;
}

a.reference-content:after {
    background: none repeat scroll 0 0 transparent;
    bottom: 0;
    content: '';
    display: block;
    height: 2px;
    left: 50%;
    position: absolute;
    background: var(--accent-area-color);
    transition: width 0.5s ease 0s, left 0.3s ease 0s;
    width: 0;
}

a.reference-content:hover:after,
a.reference-content:active:after {
    width: 100%;
    left: 0;
}

/*-----------------------------------*\
  # Articles (Hobbies)
\*-----------------------------------*/

.hobby-element {
    display: flex;
    align-items: center;
}

p.hobby-name {
    color: var(--accent-area-color);
}

.hobbies-flex-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.education-additive {
    text-align: justify;
}

@media only screen and (max-width: 950px) {
    main.main-flex-container {
        flex-direction: column;
    }

    .briefly-sidebar {
        width: auto;
    }

    .briefly-container {
        max-width: none;
    }

    div.articles-container {
        height: auto;
    }
}

@media only screen and (min-width: 2000px) {
    article {
        height: 100%;
        display: grid;
        grid-template-rows: repeat(2, auto);
        grid-template-columns: repeat(2, auto);
    }
}

@media only screen and (min-height: 1400px) {
    main.main-flex-container {
        flex-direction: column;
    }

    .briefly-sidebar {
        width: auto;
    }

    .briefly-container {
        max-width: none;
    }

    div.articles-container {
        height: auto;
    }
}
