html {
    box-sizing: border-box;
    scroll-padding-top: 72px;
    scroll-behavior: smooth;
    font-size: 16px;
}

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

:root {
    --background-header: #44CCEE;
    --background-odd: #3A3366;
    --background-even-tech: #5A547F;
    --background-nav-footer: #090040;
}

.dark {
    --background-header: #000000;
    --background-odd: #090040;
    --background-even-tech: #3A3366;
    --background-nav-footer: #06002D;
}

header,
footer,
nav,
section,
#technologies div {
    transition: background-color 0.4s ease, color 0.4s ease;
}

body {
    font-family: 'Roboto', sans-serif;

}


.montserrat-regular {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* sections-settings - start */

header h1 {
    color: white;
    font-size: 3.5625rem;
    line-height: 0.912;
    font-weight: 800;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
}

h1+p {
    color: white;
    font-size: 1.375rem;
    line-height: 1.27;
    margin-top: 16px;
    margin-bottom: 24px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
}

.container {
    padding: 64px 0;
}

.container h2 {
    color: #FFFFFF;
    font-size: 2.8125rem;
    line-height: 1.155;
    font-weight: 800;
    text-align: center;
}

h3 {
    color: #3D83F8;
    font-size: 2rem;
    line-height: 1.25;
    font-weight: 500;
    max-width: 1248px;
    width: 100%;
    padding-left: 24px;
    margin: 24px auto 0;
}

h3+p {
    color: #e8e8e8de;
    font-size: 1.375rem;
    line-height: 1.27;
    max-width: 1248px;
    width: 100%;
    padding: 0 24px;
    margin: 16px auto auto auto;
    text-align: justify;
}

.container h4 {
    font-size: 1.75rem;
    line-height: 1.286;
    font-weight: 600;
    font-style: normal;
    color: white;
    margin: 16px auto;
}

.container h4+p {
    color: #E8E8E8;
    font-size: 1.375rem;
    line-height: 1.27;
    text-align: justify;

}

/* sections-settings - end */

/* nav - start */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--background-nav-footer);
    color: white;
    display: flex;
    align-items: center;
    z-index: 2000;
    padding: 12px 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 25%);
}

#navbarLogo {
    display: inline-block;
    width: 48px;
    margin-right: auto;
}

#navbarMenu {
    display: flex;
    gap: 16px;
    list-style: none;
    margin-right: 48px;
}

#navbarMenu a {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    letter-spacing: 0.15px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: color 0.3s;

}

#navbarMenu a:hover {
    background-color: #3B82F6;
}

#navbarMenu a.active {
    background-color: #3B82F6;
}

#modeSwitch {
    display: flex;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
}

#modeIcon {
    width: 48px;
    transition: transform 0.2s;
}

#modeIcon:hover {
    transform: scale(1.2);
}

#menu {
    display: none;
    justify-content: center;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 24px;
}

#menuIcon {
    width: 48px;
    transition: transform 0.2s;
}

#menuIcon:hover {
    transform: scale(1.2);
}

#languageSwitcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 24px;
}

#langToggle {
    display: none;
}

#langOptions {
    display: flex;
    gap: 16px;
}

#langOptions a {
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
}

.langBtn {
    background-color: #ff480039;
}

.langBtn:hover {
    background-color: #3B82F6;
}

.activeLang {
    background-color: #3B82F6 !important;
    cursor: default !important;
    pointer-events: none;
}

/* nav - end */

/* header - start */

header {
    position: relative;
    background-color: var(--background-header);
    height: calc(100vh - 72px);
    margin-top: 72px;
    overflow: hidden;
}

#hero {
    display: grid;
    position: relative;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    justify-items: center;
    height: calc(100vh - 76.8px);
    padding: 0 24px;
    max-width: 1248px;
    margin: auto;
}

#heroText {
    z-index: 7;
}

#heroImg {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6;
}

#heroImg img {
    width: 90%;
    display: block;
    pointer-events: none;
}

#headerLinks {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    align-items: center;
}

#headerLinks a {
    display: inline-block;
    transition: transform 0.3s ease;
}

#headerLinks a:hover {
    transform: scale(1.2);
}

#headerButton {
    display: inline-block;
    margin-top: 16px;
    padding: 16px 64px;
    color: white;
    background-color: #3B82F6;
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    cursor: pointer;
}

#headerButton:hover {
    background-color: #649FFF;
}

#headerButton:active {
    background-color: #2F68C6;
}

#heroText,
#heroImg {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#cursor {
    display: inline-block;
    color: #3D83F8;
    animation: blink 0.8s infinite;
    margin-left: 2px;
}

#typedText {
    color: #3D83F8;
    font-size: 2.8125rem;
    line-height: 0.912;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* clouds - start */

.clouds {
    position: absolute;
    display: inline-block;
    width: 100%;
    bottom: -100px;
    opacity: 0;
    transition: bottom 1s ease-out, opacity 1s ease-out;
    pointer-events: none;
}

.clouds.animate {
    bottom: 0;
    opacity: 1;
    animation: cloudFloat 6s ease-in-out infinite;
}

#c1.animate {
    animation-delay: 0s;
}

#c2.animate {
    animation-delay: 0.5s;
}

#c3.animate {
    animation-delay: 1s;
}

#c1 {
    z-index: 1;
}

#c2 {
    z-index: 2;
}

#c3 {
    z-index: 3;
}

#c4 {
    z-index: 4;
}

#c5 {
    z-index: 5;
}

#c6 {
    z-index: 6;
}

#c7 {
    z-index: 7;
}

#c8 {
    z-index: 8;
}

@keyframes cloudFloat {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(20px);
        /* yukarı salla */
    }

    100% {
        transform: translateY(0);
        /* geri aşağı */
    }
}

/* clouds - end */

/* header - end */

/* about - start */

#about {
    background-color: var(--background-odd);
}

#technologies {
    display: flex;
    max-width: 1248px;
    padding: 0 24px;
    margin: 32px auto 0;
    row-gap: 32px;
    flex-wrap: wrap;
    justify-content: space-around;
}

#technologies div {
    cursor: default;
    color: white;
    font-size: 1.375rem;
    line-height: 1.27;
    width: 220px;
    background-color: var(--background-even-tech);
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px;
    padding: 4px 8px;
    margin: 0 32px;
    box-shadow: 0 0 4px #00000040;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

#technologies div.show {
    opacity: 1;
    transform: translateY(0);
}

#technologies div img {
    pointer-events: none;
    display: inline-block;
    width: 48px;
}

/* about - end */

/* services - start */

#services {
    background-color: var(--background-even-tech);
}

#allServices {
    display: flex;
    justify-content: center;
    gap: 100px;
    margin: 32px 24px 0;
    flex-wrap: wrap;
}

.card {
    width: 300px;
    height: 460px;
    perspective: 1000px;
    transition: transform 0.6s ease;
}

.card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    position: relative;
    text-align: center;
    transition: transform 0.6s ease;
}

@media (hover: hover) {

    .card:hover,
    .card-inner {
        transform: scale(1.03);
    }
}

.card-inner.flipped {
    transform: rotateY(180deg);
}

.card-front {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 24px;
    border-radius: 16px;
    backface-visibility: hidden;
    background-color: #8461B9;
    box-shadow: 0 2px 4px #00000080;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: pulseBorder 3s ease-in-out infinite;
    cursor: pointer;
}

.card-front img {
    pointer-events: none;
    width: 64px;
    margin-bottom: 16px;
}

.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 24px;
    border-radius: 16px;
    backface-visibility: hidden;
    background-color: #6C42AB;
    box-shadow: 0 2px 4px #00000080;
    color: white;
    display: flex;
    flex-direction: column;
    transform: rotateY(180deg);
    cursor: pointer
}

.card-back img {
    pointer-events: none;
    display: inline-block;
    margin: 0 auto 8px;
    width: 64px;
}

@keyframes pulseBorder {
    0% {
        box-shadow: 0 0 0px 0px #ffffff40;
    }

    50% {
        box-shadow: 0 0 8px 2px #ffffffa0;
    }

    100% {
        box-shadow: 0 0 0px 0px #ffffff40;
    }
}

/* services - end */

/* projects - start */

#projects {
    background-color: var(--background-odd);
}

/* projects - end */

/* contact - start */

#contact {
    background-color: var(--background-even-tech);
}

#contactInfo {
    display: flex;
    max-width: 1248px;
    padding: 0 24px;
    margin: auto;
    gap: 60px;
}

#info {
    align-items: center;
    flex: 1;
}

#info strong {
    display: block;
    margin: 24px 0 0;
    font-size: 1.75rem;
    line-height: 1.286;
    font-weight: 600;
    font-style: normal;
    color: white;
}

#info a img {
    display: inline-block;
    margin-right: 12px;
    width: 24px;
}

#info a {
    color: #c977ff;
    margin-top: 8px;
    display: flex;
    width: max-content;
    text-decoration: none;
    font-style: normal;
    font-size: 1.5rem;
    line-height: 1.33;
}

#info a:hover {
    color: #AB39F7;
}

#info a:active {
    color: #D8A4FB;
}

#map iframe {
    margin-top: 24px;
    width: 100%;
    max-width: 100%;
    height: 316px;
    border-radius: 12px;
}

#map {
    flex: 1;
}

/* contact - end */

/* askQuestion - start */

#characterContainer {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: 300px;
    height: 300px;
    pointer-events: none;
    overflow: hidden;
}

#stick {
    z-index: 800;
    position: absolute;
    opacity: 1;
    width: 100px;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0px;
}

#head {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    max-width: 70px;
    bottom: -68px;
    transition: bottom 0.8s ease, opacity 0.1s ease;
}

#body {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    opacity: 1;
    max-width: 70px;
    bottom: -110px;
    transition: bottom 0.8s ease, opacity 0.5s ease;
}

#leftHand,
#rightHand {
    position: fixed;
    z-index: 1000;
    width: 24px;
    bottom: 4px;
    opacity: 0;
    transition: bottom 0.8s ease-out, opacity 0.8s ease;
    pointer-events: none;
}

#leftHand {
    left: calc(50% - 42px);
    /* 50% (container ortası) - 50px genişlik/2 - margin */
}

#rightHand {
    left: calc(50% + 18px);
    /* 50% + sağ margin */
}

.show-hands #leftHand,
.show-hands #rightHand {
    opacity: 1;
}

#characterContainer.show #body {
    opacity: 1;
    bottom: 0;
    transition-delay: 1s;
}

#characterContainer.show #head {
    opacity: 1;
    bottom: 36px;
    transition-delay: 1s;
}


#textBubble {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 14px;
    background: #ffffff;
    border: 2px solid #333;
    border-radius: 16px;
    font-family: "Arial", sans-serif;
    font-size: 0.875rem;
    line-height: 1.43;
    color: #333;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1001;
    pointer-events: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes fadeAndShrink {
    0% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) scale(0.8);
    }
}

.text-bubble-disappear {
    animation: fadeAndShrink 0.6s ease forwards;
}


.cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 0.8s steps(1, end) infinite;
    vertical-align: bottom;
}

/* askQuestion - end */

/* footer - start */
footer {
    background-color: var(--background-nav-footer);
    color: white;
    padding: 24px 24px;
    display: flex;
    flex-direction: column;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5;
    row-gap: 16px;
}

footer p a {
    color: white;
}

footer p a:hover {
    color: #AB39F7;
}

/* footer - end */

@media (max-width: 1199.98px), (max-height: 639.99px) {
    #heroText {
        z-index: 10;
    }
}

@media (max-width: 1114.98px) {
    #hero {
        grid-template-columns: 1fr;
    }

    #heroImg {
        display: none;
    }

    #languageSwitcher {
        flex-direction: column;
        align-items: flex-end;
    }

    #langToggle {
        display: inline-block;
        background: none;
        color: white;
        padding: 8px 8px;
        border: 1px solid white;
        border-radius: 4px;
        cursor: pointer;
        font-size: 1rem;
        line-height: 1.5;
        font-weight: 500;
        transition: background-color 0.3s, transform 0.2s;
    }

    #langToggle.active {
        background-color: #3B82F6;
        transform: scale(1.05);
    }

    #langOptions {
        display: none;
        position: absolute;
        flex-direction: column;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        padding: 8px;
        border-radius: 8px;
        margin-top: 4px;
        z-index: 999;
    }

    #langOptions.show {
        display: flex;
    }

    #langOptions a {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

}

@media (max-width: 767.98px) {
    html {
        font-size: 14px;
    }

    #navbarMenu {
        position: fixed;
        top: 72px;
        right: -100%;
        width: 160px;
        background-color: var(--background-nav-footer);
        flex-direction: column;
        gap: 16px;
        padding: 24px 24px;
        transition: right 0.5s ease-in-out;
        z-index: 20;
        margin: 16px 0;
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;

    }

    #navbarMenu.menu-open {
        right: 0;
    }

    #menu {
        display: flex;
    }

    #map {
        display: none;
    }


    #allServices {
        gap: 40px;
    }

    .card {
        width: 300px;
        height: 360px;
    }

    #technologies {
        row-gap: 16px;
    }

    #technologies div {
        width: 180px;
        gap: 8px;
        margin: 0 12px;
    }

}

@media (max-width: 575.98px) {
    html {
        font-size: 12px;
    }

    #technologies div {
        width: 160px;
    }

}