/*
 * Portfolio - One Page Layout (Sukumar-inspired)
 */

:root {
    --bg-primary: #0a0a0b;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-orange: #FF6B35;
    --accent-orange-hover: #FF8555;
    --border-color: #27272a;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    /* Allow scrolling by default for project pages */
    min-height: 100%;
    overflow-x: hidden;
}

/* Homepage specific lock */
.homepage-mode,
.homepage-mode body {
    height: 100%;
    overflow: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
}


/* Particle Canvas */
.particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

.floating-elements {
    display: none;
}

/* 
   ==========================================================================
   CORNER NAVIGATION & LAYOUT
   ==========================================================================
*/

/* Top Left: Role */
.corner-top-left {
    position: absolute;
    top: 2.5rem;
    left: 2.5rem;
    z-index: 100;
}

.role-text {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.4;
    color: var(--text-secondary);
    text-transform: uppercase;
    display: block;
}

/* Top Center: Time/Location */
.corner-top-center {
    position: absolute;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
}

#local-time {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Top Right: Actions */
.corner-top-right {
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    z-index: 100;
    display: flex;
    gap: 2rem;
}

.nav-link-item {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nav-link-item:hover {
    color: var(--accent-orange);
}

/* Bottom Left: Main Name */
.corner-bottom-left {
    position: absolute;
    bottom: 2.5rem;
    left: 2.5rem;
    z-index: 100;
    pointer-events: none;
    /* Let clicks pass through if needed */
}

/* Bottom Right: Bio & CTA */
.corner-bottom-right {
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 100;
    text-align: right;
    max-width: 350px;
}

/* Project Page Navigation */
.project-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(10, 10, 11, 0.9) 0%, rgba(10, 10, 11, 0) 100%);
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

.project-nav-container {
    pointer-events: auto;
    /* Re-enable clicks on links */
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-2px);
}

/* One Page Layout Wrapper */
.one-page-layout {
    height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

/* Auto-Scrolling Carousel - CENTERED */
/* Vertically Centered Carousel */
.horizontal-carousel-wrapper {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    z-index: 50;
    /* Ensure it doesn't block clicks to corners */
    pointer-events: none;
}

.horizontal-carousel {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    /* Enable pointer events only on the carousel content */
    pointer-events: auto;
}

.horizontal-scroll {
    display: flex;
    gap: 2rem;
    /* Add side padding so items aren't flush w/ edge initially */
    animation: scroll 12s linear infinite;
    width: fit-content;
}

/* 
   ==========================================================================
   LOADER & ANIMATIONS
   ==========================================================================
*/

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 2.5rem;
}

.loader-counter {
    font-family: var(--font-display);
    font-size: 8rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.hero-reveal {
    opacity: 0;
    /* GSAP will handle visibility */
}

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

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

    /* Adjust based on duplicated content */
}

.horizontal-scroll:hover {
    animation-play-state: paused;
}

.project-thumbnail {
    flex: 0 0 675px;
    /* Larger thumbnails */
    height: 420px;
    position: relative;
    overflow: hidden;
    /* border: 1px solid var(--border-color); */
    text-decoration: none;
    background: black;
    transition: transform 0.3s ease;
}

.project-thumbnail:hover {
    transform: scale(1.02);
    z-index: 60;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Contain to show full charts */
    background: black;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.project-thumbnail:hover img {
    opacity: 1;
}

.project-overlay-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 10;
}

.project-overlay-label span {
    font-family: var(--font-main);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    background: black;
    padding: 0.3rem 0.6rem;
}

/* Bottom Section - Name Left, Bio Right */
/* Main Name - Bottom Left */
.main-name {
    font-family: var(--font-display);
    font-size: clamp(6rem, 14vw, 16rem);
    font-weight: 800;
    line-height: 0.8;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin: 0;
}

/* Bio Text - Bottom Right */
.bio-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-align: right;
}

.highlight-orange {
    color: var(--accent-orange);
    font-weight: 600;
}

.btn-primary-large {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--accent-orange);
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: all 0.2s;
}

.btn-primary-large:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-2px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {

    /* Stack elements naturally on mobile if needed, or keep the chaos */
    .one-page-layout {
        overflow-y: auto;
        height: 100vh;
        padding-bottom: 2rem;
    }

    .horizontal-carousel-wrapper {
        position: relative;
        transform: none;
        top: 0;
        margin-top: 120px;
        margin-bottom: 2rem;
    }

    .corner-top-left {
        top: 1.5rem;
        left: 1.5rem;
    }

    .corner-top-right {
        top: 1.5rem;
        right: 1.5rem;
    }

    .corner-top-center {
        top: 1.5rem;
    }

    .corner-bottom-left {
        position: relative;
        bottom: auto;
        left: auto;
        padding: 0 1.5rem;
        margin-bottom: 2rem;
    }

    .corner-bottom-right {
        position: relative;
        /* Change to relative for mobile flow */
        bottom: auto;
        right: auto;
        text-align: left;
        /* Align left on mobile */
        padding: 0 1.5rem;
        max-width: 100%;
    }

    .bio-text {
        text-align: left;
    }

    .main-name {
        font-size: 20vw;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .top-bar {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 1rem 1.5rem;
    }

    .name-section {
        padding: 0 1.5rem 2rem 1.5rem;
    }

    .name-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }

    .main-name {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .bio-section {
        max-width: 100%;
    }

    .project-thumbnail {
        flex: 0 0 400px;
        height: 260px;
    }

    .nav-links {
        display: none;
    }
}

/* 
   ==========================================================================
   PROJECT PAGE READABILITY FIXES
   (Appended to preserve original site styles)
   ==========================================================================
*/

/* 1. Article Container */
/* 1. Article Container */
.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    font-family: var(--font-main, sans-serif);
    color: #e4e4e7;
    /* Light gray for readability */
    line-height: 1.8;
    background: rgba(10, 10, 11, 0.95);
    /* High opacity dark bg */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

/* 2. Typography for Articles */
.article-content h2 {
    font-family: var(--font-display, sans-serif);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #ffffff;
    border-left: 4px solid var(--accent-orange, #FF6B35);
    padding-left: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* 3. Project Header (Titles & Meta) */
.project-header {
    text-align: center;
    padding: 8rem 2rem 4rem;
    /* Top padding clears navbar */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff;
}

.project-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--accent-orange, #FF6B35);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* 4. Visual Assets (Charts & Code) */
.chart-container {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.chart-container img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.code-block {
    background: #1a1a1b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin: 2rem 0;
    overflow-x: auto;
}

/* 5. Navigation & Footer Enhancements */
.footer {
    text-align: center;
    padding: 4rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a1a1aa;
}