:root {
    --accent: #a855f7;
    --accent-pink: #EC4899;
}

main {
    text-align: center;
    margin-top: 10px;
    padding: 50px 20px;
}

.projects {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

.projects h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.pythonsection, .websection {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(24px, 4vw, 40px);
}

.projectcard {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.projectcard:hover {
    transform: translateY(-4px);
    box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.projectcard img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-bottom: 1px solid var(--border);
}

.projectcard h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.projectcard p {
    margin: 0 20px 20px 20px;
    font-size: 15px;
    color: var(--body);
    line-height: 1.6;
}

.cardheader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin: 20px 20px 0 20px;
}

.cardheader h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

.like-btn {
    background: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.like-btn:hover {
    background: rgba(168, 85, 247, 0.08);
}

.like-btn.liked {
    background: linear-gradient(135deg, var(--accent-pink), var(--accent));
    color: white;
    border: 1.5px solid transparent;
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.25);
}

.heart-icon {
    transition: all 0.3s ease;
}

.project-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 14px;
    transition: all 0.3s ease;
    margin: 0 20px 15px 20px;
}

.project-desc.expanded {
    -webkit-line-clamp: unset; 
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--accent); 
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 0;
    margin-bottom: 15px;
    margin-left: 20px; 
    text-align: left;
}

.read-more-btn:hover {
    color: #9333ea;
    text-decoration: underline;
}

.card-actions {
    margin: auto 20px 20px 20px;
    border-top: 1px solid var(--border);
    padding-top: 15px;
}

.view-project-btn {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.view-project-btn:hover {
    background-color: rgba(168, 85, 247, 0.08);
    transform: translateY(-2px);
}
