/* Variable for scaling */
:root {
    --scalar: 250; /*A multiplier for dimensions*/
    --grid-gutter: 0.5px; /*Spacing between grid items */
}
header {
    display: flex;
    justify-content: space-between;
    height: 8ppx;
    position: fixed;
    width: 100%;
    background-color: gray;
    top: 0;
    left: 0;
    font-family: Alumni Sans Pinstripe;
    font-weight: 600;
    align-items: center;
}

header,
footer {
    box-shadow: none;
    transition: box-shadow 0.3s ease; /* Smoothly toggle the shadow */
    z-index: 10; /* Keep header and footer drawn over anything else*/
}

/* Add shadow when the class is applied */
header.with-shadow,
footer.with-shadow {
    box-shadow: 0 0 1vh 1vh white;
}

header h1 {
    font-family:
        Instrument Sans,
        sans-serif;
    padding-left: 2vw;
    font-size: clamp(1.2rem, 4vw, 2rem); /* Dynamically adjust the header font size */
    white-space: nowrap; /* Prevents text from wrapping onto a new line */
    overflow: hidden; /* Ensures no overflow */
    text-overflow: ellipsis; /* Adds ellipsis (...) when text overflows */
    transition: opacity 0.5s ease-in-out; /* Add transition for opacity */
    opacity: 1; /* Default opacity */
}

nav {
    padding-right: 2vw;
    display: flex;
    overflow: hidden; /* Prevents any overflow beyond the container */
}

grid-wrapper {
    justify-content: center; /* Center the grid horizontally */
    margin-top: 500px;
}

nav button {
    font-family:
        Instrument Sans,
        sans-serif;
    border: none;
    color: cornsilk;
    height: 5vh;
    padding-left: clamp(10px, 2vw, 32px); /* Dynamic padding based on viewport width */
    padding-right: clamp(10px, 2vw, 32px); /* Dynamic padding based on viewport width */
    text-align: center;
    font-size: clamp(0.8rem, 2vw, 1rem); /* Dynamic font size */
    margin: 4px 2px;
    opacity: 0.6;
    border-radius: 15px;
    background: none;
    transition: 0.3s;
}

nav button:hover {
    opacity: 0.75;
    background-color: darkgray;
    cursor: pointer;
}

nav button.active {
    border-color: lightgray;
    /*background-color: rgba(0, 0, 0, 0.20);
    color: white;*/
    text-decoration: underline;
    text-underline-offset: 6px;
}

#body {
    font-family:
        Instrument Sans,
        sans-serif;
}

.filter-container {
    z-index: 8; /* Render above grid items */
    position: fixed;
    top: 7vh;
    left: 2vw;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 80vh; /* Ensures the container doesn't grow beyond 80vh */
    overflow-y: auto; /* Allow scrolling */
}

.filter-container h3 {
    text-decoration: underline;
    text-decoration-color: gray;
    color: gray;
    font-size: 1.2em; /* Adjust size as needed */
    margin-top: 0;
    margin-bottom: 0; /* Space between header and checkboxes */
    text-align: left; /* Align left, change if needed */
}

.filter-container label {
    font-size: clamp(0.8rem, 2vw, 1rem); /* Font size will scale between 0.8rem and 1.2rem depending on the viewport */
    display: block;
    margin-bottom: 5px;
    cursor: pointer; /* Indicate that it's clickable */
    padding: 5px; /* Add some padding for better click area */
    border-radius: 10px; /* Add rounded corners */
}

.filter-container label:hover {
    background-color: #e0e0e0; /* Change background on hover */
}

.selected-filter {
    background-color: rgba(0, 0, 0, 0.05); /* Color for selected filters */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.25);
}

.portfolio {
    padding-top: 50px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, calc(0.7px * var(--scalar))); /* Main grid */
    column-gap: calc(1 * var(--grid-gutter) * var(--scalar)); /* Space between the cells */
    row-gap: calc(0.4 * var(--grid-gutter) * var(--scalar)); /* Space between the cells */
    justify-content: center; /* Center the grid on the page */
    justify-items: center; /* Center the grid on the page */
}

.grid-item {
    font-family: Alumni Sans Pinstripe;
    width: calc(1px * var(--scalar));
    height: calc(1.618px * var(--scalar));
    background-color: rgba(203, 250, 207);
    text-align: center;
    align-content: center;
    cursor: pointer;
    /* Background settings */
    background-size: cover;
    background-position: center;
    transition: 0.3s ease-in-out;
    transition-delay: 0.1s;
    /* Filter Animations*/
    opacity: 1;
    /* Ensure child elements like the star are positioned relative to this */
    position: relative;
}

.grid-item:hover {
    transform: scale(1.05);
    transition: 0.2s ease-in-out;
    box-shadow: 0 0 15px darkgray;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
    text-shadow: 
        1px 1px 15px black,
        -1px 1px 15px black,
        -1px -1px 15px black,
        1px -1px 15px black;
}

.favorite-star,
.favorite-badge {
    color: gold;
}

.favorite-star {
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 20px;
    z-index: 6;
    pointer-events: none;
}

.favorite-badge {
    margin-top: 15px;
    position: absolute; /* Position it independently of the flow */
    top: -1.5rem; /* Adjust to place above the title */
    left: 0; /* Align to the left edge */
    font-size: 1.2rem; /* Adjust size as needed */
    font-weight: bold;
    text-align: left; /* Align the text to the left */
}

.grid-overlay {
    font-family:
        Instrument Sans,
        sans-serif;
    background-color: rgba(0, 0, 0, 0.25);
    width: calc(1px * var(--scalar));
    height: calc(1.618px * var(--scalar));
    align-content: center;
    color: white;
    opacity: 0;
    transition: 0.5s ease;
}

.grid-overlay h3 {
    font-size: x-large;
    font-weight: 300;
    opacity: 0;
    margin: 0;
    transition: opacity 0.3s ease-in-out;
}

.grid-overlay .description {
    font-size: medium; /* Smaller font size for the description */
    margin: 10px 10px auto 10px;
    opacity: 0; /* Hide the description by default */
    transition: opacity 0.3s ease-in-out;
}

/* Make the description visible when hovered */
.grid-item:hover .grid-overlay .description {
    opacity: 1;
}

/* Make the title visible when hovered */
.grid-item:hover .grid-overlay h3 {
    opacity: 1;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: hidden; /* Prevent default scrolling of the lightbox */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100; /* Make sure the lightbox is above other content */
}

/* Overlay that covers the whole lightbox */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent black */
    z-index: 10;
    transition: opacity 0.5s ease-in-out; /* For fading effect */
    opacity: 1;
}

.overlay.fade-out {
    opacity: 0;
}

.lightbox-content {
    font-family:
        Instrument Sans,
        sans-serif;
    background-color: white;
    position: relative;
    padding: 20px;
    border-radius: 8px;
    width: 90vw; /* Responsive width */
    max-width: 1000px;
    max-height: 80vh; /* Limit overall height */
    overflow-y: auto; /* Allow vertical scrolling */
    display: flex;
    flex-direction: column; /* Stack elements vertically */
}

.lightbox-header {
    font-family: Alumni Sans Pinstripe;
    display: flex; /* Use flexbox for alignment */
    text-align: center;
    align-items: baseline;
    justify-content: space-between; /* Space between title and close button */
    margin: 0; /* Remove default margin */
    padding: 10px 0; /* Add padding for spacing */
    color: black; /* Set the title color */
    background-color: white; /* Background color for readability */
    position: sticky; /* Make the header sticky */
    top: 0; /* Stick to the top of the lightbox */
    z-index: 110; /* Ensure it's above other content */
    box-shadow: 0 -20px 0 10px white;
}

#lightbox-timeframe {
    font-size: 1em; /* Adjust font size as needed */
    margin-left: auto;
    color: gray;
    text-align: right;
    padding-right: 1em;
}

#lightbox-title {
    text-align: left;
    font-size: 2em;
}

blockquote {
    background-color: lightgray;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px; /* Add rounded corners */
}

.close {
    cursor: pointer;
    font-size: 2.5em;
}

#lightbox-timeline {
    float: right;
}

.tags-container {
    margin-top: 10px;
    font-size: 0.85em;
    color: #777;
}

#collaborators-section {
    font-size: large;
    font-style: normal;
    margin: 10px 0;
    color: #666;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px; /* Add rounded corners */
    padding-left: 15px;
}

/* Slideshow container */
.slideshow-container {
    flex-grow: 1; /* Allow this to take remaining space */
    display: flex; /* Align children in a flex container */
    justify-content: center; /* Center items */
    position: relative; /* Allow absolute positioning of arrows */
}

/* Hide the slides by default */
.slide {
    display: none;
}

/* Previous/next buttons */
.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    color: black;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 10; /* Ensure the arrows are on top */
    transform: translateY(-50%); /* Vertically center the arrows */
    width: 40%; /* Take up the left or right half of the image */
    height: 100%; /* Full height of the image */
    margin: 15px;
    display: flex;
    align-items: center; /* Vertically center the text */
    text-shadow: 0 0 2px white;
}

.prev {
    left: 0; /* Align the previous arrow to the left */
    justify-content: flex-start; /* Align text to the left */
}

.next {
    right: 0; /* Align the next arrow to the right */
    justify-content: flex-end; /* Align text to the right */
}

/* Description text */
.text {
    text-align: center;
    color: #000;
    padding: 8px 12px;
    font-size: 14px;
}

/* Thumbnails */
/* Set the .row to limit its width and allow horizontal scrolling */
.row {
    display: flex;
    justify-content: center;
    overflow-x: auto; /* Keeps horizontal scroll only within .row */
    max-width: 100%;
    min-height: max-content;
    align-items: center; /* Keeps the images aligned vertically */
    padding: 10px 0; /* Optional: Padding for spacing */
    height: auto; /* Allow row to adjust based on content */
    flex-wrap: wrap; /* Wrap images if they're too wide */
}

/* Set a consistent max-height for images to keep them within bounds */
.row img {
    max-height: 150px; /* Adjust as necessary */
    width: 100%; /* Ensure it fills the container's width */
    object-fit: cover; /* Prevents distortion, covers the space neatly */
}

/* Optional: Style the scrollbar if needed */
.row::-webkit-scrollbar {
    height: 8px; /* Adjust the height of the scrollbar */
}

.row::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.5); /* Scrollbar color */
    border-radius: 4px;
}

.column {
    flex: 0 0 auto;
    width: 80px;
    margin: 5px;
}

.demo {
    opacity: 0.6;
    cursor: pointer;
}

.active,
.demo:hover {
    opacity: 1;
}

#image-description {
    text-align: center;
    margin-top: 10px;
}

.section {
    z-index: 2;
    padding-bottom: 7vh;
    padding-top: 9vh;
    padding-left: 10vw; /* Padding around the grid */
    padding-right: 10vw; /* Padding around the grid */
}

footer {
    font-family:
        Instrument Sans,
        sans-serif;
    font-size: medium;
    align-items: center;
    padding-left: 2vw;
    padding-right: 2vw;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 50px;
    background-color: gray;
}

.footer-content {
    padding-top: 0.3vh;
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 95%; /* Adjust as needed */
    padding-left: clamp(10px, 2vw, 20px); /* Dynamic left padding */
    padding-right: clamp(10px, 2vw, 20px); /* Dynamic right padding */
    font-size: clamp(0.8rem, 2vw, 1rem); /* Dynamically adjust font size */
}

.footer-content > * {
    font-size: clamp(0.8rem, 2vw, 1rem); /* Ensure child elements' text also scales */
}

#home-content {
    display: block;
    margin-top: clamp(5vh, 10%, 0); /* margin-top dynamically scales between 5vh and 0 */
    max-width: 1000px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    transition: transform 0.3s ease-in-out; /* Smooth transition for scaling */
}

/* Scaling class for the content when it's too tall */
#home-content.scaled {
    transform: scale(0.8); /* Scale down the content */
    transform-origin: top center; /* Keep the top part fixed when scaling */
}

#home-content h2 {
    font-size: xx-large;
    margin-bottom: 0.5vh;
}

#home-content q {
    font-size: x-large;
    color: cornsilk;
    font-weight: bold;
}

#home-content i,
b {
    font-size: large;
}

#home-content p {
    font-size: large;
}

.hr-home {
    border-color: darkgray;
}

.scrollToView {
    color: cornsilk;
}

/* General layout for About Section */
#about {
    padding: 5vh 2vw;
}

.about-container {
    margin-top: 5vh;
    display: flex;
    justify-content: flex-start; /* Keeps items close to each other */
    gap: 0; /* No gap between columns */
    width: 100%;
    max-width: 1200px; /* Optional: Limit the max width of the container */
    margin-left: auto;
    margin-right: auto;
}

/* Left Column */
.about-left {
    width: 30%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-right: 2vw; /* Optional: Adds some space on the right of the left column */
}

.about-photo {
    width: 100%;
    max-width: 200px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    justify-content: center; /* Align the items in the center */
    gap: 2rem; /* Adds spacing between the icons */
    padding: 1rem 0;
}

.social-icon {
    font-size: 2rem; /* Adjust the size of the icons */
    color: #0077b5; /* Default color (LinkedIn blue) */
    text-decoration: none;
    display: flex;
    align-items: center; /* Vertically center the text with the icon */
}

.social-icon i {
    margin-right: 0.5rem; /* Space between icon and text */
}

.social-icon:hover {
    color: #005c8e; /* Darker LinkedIn blue on hover */
}

/* Customize individual icon colors */
.social-icon:nth-child(1) {
    color: #333; /* GitHub color */
}

.social-icon:nth-child(2) {
    color: #fc2448; /* Itch.io color */
}

.social-icon:nth-child(3) {
    color: #0077b5; /* LinkedIn color */
}

/* Style for the Resume link */
.resume-link {
    display: block; /* Make the Resume link a block element */
    font-size: 1.15rem; /* Adjust the font size */
    text-align: center;
    color: #333;
    text-decoration: none;
    margin-top: 1rem; /* Add space above the Resume link */
    transition: color 0.3s;
}

.resume-link i {
    margin-right: 0.5rem; /* Space between icon and text */
}

.resume-link:hover {
    color: #5b5b5b; /* Change color on hover */
}

/* Right Column */
.about-right {
    width: 70%;
    text-align: left;
    padding-left: 2vw; /* Optional: Adds space on the left of the right column */
}

/* Mobile responsiveness: Stack columns on smaller screens */
@media (max-width: 768px) {
    .about-container {
        flex-direction: column;
        align-items: center;
    }

    .about-left,
    .about-right {
        width: 100%;
        text-align: center;
    }
}

.dynamic-sections-container {
    width: 100%;
    padding: 20px;
}

#about-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.about-section {
    flex: 1 1 15%; /* Each section can grow and shrink, with a base size of 15% */
    min-width: 200px; /* Set a minimum width for each section */
    max-width: min-content;
    flex-direction: column; /* Stack the contents vertically */
    justify-content: center; /* Vertically center content */
    align-items: center; /* Horizontally center content */
}

/* Title of each column */
.about-section h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* Bullet points for each column */
.about-section ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    padding-left: 0;
}

.about-section li {
    margin-bottom: 0.3rem;
}

/* Responsive stacking */
@media (max-width: 768px) {
    .dynamic-sections-container {
        flex-direction: column; /* Stack columns vertically */
        align-items: center; /* Center columns */
    }
}

#fade-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: white;
    z-index: -2; /* Start behind the content */
    transition: transform 2.5s ease-in-out;
    box-shadow: 0 0 10vh 10vh white; /* Gradient-like effect */
}

/* Overlay for Home background */
#background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: gray; /* Default color for Home */
    z-index: -1; /* Keep it behind other content */
    transition: background-color 0.5s ease; /* Smooth transition */
}

body {
    margin: 0;
    height: 100%;
}
