:root {
    --bg: #050505;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: white;
}

#app {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#app::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40vh;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    pointer-events: none;
    z-index: 20;
}

#slider-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
    scrollbar-width: none; /* Firefox */
}

#slider-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.slide-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    height: auto;
    scroll-snap-align: start;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #050505;
    padding: 100px 40px 240px 40px;
    box-sizing: border-box;
}

#main-menu {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    padding: 8px 20px;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.menu-item {
    width: auto;
    height: 36px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
    border-radius: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid transparent;
    white-space: nowrap;
}

.menu-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    color: #050505;
    background: white;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.menu-nav {
    font-size: 18px;
    padding: 0 10px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.menu-nav:hover {
    opacity: 1;
}

.section-content {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 900px;
    text-align: center;
    mix-blend-mode: difference;
    padding: 40px 0;
}

.section-num {
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.5em;
    opacity: 0.5;
    display: block;
    margin-bottom: 20px;
}

.section-content h2 {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 900;
    margin: 24px 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.section-content p {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.15em;
    opacity: 0.6;
    margin-top: 20px;
}


canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    width: 100vw;
    height: 100vh;
    cursor: none;
    filter: saturate(1.05) contrast(1.1) brightness(1.1);
    z-index: 1;
}

/* Indicator */
#indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.4);
    z-index: 40;
    pointer-events: none;
    mix-blend-mode: difference;
    left: 50%;
}

.indicator-knob {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

.dot.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* Nav */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    mix-blend-mode: difference;
    pointer-events: none;
    box-sizing: border-box;
}

.nav-left {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.6em;
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.divider {
    width: 48px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Overlays */
#overlays {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 30;
}

.overlay-content {
    position: absolute;
    bottom: 64px;
    mix-blend-mode: difference;
    transition: opacity 0.3s ease;
}

.overlay-content.left {
    left: 64px;
}

.overlay-content.right {
    right: 64px;
    text-align: right;
}

.label {
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0.5;
    margin-bottom: 16px;
}

.overlay-content.right .label {
    flex-direction: row-reverse;
}

.label span {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
}

h1 {
    font-size: 12vw;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 0.85;
    margin: 0;
}

/* Footer */
footer {
    position: fixed;
    bottom: 40px;
    left: 40px;
    right: 40px;
    z-index: 30;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    mix-blend-mode: difference;
    pointer-events: none;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Academic Grid */
.academic-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
    width: 100%;
}

.academic-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    width: calc(25% - 15px); /* 4 columns minus gap share */
    min-width: 250px;
}

.academic-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}


.card-header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.card-logo, .card-logo-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.05); /* Fallback */
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-logo-placeholder {
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.academic-card h3 {
    font-size: 16px;
    font-weight: 900;
    margin: 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.card-status {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.3em;
    opacity: 0.3;
    margin-top: 12px;
    text-transform: uppercase;
}

/* Expanded Content */
.card-expanded-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    width: 100%;
}

.academic-card.expanded {
    width: 100%;
    cursor: default;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.academic-card.expanded:hover {
    transform: none;
}

.academic-card.expanded .card-expanded-content {
    max-height: 2000px;
    opacity: 1;
    margin-top: 40px;
}

.academic-card.expanded .card-status {
    display: none;
}

/* Detailed Styling */
.card-hero-container {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-details {
    text-align: left;
    display: flex;
    gap: 60px;
    padding: 0 20px;
}

.institution-meta {
    flex: 1.2;
}

.institution-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 28px;
    font-weight: 900;
    color: white;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity 0.3s;
}

.institution-link:hover {
    opacity: 0.7;
}

.regular-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12;
    font-weight: 500;
    color: white;
    text-decoration: none;
    margin-bottom: 12px;
    transition: opacity 0.3s;
}

.regular-link:hover {
    opacity: 0.7;
}

.class-year {
    font-size: 14px;
    font-weight: 900;
    opacity: 0.4;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.subject-list {
    flex: 1;
}

.subject-list h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.3;
    margin-bottom: 24px;
    font-weight: 900;
}

.subject-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subject-list li {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.8;
}

.subject-list li::before {
    content: '';
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    opacity: 0.4;
}

/* Responsive */
@media (max-width: 1200px) {
    .academic-card { width: calc(33.33% - 14px); }
}

@media (max-width: 1100px) {
    .academic-card { width: calc(50% - 10px); }
    .academic-card.expanded { width: 100%; }
}

@media (max-width: 900px) {
    .academic-card.expanded .card-details { flex-direction: column; gap: 40px; }
    .card-hero-container { height: 300px; }
}

@media (max-width: 640px) {
    .academic-card { width: 100%; }
    .academic-card.expanded { width: 100%; }
    .institution-link { font-size: 22px; }
}

@media (max-width: 768px) {
    nav { padding: 24px; }
    .nav-right { display: none; }
    .overlay-content.left { left: 32px; bottom: 80px; }
    .overlay-content.right { right: 32px; bottom: 80px; }
    h1 { font-size: 18vw; }
}

/* Resource Section for expanded cards */
.card-resources {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    text-align: left;
}

.resource-item {
    margin-bottom: 32px;
}

.resource-item h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.3;
    margin-bottom: 16px;
    font-weight: 900;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    border-radius: 16px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.resource-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s;
}

.resource-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Abstract Section styling */
.research-abstract {
    margin-top: 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 100%;
    text-align: left; /* Ensure title and text align left within container */
    box-sizing: border-box;
}

.research-abstract h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    opacity: 0.3;
    margin-bottom: 24px;
    font-weight: 900;
}

.abstract-text {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-family: inherit;
    letter-spacing: normal; /* Reset the loose letter spacing from parent p selector */
    text-align: justify;    /* Better for long formal paragraphs */
    margin: 0;
}

.paper-citation {
    margin-top: 40px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.5);
    padding-left: 20px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

/* Resume Button specifically for About Section */
.resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    margin: 40px auto 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.resume-btn:hover {
    background: white;
    color: #050505;
    border-color: white;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.resume-btn svg {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.resume-btn:hover svg {
    transform: translate(2px, -2px);
}
