@font-face {
    font-family: 'altertype-Regular';
    src: url('../font/altertype-Regular.otf') format('opentype');
    text-rendering: optimizeLegibility;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    font-family: 'altertype-Regular';
    background-color: #fafafa;
    position: relative;
    background-color: black;
}

.project-description{
    max-width: 500px;
    background-color: white;
    position: fixed;
    padding: 1%;
    top: 100px;
    left: 25px;
    z-index: 1000;

    transition: opacity 1.05s ease, pointer-events 0s 0.3s;
    opacity: 1;
   }
   .project-description p{
    font-size: 0.95em;
    line-height: 1.25em;
    margin-top: 10px;
   }
   .project-description h3{
    font-size: 1.35em;
   }
   
   .project-description.fade-out {
       opacity: 0;
       pointer-events: none;
       transition: opacity 0.3s ease, pointer-events 0s 0.3s;
   }
   
   .project-description.fade-in {
       opacity: 1;
       pointer-events: auto;
       transition: opacity 0.3s ease, pointer-events 0s 0s;
   }

.current-tag-display {
    text-align: left;
    font-size: 1.8em;
    color: #333;
    font-family: 'altertype-Regular';
    opacity: 0;
    /*transform: translateY(-10px);*/
    transition: all 0.3s ease;
}

.current-tag-display.show {
    opacity: 1;
    transform: translateY(0);
}

/* Filter Tags Section */
.filter-container {
    padding: 20px 20px 0 2px;
    display: flex;
    flex-wrap: wrap;
    
    gap: 10px;

}

.filter-button {
    padding: 4px 10px;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'altertype-Regular';
    font-size: 0.8em;
}

.filter-button:hover {
    background-color: #e0e0e0;
}

.filter-button.active {
    background-color: #333;
    color: white;
    border-color: #333;
}

.gallery {
    column-count: 5;
    column-gap: 0px;
    padding: 20px 0px 0px 0px;
    max-width: 100%;
    margin: 0px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 0px;
    margin: 0px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-item-overlay { 
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    padding: 30px;
    color: white;
    opacity: 0;
    /*transition: opacity 0.5s ease;*/
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
    visibility: hidden;
}

.gallery-item-overlay h3 {
    margin-bottom: 2px;
    font-size: 1.10em;
    margin: 0;
    padding: 2px 10px;
}

.gallery-item-overlay p {
    font-size: 0.9em;
    opacity: 0.9;
    margin: 0;
    padding-bottom: 10px;
    padding: 2px 10px;
}

.gallery-item-tags {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.gallery-item-tag {
    font-size: 0.9em;
    color: red;
    /*background-color: rgba(255, 255, 255, 0.2);*/
    padding: 2px 0px;
    border-radius: 0px;
    padding-bottom: 10px;
    padding: 2px 10px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img,
.modal-content video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
    padding: 20px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
    z-index: 2;
}

.modal-content img:hover+.modal-overlay,
.modal-content video:hover+.modal-overlay,
.modal-overlay:hover {
    opacity: 1;
}

.modal-overlay h3 {
    margin-bottom: 2px;
    font-size: 1.2em;
}

.modal-overlay p {
    font-size: 1em;
    opacity: 0.9;
}

.modal-overlay .gallery-item-tags {
    margin-top: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.modal-overlay .gallery-item-tag {
    font-size: 0.8em;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 3;
}

.loading {
    text-align: center;
    padding: 20px;
    display: none;
}

@media (max-width: 1200px) {
    .gallery {
        column-count: 2;
        padding: 20px 100px 20px 20px;
    }
}

@media (max-width: 768px) {
    .gallery {
        column-count: 2;
        padding: 0px;
    }

    .filter-container {
        display: none;
        pointer-events: none;
    }
}

