@import url('https://fonts.googleapis.com/css2?family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-name);
}
body.white, body.white main {
    background: aliceblue;
    color: black;
}
html {
    scroll-behavior: smooth;
}
body {
    background: linear-gradient(
        120deg,
        #101e32 0%,
        #050505 50%,
        #585673 75%,
        #101e32 100%      
    );
    overflow-x: clip;
}
:root {
    --main-color: #101e32;
    --text-color: aliceblue;
    --font-name: "Google Sans", sans-serif;
    --border-color: #1c56d4;
}
.header {
    display: grid;
    justify-content: center;
    align-items: center;
    grid-template-columns: 1fr auto 1fr;
    height: 55px;
    width: 100%;
    max-width: 100%;
    background: transparent;
   color: aliceblue;

}
.daniel {
   margin-right: 0;
   margin-left: 20px;
   justify-self: start;
   font-family: var(--font-name);
   max-width: 100%;
   font-size: clamp(16px, 4vw, 24px);
   justify-self: start;
}
.header1 {
   display: flex;
   gap: clamp(6px, 3vw, 60px);
   justify-content: space-between;
   margin-left: 0;
   margin-right: 0;
   justify-self: center;
   
}
.button {
    background: none;
    background-color: none;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 20px);
    font-family: var(--font-name);
    text-decoration: none;
    
}
.button:hover {
    opacity: 0.8;
}
.home {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 2px;
    color: var(--border-color);
}
.fa-moon {
   display: flex;
   justify-content: center;
   text-align: center;
   padding-top: 10px;
   background-color:#050505; 
   color:aliceblue;
   width: 120px;
   height: 40px;
   gap: 10px;
   border-radius: 15px;   
   margin-right: 0;
   margin-left: 0;
   justify-self: end;
   cursor: pointer;
   text-decoration: none ;   
}
.fa-phone {
    display: none;
}
.header > span {
    justify-self: end;
    margin-right: 30px;
}
.main {
    min-height: calc(100vh - 55px);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        #050505 250px  
    );
}
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(20px, 4vw, 70px);
    position: relative;
    overflow-x: clip;
    min-width: 0;
}
.hero-content {
    width: 100%;
    min-width: 0;
}
.hello {
    margin-left: 20px;
    margin-top: 50px;
    color: grey;
    font-size: 0.8em;
    font-family: var(--font-name);
}
.daniel1 {
    margin-left: 15px;
    color: var(--text-color);
    font-size: clamp(2.6rem, 12vw, 4.2rem);
    line-height: 1.3;
    min-width: 0;
    font-family: var(--font-name);
}
.bernovskyi {
    margin-left: 15px;
    color: var(--border-color);
    font-size: clamp(2.6rem, 12vw, 4.2rem);
    line-height: 1.2;
    min-width: 0;
    margin-top: -23px;
    font-family: var(--font-name);
}
.webDeveloper {
    margin-left: 20px;
    color: var(--text-color);
    opacity: 0.7;
    font-family: var(--font-name);
}
.description {
margin-left: 20px;
color: grey;
opacity: 0.5;
max-width: 500px;
width: auto;
margin-right: 20px;
margin-top: 10px;
font-family: var(--font-name);
}
.viewMyProjects {
    margin-left: 20px;
    margin-top: 20px;
    width: clamp(140px, 14vw, 190px);
    gap: 10px;
    height: 40px;
    border-radius: 20px;
    color: var(--text-color);
    background-color: var(--border-color);
    border: none;
    cursor: pointer;
    opacity: 0.8;
    font-size: 0.9em;
    font-family: var(--font-name);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.contactMe {
    margin-left: 10px;
    margin-top: 20px;
    width: clamp(100px, 14vw, 130px);
    height: 40px;
    border: none;
    border-radius: 20px;
    color: var(--text-color);
    background-color: var(--main-color);
    opacity: 0.8;
    cursor: pointer;
    font-family: var(--font-name);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    text-decoration: none;
}
.skills {
    margin-left: 20px;
    margin-top: 20px;
    color: var(--text-color);
    display: flex;
    gap: clamp(15px, 3vw, 45px);
    flex-wrap: wrap;
}
.skills > span {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-family: var(--font-name);
}
.skills strong {
    font-size: clamp(15px, 1.5vw, 22px);
    white-space: nowrap;
    font-family: var(--font-name);
}

.skills small {
    font-size: clamp(11px, 1vw, 14px);
    color: gray;
    opacity: 0.5;
    font-family: var(--font-name);
}
.hero-particles {
    position: absolute;
    left: 37%;
    top: 20%;
    width: 25%;
    height: 60%;
    z-index: 1;
}
@media (max-width: 1300px) {
    canvas {
        display: none;
    }
}
.my-photo3d {
    position: relative;
    width: min(100%, 400px);
    aspect-ratio: 4 / 5;
    justify-self: end;
    perspective: 1000px;
    margin-right: min(70px, 16vw, 300px);
    margin-top: 50px;
}
.photo-layers {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}
.frame {
    position: absolute;
    border: 1px solid rgba(0, 130, 255, 0.5);
    border-radius: 25px;
    background: rgba(0, 80, 180, 0.1);
    margin-right: 40px;
}
.frame-one {
    inset: 0% -20% 10% -30%;
    transform: translate3d(-18px, -20px, -70px);
    z-index: 3;
    border-right: none;
    mask-image: radial-gradient(
        ellipse at center,
        black 40%,
        transparent 99%
    );
}
.frame-two {
    inset: 2% -20% 27% 1%;
    transform: skewY(-20deg);
    z-index: 4;
    margin-right: 200px;
    width: min(90%, 310px);
    border-right: none;
    mask-image: radial-gradient(
        ellipse at center,
        black 60%,
        transparent 100%
    );
    filter: brightness(0.8);
    opacity: 1;
}
.background {
    position: absolute;
    inset: 10% -8% 30% -50%;
    width:  500px;
    height: min(95%, 365px);
    object-fit: cover;
    border-radius: 25px;
    transform: translateZ(0px);
    justify-self: end;
    z-index: 2;
    opacity: 0.5;
}
.my-photo {
    position: absolute;
    inset: -10% -10% 10% 10%;
    width: min(95%, 600px);
    height: min(95%, 700px);
    object-fit: contain;
    object-position: center bottom;
    transform: translateZ(55px);
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5))
     brightness(0.6);;
    z-index: 1;
    opacity: 1;
}
   
@media (max-width: 870px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .my-photo3d {
         width: min(80%, 340px);
        justify-self: center;
        margin-left: 0px;

    }
    .background {
        height: 340px;
        width: min(100%, 700px);
        inset: 0% -30% 0% 0%;
        justify-self: center;
    }
    .frame-two {
        width: min(90%, 260px);
        inset: 0% 0% 0% 0%;
    }
    .my-photo {
        filter: brightness(0.7)
        drop-shadow(0 15px 25px rgba(0,0,0,0.5));
    }
    .skills {
        display: inline-flex;
    }
    .daniel {
        justify-self: start;
    }
    .fa-moon {
        display: none;
    }
    .fa-phone {
        display: block;
    }
}
@media (max-width: 420px) {
    .daniel1 {
        font-size: 3em;
    }
    .bernovskyi {
        font-size: 3em;
    }
    .frame-one {
        width: auto;
        inset: 1% -12% 9% -12%;
        transform: translate3d(-8px, -12px, -70px);
    }
    .frame-two {
        width: min(90%, 263px);
        margin-right: 0;
    }
    .my-photo3d {
        margin-left: 0px;
        margin-right: 0px;
        justify-self: center;
        width: min(92%, 340px);
    }
    .header1 {
        display: none;
    }
    .daniel {
        display: flex;
        justify-self: start;
        margin-left: 20px;
        margin-right: 180px;
        font-size: 2em;;
    }
    .background {
        width: min(100%, 300px);
        inset: 5% -5% 0;
    }
    .header {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .header .daniel {
        margin-right: 0;
    }

    .header .header-controls {
        margin-right: 20px;
    }
    
}
@media (min-width: 421px) and (max-width: 500px) {
    .header {
        grid-template-columns: auto 1fr auto;
    }

    .header1 {
        gap: 8px;
    }

    .header1 .button {
        margin-left: 0;
    }
}
.featured-projects {
    color: grey;
    opacity: 0.8;
    margin-left: 20px;
    font-size: 0.8em;
    margin-top: -20px;
    font-family: var(--font-name);
}
.some {
    color: var(--text-color);
    margin-top: 5px;
    letter-spacing: 1px;
    font-family: var(--font-name);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: clamp(12px, 2vw, 15px);
}
.some span {
    color: var(--border-color);
}
.AllProjects {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 10px;
    width: 200px;
    background-color: var(--main-color);
    height: 40px;
    border-radius: 20px;
    filter: brightness(0.8);
    border: 1px solid #1c56d4;
    margin-right: 10px;
    font-size: 1em;
}
 .projects {
   display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 10px;
    row-gap: 0;
} 
.project-1, .project-2, .project-3, .project-4, .project-5, .project-6{
    border: 1px solid white;
    height: 140px;
    margin-left: 20px;
    width: 92%;
    mask-image: radial-gradient(
        ellipse at center,
        black 80%,
        transparent 100%
    );
}

 .project-1 {
   background-image:url(../img/azure-hero.png);
   background-image: image-set(url(../img/azure-hero.webp) type("image/webp"), url(../img/azure-hero.png) type("image/png"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    border-color: gray;
    filter:brightness(0.5);
}
.project-2 {
    background-image: url(../img/aurora-hero.png);
    background-image: image-set(url(../img/aurora-hero.webp) type("image/webp"), url(../img/aurora-hero.png) type("image/png"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: none;
     border-radius: 10px 10px 0 0;
    border-color: gray;
    filter:brightness(0.5);
}
.project-3 {
    background-image: url(../img/particle-world-background.png);
    background-image: image-set(url(../img/particle-world-background.webp) type("image/webp"), url(../img/particle-world-background.png) type("image/png"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: none;
     border-radius: 10px 10px 0 0;
     border-color: gray;
     filter:brightness(0.5);
}
.project-4 {
    border-top: none;
    margin-bottom: 30px;
    border-color: gray;
    border-radius: 0 0 10px 10px;
    filter:brightness(0.8);
    font-family: var(--font-name);
}
.project-5 {
    border-top: none;
    margin-bottom: 30px;
    border-color: gray;
    border-radius: 0 0 10px 10px;
    filter:brightness(0.8);
    font-family: var(--font-name);
}
.project-6 {
    border-top: none;
    border-color: gray;
    border-radius: 0 0 10px 10px;
    filter:brightness(0.8);
    font-family: var(--font-name);
}
.featured-work .project-4,
.featured-work .project-5,
.featured-work .project-6 {
    height: auto;
    min-height: 140px;
    align-self: start;
    padding-bottom: 10px;
}
.project-4 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
    font-family: var(--font-name);
}
.project-4 > p {
    color: var(--text-color);
    font-size: 0.7em;
    padding-top: 10px;
    padding-left: 10px;
    font-family: var(--font-name);
}
.project-5 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
    font-family: var(--font-name);
}
.project-5 > p {
    color: var(--text-color);
    font-size: 0.75em;
    padding-top: 10px;
    padding-left: 10px;
    font-family: var(--font-name);
}
.project-6 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
    font-family: var(--font-name);
}
.project-6 > p {
    color: var(--text-color);
    font-size: 0.7em;
    padding-top: 10px;
    padding-left: 10px;
    font-family: var(--font-name);
}
.buttons {
    display: flex;
    margin-top: 15px;
    padding-left: 10px;
    gap: 10px;
}
.html {
    color: white;
    width: 70px;
    background-color: var(--main-color);
    border: none;
    border-radius: 20px;
    height: 25px;
    font-family: var(--font-name);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
}
.css {
    color: white;
    width: 50px;
    background-color: var(--main-color);
    border: none;
    border-radius: 20px;
    font-family: var(--font-name);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
}
.js {
    color: white;
    width: 100px;
    background-color: var(--main-color);
    border: none;
    border-radius: 20px;
    font-family: "Google Sans", sans-serif;
     color: var(--text-color);
     display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9em;
}
.viewMyProjects:hover, .contactMe:hover {
    filter: brightness(0.8);
}
@media (max-width: 870px) {
    .projects { 
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        width: 100%;
    }
    .project-3 {
        background-position: center 35%;
    }
    .project-2 {
        background-position: center 70%;
    }
    .projects > :nth-child(1) {
        order: 1;
    }
    .projects > :nth-child(4) {
        order: 2;
    }
    .projects > :nth-child(2) {
        order: 3;
    }
    .projects > :nth-child(5) {
        order: 4;
    }
    .projects > :nth-child(3) {
        order: 5;
    }
    .projects > :nth-child(6) {
        order: 6;
    }
    .project-4 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
}
.project-4 > p {
    color: var(--text-color);
    font-size: 0.9em;
    padding-top: 10px;
    padding-left: 10px;
}
.project-5 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
}
.project-5 > p {
    color: var(--text-color);
    font-size: 1em;
    padding-top: 10px;
    padding-left: 10px;
}
.project-6 > h3 {
    color: var(--text-color);
    display: flex;
    margin-left: 10px;
    padding-top: 10px;
}
.project-6 > p {
    color: var(--text-color);
    font-size: 1em;
    padding-top: 10px;
    padding-left: 10px;
}
  .AllProjects {
    width: 130px;
    font-size: 0.7em;
  }  
  .featured-work .AllProjects {
    font-size: clamp(11px, 1.8vw, 12px);
}
} 
@media (max-width: 420px) {
    .project-4 > p {
        font-size: 0.85em;
    }
    .project-5 > p {
        font-size: 0.85em;
    }
}
.contact-section > div > p, h1,a {
    color: var(--text-color);
    margin-left: 20px;
}
.contact-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}
.icons {
    display: block;
    margin-right: 100px;
    margin-top: 20px;
    justify-self: end;
    padding-bottom: 10px;
}
.icons > a {
    text-decoration: none;
}
.fa-envelope, .fa-github, .fa-telegram {
    color: var(--text-color);
}
.contact-section > div > p {
    font-size: 0.9em;
    opacity: 0.7;
    margin-bottom: 10px;
    max-width: 280px;
    margin-top: 10px;
}
.lets-work > h1 > span {
    color: var(--border-color);   
}
.lets-work > h1 {
    margin-bottom: 30px;
    margin-top: 10px;
}
.fa-github, .fa-telegram {
    margin-top: 30px;
}
.email {
    font-size: 0.8em;
    filter: brightness(0.6);
}
.contact-section .fa-instagram {
    color: var(--text-color);
    margin-top: 30px;
}
.line {
    border: 0.1px solid var(--text-color);
    grid-column: 1 / -1;
    width: calc(100% - 40px);
    margin-right: 20px;
    margin-top: 50px;
    margin-bottom: 60px;
    filter: brightness(0.5);
    margin-left: 20px;  
    border-bottom: none;
    border-left: none;
    border-right: none; 
    display: flex;
    justify-content: space-between;
}
.footer-name {
    color: var(--text-color);
    font-size: 0.9em;
    filter: brightness(0.7);
    display: flex;
    justify-content: flex-start;
    padding-top: 40px;
}
.design-by-me {
    color: var(--text-color);
    padding-top: 40px;
    font-size: 0.9em;
    filter: brightness(0.7);
    padding-left: 10px;
}
.fa-github {
    margin-top: 10px;
}
@media (max-width: 870px) {
    .icons {
        margin-top: 50px;
        margin-right: 20px;
    }
    .contactFooter {
        padding-top: 30px;
    }
}
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header {
    position: relative;
}
.menu-button {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    margin-right: -20px;
}
.menu-button span {
    width: 25px;
    height: 2px;
    background: white;
    border-radius: 5px;
}
@media (max-width: 420px) {
    .menu-button {
        display: flex;
    }
    .header1.open {
        display: flex;
    }
    .header1 {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-sizing: border-box;

        flex-direction: column;
        gap: 20px;
        padding: 20px;

        background: #0e192b;
        z-index: 100;
    }
}
@media (max-width: 400px) {
    .contact-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-section .icons {
        justify-self: start;
        margin: 30px 20px 0;
        max-width: calc(100% - 40px);
    }

    .contact-section .icons .email {
        overflow-wrap: anywhere;
    }
}
#contacts {
    position: relative;
}
#contacts .contact-orbit {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    height: 220px;
}
.contact-orbit {
    position: relative;
    width: 220px;
    height: 220px;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    margin: auto;

    width: 200px;
    height: 90px;

    border: 1px solid #1c56d4;
    border-radius: 50%;

    animation: spin 10s linear infinite;
}

.ring2 {
    animation-duration: 15s;
    animation-direction: reverse;
    animation-delay: -4s;
}

.ring3 {
    width: 150px;
    height: 150px;
    opacity: 0.4;
    animation-duration: 20s;
    border: 1px dashed #1c56d4;
    box-shadow: 0 0 20px #1c56d4;
    filter: brightness(1.5);

}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 15px;
    height: 15px;
    border-radius: 50%;

    background: #4da6ff;
    box-shadow: 0 0 20px #1c56d4;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
@media (max-width: 820px) {
    .contact-orbit {
        margin-left: 50px;
    }
}
@media (max-width: 700px) {
    .contact-orbit {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    #contacts .orbit-ring {
        animation: none;
    }
}
@media (min-width: 871px) and (max-width: 1023px) {
    .home-page .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-page .hero .my-photo3d {
        width: min(80%, 340px);
        justify-self: center;
        margin: 50px 0 0;
    }

    .home-page .hero .background {
        height: 340px;
        width: min(100%, 700px);
        inset: 0% -30% 0% 0%;
        justify-self: center;
    }

    .home-page .hero .frame-two {
        width: min(90%, 260px);
        inset: 0;
    }
}

/* Отступ и читаемость подписи Featured Projects */

.home-page .featured-work .featured-projects {
    margin-top: 20px;
    color: #b8c4d3;
    opacity: 1;
}

/* Читаемость описания и подписей в Hero */

.home-page .hero .description,
.home-page .hero .skills small {
    color: #b8c4d3;
    opacity: 1;
}

/* Читаемость текста в нижней части страницы */

.home-page .contact-section .line {
    filter: none;
    border-color: #718092;
}

.home-page .contact-section .line p {
    color: #b8c4d3;
    opacity: 1;
    filter: none;
}
/* Начальное состояние вступления на главной странице */

html.home-motion-pending .home-page .header,
html.home-motion-pending .home-page .hero-content > .hello,
html.home-motion-pending .home-page .hero-content > .daniel1,
html.home-motion-pending .home-page .hero-content > .bernovskyi,
html.home-motion-pending .home-page .hero-content > .webDeveloper,
html.home-motion-pending .home-page .hero-content > .description,
html.home-motion-pending .home-page .hero-content > .buttons,
html.home-motion-pending .home-page .hero-content .skills > span,
html.home-motion-pending .home-page .hero .my-photo3d,
html.home-motion-pending .home-page .hero-particles,
html.home-motion-pending .home-page .featured-work .featured-projects,
html.home-motion-pending .home-page .featured-work .some,
html.home-motion-pending .home-page .featured-work .projects > div,
html.home-motion-pending .home-page .contact-section .lets-work,
html.home-motion-pending .home-page .contact-section .icons {
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .home-page .hero-particles {
        display: none;
    }
}