/* --- Final Portfolio CSS --- */
:root {
    --accent-color: #7B2BFC;
    --text-color: #EAEAEA;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    background-color: #02020a;
    overflow: hidden;
}

/* --- 1. Backgrounds & Scroll Snapping --- */
#background-layers {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.background-layer.visible {
    opacity: 1;
}

#scroll-container {
    width: 100%;
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.fullscreen-section {
    width: 100%;
    height: 100vh;
    scroll-snap-align: start;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* --- 2. New Split-Screen Hero Section --- */
.hero {
    flex-direction: row;
    padding: 0;
    /* Ensure hero content doesn't overflow */
    overflow: hidden; 
}

.hero-content-column,
.hero-image-column {
    height: 100%;
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content-column {
    padding: 4rem;
    position: relative; /* For text content positioning */
    z-index: 2; /* Ensure text is above image on overlap */
}

.hero-image-column {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent), url('../images/profile.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1; /* Behind text content */
}

.hero-text-content {
    max-width: 500px;
    text-align: left;
    width: 100%; /* Ensure it fills column */
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-about {
    border-left: 3px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-bottom: 2rem;
    transition: border-color 0.5s ease;
}

.hero-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.social-links a {
    margin: 0 10px;
}

/* Entrance Animations */
.anim-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.anim-delay-1 { animation-delay: 0.2s; }
.anim-delay-2 { animation-delay: 0.4s; }
.anim-delay-3 { animation-delay: 0.6s; }


/* --- 3. Project Cards (No Blur, Clickable) --- */
.marquee {
    width: 100%;
    overflow: hidden;
    /* Keep mask for desktop horizontal scroll */
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

/* On mobile, remove marquee mask */
@media (max-width: 768px) {
    .marquee {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-content {
    display: flex;
    width: fit-content; /* Allow content to dictate width for marquee */
    animation: scroll 60s linear infinite;
}

/* On mobile, stack cards vertically */
@media (max-width: 768px) {
    .marquee-content {
        flex-direction: column;
        width: 100%;
        animation: none; /* Disable marquee animation */
    }
}

@keyframes scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.project-card-link {
    text-decoration: none;
    flex-shrink: 0; /* Important for marquee items */
}

/* On mobile, make link fill width */
@media (max-width: 768px) {
    .project-card-link {
        width: 100%;
        max-width: 400px; /* Limit card width on mobile for better readability */
        margin: 1rem auto; /* Center cards */
    }
}


.project-card {
    width: 300px;
    height: 420px;
    margin: 0 1rem;
    flex-shrink: 0;
    position: relative;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform-style: preserve-3d;
    background: rgba(10, 10, 25, 0.2); /* Base for glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* On mobile, adjust card size */
@media (max-width: 768px) {
    .project-card {
        width: 100%; /* Fill parent link width */
        height: auto; /* Auto height for content */
        min-height: 250px; /* Min height on mobile */
        margin: 0; /* Remove horizontal margin */
        padding-bottom: 1.5rem; /* Add padding at bottom for content */
        display: flex; /* Flex content */
        flex-direction: column; /* Stack image and content */
        justify-content: flex-start;
        align-items: center;
        text-align: center;
    }
}

.marquee:hover .project-card {
    transform: scale(0.9);
}

.marquee:hover .project-card-link:hover .project-card {
    transform: scale(1.1);
    z-index: 10;
}

/* Mobile: no scale effect on hover */
@media (max-width: 768px) {
    .marquee:hover .project-card,
    .marquee:hover .project-card-link:hover .project-card {
        transform: none; /* No scaling on mobile */
    }
}


.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    z-index: 1; /* Ensure image is below glass pane content */
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.1);
}

/* Mobile: image inside card, not full absolute */
@media (max-width: 768px) {
    .card-image {
        position: relative; /* No absolute positioning */
        height: 180px; /* Fixed height for image */
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        width: calc(100% - 2px); /* Account for card border */
    }
    .card-image img {
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }
}


.card-glass-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
    /* REMOVED: backdrop-filter from here so image is clear */
    /* Instead, the background of .project-card handles the base transparency */
    /* Blur will only apply to the content that overlays the image */
    background: rgba(10, 10, 25, 0.4); /* Slightly darker, more opaque for text readability */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2; /* Overlays image */
    opacity: 0; /* Initially hidden */
    transition: opacity 0.5s ease;
}

.project-card:hover .card-glass-pane {
    opacity: 1; /* Visible on hover */
}

/* Mobile: glass pane always visible, covers full card */
@media (max-width: 768px) {
    .card-glass-pane {
        opacity: 1;
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 16px;
        /* Blur applied directly to the pane which is over image */
    }
}


.card-content {
    position: relative;
    transform-style: preserve-3d;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 3; /* Ensure content is above glass pane */
}

/* Mobile: content position adjusts */
@media (max-width: 768px) {
    .card-content {
        position: absolute; /* Absolute within project-card */
        top: 0; left: 0;
        height: 100%;
        justify-content: center; /* Center content vertically */
        align-items: center;
        text-align: center;
    }
}


.card-content h3 {
    transform: translateZ(40px);
    margin-bottom: 0.5rem;
}

.card-details {
    transform-style: preserve-3d;
    transform-origin: top center;
    transform: perspective(1000px) rotateX(-90deg);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
}

.project-card:hover .card-details {
    transform: perspective(1000px) rotateX(0deg);
    opacity: 1;
    transition-delay: 0.1s;
}

/* Mobile: details always visible */
@media (max-width: 768px) {
    .card-details {
        transform: none; /* No 3D rotation */
        opacity: 1; /* Always visible */
        transition: none; /* No transition on mobile */
    }
}


.card-details p,
.card-details small,
.project-links-visual {
    transform: translateZ(40px);
    color: #fff;
}

.card-details p { font-size: 0.9rem; margin-bottom: 1rem;}

.project-links-visual {
    font-weight: 600;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}


/* --- 4. All Other Styles (Backgrounds, General, etc.) --- */
[data-theme="orbs"] {
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    overflow: hidden;
}

[data-theme="orbs"]::before,
[data-theme="orbs"]::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    animation: float 15s infinite linear;
    background: rgba(123, 43, 252, 0.3);
}

[data-theme="orbs"]::before { width: 40vmax; height: 40vmax; left: -20vmax; top: -20vmax; }
[data-theme="orbs"]::after { width: 30vmax; height: 30vmax; right: -15vmax; bottom: -15vmax; animation-delay: -7s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(180deg); }
    100% { transform: translateY(0) rotate(360deg); }
}

[data-theme="matrix"] { background: #000; overflow: hidden; }

[data-theme="aurora"] { background: linear-gradient(150deg, #000010 0%, #050520 50%, #000010 100%); }

.aurora-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; mix-blend-mode: screen; animation: aurora-anim 12s infinite linear alternate; }
.aurora-layer:nth-child(1) { background: radial-gradient(circle at 20% 30%, #4c00ff, transparent 40%); }
.aurora-layer:nth-child(2) { background: radial-gradient(circle at 80% 70%, #00ffc3, transparent 40%); animation-delay: -6s; }

@keyframes aurora-anim { from { transform: translateX(-20%) translateY(-20%) rotate(0deg); } to { transform: translateX(20%) translateY(20%) rotate(360deg); } }

[data-theme="warp"] { background: #000; }
.star { position: absolute; width: 2px; height: 2px; background: white; border-radius: 50%; animation: warp-anim 3s infinite linear; }
@keyframes warp-anim { from { transform: perspective(500px) translateZ(0); opacity: 1; } to { transform: perspective(500px) translateZ(500px); opacity: 0; } }

h2 { font-size: 2.8rem; text-align: center; margin-bottom: 3rem; position: relative; color: #fff; }
h2::after { content: ''; display: block; width: 70px; height: 4px; background: var(--accent-color); margin: .75rem auto 0; border-radius: 2px; transition: background-color .5s ease; }
.btn { display: inline-block; padding: 14px 32px; background: var(--accent-color); color: #fff; text-decoration: none; border-radius: 50px; font-weight: 600; transition: all .3s ease; border: 2px solid var(--accent-color); }
.btn:hover { transform: translateY(-5px) scale(1.05); }
#scroll-progress { position: fixed; top: 0; left: 0; height: 5px; width: 0; background: var(--accent-color); z-index: 10000; transition: width .1s ease-out, background-color .5s ease; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; width: 100%; }
.experience-list { width: 100%; max-width: 800px; }
.skill-category, .experience-item { background: rgba(26, 26, 46, 0.5); padding: 2rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); transition: all .3s ease; }
.experience-item { margin-bottom: 1.5rem; }
.skill-category:hover, .experience-item:hover { transform: translateY(-5px); }
.skill-category h3, .experience-item h3 { margin-bottom: 1rem; color: var(--accent-color); transition: color .5s ease; }
.site-footer { background-color: transparent; }
.footer-content { max-width: 800px; text-align: center; }
.cursor-dot, .cursor-outline { pointer-events: none; position: fixed; border-radius: 50%; z-index: 9999; transition: opacity .3s ease-in-out, transform .2s ease-in-out, background-color .5s ease, border-color .5s ease; }
.cursor-dot { width: 8px; height: 8px; background-color: var(--accent-color); transform: translate(-50%, -50%); }
.cursor-outline { width: 40px; height: 40px; border: 2px solid var(--accent-color); transform: translate(-50%, -50%); }

/* --- Media Queries for Responsiveness --- */
@media (max-width: 1200px) {
    .hero { flex-direction: column; }
    .hero-content-column, .hero-image-column { width: 100%; }
    .hero-content-column { height: 60%; align-items: flex-end; padding-bottom: 4rem; text-align: center;}
    .hero-text-content { text-align: center; }
    .hero-image-column { height: 40%; }
    .hero-links { justify-content: center; }
}

@media (max-width: 768px) {
    * { cursor: auto; }
    .cursor-dot, .cursor-outline { display: none; }
    .hero { padding-top: 2rem; /* Give some space on top for smaller screens */ }
    .hero-content-column { padding: 2rem 1rem; height: 70%; /* Give more space for text */ }
    .hero-image-column { height: 30%; }
    .hero h1 { font-size: 2.8rem; }
    .hero p { font-size: 1rem; margin-bottom: 1.5rem; }
    .hero-links { flex-direction: column; gap: 1rem; }
    .social-links { margin-top: 1rem; }

    h2 { font-size: 2.2rem; }
    .container { padding: 0 1rem; }
    .skills-grid { grid-template-columns: 1fr; } /* Stack skills on mobile */
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 0.9rem; }
    .btn { padding: 10px 24px; font-size: 0.9rem; }
    .social-links a { font-size: 1.5rem; margin: 0 8px; }
}
/* --- 5. All Projects Gallery Page --- */
.project-gallery-body {
    background: #0d0d1a;
    overflow-y: auto; /* Allow this page to scroll normally */
}

.project-page-container {
    width: 100%;
    max-width: 1400px; /* Wider for more projects */
    margin: 0 auto;
    padding: 4rem 2rem;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.project-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.project-page-header h1 {
    font-size: 3rem;
    color: #fff;
}

.back-btn {
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.back-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

.all-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.grid-project-card {
    background: var(--primary-color);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.grid-card-image {
    height: 220px;
}

.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-card-content {
    padding: 1.5rem;
}

.grid-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.grid-card-content p {
    font-size: 0.95rem;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.grid-card-content small {
    display: block;
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.grid-card-links {
    display: flex;
    gap: 1rem;
}

.card-btn {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.card-btn:hover {
    background: var(--accent-color);
}