/*
   GLASSMORPHISM THEME
   A modern, dark, semi-transparent theme designed for WebGL backgrounds.
*/

/* --- Variables --- */
:root {
    /* Colors */
    --bg-color: #181717;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    --accent: #00ffff;
    /* Cyan - matches your particles */
    --accent-hover: #ffd000;
    /* Magenta */

    /* Glass Effect */
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 12px;
    --card-radius: 12px;

    /* Typography */
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
}

/* --- Base Reset --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: var(--font-main);
    font-size: 16.5px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background: transparent !important;
}

body {
    margin: 0;
    color: white;
    background: var(--bg-color);
    font-family: sans-serif;
    line-height: 1.6;
}

#gl {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Typography --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
}

h1 {
    font-size: 2.5rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px rgba(255, 0, 255, 0.4);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout (Bootstrap Grid) --- */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-12,
.col-lg-4,
.col-lg-8,
.col-md-6,
.col-6,
.col {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (min-width: 992px) {
    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
}

/* --- Utilities --- */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.align-items-center {
    align-items: center !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.float-right {
    float: right !important;
}

.flex-row {
    flex-direction: row !important;
}

.ml-auto {
    margin-left: auto !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

.pt-5 {
    padding-top: 3rem !important;
}

.pb-5 {
    padding-bottom: 3rem !important;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.my-1 {
    margin-top: 0.25rem !important;
    margin-bottom: 0.25rem !important;
}

@media (min-width: 768px) {
    .pl-md-2 {
        padding-left: 0.5rem !important;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: .5rem 1rem;
    font-size: 0.9rem;
    border-radius: 50px;
    /* Pill shape */
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
}

/* --- Navbar (Glass) --- */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    min-height: 70px;
    height: auto;

    /* Glass Effect */
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
}

.navbar-nav {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-direction: column;
    width: 100%;
    text-align: center;
}

.nav-link {
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.navbar-toggler {
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    background: transparent;
}

/* Mobile Menu State */
.navbar-collapse {
    display: none;
    width: 100%;
    flex-basis: 100%;
    margin-top: 1rem;
}

.navbar-collapse.show {
    display: flex;
}

@media (min-width: 992px) {
    .navbar-expand-lg {
        flex-flow: row nowrap;
        justify-content: flex-start;
    }

    .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-toggler {
        display: none;
    }

    .navbar-nav {
        flex-direction: row;
        width: auto;
    }
}

/* --- Sections --- */
.home-section {
    padding: 100px 0;
    position: relative;
    /* Transparent to show WebGL */
    background: transparent !important;
    z-index: 2;
}

/* Glowing Sine Wave Separator */
.home-section::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 15px;
    background: radial-gradient(ellipse at center, var(--accent-hover) 0%, transparent 80%);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 25 0 50 10 T 100 10' stroke='white' stroke-width='4' fill='none'/%3E%3C/svg%3E") repeat-x 0 0;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 10 Q 25 0 50 10 T 100 10' stroke='white' stroke-width='4' fill='none'/%3E%3C/svg%3E") repeat-x 0 0;
    -webkit-mask-size: 100px 100%;
    mask-size: 100px 100%;
    filter: drop-shadow(0 0 8px var(--accent-hover));
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

/* --- Cards (Glass Panels) --- */
.card,
.media.stream-item,
.news-highlights {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Remove separator from the last section */
.home-section:last-of-type::after {
    display: none;
}

.card:hover,
.media.stream-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--accent);
}

.card-body {
    padding: 0;
}

.article-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.article-title a {
    color: var(--text-main);
}

.article-metadata {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.article-style {
    font-size: 0.9rem;
    color: #ccc;
}

/* --- List Items (Projects/Publications) --- */
.media {
    display: flex;
    align-items: flex-start;
}

.media-body {
    flex: 1;
}

.media.stream-item img {
    width: 200px;
    /* Fixed width */
    height: 200px;
    /* Fixed height */
    object-fit: cover;
    /* Crop to fit */
    border-radius: 8px;
    margin-left: 1.5rem;
    /* Spacing from text */
    margin-top: 0;
    /* Reset margins */
    margin-bottom: 0;
    flex-shrink: 0;
    /* Prevent shrinking */
}

/* --- Profile Widget --- */
#profile {
    text-align: center;
    padding: 2rem 0;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    object-fit: cover;
    margin: 0 auto 1rem auto;
}

.portrait-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    border: none;
}

.portrait-title h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Social Icons */
.network-icon {
    display: flex;
    justify-content: center;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
}

.big-icon {
    font-size: 1.8rem;
    color: var(--text-muted);
    transition: color 0.3s;
}

.network-icon li:hover .big-icon {
    color: var(--accent);
    transform: scale(1.1);
}

/* Organization Logos */
.organization-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    list-style: none;
    padding: 1.5rem 3rem;
    margin: 2rem auto;
    width: fit-content;
    max-width: 90%;

    /* Glass Dock Look */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.logo-icon {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: grayscale(0%) brightness(200%);
    opacity: 0.6;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-icon:hover {
    opacity: 1;
    transform: scale(1.2);
}

.org-section-title {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.previous-logos .logo-icon {
    height: 35px;
    opacity: 1;
    /* filter: grayscale(100%); */
}

.previous-logos .logo-icon:hover {
    opacity: 1;
    /* filter: grayscale(0%) brightness(100%); */
    transform: scale(1.2);
}

/* --- Badges --- */
.badge-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
}

/* --- Footer --- */
footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    position: relative;
    z-index: 2;
}

/* --- Helper Classes --- */
.nav-icons {
    display: flex;
    list-style: none;
}

.nav-icons li {
    margin-left: 1rem;
}

.section-heading {
    text-align: right;
    border-right: 3px solid var(--accent);
    padding-right: 1rem;
}

@media (max-width: 768px) {
    .section-heading {
        text-align: left;
        border-right: none;
        border-left: 3px solid var(--accent);
        padding-left: 1rem;
    }
}

/* --- Simple Citation Modal --- */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid var(--accent);
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    color: #fff;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

/* Fix for list bullets showing up */
.list-inline {
    list-style: none;
    padding-left: 0;
}

.list-inline-item {
    display: inline-block;
    margin-right: 0.5rem;
}

/* Fix for centering and sizing images and videos */
.article-style img,
.article-style video,
.featured-image {
    display: block;
    margin: 2rem auto;
    max-width: 100%;
    max-height: 500px;
    /* Constrain height */
    width: auto;
    /* Maintain aspect ratio */
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.article-style figure {
    margin: 2rem auto;
    display: block;
    text-align: center;
}

.article-style figcaption {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-body pre {
    background: #333;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
}

/* --- Custom Link Colors --- */
.author-link {
    color: #ffd000;
    /* Cyan hover instead of Pink */
    text-shadow: 0 0 8px rgba(0, 191, 255, 0.4);
}

.author-link:hover {
    color: rgba(0, 191, 255, 0.8);
    /* Cyan hover instead of Pink */
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.4);
}

.venue-link {
    color: rgba(253, 135, 188, 0.738);
    /* Grey normal state */
}

.venue-link:hover {
    color: rgba(255, 0, 115, 0.738);
    /* Cyan hover state */
    text-shadow: 0 0 8px rgba(255, 0, 115, 0.386);
}

/* --- News Ticker --- */
.news-scroll-wrapper {
    width: 100%;
    height: 30px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    margin-top: 0.5rem;
    border: 1px solid var(--glass-border);
    flex-basis: 100%;
    /* Force it to take full width in flex container */
}

.news-label {
    background: #ffd000;
    color: #000;
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.news-ticker {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.news-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: ticker 15s linear infinite;
}

.news-item {
    display: inline-block;
    padding-right: 3rem;
    color: #ffd000;
    font-size: 0.9rem;
}

/* --- Static News List (About Section) --- */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.news-list::-webkit-scrollbar {
    width: 6px;
}

.news-list::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 10px;
}

.news-list .news-item {
    display: block;
    /* Override inline-block from ticker */
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.news-list .news-item::before {
    content: "•";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.5rem;
}

/* Pause animation on hover */
.news-scroll-wrapper:hover .news-content {
    animation-play-state: paused;
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- News Item Colors --- */
.venue-red {
    color: #ff6b6b;
    font-weight: bold;
}

.paper-abbrev a {
    color: var(--accent);
    font-weight: bold;
    text-decoration: none;
}

.paper-abbrev a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}