:root {
    /* Light mode (default) variables */
    --bg-color: #f3f3f3;
    --text-color: #333333;
    --accent-color: #212121;
    --tech-tag-color: #838548;
    --divider-color: rgba(0, 0, 0, 0.2);
    --card-bg: #DDDDDD;
    --card-text-color: #333333;
    --card-shadow: rgba(0, 0, 0, 0.1);
}

/* Dark mode variables */
body.dark-mode {
    --bg-color: #191919;
    --text-color: #ffffff;
    --accent-color: #A7A7A7;
    --tech-tag-color: #838548;
    --divider-color: rgba(255, 255, 255, 0.2);
    --card-bg: #363636;
    --card-text-color: #DBDBDB;
    --card-shadow: rgba(0, 0, 0, 0.3);
}

/* Apply variables to elements */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

.projects-section {
    padding: 2rem;
    margin: 2rem 0;
    max-width: 1200px;  /* Match the max-width of projects-container */
    margin: 0 auto;     /* Center the entire section */
}

/*.projects-section{
    border-top: #c7c7c7 1px solid;
}*/

.projects-section h1 {
    font-size: 34px;
    padding-left: 0;    /* Remove any left padding */
    text-align: left;   /* Ensure left alignment */
    margin-bottom: 6rem;  /* Increases space between heading and cards */
}


.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1rem;  /* Additional top padding for container */
}

.conference-subtitle {
    font-size: 0.85rem;
    color: var(--tech-tag-color);
    margin: -0.75rem 0 1rem 0;
    font-style: italic;
}

.project-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1rem;
}

.project-content h3 {
    margin: 0 0 1rem 0;
    color: var(--card-text-color);
}

.project-content p {
    color: var(--card-text-color);
    margin-bottom: 1rem;
}

.project-content h3 + .conference-subtitle + p {
    margin-top: 0;  /* Remove top margin from paragraph when after subtitle */
}

.project-content h3 + p {
    margin-top: 0;  /* Remove top margin from paragraph when directly after title */
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tech-tag {
    background: var(--tech-tag-color);
    color: var(--bg-color);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links a {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    background: var(--accent-color);
    color: var(--bg-color);
    transition: opacity 0.3s ease;
}

.project-links a:hover {
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}
