/* Linear-style Portfolio Cards - Vertical Dark Mode */

.portfolio-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 20px 0;
}

.project-card {
    position: relative;
    background: #0f1115;
    /* Deep dark background */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 520px;
    /* Significantly increased height for vertical aspect ratio */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Glow Effect - Replaces the blurred background image for a cleaner light effect */
.visual-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, var(--glow-color, rgba(255, 255, 255, 0.1)) 0%, transparent 70%);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.project-card:hover .visual-bg {
    opacity: 0.25;
}

/* Specific Glow Colors */
.project-card:nth-child(1) {
    --glow-color: rgba(99, 102, 241, 0.6);
}

/* Indigo/Blue */
.project-card:nth-child(2) {
    --glow-color: rgba(16, 185, 129, 0.6);
}

/* Emerald/Green */
.project-card:nth-child(3) {
    --glow-color: rgba(139, 92, 246, 0.6);
}

/* Violet/Purple */

.card-header {
    padding: 32px 32px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Align to top */
    position: relative;
    z-index: 5;
}

.card-identity {
    display: flex;
    flex-direction: column;
    /* Stack symbol and text vertically if needed, or keep horizontal depending on specific Linear look. Keeping horizontal for now but adjusting spacing */
    gap: 16px;
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.card-identity h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 4px 0 0;
    letter-spacing: -0.01em;
}

.card-arrow {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    /* Circular button often looks cleaner in dark mode */
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
}

.project-card:hover .card-arrow {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.card-body {
    padding: 0 32px 24px;
    position: relative;
    z-index: 5;
    flex-grow: 0;
}

.card-body p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    /* Light gray text for dark mode */
    line-height: 1.6;
    margin: 0;
}

.card-visual {
    padding: 0 32px 40px;
    flex-grow: 1;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    /* Align visual to bottom */
}

.visual-inner {
    width: 100%;
    height: 280px;
    /* Taller visual area */
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease;
}

.project-card:hover .visual-inner {
    transform: translateY(-5px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.visual-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    /* Slightly dim mostly white mockups to sit better in dark card */
    transition: opacity 0.3s ease;
}

.project-card:hover .visual-inner img {
    opacity: 1;
}

/* Specific tweaks for color accents if needed on hover */
.project-card:nth-child(1):hover {
    border-color: rgba(99, 102, 241, 0.5);
}

.project-card:nth-child(2):hover {
    border-color: rgba(16, 185, 129, 0.5);
}

.project-card:nth-child(3):hover {
    border-color: rgba(139, 92, 246, 0.5);
}

@media (max-width: 1024px) {
    .portfolio-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .portfolio-list {
        grid-template-columns: 1fr;
    }

    .project-card {
        height: auto;
        min-height: 480px;
    }
}