﻿.portfolio-section {
    background: #050810;
    padding: 100px 32px;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* 4 Column Grid for Desktop */
.port-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force 4 columns on large screens */
    gap: 20px; /* Reduced gap to fit 4 cards properly */
    max-width: 1400px; /* Increased max-width for 4 columns */
    margin: 0 auto;
}

/* Card Styling */
.port-card {
    position: relative;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px; /* Slightly smaller radius for smaller cards */
    padding: 25px; /* Reduced padding for 4 columns */
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    flex-direction: column;
}

.port-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(var(--p-clr), 0.12), transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
}

.port-card:hover {
    transform: translateY(-8px);
    border-color: var(--p-clr);
    background: rgba(255, 255, 255, 0.04);
}

    .port-card:hover .port-glow {
        opacity: 1;
    }

/* Icon & Category */
.port-top {
    display: flex;
    flex-direction: column; /* Stack icon and tag for better space management */
    gap: 15px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.port-icon-wrap {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
}

    .port-icon-wrap i {
        font-size: 22px;
        color: var(--p-clr);
        filter: drop-shadow(0 0 8px var(--p-clr));
    }

.port-card:hover .port-icon-wrap {
    background: var(--p-clr);
    box-shadow: 0 0 15px var(--p-clr);
}

    .port-card:hover .port-icon-wrap i {
        color: #fff;
        filter: none;
    }

.port-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--p-clr);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    border-left: 2px solid var(--p-clr);
}

/* Title & Description */
.port-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.25rem; /* Reduced size for 4-column layout */
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 10px;
}

.port-desc {
    font-size: 13.5px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limit text to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 65px; /* Consistent height */
}

.port-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: 0.3s;
}

    .port-link svg {
        width: 16px;
        height: 16px;
        stroke: var(--p-clr);
        fill: none;
        stroke-width: 2.5;
        transition: transform 0.3s;
    }

.port-card:hover .port-link {
    color: var(--p-clr);
}

    .port-card:hover .port-link svg {
        transform: translate(2px, -2px);
    }

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .port-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .port-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-stack-header h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .port-grid {
        grid-template-columns: 1fr;
    }
}

/* CICADA Button Component */
.cicada-btn {
    text-decoration: none;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 14px 35px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: 0.3s;
    background: rgba(255,255,255,0.02);
    display: inline-block;
}

    .cicada-btn:hover {
        background: #fff;
        color: #050810;
        transform: translateY(-3px);
    }
