/* General styles for both index and projects page */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to right, #6a11cb, #2575fc);
    color: white;
}

.container {
    text-align: center;
    padding: 20px;
}

h1 {
    font-size: 3em;
    margin-bottom: 50px;
}

.card-container {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start; /* Corrected to prevent cards from stretching */
}

.card {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 30px;
    width: 250px; /* Default width for index.html */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card h2 {
    margin-top: 0;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.card p {
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 0.5em;
}

.card p:last-child {
    margin-bottom: 0;
}

.card a {
    color: #f0f0f0;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    padding-bottom: 3px;
}

.card a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 2px;
    background-color: #f0f0f0;
    transition: width 0.3s ease;
}

.card a:hover {
    color: #ffffff;
}

.card a:hover::after {
    width: 100%;
}

/* --- Styles for the projects page --- */
@media (min-width: 768px) {
    .card-container .card {
        width: 550px;
    }
}

.card ul {
    text-align: left;
    list-style-position: inside;
    padding-left: 0;
    margin: 10px 0;
}

.card ul li {
    text-align: left;
    margin-bottom: 5px;
}

.card hr {
    border: none;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    width: 75%;
    margin: 20px auto;
    border-radius: 1px;
}

/* --- New styles for collapsible cards --- */
.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.toggle-btn {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    padding: 8px 16px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 5px;
    margin-top: 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
    align-self: center;
}

.toggle-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.card ul ul {
    margin-left: 20px;
    list-style-type: circle; /* Use a different bullet for nested lists */
}