:root {
    --bg-color: #050510;
    --card-bg: rgba(255, 255, 255, 0.03);
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(15, 15, 20, 0.7);
    --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --blue-accent: #4db5ff;
    --emerald-accent: #10b981;
    --cosmic-purple: #8b5cf6;
    --cosmic-glow: rgba(139, 92, 246, 0.5);
}

/* Cosmic Background Layer */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at 50% 50%, #0a0a20 0%, #050505 100%);
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0.3;
    animation: twinkle var(--duration) infinite ease-in-out;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.3); }
}

/* Cosmic Cursor System */
@media (pointer: fine) {
    body { cursor: none; }
    
    .cosmic-cursor {
        width: 30px;
        height: 30px;
        border: 1px solid var(--cosmic-purple);
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 10000;
        transition: transform 0.15s ease-out, opacity 0.3s;
        box-shadow: 0 0 15px var(--cosmic-glow);
        mix-blend-mode: screen;
        transform: translate(-50%, -50%);
    }

    .cosmic-cursor-dot {
        width: 6px;
        height: 6px;
        background: #fff;
        border-radius: 50%;
        position: fixed;
        pointer-events: none;
        z-index: 10001;
        box-shadow: 0 0 8px #fff;
        transform: translate(-50%, -50%);
    }

    .stardust {
        position: fixed;
        pointer-events: none;
        background: var(--cosmic-purple);
        border-radius: 50%;
        z-index: 9999;
        opacity: 0.6;
        animation: fadeOutStardust 0.8s forwards;
    }
}

@keyframes fadeOutStardust {
    from { opacity: 0.6; transform: scale(1); }
    to { opacity: 0; transform: scale(0.2) translateY(10px); }
}

/* Cosmic Click Burst */
.cosmic-burst {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--cosmic-purple);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    animation: cosmicBurstAnimation 0.8s cubic-bezier(0, 0, 0.2, 1) forwards;
}

@keyframes cosmicBurstAnimation {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}

.empty-state {
    grid-column: 1 / -1;
    padding: 5rem 2rem;
    text-align: center;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border-color: rgba(139, 92, 246, 0.3);
    box-shadow: 0 8px 32px 0 rgba(139, 92, 246, 0.1);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: #27272a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3f3f46; }

/* Header / Nav */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 2.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: var(--transition-smooth);
}

nav.scrolled {
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem 5%;
    border-bottom: 1px solid var(--glass-border);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: #fff;
    transition: var(--transition-smooth);
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    transition: var(--transition-smooth);
}

.nav-links a:hover, .nav-links a.active {
    opacity: 1;
    color: #4db5ff; /* Subtle blue from inspiration */
}

/* Hero Section */
#home {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
}

.hero-content {
    max-width: 600px;
}

.name-container {
    margin-bottom: 0.5rem;
}

.first-name {
    display: block;
    font-size: 2.5rem;
    font-weight: 400;
    letter-spacing: 5px;
    line-height: 1;
    color: #fff;
}

.last-name {
    display: block;
    font-size: 6.5rem;
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -2px;
    color: #fff;
}

.designation {
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--blue-accent);
    margin-bottom: 2.5rem;
    letter-spacing: 4px;
}

.btn-outline {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin-right: 1.5rem;
    transition: var(--transition-smooth);
}

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

/* Socials at bottom left */
.hero-socials {
    position: absolute;
    bottom: 3rem;
    left: 5%;
    display: flex;
    gap: 2rem;
}

.hero-socials a {
    color: var(--text-primary);
    font-size: 1.8rem;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.hero-socials a:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.hero-socials a:hover:has(.fa-whatsapp) { color: #25D366; }
.hero-socials a:hover:has(.fa-instagram) { color: #E1306C; }
.hero-socials a:hover:has(.fa-facebook-f) { color: #1877F2; }
.hero-socials a:hover:has(.fa-linkedin-in) { color: #0A66C2; }
.hero-socials a:hover:has(.fa-pinterest-p) { color: #E60023; }

.hero-bottom-right {
    position: absolute;
    bottom: 3rem;
    right: 5%;
    color: var(--text-primary);
    opacity: 0.6;
    font-size: 1.2rem;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header p {
    color: var(--text-secondary);
    margin-top: -2rem;
    margin-bottom: 3rem;
}

/* About Section Overhaul */
.about-hero {
    position: relative;
    height: 100vh;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #000;
}

.about-bg-portrait {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    z-index: 1;
}

.about-bg-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: brightness(0.6);
    mask-image: linear-gradient(to right, transparent, black 30%);
}

.about-hero-content {
    position: relative;
    z-index: 2;
    padding: 0 10%;
    max-width: 800px;
}

.about-title {
    font-size: 5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
}

.about-email {
    display: block;
    font-size: 1.5rem;
    color: #4db5ff;
    text-decoration: none;
    margin-bottom: 4rem;
    font-weight: 500;
}

.about-description {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-secondary);
    max-width: 550px;
    margin-bottom: 5rem;
}

.about-footer-info {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.info-line {
    width: 60px;
    height: 1px;
    background: #4db5ff;
    margin: 1rem 0;
}

/* Timeline Section */
#resume {
    padding: 80px 10%;
}

.timeline-wrapper {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    padding: 1rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, #4db5ff 10%, #8b5cf6 90%, transparent);
    transform: translateX(-50%);
    box-shadow: 0 0 20px rgba(77, 181, 255, 0.3);
}

.timeline-item {
    width: 100%;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.timeline-item.left {
    justify-content: flex-start;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    width: 12px;
    height: 12px;
    background: #4db5ff;
    border: 3px solid #0a0a0c;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 5;
    box-shadow: 0 0 10px #4db5ff;
}

.timeline-content {
    width: 44%;
    padding: 1.5rem 2rem;
    position: relative;
}

.timeline-content:hover {
    transform: translateY(-3px);
    border-color: rgba(77, 181, 255, 0.3);
}

.timeline-date {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4db5ff;
    margin-bottom: 0.4rem;
    letter-spacing: 1px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 0.2rem;
    color: #fff;
    font-weight: 800;
}

.timeline-org {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

.timeline-break {
    text-align: center;
    margin: 4rem 0;
    position: relative;
    z-index: 5;
}

.timeline-break span {
    background: #4db5ff;
    color: #000;
    padding: 0.5rem 1.75rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.skills-sidebar {
    margin-top: 8rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Animations */
@keyframes fadeInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Skills Mastery Refined */
.skills-mastery {
    margin-top: 5rem;
    padding: 2rem 0;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

/* Radial Circle Skills */
.skills-radial {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.skill-circle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.circle-container {
    position: relative;
    width: 120px;
    height: 120px;
}

.circle-container svg {
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 8;
}

.circle-progress {
    fill: none;
    stroke: #fff;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 339;
    stroke-dashoffset: 339;
    transition: stroke-dashoffset 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.circle-container .percentage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
}

.skill-circle-item .skill-name {
    text-transform: uppercase;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.skill-circle-item.animate .circle-progress {
    filter: drop-shadow(0 0 8px var(--blue-accent));
    stroke: var(--blue-accent);
}

/* Linear Bar Skills */
.skills-linear {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.skill-bar-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.bar-bg {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.1);
    position: relative;
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--blue-accent), var(--accent-color));
    width: 0;
    border-radius: 4px;
    transition: width 2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Animations Triggered by Scroll */
.animate .circle-progress {
    stroke-dashoffset: calc(339 - (339 * var(--target-pct)) / 100);
}

.animate .bar-fill {
    width: calc(var(--target-pct) * 1%);
}

/* Responsive Overrides */
@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: 1fr; }
    .about-bg-portrait { width: 50%; }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: #0a0a0c;
        padding: 100px 40px;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active { display: flex; }
    .menu-toggle { display: flex; }
    .nav-extra { display: none; }

    .about-bg-portrait { 
        width: 100%; 
        opacity: 0.4;
        mask-image: linear-gradient(to bottom, transparent, black 40%);
    }

    .about-hero-content { 
        padding: 100px 5%; 
        text-align: center;
    }
    .about-description { margin: 0 auto 3rem auto; }

    /* Timeline Mobile */
    .timeline-line {
        left: 20px;
        transform: none;
    }

    .timeline-item, .timeline-item.left {
        justify-content: flex-start;
        padding-left: 45px;
        margin-bottom: 3rem;
    }

    .timeline-dot {
        left: 20px;
        transform: translateX(-50%);
    }

    .timeline-content {
        width: 100%;
        padding: 1.5rem;
    }

    .timeline-break {
        text-align: left;
        padding-left: 45px;
        margin: 3rem 0;
    }
}

/* Gallery Controls */
.gallery-controls-bar {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.sort-toggle {
    display: flex;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    padding: 5px;
}

.sort-btn {
    padding: 0.5rem 1.5rem;
    color: #aaa;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.sort-btn:hover {
    color: #fff;
}

.sort-btn.active {
    background: var(--cosmic-purple);
    color: #fff;
    box-shadow: 0 0 15px var(--cosmic-glow);
}

/* Gallery - True Masonry Layout */
.gallery-container {
    display: block !important;
    column-count: 4;
    column-gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 5rem auto 0 auto;
}

@media (max-width: 1200px) {
    .gallery-container {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .gallery-container {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .gallery-container {
        column-count: 1;
    }
}

.gallery-item {
    display: inline-block !important;
    width: 100%;
    margin-bottom: 1.5rem;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Prevent breaking across columns */
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.05);
}

.gallery-item img {
    width: 100%;
    height: auto; /* Natural aspect ratio creates staggered masonry */
    display: block;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    z-index: 20;
    border-color: rgba(255,255,255,0.15);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Gallery Interactions - Separated */
.like-btn-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.download-link-container {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 10;
}

.control-btn {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
    opacity: 0;
    transform: scale(0.9);
}

.gallery-item:hover .control-btn {
    opacity: 1;
    transform: scale(1);
}

/* Individual Hover Colors */
.like-btn:hover {
    background: #ff2d55 !important;
    border-color: #ff2d55 !important;
    box-shadow: 0 0 15px rgba(255, 45, 85, 0.5);
}

.download-btn:hover {
    background: var(--emerald-accent) !important;
    border-color: var(--emerald-accent) !important;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5);
}

.control-btn .count {
    position: absolute;
    right: 48px;
    background: rgba(0, 0, 0, 0.7);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 800;
    transition: all 0.3s;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Persistent count if it has text */
.control-btn .count {
    opacity: 1 !important;
    transform: none !important;
}

.control-btn .count:empty {
    display: none;
}

/* Heart Particle Animation */
.heart-particle {
    position: fixed;
    pointer-events: none;
    z-index: 10005;
    font-size: 1.5rem;
    color: #ff2d55;
    animation: heartFly 1s ease-out forwards;
}

@keyframes heartFly {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0.8; }
    100% { transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(var(--tr)); opacity: 0; }
}

/* Download Pop Animation */
.download-success-pop {
    position: absolute;
    background: var(--emerald-accent);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    animation: popUp 1s ease forwards;
    pointer-events: none;
}

@keyframes popUp {
    0% { opacity: 0; transform: translate(-50%, 10px); }
    20% { opacity: 1; transform: translate(-50%, 0); }
    80% { opacity: 1; transform: translate(-50%, -10px); }
    100% { opacity: 0; transform: translate(-50%, -20px); }
}

/* Contact Styling */
#contact {
    padding: 80px 10%;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.05), transparent 400px);
}

.contact-container {
    max-width: 700px;
    margin: 4rem auto;
    padding: 3.5rem;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-group input, .form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.2rem;
    color: #fff;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--accent-color);
    background: rgba(139, 92, 246, 0.05);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #6d28d9);
    color: #fff;
    border: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    filter: brightness(1.1);
}

/* Footer Styling */
footer {
    padding: 100px 10% 50px;
    background: #000;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.footer-links {
    display: flex;
    gap: 3rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--blue-accent);
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

.footer-socials a:hover {
    color: #fff;
    transform: translateY(-5px);
    border-color: transparent;
}

.footer-socials a:hover:has(.fa-whatsapp) { background: #25D366; }
.footer-socials a:hover:has(.fa-instagram) { background: #E1306C; }
.footer-socials a:hover:has(.fa-facebook-f) { background: #1877F2; }
.footer-socials a:hover:has(.fa-linkedin-in) { background: #0A66C2; }
.footer-socials a:hover:has(.fa-pinterest-p) { background: #E60023; }

.copyright {
    margin-top: 5rem;
    font-size: 0.85rem;
    color: #52525b;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.mobile-home-btn {
    display: none; /* Hidden on desktop by default */
}

/* Mobile Responsive Overrides */
@media (max-width: 768px) {
    .mobile-home-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        color: #fff;
        font-size: 1.2rem;
        order: 1; /* Left side */
        transition: var(--transition-smooth);
        z-index: 1002;
    }

    .menu-toggle {
        display: flex;
        order: 3; /* Right side */
        z-index: 1002;
    }

    nav {
        padding: 1rem 5% !important;
        background: rgba(10, 10, 12, 0.95) !important;
        backdrop-filter: blur(15px) !important;
        border-bottom: 1px solid var(--glass-border) !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 5rem 0;
        gap: 2.5rem;
        z-index: 1001;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        transform: translateX(-100%);
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        opacity: 0.8;
    }

    .nav-links a.active, .nav-links a:hover {
        opacity: 1;
        color: var(--cosmic-purple);
    }

    .mobile-home-btn:hover {
        background: var(--cosmic-purple);
        box-shadow: 0 0 15px var(--cosmic-glow);
    }

    .nav-extra {
        display: none;
    }

    /* Toggle to X Animation */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
        background: var(--cosmic-purple);
    }
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
        background: var(--cosmic-purple);
    }

    /* About Section Mobile Overrides */
    .about-hero {
        height: auto !important;
        padding: 100px 10% 50px !important;
        display: flex;
        flex-direction: column;
    }

    .about-hero-content {
        padding: 0 !important;
        display: flex;
        flex-direction: column;
    }

    .about-title {
        font-size: 3.5rem;
        order: 1;
        margin-bottom: 2rem;
    }

    .about-bg-portrait {
        position: relative !important;
        width: 100% !important;
        height: 350px !important;
        right: 0 !important;
        top: 0 !important;
        order: 2;
        margin-bottom: 3rem;
        border-radius: 20px;
        overflow: hidden;
        z-index: 10;
        opacity: 1;
    }

    .about-bg-portrait img {
        mask-image: none;
        filter: brightness(0.9);
    }

    .about-email {
        order: 3;
        margin-bottom: 2rem;
        font-size: 1.2rem;
    }

    .about-description {
        order: 4;
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }

    .about-footer-info {
        order: 5;
    }

    /* Gallery Mobile Masonry Overrides (2 Columns) */
    .gallery-container {
        columns: 2 !important;
        column-gap: 0.8rem;
        margin-top: 3rem;
    }

    .gallery-item {
        margin-bottom: 0.8rem;
    }
}

@media (min-width: 1400px) {
    .about-bg-portrait {
        width: 40% !important;
    }
}


/* --- LIGHTBOX OVERLAY --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(15px);
}

.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 10001;
}

.lightbox-main {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    background: rgba(0,0,0,0.5);
    padding: 0.8rem 1.5rem;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Lightbox Controls */
.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: 0.3s;
    opacity: 0.7;
}

.lightbox-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.lightbox-nav .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-btn.prev { left: 2rem; }
.nav-btn.next { right: 2rem; }

.nav-btn:hover {
    background: var(--cosmic-purple);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-controls {
    position: absolute;
    bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.lightbox-actions-bottom .control-btn {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(5px);
}

.lightbox-actions-bottom .control-btn:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Lightbox Blurred Backgrounds (Coverflow style) */
.lightbox-blur-img {
    position: absolute;
    top: 50%;
    height: 60vh;
    width: auto;
    max-width: 30vw;
    object-fit: cover;
    filter: blur(8px) brightness(0.7);
    opacity: 0.6;
    z-index: 1;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.lightbox {
    perspective: 1000px;
}

.lightbox-blur-img.prev {
    left: 5%;
    transform: translateY(-50%) scale(0.85) rotateY(15deg);
}

.lightbox-blur-img.next {
    right: 5%;
    transform: translateY(-50%) scale(0.85) rotateY(-15deg);
}

#slideshow-toggle {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: 0.3s;
}

#slideshow-toggle.active {
    background: var(--cosmic-purple);
    border-color: var(--cosmic-purple);
    box-shadow: 0 0 20px var(--cosmic-glow);
}

.slideshow-progress {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
    opacity: 0;
    transition: 0.3s;
}

#slideshow-toggle.active + .slideshow-progress {
    opacity: 1;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--cosmic-purple);
    transition: width linear;
}

@media (max-width: 768px) {
    .nav-btn { width: 45px; height: 45px; font-size: 1rem; }
    .nav-btn.prev { left: 1rem; }
    .nav-btn.next { right: 1rem; }
    #lightbox-img { max-height: 60vh; }
}

/* --- FEATURED PROJECTS SLIDER --- */
.projects-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 3rem auto 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.projects-track-container {
    overflow: hidden;
    width: 100%;
    padding: 2rem 0;
    perspective: 1200px; /* Added for 3D coverflow */
}

.projects-track {
    display: flex;
    /* Removed gap because JS will calculate positions and overlaps */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; /* Added for 3D coverflow */
    will-change: transform;
    align-items: center;
}

.project-card {
    flex: 0 0 350px;
    height: 450px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* Transition includes transform for the JS scaling */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--card-bg);
    cursor: pointer;
    transform-origin: center center; /* Critical for smooth scaling */
    margin: 0 1rem; /* Base gap, JS will adjust */
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(10, 10, 15, 0.95) 0%, rgba(10, 10, 15, 0) 100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.project-content {
    position: absolute;
    bottom: 2rem;
    left: 0;
    width: 100%;
    padding: 0 2rem;
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-content h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-details {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

.project-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-visit {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--blue-accent);
    color: #000;
    text-decoration: none;
    font-weight: 800;
    border-radius: 30px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-smooth);
}

.btn-visit:hover {
    background: #fff;
    box-shadow: 0 0 15px rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* Hover Effects */
.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card:hover .project-overlay {
    height: 100%;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(4px);
}

.project-card:hover .project-content {
    bottom: 50%;
    transform: translateY(50%);
}

.project-card:hover .project-content h4 {
    transform: translateY(-20px);
    color: var(--blue-accent);
}

.project-card:hover .project-details {
    opacity: 1;
    transform: translateY(0);
}

.slider-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}

.slider-btn:hover {
    background: var(--blue-accent);
    color: #000;
    border-color: var(--blue-accent);
    transform: scale(1.1);
}

.slider-btn.prev {
    margin-right: 10px;
}

.slider-btn.next {
    margin-left: 10px;
}

@media (max-width: 768px) {
    .project-card {
        flex: 0 0 280px;
        height: 380px;
    }
    .slider-btn {
        width: 40px;
        height: 40px;
    }
}
