@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

html, body {
    margin: 0;
    padding: 0;
}

html {
    background-color: #c0c0c0;
}

html::before {
    content: "";

    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;

    background-image: url("/assets/circuit-board.webp");
    background-repeat: repeat-x repeat-y;
    background-size: auto 50vh;
    background-attachment: fixed;

    opacity: 0.15;
    z-index: -1;
}

body {
    max-width: 1000px;
    min-height: 100vh;
    box-sizing: border-box;

    margin: 0 auto;
    padding: 2rem 4rem;

    border-left: 2px solid #000;
    border-right: 2px solid #000;

    /* font-family: "Courier New", Courier, monospace; */
    font-family: "Open Sans", sans-serif;
    background-color: #ffffff;
    color: #000000;
}

h1 {
    border-bottom: 2px solid #000;
    text-transform: uppercase;
}

h2 {
    border-bottom: 1px solid #000;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.card {
    position: relative;
    border: 2px solid #000000;
    border-radius: 0;
    padding: 1.5rem;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card:hover {
    background-color: #f4f4f4;
}

.card-clickable-overlay {
    text-decoration: none;
    color: #0000EE;
}

.card:hover .card-title {
    text-decoration: underline;
}

.card-clickable-overlay::after {
    content: "";
    position: absolute;
    inset: 0; 
    z-index: 1; 
}

.card-header {
    display: flex;
    justify-content: space-between; 
    align-items: flex-start;
    border-bottom: 1px dashed #000;
    padding-bottom: 0.5rem;
}

.title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title {
    font-weight: bold;
    font-size: 1.25rem;
    margin: 0;
}

.github-link {
    position: relative;
    z-index: 2;
    display: inline-flex;
    color: #000000;
    padding: 2px;
}

.github-link:hover {
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

.github-link:hover .github-icon {
    filter: invert(100%);
}

.card-date {
    font-size: 0.9rem;
    color: #333;
    white-space: nowrap; 
}

.card-desc {
    margin: 0;
    color: #000;
    font-size: 1rem;
    line-height: 1.4;
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover; 
    border: 1px solid #000;
    border-radius: 0;
}

.card-tags {
    display: flex;
    flex-wrap: wrap; 
    gap: 0.5rem;
    margin-top: auto; 
}

.tag-pill {
    background-color: transparent;
    color: #000;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.1rem 0.4rem;
    border: 1px solid #000;
    border-radius: 0;
}

.tag-pill::before {
    content: "[";
}
.tag-pill::after {
    content: "]";
}

.top-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding-bottom: 1rem;
}

section {
    margin-bottom: 3rem;
}

.portrait-box {
    flex-shrink: 0;
}

.portrait-img {
    width: 300px;
    height: auto;
    border: 2px solid #000;
    display: block;
    transform: scaleX(-1);
}

.top-info-text {
    flex-grow: 1;
    font-size: 1.1rem;
    line-height: 1.6;
}

.top-info-text p {
    margin-top: 0;
}

a {
    color: #0000EE;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    background-color: transparent;
    color: #0000EE;
}

@media (max-width: 850px) {
    .top-info {
        flex-direction: column;
    }
}

.filter-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 2px solid #000;
    background-color: #f4f4f4; /* Classic gray box for tools */
}

.project-page-title-container {
    display: flex;
    justify-content: space-between;

    align-items: center;
    width: 100%;

    border-bottom: 2px solid #000;
    height: 2em;
    margin-top: 1em;
}

.project-page-link {
    text-decoration: underline;
    font-weight: bold;

    margin-left: auto;
    display: flex;
    align-items: center;

    margin-bottom: 4px;
}
