/* Global Settings inherited from global_ui.css */
:root {
    /* Local overrides only if necessary */
    --card-hover: rgba(50, 50, 60, 0.3);
}

/* Linked products styles moved to line 1217 to avoid duplication */

body {
    background-color: var(--primary-bg);
    /* Gradient handled in global header css primarily, but ensuring fallback */
    background-image: radial-gradient(circle at 50% 0%, #202020, #050505);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    padding-top: 80px;
    /* Space for fixed header */
    min-height: 100vh;
}

/* Page Wrapper */
.page-wrapper {
    width: 90%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 0;
}

.content-container {
    width: 100%;
}

/* Profile Header and Navigation styles moved to global_ui.css */

/* --- Project Detail Page (ArtStation Style Refined) --- */

.project-detail-page {
    background-color: #0a0a0a;
    /* Deep dark background */
}

.project-detail-wrapper {
    max-width: 1700px;
    /* Wide layout */
    padding: 0 40px;
}

.project-detail-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    /* Wider sidebar */
    gap: 40px;
    position: relative;
    padding-top: 2rem;
    align-items: start;
}

/* Left: Gallery */
.project-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Seamless images */
}

.gallery-item {
    width: 100%;
    margin-bottom: 2px;
    /* Tiny gap */
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Right: Sidebar */
.project-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    background-color: var(--card-bg);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid var(--border-color);
    /* Added border for definition */
    border-radius: 8px;
    /* Softer radius */
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    /* Contain children */
}

/* Sidebar Section Headers (Moved from inline) */
.sidebar-section h4 {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    font-weight: 600;
}

.sidebar-section {
    border-bottom: 1px solid #2a2a2a;
    padding: 20px 0;
    width: 100%;
    /* Ensure full width */
}

.sidebar-section:first-child {
    padding-top: 0;
}

.sidebar-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Author Header */
.author-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #333;
}

.sidebar-author-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-author-name {
    color: #f0f0f0;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.sidebar-author-role {
    color: #999;
    font-size: 0.85rem;
}

.follow-btn {
    width: 100%;
    background-color: #13AFF0;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.follow-btn:hover {
    background-color: #05a0df;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(19, 175, 240, 0.3);
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens */
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-grow: 1;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 80px;
    /* Prevent crushing */
}

.action-btn:hover {
    background: #333;
    color: #fff;
    border-color: #444;
}

/* Project Info */
.sidebar-project-title {
    font-size: 1.5rem;
    color: #ffffff;
    margin-bottom: 5px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -1px;
}


.sidebar-project-cat {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.sidebar-project-desc p {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.external-link-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #13AFF0;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    font-size: 0.95rem;
}

.external-link-btn:hover {
    text-decoration: underline;
}

/* Tags */
.tags-block {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ccc;
    padding: 6px 12px;
    border-radius: 4px;
    /* Updated from 2px */
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s;
    display: inline-flex;
    /* Moved from inline */
    align-items: center;
    /* Moved from inline */
    gap: 6px;
    /* Moved from inline */
}

.tag:hover {
    background-color: #333;
    color: #fff;
}

/* Stats */
.stats-block {
    display: flex;
    gap: 20px;
    color: #999;
    /* Updated from #777 */
    font-size: 0.9rem;
    padding-top: 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive */
@media (max-width: 1024px) {
    .project-detail-container {
        grid-template-columns: 1fr;
    }

    .project-detail-wrapper {
        padding: 0 20px;
    }

    .project-sidebar {
        position: relative;
        top: 0;
        order: 1;
        width: 100%;
    }
}

/* Controls Section (Master Wrapper - Orange Box) */
.controls-section {
    display: flex;
    flex-direction: column;
    margin-bottom: 2.5rem;
    width: 100%;
}

/* Row 1: Switcher (Aligned Right) */
.switcher-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

/* Row 2: Filters (Full Width Bar) */
.filters-row {
    width: 100%;
}

/* Grouped Boxes (Yellow Boxes) */
.filter-tabs,
.layout-switcher {
    display: inline-flex;
    background-color: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    gap: 0.5rem;
}

.filter-tabs {
    display: flex;
    width: 100%;
    cursor: grab;
    user-select: none;
    overflow-x: auto;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE/Edge */
}

.filter-tabs::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome/Safari */
}

.filter-tabs.grabbing {
    cursor: grabbing;
    scroll-behavior: auto;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    margin-left: .3rem;
    margin-right: .3rem;
    margin-top: .5rem;
    margin-bottom: .5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #212020;
}

.filter-btn.active {
    background: #212020;
}




/* Responsive Overrides */
@media (max-width: 768px) {
    .layout-switcher {
        display: flex !important;
        /* Force icons to stay visible on mobile as requested */
    }

    .layout-switcher {
        display: flex !important;
        /* Force icons to stay visible on mobile as requested */
    }
}


/* Project Card Redesign (Unified) */
.project-card {
    background-color: var(--card-bg);
    backdrop-filter: var(--glass-backdrop);
    -webkit-backdrop-filter: var(--glass-backdrop);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease-out forwards;
    text-decoration: none;
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.project-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background-color: #000;
}

.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-card:hover .project-img {
    transform: scale(1.05);
}

/* Gradient Overlay at Bottom */
.project-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px 15px;
    /* Top padding for gradient fade */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.6) 60%, transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    /* Hidden by default as per user request */
    transition: opacity 0.3s ease;
}

.project-card:hover .project-info-overlay {
    opacity: 1;
}

/* If looking for cleaner look, maybe show info on hover?
   Reference image has text visible. keeping it visible. 
   But maybe simpler: */

.project-title {
    color: #e0e0e0;
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-author .author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.project-author .author-name {
    color: #aaa;
    font-size: 0.8rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.project-author .author-name:hover {
    color: white;
}

/* Animations */
.project-card.new-item {
    animation: fadeInUp 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Subscribe Modal (Premium) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 5, 0.9);
    /* Deep matte overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: simpleFade 0.4s ease forwards;
    backdrop-filter: blur(12px);
    /* Strong glass blur */
}

.modal-content {
    background: linear-gradient(145deg, #1A1A1A, #111111);
    padding: 3.5rem 2.5rem;
    border-radius: 16px;
    /* Smooth corners */
    width: 90%;
    max-width: 420px;
    position: relative;
    text-align: center;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.08);
    /* Auto-stroke border */
    transform: translateY(20px);
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 1.5rem;
    color: #555;
    background: transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-modal:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* Icon for Modal Header (Optional visual anchor) */
.modal-content::before {
    content: "\f0e0";
    /* FontAwesome Envelope */
    font-family: "FontAwesome";
    font-size: 2rem;
    color: #13AFF0;
    display: block;
    margin-bottom: 20px;
    opacity: 0.9;
}

.modal-content h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-content p {
    color: #888;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

#subscribeForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#subEmail {
    width: 100%;
    padding: 16px;
    background: #0a0a0a;
    border: 1px solid #333;
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

#subEmail:focus {
    outline: none;
    border-color: #13AFF0;
    background: #111;
    box-shadow: 0 0 0 4px rgba(19, 175, 240, 0.15);
}

#subEmail::placeholder {
    color: #444;
}

.subscribe-confirm-btn {
    background: linear-gradient(135deg, #13AFF0 0%, #0077BE 100%);
    color: white;
    border: none;
    padding: 16px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(19, 175, 240, 0.3);
    letter-spacing: 0.5px;
}

.subscribe-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(19, 175, 240, 0.5);
    filter: brightness(1.1);
}

.subscribe-confirm-btn:active {
    transform: translateY(0);
}

#subMessage {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0;
    min-height: 20px;
}

/* Animations */
@keyframes simpleFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Rich Content Styles (Videos/Text) --- */
.project-rich-content {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1.1rem;
}

.project-rich-content img,
.project-rich-content video,
.project-rich-content iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 4px;
}

.project-rich-content p {
    margin-bottom: 1.5rem;
}

.project-rich-content h1,
.project-rich-content h2,
.project-rich-content h3 {
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

/* --- VISUAL CONTENT BLOCKS --- */
.content-block {
    margin-bottom: 40px;
    width: 100%;
    position: relative;
}

/* Image Block */
.block-image figure {
    margin: 0;
    width: 100%;
}

.block-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

.block-caption {
    color: #888;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Video Block */
.block-video {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
}

.block-video video {
    width: 100%;
    height: auto;
    display: block;
}

/* Sketchfab Block */
.sketchfab-embed-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}

.sketchfab-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Comparison Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    user-select: none;
}

.comparison-container {
    position: relative;
    width: 100%;
    line-height: 0;
}

.nav-img {
    width: 100%;
    display: block;
}

.overlay-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    border-right: 2px solid white;
    box-sizing: content-box;
}

.overlay-img img {
    height: 100%;
    width: auto;
    max-width: none !important;
}

.comparison-handle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.comparison-handle::after {
    content: '↔';
    color: #333;
    font-weight: bold;
}

.comparison-label {
    position: absolute;
    top: 10px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.8rem;
    border-radius: 4px;
    z-index: 5;
    pointer-events: none;
}

/* --- LINKED PRODUCTS (Sidebar) --- */
.linked-product-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #252525;
    color: #ccc;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid #333;
    transition: all 0.2s;
}

.linked-product-btn:hover {
    background: #333;
    color: white;
    border-color: #555;
    transform: translateX(2px);
}

.label-before {
    left: 10px;
}

/* --- SOFTWARE TAGS (Sidebar) --- */
.software-tag {
    transition: all 0.2s ease;
    cursor: default;
    border: 1px solid #333;
    display: flex;
    /* Moved from inline */
    align-items: center;
    /* Moved from inline */
    background: #222;
    /* Moved from inline */
    padding: 6px 10px;
    /* Moved from inline (slightly bumped) */
    border-radius: 4px;
    /* Moved from inline */
    gap: 8px;
    /* Moved from inline */
}

.software-tag:hover {
    background: #333 !important;
    border-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.label-after {
    right: 10px;
}

/* Gallery Grid */
.block-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.block-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s;
}

/* .block-gallery-item:hover img { transform: scale(1.02); } */

/* Gallery Layout: Masonry */
.block-gallery-masonry {
    column-count: 3;
    column-gap: 15px;
}

.block-gallery-masonry .block-gallery-item {
    break-inside: avoid;
    margin-bottom: 15px;
}

.block-gallery-masonry img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .block-gallery-masonry {
        column-count: 2;
    }
}

/* Gallery Layout: Carousel (Horizontal Scroll) */
.block-gallery-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 15px;
    /* Space for scrollbar */
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    /* Firefox */
}

.block-gallery-carousel::-webkit-scrollbar {
    height: 6px;
}

.block-gallery-carousel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.block-gallery-carousel .block-gallery-item {
    flex: 0 0 80%;
    /* Show part of next item */
    max-width: 400px;
    scroll-snap-align: center;
}

.block-gallery-carousel img {
    width: 100%;
    height: 300px;
    /* Fixed height for uniformity */
    object-fit: cover;
    border-radius: 4px;
}

/* --- Rich Text Description (Sidebar Work Pad) --- */
.project-rich-text {
    color: #b0b0b0;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    word-wrap: break-word;
}

.project-rich-text p {
    margin-bottom: 10px;
}

.project-rich-text strong {
    color: #e0e0e0;
    font-weight: 600;
}

.project-rich-text em {
    color: #d0d0d0;
    font-style: italic;
}

.project-rich-text ul,
.project-rich-text ol {
    margin-bottom: 15px;
    padding-left: 20px;
}

.project-rich-text li {
    margin-bottom: 5px;
    padding-left: 5px;
}

.project-rich-text a {
    color: #13AFF0;
    text-decoration: none;
    transition: color 0.2s;
}

.project-rich-text a:hover {
    color: #fff;
    text-decoration: underline;
}

.project-rich-text h1,
.project-rich-text h2,
.project-rich-text h3 {
    color: #fff;
    font-size: 1rem;
    margin-top: 15px;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ========================================
   LAYOUT PERFECTION ENHANCEMENTS
   ======================================== */

/* Enhanced Project Card Hover */
.project-card {
    will-change: transform, box-shadow;
}

.project-card:hover {

    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(49, 168, 255, 0.1) !important;
    border-color: rgba(49, 168, 255, 0.3) !important;
}



/* Smooth title truncation */
.project-title {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

/* Enhanced Filter Active State */
.filter-btn {
    position: relative;

}

.filter-btn.active {
    background: linear-gradient(135deg, #1e3a5f, #2a5080) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(49, 168, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border: 1px solid rgba(49, 168, 255, 0.4);
}

.filter-btn.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Smooth Page Transitions */
.page-wrapper {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content Block Animations */
.content-block {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.content-block:nth-child(1) {
    animation-delay: 0.1s;
}

.content-block:nth-child(2) {
    animation-delay: 0.2s;
}

.content-block:nth-child(3) {
    animation-delay: 0.3s;
}

.content-block:nth-child(4) {
    animation-delay: 0.4s;
}

.content-block:nth-child(5) {
    animation-delay: 0.5s;
}

/* Image Zoom on Hover */
.block-image img {
    cursor: zoom-in;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.block-image:hover img {
    transform: scale(1.03);
}

/* Better Figure Captions */
.block-caption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-left: 3px solid var(--accent-blue);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

/* Software Grid Enhancement */
.software-item {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.software-item:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.software-icon-img {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.software-item:hover .software-icon-img {
    transform: scale(1.1) rotate(5deg);
}

/* Category Badge Improvements */
.category-badge,
.sidebar-section a[href*="Portfolio.php"] {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(49, 168, 255, 0.15), rgba(33, 150, 243, 0.05));
    border: 1px solid rgba(49, 168, 255, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    color: var(--text-primary);
}

.category-badge:hover,
.sidebar-section a[href*="Portfolio.php"]:hover {
    background: linear-gradient(135deg, rgba(49, 168, 255, 0.25), rgba(33, 150, 243, 0.1));
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(49, 168, 255, 0.2);
}

/* Sidebar Sticky Enhancement */
.project-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    align-self: flex-start;
}

/* Custom Scrollbar for Sidebar */
.project-sidebar::-webkit-scrollbar {
    width: 6px;
}

.project-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}

.project-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background 0.3s;
}

.project-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(49, 168, 255, 0.5);
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmerSkeleton 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmerSkeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Better Focus States (Accessibility) */
*:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 4px;
    border-radius: 4px;
}

.filter-btn:focus-visible,
.project-card:focus-visible {
    outline-offset: 2px;
}

/* Responsive Profile Section */
@media (max-width: 768px) {
    .profile-section {
        margin-top: clamp(-100px, -15vw, -85px);
    }

    .profile-name {
        font-size: 1.5rem;
    }

    .project-card:hover {
        transform: translateY(-8px) scale(1.01) !important;
    }
}

/* Improved Sidebar Section Spacing */
.sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h4 {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section h4::before {
    content: '';
    width: 3px;
    height: 18px;
    background: var(--accent-blue);
    border-radius: 2px;
}

/* Enhanced Linked Product Buttons */
.linked-product-btn {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.linked-product-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: translateX(6px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Remove for reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Grid gap already defined at line 638 - duplicate removed */

/* Profile Avatar Enhancement */
.profile-pic-wrapper {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease;
}

.user-profile-header:hover .profile-pic-wrapper {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 12px 40px rgba(49, 168, 255, 0.3);
}

/* Responsive Typography */
@media (max-width: 480px) {
    .profile-name {
        font-size: 1.3rem;
    }

    .profile-role {
        font-size: 0.85rem;
    }
}


/* END LAYOUT PERFECTION */

/* ========================================
   ULTRA-SMOOTH ANIMATION OVERRIDES
   ======================================== */

/* Bouncy easing curve - smooth and playful */
.project-card,
.filter-btn,
.software-item,
.category-badge,
.linked-product-btn,
.sidebar-section a,
.profile-pic-wrapper {
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    transition-duration: 0.35s !important;
}

/* Page and block entrance - gentle fade */
.page-wrapper,
.content-block {
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* Image transforms - extra smooth */
.block-image img,
.project-img,
.cover-img,
.software-icon-img {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Ensure 60fps with GPU acceleration */
.project-card,
.filter-btn,
.software-item,
.profile-pic-wrapper,
.block-image img {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Smoother filter button state change */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Profile avatar super smooth */
.user-profile-header:hover .profile-pic-wrapper {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease !important;
}

/* END ULTRA-SMOOTH ANIMATIONS */