* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: black;
}

body {
    background: black;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.slide-in {
    transform: translateY(0);
}

body.slide-out {
    transform: translateY(100%);
}

.navbar {
    position: fixed;
    top: 1vw;
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 760px);
    padding: clamp(0.65rem, 1.2vw, 0.85rem) clamp(0.8rem, 1.8vw, 1rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2vw;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 1vw;
    box-shadow: 0 2vw 8vw rgba(0, 0, 0, 0.28);
    z-index: 10;
}

@media (min-width: 1200px) {
    .navbar {
        width: min(50vw, 40vw);
        padding: clamp(0.2rem, 1vw, 0.3rem) clamp(0.15rem, 1.5vw, 0.95rem);
    }
}

.nav-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 3vw;
    height: 3vw;
    border-radius: 0.7vw;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.nav-brand:hover {
    opacity: 0.8;
}

.nav-brand img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5vw;
    margin: 0;
    padding: 0;
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    padding: 0.5vw 0.8vw;
    display: inline-block;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    min-width: 70px;
    text-align: center;
}

.nav-links a:hover {
    opacity: 0.8;
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1vw;
    flex-shrink: 0;
}

.nav-button {
    border-radius: 0.8vw;
    padding: clamp(0.6rem, 1vw, 0.8rem) clamp(0.9rem, 1.7vw, 1rem);
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.nav-primary {
    background: white;
    color: black;
    font-weight: 700;
    padding: 0.6vw 1vw;
    min-width: 90px;
    text-align: center;
}

.language-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 20;
}

.toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 0.2em;
    padding: 0.15em;
    background: linear-gradient(to right, #1a1a1a, #2c2c2c);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    font-size: 1.5em;
}

.toggle-checkbox {
    appearance: none;
    position: absolute;
    z-index: 1;
    border-radius: inherit;
    width: 100%;
    height: 100%;
    font: inherit;
    opacity: 0;
    cursor: pointer;
}

.toggle-container {
    display: flex;
    align-items: center;
    position: relative;
    border-radius: 0.1em;
    width: 4em;
    height: 1.6em;
    background-color: #222222;
    box-shadow: inset 0 0 0.1em rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.toggle-background {
    display: none;
}

.toggle-button {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0.2em;
    border-radius: 0.1em;
    width: 1.6em;
    height: 1.2em;
    background: linear-gradient(to bottom, #ffffff, #d9d9d9);
    box-shadow: 0 0 0.2em rgba(255, 255, 255, 0.3);
    transition: left 0.3s ease;
    z-index: 2;
}

.toggle-checkbox:checked+.toggle-container>.toggle-button {
    left: 2.2em;
}

.toggle-checkbox:checked+.toggle-container {
    background-color: #222222;
}

.toggle-labels {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    pointer-events: none;
    z-index: 3;
}

.toggle-label-en,
.toggle-label-tr {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.38em;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.toggle-label-en {
    color: white;
}

.toggle-label-tr {
    color: white;
}

.toggle-checkbox:not(:checked)~.toggle-labels .toggle-label-en {
    color: #111;
}

.toggle-checkbox:checked~.toggle-labels .toggle-label-tr {
    color: #111;
}

.projects-hero {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 8vh;
    overflow-y: auto;
}

.projects-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgb(255, 255, 255) 1.4px, transparent 1px);
    background-size: 30px 30px;
    -webkit-mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
    mask-image: radial-gradient(circle 200px at var(--mouse-x, 50%) var(--mouse-y, 50%), black, transparent);
    z-index: 0;
}

.projects-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: black;
    opacity: 0.6;
    z-index: 1;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 300px);
    gap: 2rem;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.card-container {
    width: 300px;
    height: 300px;
    position: relative;
    border-radius: 10px;
}

.card-container::before {
    content: "";
    z-index: -1;
    position: absolute;
    inset: 0;
    background: linear-gradient(to top left, #a8a428 0%, #d4d06a 100%);
    transform: translate3d(0, 0, 0) scale(0.95);
    filter: blur(20px);
}

.card {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.card .img-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to top left, #a8a428 0%, #d4d06a 100%);
    transition: scale 0.6s, rotate 0.6s, filter 1s;
    padding: 5px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.card .img-content svg {
    width: 50px;
    height: 50px;
    fill: #212121;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    color: #e8e8e8;
    padding: 20px 24px;
    line-height: 1.5;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(50px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.card .content .heading {
    font-size: 32px;
    font-weight: 700;
}

.card:hover .content {
    opacity: 1;
    transform: translateY(0);
}

.card:hover .img-content {
    scale: 2.5;
    rotate: 30deg;
    filter: blur(7px);
}

.card:hover .img-content svg {
    fill: transparent;
}

.card.active .content {
    opacity: 1;
    transform: translateY(0);
}

.card.active .img-content {
    scale: 2.5;
    rotate: 30deg;
    filter: blur(7px);
}

.card.active .img-content svg {
    fill: transparent;
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }

    .card-container {
        width: 100%;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .card-container {
        width: 100%;
        height: 140px;
    }
}

@media (max-width: 868px) {
    .language-selector {
        top: auto !important;
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        left: auto !important;
        transform: none !important;
    }

    .toggle-wrapper {
        font-size: 1em;
    }

    .navbar {
        width: 85vw;
    }
}

@media (max-width: 464px) {
    .nav-primary {
        min-width: unset;
        padding: 0.5vw 2vw;
        font-size: 0.8rem;
    }

    .nav-links a {
        min-width: unset;
        font-size: 0.8rem;
        padding: 0.5vw 0.4vw;
    }
}

.loader {
    --dim: 3rem;
    width: var(--dim);
    height: var(--dim);
    position: relative;
    animation: spin988 2s linear infinite;
}

.loader .circle {
    --color: #333;
    --dim: 1.2rem;
    width: var(--dim);
    height: var(--dim);
    background-color: var(--color);
    border-radius: 50%;
    position: absolute;
}

.loader .circle:nth-child(1) {
    top: 0;
    left: 0;
}

.loader .circle:nth-child(2) {
    top: 0;
    right: 0;
}

.loader .circle:nth-child(3) {
    bottom: 0;
    left: 0;
}

.loader .circle:nth-child(4) {
    bottom: 0;
    right: 0;
}

@keyframes spin988 {
    0% {
        transform: scale(1) rotate(0);
    }

    20%,
    25% {
        transform: scale(1.3) rotate(90deg);
    }

    45%,
    50% {
        transform: scale(1) rotate(180deg);
    }

    70%,
    75% {
        transform: scale(1.3) rotate(270deg);
    }

    95%,
    100% {
        transform: scale(1) rotate(360deg);
    }
}