.section {
    opacity: 0;
    scroll-margin-top: 20px;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
    margin: 70px 8% 0 8%;
}

.about-text {
    font-size: 1.2rem;
    max-width: 90%;
    margin: 0 auto 16px;
    font-weight: bold;
    line-height: 1.8;
    color: #c9d1d9;
    text-align: center;
}

#about {
    max-width: 80%;
    margin: 50px auto;
    color: #c9d1d9;
}


#stack {
    scroll-margin-top: 0px;
}

.section-title {
    font-size: 3rem;
    font-weight: bold;
    border-bottom: 1px solid #444;
    margin-bottom: 20px;
    color: #ffffff;
    text-align: center;
}

.card {
    background-color: #161b22;
    border: 1px solid #30363d;
    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease-in-out;
    grid-column: span 1;
    border-radius: 8px;
    padding: 20px;
    transform-origin: center; /* keeps the scaling centered */
    z-index: 0;
    position: relative;
}

.card:hover {
    border: 1px solid #f97316;
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.3);
    transform: scale(1.03);
    z-index: 10;
}

.section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.projects .project-grid {
    margin-top: 24px;
}

.experience .work-grid {
    margin-top: 24px;
}

.section:nth-of-type(2) { animation-delay: 0.2s; }
.section:nth-of-type(3) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1100px) {
    .card {
        padding: 10px;
    }

    .about-text {
        font-size: 0.7rem;
        font-weight: bold;
        line-height: 1.8;
        margin-bottom: 16px;
        color: #c9d1d9;
        text-align: center;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section {
        min-width: 90%;
        margin: 5px 5%;
        scroll-margin-top: 10px;
    }
}
