@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;600;700;800&family=Roboto:wght@400;500;700&display=swap');

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #fd5d00, #ff0000);
    color: white;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 40px 20px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('public/cat.png');
    background-repeat: repeat;
    background-size: 70px 70px;
    opacity: 0.06;
    z-index: 0;
}

.portfolio {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 1600px;
    height: 85vh;
    max-height: 1500px;
    background: rgba(164, 241, 252, 0.97);
    border-radius: 20px;
    padding: 44px 36px 36px;
    display: flex;
    gap: 28px;
    align-items: stretch;
    box-shadow: 0 30px 60px -20px rgba(120, 30, 30, 0.35);
}

.container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 22px;
    overflow: visible;
    padding-right: 4px;
}

.card {
    --accent: #b93838;
    background: white;
    color: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    border-top: 6px solid var(--accent);
}

.card:hover {
    transform: translateY(-4px) rotate(-0.4deg);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.16);
}

.card-about     { --accent: #ffb703; }
.card-frameworks{ --accent: #4f86c6; }
.card-barnical  { --accent: #3fa789; }
.card-contact   { --accent: #a677d1; }

.card-banner-wrap {
    position: relative;
    height: 130px;
    overflow: hidden;
}

.card-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.card-banner-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--accent);
    mix-blend-mode: multiply;
    opacity: 0.28;
}

.card-body {
    padding: 18px 22px 22px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-body h3 {
    font-family: 'Baloo 2', sans-serif;
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #292929;
}

.card-body p {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    max-width: 320px;
}

.pill-link {
    display: inline-block;
    margin-top: 12px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: white;
    background: var(--accent);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 999px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pill-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
}

.projects {
    width: 260px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #c23f3f, #a52d2d);
    border-radius: 14px;
    padding: 26px 18px;
    overflow: visible;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    position: relative;
}

.projects-title {
    font-family: 'Baloo 2', sans-serif;
    text-align: center;
    color: #ffe3b0;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sparkle-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background 0.15s ease, padding-left 0.15s ease;
}

.project-link:hover {
    background: rgba(255, 255, 255, 0.14);
    padding-left: 18px;
}

.project-link .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.accent-yellow .dot { background: #ffd166; }
.accent-blue .dot   { background: #7fb3e8; }
.accent-mint .dot   { background: #6fd4b3; }
.accent-lilac .dot  { background: #c9a0f0; }

.decor {
    position: absolute;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

.decor img {
    width: 100%;
    height: 100%;
    display: block;
}

.card-about .star-peek {
    top: -16px;
    left: -16px;
    width: 40px;
    height: 40px;
    transform: rotate(-15deg);
    z-index: 2;
}

.card-barnical .cat-peek {
    bottom: -14px;
    left: -14px;
    width: 46px;
    height: 46px;
    transform: rotate(-8deg);
    z-index: 2;
}

.card-contact .flower-peek {
    bottom: -12px;
    right: -12px;
    width: 38px;
    height: 38px;
    transform: rotate(10deg);
    z-index: 2;
}

.projects .star-corner {
    top: -14px;
    right: -14px;
    width: 42px;
    height: 42px;
    transform: rotate(15deg);
    z-index: 2;
}

@media (max-width: 1000px) {
    .portfolio {
        height: auto;
        max-height: none;
        flex-direction: column;
    }
    .container {
        grid-template-columns: 1fr;
    }
    .projects {
        width: 100%;
    }
}