:root {
    --main-bg-color: #f4f4f4;
    --main-font-color: #252525FF;
}

body {
    font-family: Futura, sans-serif;
    background-color: var(--main-bg-color);
    color: var(--main-font-color);
    padding: 16px 72px 16px;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 95vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    display: flex;
    flex-direction: column;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.blur {
    background: rgba(244, 244, 244, 0.39);
    border-radius: 16px;
    box-shadow: 0px 0.761px 6.087px 0px rgba(255, 255, 255, 0.35) inset,
    -0.761px 0.761px 0.761px -1.522px rgba(255, 255, 255, 0.35) inset,
    0px 18.262px 22.827px 0px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
}

#small {
    border-radius: 4px;
    height: 32px;
    width: 32px;
}

/* View Switch Styles */
.view-switch {
    display: flex;
    justify-content: flex-end;
    flex-direction: row;
    align-items: center;
    padding: 64px 0px 8px;
}

.view-switch p {
    margin: 0;
    padding-right: 8px;
    font-size: 24px;
}

.hide-text {
    opacity: 0;
}

.grid-change {
    cursor: pointer;
    width: 32px;
    height: 32px;
}

.grid-change path {
    stroke: var(--main-font-color);
}

/* Left Section Styles */
.left-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: end;
    gap: 64px;
    margin-bottom: -5px;
}

.left-section p {
    font-size: 32px;
}

.left-section p:hover {
    text-decoration: underline;
}

.container {
    width: 40px;
    height: 32px;
    position: sticky;
    cursor: pointer;
    z-index: 101;
}

/* Burger Menu Styles */
.burger-menu {
    display: flex;
    position: relative;
}

.btn {
    width: 56px;
    cursor: pointer;
    z-index: 1100;
}

.btn span {
    display: block;
    width: 100%;
    border-radius: 3px;
    height: 8px;
    background: var(--main-font-color);
    transition: all 0.3s;
    position: relative;
}

.btn span + span {
    margin-top: 14px;
}

.active span:nth-child(1) {
    animation: top 0.7s forwards;
}

.not-active span:nth-child(1) {
    animation: top-2 0.7s forwards;
}

.active span:nth-child(2) {
    animation: scaled 0.7s forwards;
}

.not-active span:nth-child(2) {
    animation: scaled-2 0.7s forwards;
}

.active span:nth-child(3) {
    animation: bottom 0.7s forwards;
}

.not-active span:nth-child(3) {
    animation: bottom-2 0.7s forwards;
}

/* Keyframes for Burger Menu Animations */
@keyframes top {
    0% {
        top: 0;
        transform: rotate(0);
    }
    50% {
        top: 22px;
        transform: rotate(0);
    }
    100% {
        top: 22px;
        transform: rotate(45deg);
    }
}

@keyframes top-2 {
    0% {
        top: 22px;
        transform: rotate(45deg);
    }
    50% {
        top: 22px;
        transform: rotate(0deg);
    }
    100% {
        top: 0;
        transform: rotate(0deg);
    }
}

@keyframes bottom {
    0% {
        bottom: 0;
        transform: rotate(0);
    }
    50% {
        bottom: 22px;
        transform: rotate(0);
    }
    100% {
        bottom: 22px;
        transform: rotate(135deg);
    }
}

@keyframes bottom-2 {
    0% {
        bottom: 22px;
        transform: rotate(135deg);
    }
    50% {
        bottom: 22px;
        transform: rotate(0);
    }
    100% {
        bottom: 0;
        transform: rotate(0deg);
    }
}

@keyframes scaled {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0);
    }
}

@keyframes scaled-2 {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

/* Navigation Menu Styles */
.nav-menu {
    border-radius: 8px;
    position: absolute;
    right: 32px;
    top: 36px;
    overflow: hidden;
    margin-top: 4px;
    z-index: 99;
}

.nav-menu ul {
    list-style-type: none;
    margin: 0;
    padding: 8px;
    padding-top: 0;
    margin-top: 32px;
    margin-bottom: 16px;
}

.nav-menu li {
    padding: 8px;
}

.nav-menu li a {
    color: var(--main-font-color);
    padding: 16px;
    font-size: 20px;
    white-space: nowrap;
}

.nav-menu li:hover {
    background: rgba(250, 250, 250, 0.39);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(11.3px);
    -webkit-backdrop-filter: blur(11.3px);
}

/* Hidden and Not-Hidden Classes */
.hidden {
    display: none;
}

.not-hidden {
    display: flex;
}

/* Header Title */
h1 {
    margin: 0px;
    margin-bottom: -15px;
}

h1 a {
    margin: 0;
    font-size: 52px;
}

/* Footer Styles */
.footer {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: start;
    flex-wrap: wrap;
    padding: 64px 0px 8px;
}

.footer-middle {
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    gap: 16px;
}

.footer-link {
    font-size: 20px;
}

.footer-link:hover {
    text-decoration: underline;
}

.copyright {
    font-size: 20px;
    width: 275px;
}
.carbonbadge {
    width: 275px;
}

/* Section One Styles */
.section-one {
    max-width: 1480px;
    padding: 64px 0px;
    display: flex;
    flex-direction: row;
    gap: 24px;
    flex-basis: calc(100% / 13 * 9);
}


.right {
    text-wrap: normal;
}

.left p {
    margin: 0;
    font-size: 16px;
    line-height: 150%;
    width: 75%;
}

.right img {
    max-width: 85%;
    height: auto;
}

/* Image Grid Styles */
.row-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    padding: 0;
    margin-top: 48px;
}

.row {
    --modifier: calc((16rem - 100%) * 999);
    display: flex;
    gap: 16px;
    padding: 0;
    margin: 0;
    margin-inline: auto;
    width: 100%;
}

.item {
    flex-basis: max(var(--modifier), 0px);
    flex-grow: calc(var(--ratio));
    cursor: nesw-resize;
    padding: 0;
    margin: 0;
    position: relative; /* Needed for z-index */
  	transition: 0.3s ease-in-out;
}

.item::before {
    content: "";
    display: block;
    padding-bottom: calc( (1 / (var(--ratio))) * 100% );
}

.item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item:hover {
  	box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  	transform: scale(1.05);
    z-index: 10000;
}


.item img.enlarged {
    transform: scale(2); 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 10; 
    position: relative;
}

/* Anchor Styles */
a {
    color: var(--main-font-color);
    text-decoration: none;
}

.gallery {
    display: flex;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 244, 244, 0.58);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    z-index: 11000; 
    transition: opacity 0.3s ease;
}

.gallery.visible {
    opacity: 1;
    pointer-events: auto;
}

.gallery-grid {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.gallery-item {
    box-sizing: border-box;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    position: relative;
    padding: 16px;
    overflow: hidden;
}

.gallery-item img {
    max-width: 100%;
    max-height: calc(100vh - 32px); 
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
}

.gallery-spacer {
    height: 100vh; 
}

.close {
    display: none; 
    position: fixed;
    right: 0;
    z-index: 11001;
}
.close.visible {
    display: block;
}
.close-gallery {
    font-size: 40px;
    color: var(--main-font-color);
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}

.close-gallery:hover {
    color: #ccc;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Media Queries */

/* Hide Desktop Link by Default */
.desktop-link {
    display: none;
}

.desktop-link:hover {
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* Show Desktop Link and Hide Burger Menu on Screens >=720px */
@media (min-width: 720px) {
    .desktop-link {
        display: block;
        font-size: 24px;
        margin-left: 16px;
    }

    .burger-menu {
        display: none;
    }
}

/* Ensure Burger Menu is Visible and Desktop Link is Hidden on Screens <720px */
@media (max-width: 719px) {
    .desktop-link {
        display: none;
    }

    .burger-menu {
        display: flex;
        flex-direction: column;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        color: var(--main-bg-color);
        background: var(--main-font-color);
    }


    .btn span {
        background: var(--main-bg-color);
    }

    .blur {
        background: rgba(0, 0, 0, 0.39);
        border-radius: 16px;
        box-shadow: 0px 0.761px 6.087px 0px rgba(255, 255, 255, 0.35) inset,
        -0.761px 0.761px 0.761px -1.522px rgba(255, 255, 255, 0.35) inset,
        0px 18.262px 22.827px 0px rgba(0, 0, 0, 0.05);
        backdrop-filter: blur(74.569px);
        -webkit-backdrop-filter: blur(74.569px);
    }

    .grid-change path {
        stroke: var(--main-bg-color);
    }

    .bar {
        background: var(--main-bg-color);
    }

    a {
        color: var(--main-bg-color);
    }

    .nav-menu ul li a {
        color: var(--main-bg-color);
    }

    .gallery {
        background: rgba(37, 37, 37, 0.39);
    }

    .close-gallery {
        color: var(--main-bg-color);
    }
}

/* Tablet and Below */
@media (max-width: 960px) {
    h1 {
        margin: 0px;
        margin-bottom: -11px;
    }

    h1 a{
        font-size: 40px;
    }

    .left-section p{
        font-size: 24px;
    }

    .nav-menu {
        border-radius: 8px;
    }

    #small {
        border-radius: 4px;
        height: 24px;
        width: 24px;
    }
    .row-grid {
        gap: 16px;
    }

    .row {
        gap: 16px;
    }

    .left-section {
        gap: 40px;
    }

    .footer-link {
        font-size: 16px;
    }

    .copyright {
        font-size: 16px;
        align-self: flex-start;
        width: auto;
    }
    .carbonbadge {
        margin: 0 auto;
    }

    /* Adjusted Keyframes for Smaller Screens */
    @keyframes top {
        0% {
            top: 0;
            transform: rotate(0);
        }
        50% {
            top: 12px;
            transform: rotate(0);
        }
        100% {
            top: 12px;
            transform: rotate(45deg);
        }
    }

    @keyframes top-2 {
        0% {
            top: 12px;
            transform: rotate(45deg);
        }
        50% {
            top: 12px;
            transform: rotate(0deg);
        }
        100% {
            top: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes bottom {
        0% {
            bottom: 0;
            transform: rotate(0);
        }
        50% {
            bottom: 12px;
            transform: rotate(0);
        }
        100% {
            bottom: 12px;
            transform: rotate(135deg);
        }
    }

    @keyframes bottom-2 {
        0% {
            bottom: 12px;
            transform: rotate(135deg);
        }
        50% {
            bottom: 12px;
            transform: rotate(0);
        }
        100% {
            bottom: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes scaled {
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(0);
        }
    }

    @keyframes scaled-2 {
        0% {
            transform: scale(0);
        }
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(1);
        }
    }
}

/* Mobile */
@media (max-width: 720px) {
    body {
        padding: 16px 48px 16px;
    }

    .left-section {
        margin-bottom: 0;
    }

    h1 a{
        font-size: 32px;
    }

    .row-grid {
        gap: 8px;
        margin-top: 32px;
    }

    .row {
        gap: 8px;
    }



    .view-switch p {
        font-size: 20px;
    }

    .grid-change {
        width: 24px;
        height: 24px;
    }

    .burger-menu {
        font-size: 32px;
    }


    .section-one {
        flex-direction: column;
        padding: 32px 0px;
    }

    .left, .right {
        flex: none; 
        width: 100%; 
    }
    .btn {
        width: 28px;
    }
    .btn span {
        height: 3px;
    }

    .btn span + span {
        margin-top: 9px;
    }

    .nav-menu {
        top: 36px;
        right: 16px;
    }

    .footer {
        display: flex;
        position: relative;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        row-gap: 24px;
        padding: 64px 0px 8px;
    }

    .footer-link {
        font-size: 18px;
    }

    .copyright {
        font-size: 18px;
        align-self: flex-start;
        width: auto;
    }
    .carbonbadge {
        margin: 0 auto;
    }

    /* Adjusted Keyframes for Smaller Screens */
    @keyframes top {
        0% {
            top: 0;
            transform: rotate(0);
        }
        50% {
            top: 12px;
            transform: rotate(0);
        }
        100% {
            top: 12px;
            transform: rotate(45deg);
        }
    }

    @keyframes top-2 {
        0% {
            top: 8px;
            transform: rotate(45deg);
        }
        50% {
            top: 8px;
            transform: rotate(0deg);
        }
        100% {
            top: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes bottom {
        0% {
            bottom: 0;
            transform: rotate(0);
        }
        50% {
            bottom: 6px;
            transform: rotate(0);
        }
        100% {
            bottom: 6px;
            transform: rotate(135deg);
        }
    }

    @keyframes bottom-2 {
        0% {
            bottom: 6px;
            transform: rotate(135deg);
        }
        50% {
            bottom: 6px;
            transform: rotate(0);
        }
        100% {
            bottom: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes scaled {
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(0);
        }
    }

    @keyframes scaled-2 {
        0% {
            transform: scale(0);
        }
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(1);
        }
    }
}

/* Small Mobile */
@media (max-width: 520px) {
    body {
        padding: 16px 20px 16px;
    }

    .header {
        display: flex;
        flex-direction: column;
    }

    .blur {
        border-radius: 8px;
    }


    .row-grid {
        gap: 4px;
        margin-top: 32px;
    }

    .row {
        gap: 4px;
    }

    .view-switch {
        padding: 32px 0px 8px;
    }

    .view-switch p {
        font-size: 16px;
    }

    .grid-change {
        width: 20px;
        height: 20px;
    }

    .btn {
        width: 28px;
    }

    .btn span {
        height: 3px;
    }

    .btn span + span {
        margin-top: 6px;
    }

    .nav-menu {
        top: 14px;
        right: 12px;
    }

    .left-section {
        gap: 32px;
    }


    h1 a{
        font-size: 24px;
    }

    .section-one {
        flex-direction: column;
        padding: 32px 0px;
    }

    .left, .right {
        flex: none; 
        width: 100%; 
    }

    .right p {
        font-size: 16px;
        line-height: 150%;
    }

    .footer {
        display: flex;
        position: relative;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        row-gap: 16px;
        padding: 64px 0px 8px;
    }

    .footer-link {
        font-size: 16px;
    }

    .copyright {
        font-size: 14px;
        align-self: flex-start;
        width: auto;
    }
    .carbonbadge {
        margin: 0 auto;
    }

    /* Adjusted Keyframes for Smaller Screens */
    @keyframes top {
        0% {
            top: 0;
            transform: rotate(0);
        }
        50% {
            top: 12px;
            transform: rotate(0);
        }
        100% {
            top: 12px;
            transform: rotate(45deg);
        }
    }

    @keyframes top-2 {
        0% {
            top: 8px;
            transform: rotate(45deg);
        }
        50% {
            top: 8px;
            transform: rotate(0deg);
        }
        100% {
            top: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes bottom {
        0% {
            bottom: 0;
            transform: rotate(0);
        }
        50% {
            bottom: 6px;
            transform: rotate(0);
        }
        100% {
            bottom: 6px;
            transform: rotate(135deg);
        }
    }

    @keyframes bottom-2 {
        0% {
            bottom: 6px;
            transform: rotate(135deg);
        }
        50% {
            bottom: 6px;
            transform: rotate(0);
        }
        100% {
            bottom: 0;
            transform: rotate(0deg);
        }
    }

    @keyframes scaled {
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(0);
        }
    }

    @keyframes scaled-2 {
        0% {
            transform: scale(0);
        }
        50% {
            transform: scale(0);
        }
        100% {
            transform: scale(1);
        }
    }
}

.cursorS {
    position: absolute;
    width: 25px;
    height: 25px;
    left: -100px;
    cursor: none;
    pointer-events: none;
}

.cursorG {
    position: absolute;
    width: 25px;
    height: 25px;
    left: -100px;
    cursor: none;
    pointer-events: none;
}