/* --------- RESET --------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

a:hover {
    opacity: 0.7;
}

/* --------- 3D BACKGROUND --------- */
#research-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
    opacity: 0.8; /* Made slightly more visible */
}

/* --------- LAYOUT --------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* --------- NAVIGATION --------- */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    position: sticky;
    top: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-left {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.home-link { font-weight: 600; }
.slash { color: #444; }
.page-title { color: #888; }

.back-btn {
    border: 1px solid #333;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* --------- HEADER GRID (NEW) --------- */
.page-header {
    padding: 6rem 0 4rem;
}

.header-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr; /* Text takes more space, Matrix takes less */
    gap: 4rem;
    align-items: end; /* Aligns matrix to bottom of title */
}

h1 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    text-transform: uppercase;
    line-height: 0.95;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.intro-text {
    font-size: 1.1rem;
    color: #bbb;
    max-width: 500px;
}

/* --------- RESEARCH MATRIX (NEW) --------- */
/* This fills the blank space with cool data */
.research-matrix {
    display: grid;
    grid-template-columns: 1fr;
    border-top: 1px solid #333;
}

.matrix-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
    font-family: 'JetBrains Mono', monospace; /* Tech font */
    font-size: 0.85rem;
}

.matrix-row .label {
    color: #666;
    letter-spacing: 1px;
}

.matrix-row .value {
    color: #fff;
    font-weight: 500;
}

/* --------- PROJECTS --------- */
.divider {
    height: 1px;
    background: #222;
    margin: 4rem 0;
    width: 100%;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 4rem;
    align-items: start;
}

.project-info {
    max-width: 500px;
}

.project-meta {
    display: flex;
    gap: 1rem;
    font-family: 'Anton', sans-serif;
    color: #444;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.project-meta .year { color: #fff; }

.project-title {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.tags {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tags span {
    font-size: 0.7rem;
    border: 1px solid #333;
    padding: 0.3rem 0.6rem;
    border-radius: 50px;
    color: #aaa;
    text-transform: uppercase;
}

.description {
    color: #ccc;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.details-list {
    list-style: none;
    color: #888;
    font-size: 0.95rem;
}

.details-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.details-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #444;
}

/* --------- CAROUSEL STYLES --------- */
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: #0a0a0a;
    border: 1px solid #222;
}

.carousel-container {
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-slide img {
    width: 100%;
    aspect-ratio: 4 / 3; 
    object-fit: cover;
    display: block;
}

.caption {
    background: #0a0a0a;
    color: #888;
    padding: 1rem;
    font-size: 0.85rem;
    border-top: 1px solid #222;
    font-family: 'Inter', sans-serif;
}

.caption strong {
    color: #fff;
    margin-right: 5px;
}

/* Carousel Buttons */
.carousel-btn {
    position: absolute;
    top: 40%; 
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.carousel-btn:hover {
    background: #fff;
    color: #000;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 4.5rem; 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.indicator {
    width: 6px;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
}

.indicator.active {
    background: #fff;
}

/* --------- ANIMATIONS --------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------- FOOTER --------- */
.site-footer {
    padding: 4rem 0;
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 900px) {
    .header-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .project-item {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .carousel-wrapper {
        margin-bottom: 1rem;
    }
}