@font-face {
    font-family: PixelOperator;
    src: url('fonts/PixelOperator.ttf');
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    font-family: PixelOperator;
    font-size: 16pt;
}

th, td {
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 15px;
    padding-right: 15px;
    text-align: right;
    font-size: 16pt;
}


/* Background image */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/bullet_cluster.jpg') center center/cover;
    z-index: -1;
    filter: brightness(100%);
    transition: transform 1.5s ease-in-out, filter 0.5s ease-in-out;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    text-align: right;
    font-size: 12px;
    z-index: 1000;
}

.audioplayer {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 20%;
    height: 30px;
    z-index: 10000;
}
#player {
    position: fixed;
    bottom: 5px;
    left: 5px;
    width: 20%;
    height: 20px;
    z-index: 10000;
}

/* SVG Cursor */
.cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 10000;
    /* animation: spin-timed 30s infinite; */
}

.cursor svg {
    width: 100%;
    height: 100%;
    fill: rgba(255, 255, 255, 0.8);
    stroke: white;
    stroke-width: 3;
    animation: twinkle 1s infinite alternate, color-cycle 10s infinite;
}

.spinning-thing {
    display: inline-block;
    animation: spin 0.4s linear infinite;
}

/* Cursor animations */
@keyframes twinkle {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes color-cycle {
    0% {
        fill: rgba(0, 0, 255, 0.8); /* Deep Blue */
    }
    15% {
        fill: rgba(173, 216, 230, 0.8); /* Light Blue */
    }
    30% {
        fill: rgba(255, 255, 255, 0.8); /* White */
    }
    45% {
        fill: rgba(255, 255, 0, 0.8); /* Yellow */
    }
    60% {
        fill: rgba(255, 165, 0, 0.8); /* Orange */
    }
    75% {
        fill: rgba(255, 0, 0, 0.8); /* Deep Red */
    }
    100% {
        fill: rgba(0, 0, 255, 0.8); /* Deep Blue */
    }
}
@keyframes color-cycle-text {
    0% {
        color: red; 
    }
    15% {
        color: orange; 
    }
    30% {
        color: yellow; 
    }
    45% {
        color: green;
    }
    60% {
        color: blue;
    }
    75% {
        color: rebeccapurple;
    }
    100% {
        color: red;
    }
}


.trail {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: fadeOut 2s forwards;
}

/* Text animations */
@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.1);
    }
}

/* Container for content */
.content {
    cursor: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: white;
    text-shadow: 2px 2px 5px black;
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1s, transform 1s;
    overflow-y: auto;
}
.content::-webkit-scrollbar {
    display: none;
}

.content.hidden {
    opacity: 0;
    transform: translateY(20px);
}

/* Right and left-half containers */
.right-half {
    position: absolute;
    right: 5%;
    top: 7%;
    width: 30%;
    height: 85%;
    padding: 20px;
    text-align: justify;
    overflow-y: auto; /* Add scrolling if the content overflows */
    overflow-x: hidden;
    hyphens: auto;
    }
.right-half::-webkit-scrollbar {
    display: none;
}

.left-half {
    position: absolute;
    left: 5%;
    top: 7%;
    width: 50%;
    height: 85%;
    padding: 20px;
    text-align: justify;
    overflow-y: auto; /* Add scrolling if the content overflows */
    overflow-x: hidden;
    hyphens: auto;
    }
.left-half::-webkit-scrollbar {
    display: none;
}

.middle-half {
    position: relative;
    /* left: 12.5%; */
    width: 80%;
    /* right: 12.5%; */
    height: 85%;
    padding: 20px;
    text-align: justify;
    overflow-y: auto;
    overflow-x: hidden;
    hyphens: auto;
}
.middle-half::-webkit-scrollbar {
    display: none;
}

/* Menu bar */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
}

.nav-container nav {
    display: inline-flex;
    justify-content: space-around;
    flex-direction: row;
    overflow-x: scroll;
}
.nav-container nav::-webkit-scrollbar {
    display: none;
}

.scrollarrow-container-right {
    position: absolute;
    right: 0;
    top: 0;
    height: 95%;
    width: 4rem;
    padding-left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    background: linear-gradient(
        to left,
        #000 1.75rem,
        transparent
    );
}

.scrollarrow-container-left {
    position: absolute;
    left: 0;
    top: 0;
    height: 95%;
    width: 4rem;
    padding-right: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    background: linear-gradient(
        to right,
        #000 1.75rem,
        transparent
    );
}

.noback {
    background: none;
}

.nav-container nav a {
    flex: 1 1 auto;
    text-align: center;
    white-space: nowrap;
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
    margin: 0;
    padding: 0 10px;
    box-sizing: border-box;
}

nav a {
    cursor: none;
    margin: 0 15px;
    text-decoration: none;
    color: white;
    font-size: 24px;
    transition: color 0.3s;
}

nav a:visited {
    color: white;
}

nav a:hover {
    /* color: rgb(86, 233, 101); */
    animation: color-cycle-text 10s infinite ease-in-out;
}

nav a:hover img {
    opacity: 0.7;
    transform: scale(1.1);
    filter: grayscale(100%);
}

/* Zoom-in animations */
.zoom-about {
    transform: scale(2.5) translate(-3%, 5%);
}

.zoom-links {
    transform: scale(5) translate(6%, 20%);
}

.zoom-cv {
    transform: scale(3) translate(20%, -30%);
}

.zoom-publications {
    transform: scale(3) translate(-32%, -25%);
}

.zoom-affils {
    transform: scale(2.5) translate(-22%, 8%);
}

.zoom-resources {
    transform: scale(4) translate(-8%, 25%);
}

.zoom-research {
    transform: scale(5) translate(29%, 40%);
}

.zoom-secret {
    transform: scale(7) translate(41%, -34%);
}

.dim-background {
    filter: brightness(30%);
    transition: filter 0.5s;
}

.section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100vh;
    padding: 20px;
}

.section:nth-child(odd) {
    flex-direction: row-reverse;
}

.secret {
    position: absolute;
    left: 96px;
    bottom: 108px;
    width: 5px;
    height: 5px;
    opacity: 0;
}

figcaption {
    font-size: 16px;
}

h1 {
    font-size: 65px;
    margin-top: 25px;
    margin-bottom: 25px;
}

h2 {
    font-size: 35px;
    margin-top: 18px;
    margin-bottom: 18px;
}

h3 {
    font-size: 25px;
    margin-top: 12px;
    margin-bottom: 12px;
}

a {
    color: yellow;
    text-decoration: none;
    cursor: none;
}

a:visited {
    color: rgba(255, 191, 252, 1.0);
}

a:hover {
    /* color: rgb(86, 233, 101); */
    animation: color-cycle-text 10s infinite ease-in-out;
}

a:hover img {
    opacity: 0.7;
    transform: scale(1.1);
    filter: grayscale(100%);
}


img {
    display: block;
    width: 100%;
    height: auto;  /* keep aspect ratio */
    object-fit: contain;
    /* position: absolute; */
    /* top: 50%; */
    /* left: 50%; */
    /* transform: translate(-50%, 0%); */
    /* transform: translate(-50%, -50%); */
}

/* figure {
    position: relative;
    left: 15%;
    width: 60%;
} */

.figcontainer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}

figure {
    border: 3px solid #a44eff; 
    padding: 10px;
    border-radius: 10px;
    background: linear-gradient(145deg, rebeccapurple, rgb(132, 97, 166)); /* Gradient background */
    box-shadow: 0 0 20px rgba(178, 78, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.3); /* Glow effect */
    width: max-content;
    position: relative;
    width: 60%;
    min-width: 275px;
    max-width: 500px;
    margin: 0;
}

figure img {
    justify-content: center;
    border-radius: 5px;
    display: block;
    min-width: 225px;
    max-width: 500px;
    width: 100%;
}

figcaption {
    background-color: rebeccapurple;
    color: #d4d4ff;
    padding: 5px 10px;
    border-radius: 5px;
    border: 1px solid #a44eff;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: left;
    box-shadow: 0 0 15px rgba(178, 78, 255, 0.8);
    text-shadow: none;
}

.starfield {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    z-index: -1;
    background: radial-gradient(circle, transparent, rgba(255, 255, 255, 0.1), transparent),
                repeating-linear-gradient(transparent, transparent 15px, rgba(255, 255, 255, 0.1) 16px, transparent 17px);
}

.title-img {
    display: block;
    height: 100%;
    width: auto;
    object-fit: contain;
    position: relative;
    border: 2px solid transparent; /* Transparent initial border */
    border-radius: 15px; /* Rounded corners */
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(135deg, #ff6ec4, #7873f5, #1fc8db) border-box; /* Gradient border */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 
                0 0 40px rgba(143, 45, 253, 0.6), 
                0 0 60px rgba(0, 153, 255, 0.5); /* Glow effect */
    overflow: hidden; /* Clips child elements if they overflow */
}

.img-small {
    display: block;
    width: 15%;
    min-width: 200px;
    max-width: 300px;
    position: relative;
    left: 0%;
    top: 0%;
}

.img-tiny {
    display: block;
    width: 32px;
    height: auto;
    object-fit: contain;
    position: relative;
    left: 0%;
    top: 0%;
}

.logo-text-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.logo-container {
    flex: 1;
    min-width: 200px;
    max-width: 15%;
    box-sizing: border-box;
    padding: 10px;
    align-self: center;
}

.title-img-container {
    display: flex;
    min-width: 20%;
    max-width: 300px;
    width: auto;
    min-height: 100px;
    max-height: 35%;
    box-sizing: border-box;
    padding: 3px;
    align-self: center;
    justify-content: center;
}

.logo-container-big {
    flex: 1;
    min-width: 200px;
    max-width: 30%;
    box-sizing: border-box;
    margin-right: 70px;
    margin-left: 30px;
    align-self: center;
}

.logo-container-big figure {
    margin-bottom: 30px;
}

.text-container {
    flex: 3;
    max-width: 80%;
    box-sizing: border-box;
    padding: 30px;
}

.text-container-big {
    flex: 3;
    max-width: 65%;
    box-sizing: border-box;
    padding: 0px;
}


.spacey-border {
    width: 80%;
    height: 70%;
    position: relative;
    padding: 20px; /* Inner content padding */
    border: 2px solid transparent; /* Transparent initial border */
    border-radius: 15px; /* Rounded corners */
    background: linear-gradient(white, white) padding-box, 
                linear-gradient(135deg, #ff6ec4, #7873f5, #1fc8db) border-box; /* Gradient border */
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 
                0 0 40px rgba(143, 45, 253, 0.6), 
                0 0 60px rgba(0, 153, 255, 0.5); /* Glow effect */
    overflow: hidden; /* Clips child elements if they overflow */
}

/* Animated Glow */
/* .spacey-border:hover { */
    /* box-shadow: 0 0 30px rgba(255, 255, 255, 1),  */
                /* 0 0 60px rgba(143, 45, 253, 0.8),  */
                /* 0 0 90px rgba(0, 153, 255, 0.7); enhanced glow on hover */
    /* transition: box-shadow 0.4s ease-in-out; */
/* } */

.button-list {
    display: grid;
    grid-template-columns: repeat(6, 33px);
    gap: 10px;
    margin: 20px 10px;
}

.button-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: white;
    /* background-color: rgb(89, 59, 210);  */
    /* border: 1px solid rgb(64, 28, 207); */
    border-radius: 5px;
    font-size: 16px;
    color: #fff; /* White text */
    transition: background-color 0.3s, border-color 0.3s;
    aspect-ratio: 1 / 1;
    width: 100%;
    box-sizing: border-box;
    text-shadow: none;
    /* box-shadow: 2px 2px 5px black; */
}

.button-list a img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.button-list a:hover {
    /* background-color: #e84790; */
    /* border-color: #ca2e74; */
    color: #fff;
    animation: none;
}

.button-list a span {
    font-size: 20px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle {
    display: none;
}

.menu-icon {
    display: none;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: none;
    margin-right: 10px;
}

.menu-icon a:hover {
    animation: color-cycle-text 10s infinite ease-in-out;
}

@keyframes fade-slide-down {
    0% {
        opacity: 0;
        transform: translateY(-200px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-slide-up {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-200px);
    }
}

@media (max-width: 1024px) {
    /* .button-list {
        grid-template-columns: repeat(3, 33px);
    } */
}

@media (max-width: 768px) {

    h1 {
        font-size: 40px;
        margin-top: 16px;
        margin-bottom: 16px;
    }
    h2 {
        font-size: 25px;
        margin-top: 12px;
        margin-bottom: 12px;
    }
    h3 {
        font-size: 18px;
        margin-top: 8px;
        margin-bottom: 8px;
    }

    /* justify doesnt work so well on small screens */
    .right-half {
        text-align: left;
    }
    .left-half {
        text-align: left;
    }
    .middle-half {
        text-align: left;
    }

    /* smaller button list */
    .button-list {
        /* grid-template-columns: repeat(3, 33px); */
        margin: 10px 5px;
    }
    .button-list a {
        font-size: 12px;
    }
    .button-list a span {
        font-size: 15px;
        margin-right: 5px;
    }

    /* logos and text now single-column */
    .logo-text-container {
        flex-direction: column;
    }

    .logo-container, .text-container, .logo-container-big, .text-container-big {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
        max-width: 100%;
    }

    /* nav menu for mobile */
    .menu-icon {
        display: block;
        width: 30px;
        height: 24px;
        position: relative;
        cursor: none;
        z-index: 1100; /* Ensure it's above the nav */
    }

    .menu-icon span {
        display: block;
        height: 4px;
        width: 100%;
        background: white;
        border-radius: 2px;
        position: absolute;
        transition: transform 0.3s ease, top 0.3s ease, opacity 0.3s ease;
    }
    
    .menu-icon span:nth-child(1) {
        top: 0;
    }
    
    .menu-icon span:nth-child(2) {
        top: 10px;
    }
    
    .menu-icon span:nth-child(3) {
        top: 20px;
    }
    
    .menu-toggle:checked + .menu-icon span:nth-child(1) {
        transform: rotate(45deg);
        top: 10px;
    }
    
    .menu-toggle:checked + .menu-icon span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle:checked + .menu-icon span:nth-child(3) {
        transform: rotate(-45deg);
        top: 10px;
    }

    .nav-container {
        background: rgba(0, 0, 0, 0.9);
    }

    .nav-container nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 50px;
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.9);
        padding: 10px 0;
        transform: translateY(-200px); /* Start off-screen */
        opacity: 0;
        transition: none; /* Disable default transitions */
        pointer-events: none;
    }

    .menu-toggle:checked + .menu-icon + nav {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        animation: fade-slide-down 0.3s ease-out;
        pointer-events: auto;
    }

    .menu-toggle:not(:checked) + .menu-icon + nav {
        animation: fade-slide-up 0.3s ease-out forwards;
        pointer-events: none; /* Prevent interaction when hidden */
    }

    .nav-container nav a {
        text-align: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .scrollarrow-container-left {
        display: none;
    }

    .scrollarrow-container-right {
        display: none;
    }
}
