@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@500&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@700&display=swap");

* {
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
}

.sidebar {
    position: fixed; /* Keep the sidebar fixed in place */
    width: 22vw; /* Sidebar always takes up 30% of the viewport width */
    height: 100vh; /* Full viewport height */
    padding: 20px; /* Padding inside the sidebar */
    background-color: #FEFEFE; /* Background color */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Space between top and bottom elements */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.top-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    overflow: hidden;
}

.sidebar h1 {
    font-size: 2.625em;
    color: #111213;
    padding-bottom: 10px; 
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 700;
}

.sidebar .top-section h2 {
    font-size: 1.125em;
    color: #323639;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
}

.sidebar .top-section p {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: 1.0625em;
    color: #8b9198;
    margin-bottom: 10px;
}

.sidebar .contact {
    margin-bottom: 20px; 
}

.sidebar .contact p {
    margin: 5px 0;
}

.sidebar .contact a {
    text-decoration: none;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    color: #323639;
    width: 100%;
    word-break: break-all;
    overflow-wrap: anywhere;
}

.sidebar .divider {
    border-top: 2px solid #111213; 
    margin: 10px 0;
    width: 100%;
}

.sidebar .social-media ul {
    display: flex;
    list-style: none;
    justify-content: flex-start;
    flex-wrap: wrap;
} 

.sidebar .social-media ul li {
    margin-right: 8px; /* Adjust spacing as needed */
}

.sidebar .social-media a img {
    width: 32px;
    height: 32px;
    display: inline-block;
}

#personal-image-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: inline-block;
}

.main-content {
    margin-left: 22vw; /* Adjust based on sidebar width and desired spacing */
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 20px;
    flex-grow: 1; /* Main content takes up remaining space */
    column-count: 3;
    column-gap: 20px;
}

.masonry-grid img {
    width: 100%;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;    
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.masonry-grid img:hover {
    transform: scale(1.05);
}

.clickable {
    cursor: pointer;
}

.image-container {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Apply the box-shadow here */
    cursor: pointer;
}

.image-container img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s, transform 0.3s;
}

.image-container .image-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 20px;
    text-align: center;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    will-change: opacity;    
    text-shadow: 0 0 5px rgba(0,0,0,.7);
    pointer-events: none;
}

.image-container:hover img {
    opacity: 0.75;
    transform: scale(1.05);
}

.image-container:hover .image-label {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    width: 100%;
    height: auto;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Media Queries for Responsiveness */
@media (max-width: 1200px) {
    .sidebar {
        font-size: 0.9em; /* Slightly smaller text */
    }
    .main-content {
        column-count: 2;
    }
}

@media (max-width: 768px) {
    .sidebar {
        font-size: 0.8em; /* Smaller text */
    }
    .main-content {
        column-count: 2;
    }
}

@media (max-width: 576px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        font-size: 0.7em; /* Smaller text */
        overflow: hidden; /* Hide overflowing content */
    }
    .main-content {
        margin-left: 0;
        margin-top: 20px;
        column-count: 1;
    }
}