@font-face {
    font-family: "KG Second Chances Sketch";
    src: url("/fonts/kg_second_chances/KGSecondChancesSketch.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
}

@font-face {
    font-family: "KG Second Chances Solid";
    src: url("/fonts/kg_second_chances/KGSecondChancesSolid.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
}

html,
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #3f2024;
    cursor: url("/media/cursor2x-72.png") 18 18, auto;
}

.navbar {
    background-color: transparent;
    color: #072163;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding: 8px 28px;
    margin: 8px 16px 0;
    width: calc(100% - 32px);
    box-sizing: border-box;
    border-radius: 14px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.logo a {
    text-decoration: none;
    font-size: 36px;
    font-family: "KG Second Chances Solid", Arial, sans-serif;
    font-weight: 400;
    color: #072163;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px;
    font-size: 28px;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    color: #072163;
    font-family: "KG Second Chances Sketch", Arial, sans-serif;
    font-weight: 400;
}

.nav-links a.is-active,
.logo a.is-active {
    font-family: "KG Second Chances Solid", Arial, sans-serif;
}

.nav-links a:hover {
    opacity: 0.75;
}

.burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #072163;
}

.burger span {
    width: 100%;
    height: 3px;
    background-color: currentColor;
}

a,
button,
.burger {
    cursor: url("/media/cursor2x-72.png") 18 18, pointer;
}

.projects-grid {
    width: min(1120px, 94%);
    margin: 40px auto 90px;
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    column-gap: 64px;
    row-gap: 20px;
}

.project-card {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.project-card img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(63, 32, 36, 0.15));
    transition: filter 0.2s ease;
}

.project-card__overlay {
    position: absolute;
    top: var(--overlay-y, 50%);
    left: var(--overlay-x, 50%);
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-family: "KG Second Chances Solid", Arial, sans-serif;
    font-size: clamp(16px, 2.1vw, 30px);
    line-height: 1.15;
    width: min(82%, 280px);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    text-align: center;
    padding: 8px 10px;
    box-sizing: border-box;
    text-wrap: balance;
    z-index: 2;
}

.project-card:hover {
    transform: translateY(-4px) scale(1.02) rotate(0deg);
    filter: brightness(1.03);
}

.project-card:hover img {
    filter: drop-shadow(0 4px 8px rgba(63, 32, 36, 0.15)) brightness(0.62) saturate(1.2) hue-rotate(8deg);
}

.project-card:hover .project-card__overlay {
    opacity: 1;
}

.project-card:nth-child(1) { width: 88%; margin-top: 10px; justify-self: start; transform: rotate(-1.4deg) translateX(-10px); }
.project-card:nth-child(2) { width: 86%; margin-top: 56px; justify-self: end; transform: rotate(1.5deg) translateX(12px); }
.project-card:nth-child(3) { width: 78%; margin-top: -12px; justify-self: start; transform: rotate(1deg) translateX(-18px); }
.project-card:nth-child(4) { width: 90%; margin-top: 14px; justify-self: end; transform: rotate(-0.9deg) translateX(8px); }
.project-card:nth-child(5) { width: 74%; margin-top: -18px; justify-self: end; transform: rotate(1.8deg) translateX(16px); }
.project-card:nth-child(6) { width: 84%; margin-top: 10px; justify-self: start; transform: rotate(-1.1deg) translateX(-12px); }
.project-card:nth-child(7) { width: 92%; margin-top: 8px; justify-self: start; transform: rotate(0.8deg) translateX(-6px); }
.project-card:nth-child(8) { width: 86%; margin-top: -14px; justify-self: end; transform: rotate(-1.5deg) translateX(14px); }
.project-card:nth-child(9) { width: 82%; margin-top: 2px; justify-self: start; transform: rotate(1.2deg) translateX(-14px); }
.project-card:nth-child(10) { width: 88%; margin-top: -8px; justify-self: end; transform: rotate(-0.9deg) translateX(10px); }

@media (max-width: 768px) {
    .logo a {
        font-size: 26px;
    }

    .burger {
        display: flex;
        position: relative;
        z-index: 60;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        left: 0;
        width: min(70vw, 360px);
        height: 100vh;
        margin: 0;
        padding: 88px 22px 24px;
        box-sizing: border-box;
        gap: 16px;
        font-size: 24px;
        background-color: #ffffff;
        border-right: 1px solid rgba(7, 33, 99, 0.25);
        transform: translateX(-104%);
        transition: transform 0.28s ease;
        z-index: 50;
    }

    .nav-links.mobile {
        transform: translateX(0);
    }

    .navbar {
        margin: 6px 10px 0;
        width: calc(100% - 20px);
        padding: 8px 14px;
        top: 0;
    }

    .nav-links a {
        font-size: 24px;
        text-align: left;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        width: min(480px, 90%);
        column-gap: 0;
        row-gap: 18px;
    }

    .project-card,
    .project-card:nth-child(1),
    .project-card:nth-child(2),
    .project-card:nth-child(3),
    .project-card:nth-child(4),
    .project-card:nth-child(5),
    .project-card:nth-child(6),
    .project-card:nth-child(7),
    .project-card:nth-child(8),
    .project-card:nth-child(9),
    .project-card:nth-child(10) {
        width: 100%;
        margin-top: 0;
        justify-self: stretch;
        transform: none;
    }
}

