:root {
    --highlight-color: #999;
    --line-color: #555;
    --primary-bg-color: #1e1e1e;
    --primary-text-color: #ddd;
    --search-bar-bg: #2e2e2e;
    --card-title-color: #eee;
    --magnifying-glass-color: #777;
    --box-shadow-color: #000;
}
/* Tag-specific colors */
.tag-mechanical .color-overlay {
    background-color: rgba(255, 99, 71, 0.8); /* Tomato for Mechanical */
}

.tag-electrical .color-overlay {
    background-color: rgba(65, 105, 225, 0.8); /* Royal Blue for Electrical */
}

.tag-writing .color-overlay {
    background-color: rgba(50, 205, 50, 0.8); /* Lime Green for Writing */
}

.tag-programming .color-overlay {
    background-color: rgba(255, 215, 0, 0.8); /* Gold for Programming */
}

* {
    font-family: 'Raleway', sans-serif;
    font-weight: 400;
}

body {
    background-color: var(--primary-bg-color);
    color: var(--primary-text-color);
    margin: 0;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

header {
    display: flex;
    justify-content: space-between;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
    align-items: center;
    padding-bottom: 60px;
    padding-top: 50px;
    max-width: 945px;
    margin: 0 auto;
    box-sizing: border-box;
}

header h1 {
    margin: 0;
    font-size: 3em;
    font-family: 'Raleway', sans-serif;
    font-weight: 200;
}

.search-container {
    position: relative;
    width: 300px;
    display: flex;
    justify-content: flex-end;
}

#searchBar {
    padding: 10px 40px 10px 10px;
    width: 100%;
    border: none;
    border-radius: 5px;
    background-color: var(--search-bar-bg);
    color: var(--primary-text-color);
    box-sizing: border-box;
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    stroke: var(--magnifying-glass-color);
    fill: none;
}

.section-wrapper {
    max-width: 1000px;
    margin: auto;
    margin-bottom: 40px;
    position: relative;
}

.section-title {
    font-size: 1.2em;
    color: var(--highlight-color);
    text-align: left;
    position: absolute;
    left: -120px;
    top: -10px;
    white-space: nowrap;
    margin: 0;
}

.section-wrapper hr {
    border: none;
    height: 2px;
    background-color: var(--line-color);
    margin: 10px 0;
    width: 100%;
}

.project-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 30px;
    padding-bottom: 0;
    margin-bottom: 20px;
    max-width: 1000px;
    margin: auto;
    grid-auto-rows: minmax(200px, auto);
    grid-auto-flow: dense;
}

.project-wrapper {
    position: relative;
    display: flex;
}

.project-wrapper[data-hidden="true"] {
    display: none;  /* We will use a custom data attribute to hide wrappers in JS */
}

.project-wrapper.importance-2 {
    grid-column: span 2;
}

.project-wrapper.importance-3 {
    grid-column: span 3;
}

.project-card {
    border-radius: 8px; /* Border radius for card */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.15s ease-in-out, filter 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 100%;
}

.project-card.show {
    opacity: 1;
    transform: translateY(0);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.title-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px 20px;
    color: var(--card-title-color);
    text-align: left;
    font-size: 1.1em;
    background-color: rgba(0, 0, 0, 0.5);
}

.color-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    z-index: -1; /* Ensure overlay is behind card */
    border-radius: 9px; /* Match the card's border radius */
}
