:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --font-family: 'Space Grotesk', sans-serif;
    --card-radius: 24px;
    /* Liquid curvature */

    /* Tab-specific Dynamic Glows */
    --glow-1-color: rgba(16, 76, 255, 0.4);   /* Default Home: Blue */
    --glow-2-color: rgba(224, 40, 136, 0.3);  /* Default Home: Pink */
    --glow-3-color: rgba(255, 201, 77, 0.2);  /* Default Home: Gold */
}

/* Ambient Glow Background Effect */
.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    /* Darkened background */
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    width: 400px;
    height: 400px;
    background: var(--glow-1-color);
    top: -10%;
    left: 20%;
    animation: float1 15s ease-in-out infinite alternate;
}

.glow-2 {
    width: 300px;
    height: 300px;
    background: var(--glow-2-color);
    bottom: 20%;
    right: 15%;
    animation: float2 20s ease-in-out infinite alternate;
}

.glow-3 {
    width: 200px;
    height: 200px;
    background: var(--glow-3-color);
    top: 40%;
    left: 40%;
    animation: float3 18s ease-in-out infinite alternate;
}

/* Float Animations for Orbs */
@keyframes float1 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(50px, 50px);
    }
}

@keyframes float2 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-40px, 60px);
    }
}

@keyframes float3 {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(60px, -30px);
    }
}

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

html {
    scroll-behavior: smooth;
}

/* Skip-to-Content Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 40px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    z-index: 99999;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 20px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0 20px 60px;
    overflow-x: hidden;
    position: relative;
    /* Clean, non-masked body */
}

/* Smooth Moving Animated Grid Background - Layered for Flicker-Free Motion */
.bg-grid-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    pointer-events: none;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.bg-grid-layer::before {
    content: '';
    position: absolute;
    top: -40px; 
    left: -40px;
    width: calc(100% + 80px);
    height: calc(100% + 80px);
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1.2px, transparent 1.2px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1.2px, transparent 1.2px);
    background-size: 40px 40px;
    
    /* Smooth 3D Diagonal Drift (NW to SE) */
    animation: smoothGridDrift 10s linear infinite;
    will-change: transform;
}

.business-card-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    position: relative;
    z-index: 1;
    padding-top: 120px;
    /* Space for fixed navigation */
}

/* Glass Panel Base Utility (MATCHING BAKED HERO GLASS) */
.glass-panel {
    background: linear-gradient(135deg, rgba(28, 28, 28, 0.98) 0%, rgba(10, 10, 10, 1) 100%);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Volumetric Depth Shadows & Highlights */
    box-shadow:
        /* Outer ambient drop shadow */
        0 20px 50px rgba(0, 0, 0, 0.8),
        /* Primary 45-degree volumetric top-left highlight (beveled look) */
        inset 1px 1px 0px rgba(255, 255, 255, 0.15),
        /* Secondary soft chamfer highlight */
        inset 2px 2px 8px rgba(255, 255, 255, 0.05),
        /* Internal shadow to simulate thickness on bottom-right */
        inset -1px -1px 2px rgba(0, 0, 0, 0.5);
    
    border-radius: var(--card-radius);
    position: relative;
    overflow: hidden;
    contain: layout paint;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Contains the spotlight boundaries */
    --x: -100px;
    --y: -100px;
}

/* Mouse Attractive Spotlight Glare (Applied to ALL glass panels) */
.glass-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x) var(--y), rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    /* Ensures the light sits underneath the primary content like the baked img */
    transition: opacity 0.3s ease;
    opacity: 0;
}

.glass-panel:hover::after {
    opacity: 1;
    /* Spotlight turns on when hovering anywhere on the panel */
}

/* Ensure foreground contents sit securely above the background glare */
.glass-panel>* {
    position: relative;
    z-index: 1;
}

/* --- Sticky Header Navigation --- */
.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 50px;
    width: 100%;
    max-width: 440px; /* Perfectly aligned with the 440px cards below */
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

/* Safe-Area Minified State */
.header-nav.minified {
    top: 15px;
    padding: 6px 16px;
    max-width: 380px; /* Slimmer but centered */
    opacity: 0.9;
}

/* Hover state only for desktop to avoid mobile jitter */
@media (hover: hover) {
    .header-nav:hover {
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .header-nav.minified:hover {
        opacity: 1;
        transform: translateX(-50%) scale(1.02);
    }
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    height: 44px;
    border-radius: 40px;
    text-decoration: none;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.nav-btn-home {
    --hover-glow-1: rgba(86, 123, 255, 0.9);
    --hover-glow-2: rgba(42, 238, 171, 0.6);
}

.nav-btn-portfolio {
    --hover-glow-1: rgba(225, 48, 108, 0.9);
    --hover-glow-2: rgba(255, 201, 77, 0.6);
}

.nav-btn-team {
    --hover-glow-1: #00f0ff; /* Vibrant Cyan */
    --hover-glow-2: #0080ff; /* Azure Blue */
}

.nav-btn-gateways {
    --hover-glow-1: rgba(255, 170, 0, 0.9); /* Amber */
    --hover-glow-2: rgba(255, 94, 58, 0.6); /* Orange-Red */
}

.nav-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--hover-glow-1), var(--hover-glow-2), var(--hover-glow-1));
    background-size: 200% auto;
    border-radius: 2px;
    filter: blur(1px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    animation: liquidFlow 3s linear infinite;
}

@media (hover: hover) {
    .nav-btn:hover::before {
        opacity: 1;
        width: 80%;
    }
    .nav-btn:hover {
        background-color: rgba(255, 255, 255, 0.04);
    }
}

.nav-btn.active::before {
    opacity: 1;
    width: 80%;
}

.nav-btn.active {
    background-color: rgba(255, 255, 255, 0.02);
}

.nav-icon-container {
    position: relative;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn i {
    font-size: 20px;
    color: var(--text-primary);
    position: absolute;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Volumetric Icon Pop */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.nav-btn .icon-outline {
    opacity: 0.6;
}

.nav-btn:hover .icon-outline,
.nav-btn.active .icon-outline {
    opacity: 0;
    transform: scale(0.6) translateY(5px);
}

.nav-btn:hover .icon-fill,
.nav-btn.active .icon-fill {
    opacity: 1;
    background: linear-gradient(135deg, var(--hover-glow-1), var(--hover-glow-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px var(--hover-glow-1));
    transform: scale(1.1);
}

.nav-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.4s ease;
}

.nav-btn:hover .nav-text,
.nav-btn.active .nav-text {
    color: #ffffff;
    /* Flowing text effect for active nav too! */
    background: linear-gradient(90deg, #ffffff, var(--hover-glow-1), #ffffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidFlow 4s linear infinite;
}

/* --- Content Wrapper & Tabs Controllers --- */
.content-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
    /* Stretch tabs to match height */
    width: 100%;
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 440px; /* Standardized width for perfect symmetry */
    justify-content: flex-start;
    /* Keeps cards pinned to the top */
    transition: all 0.5s ease;
}

#portfolio-tab {
    max-width: 440px; /* Standardized with others */
}

#team-tab {
    max-width: 440px;
}

.tab-content.active-tab {
    display: flex;
    animation: fadeInTab 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInTab {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Hero Section --- */
.hero-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    flex: none;
    height: auto;
    /* Fit precisely to new image dimensions */
    overflow: hidden;
    position: relative;
}

.hero-image-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-backdrop-foundation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0) 80%);
    z-index: 1;
    pointer-events: none;
}

.profile-graphic {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 2; /* Sits above the background foundation */
    aspect-ratio: 1 / 1;
    --lottie-player-toolbar-height: 0px;
}

/* Dark Mode Shield: Protects custom visuals from 'Smart Invert' or Dark Mode extensions */
/* !important required here to override browser-level dark mode extensions */
.dark-mode-shield,
.dark-mode-shield img,
.dark-mode-shield lottie-player,
.dark-mode-shield::before {
    filter: brightness(1) contrast(1) !important;
    mix-blend-mode: normal !important;
}

/* --- Social Links Section --- */
.social-links-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-radius: var(--card-radius);
    position: relative;
    overflow: hidden;
    /* Contains the glowing edge overflow */
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 36px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

/* Remove border on the last item */
.social-btn:last-child {
    border-right: none;
}

/* Individual colors for the glowing edges and icon glows */
.social-btn:nth-child(1) {
    --hover-glow-1: rgba(42, 171, 238, 0.9);
    --hover-glow-2: rgba(42, 238, 171, 0.6);
}

/* Telegram Cyan/Blue */
.social-btn:nth-child(2) {
    --hover-glow-1: rgba(225, 48, 108, 0.9);
    --hover-glow-2: rgba(253, 29, 29, 0.6);
}

/* Instagram Pink/Orange */
.social-btn:nth-child(3) {
    --hover-glow-1: rgba(88, 101, 242, 0.9);
    --hover-glow-2: rgba(148, 101, 242, 0.6);
}

/* Discord Blurple/Purple */
.social-btn:nth-child(4) {
    --hover-glow-1: rgba(10, 102, 194, 0.9);
    --hover-glow-2: rgba(10, 194, 194, 0.6);
}

/* LinkedIn Blue/Cyan */

/* Glowing Top Edge that appears on Hover */
.social-btn::before {
    content: '';
    position: absolute;
    top: -16px;
    /* Stick perfectly to the top edge of the .social-links-card */
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 10px;
    background: linear-gradient(90deg, var(--hover-glow-1), var(--hover-glow-2));
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.social-btn i {
    font-size: 24px;
    color: var(--text-primary);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-btn .icon-outline {
    opacity: 1;
}

.social-btn .icon-fill {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Hover States */
@media (hover: hover) {
    .social-btn:hover {
        transform: translateY(-2px) scale(1.05);
    }

    .social-btn:hover::before {
        opacity: 1;
        /* Activate glowing top edge */
    }

    .social-btn:hover .icon-outline {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    .social-btn:hover .icon-fill {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
        background: linear-gradient(135deg, var(--hover-glow-1), var(--hover-glow-2));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        filter: drop-shadow(-4px 4px 8px var(--hover-glow-1)) drop-shadow(4px -4px 8px var(--hover-glow-2));
    }
}

/* --- Portfolio Section --- */
.portfolio-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Header and Body handle internal spacing */
    position: relative;
    height: 100%;
    min-height: 0;
    /* Let flex stretch handle the matching height */
    /* Custom vertical scrollbar on the right */
    scrollbar-width: thin;
    scrollbar-color: var(--hover-glow-1) transparent;
}

.portfolio-card::-webkit-scrollbar {
    width: 6px;
}

.portfolio-card::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.portfolio-card::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hover-glow-1), var(--hover-glow-2));
    border-radius: 10px;
    cursor: pointer;
}

.portfolio-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(20, 20, 20, 0.6);
    /* Semi-transparent to blend with blur */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.portfolio-sub-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    /* Center buttons in header */
    flex-wrap: wrap;
    /* Safety for small desktops */
}

.sub-nav-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 40px;
    padding: 8px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Slightly reduced for better fit */
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    min-width: 100px;
    /* Ensures buttons don't crush text */
    white-space: nowrap;
}

.sub-nav-btn .nav-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.sub-nav-btn .nav-icon-container {
    position: relative;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sub-nav-btn i {
    font-size: 18px;
    position: absolute;
    /* Fixes the shifting bug */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Button-specific category themes */
.sub-nav-btn[data-target="youtube"] {
    --hover-glow-1: rgba(255, 0, 50, 0.9);
    --hover-glow-2: rgba(255, 80, 80, 0.6);
}

.sub-nav-btn[data-target="brand"] {
    --hover-glow-1: rgba(0, 240, 255, 0.9);
    --hover-glow-2: rgba(0, 120, 255, 0.6);
}

.sub-nav-btn[data-target="social"] {
    --hover-glow-1: rgba(148, 101, 242, 0.9);
    --hover-glow-2: rgba(224, 40, 136, 0.6);
}

.sub-nav-btn::before {
    content: '';
    position: absolute;
    top: -12px;
    /* Tighter for smaller button */
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 8px;
    background: linear-gradient(90deg, var(--hover-glow-1), var(--hover-glow-2));
    border-radius: 50%;
    filter: blur(6px);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.sub-nav-btn:hover::before,
.sub-nav-btn.active::before {
    opacity: 1;
}

.sub-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.sub-nav-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Transition Logic for Icons */
.sub-nav-btn .icon-outline {
    opacity: 0.6;
    color: #ffffff;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-nav-btn.active .icon-outline,
.sub-nav-btn:hover .icon-outline {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

.sub-nav-btn .icon-fill {
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-nav-btn.active .icon-fill,
.sub-nav-btn:hover .icon-fill {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    background: linear-gradient(135deg, var(--hover-glow-1), var(--hover-glow-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-nav-btn.active .nav-text {
    color: #ffffff;
    text-shadow: 0 0 10px var(--hover-glow-1);
}

.portfolio-body {
    padding: 24px;
    flex-grow: 1;
}

.portfolio-sub-content {
    display: none;
    flex-direction: column;
    animation: slideUpSub 0.4s ease forwards;
}

.portfolio-sub-content.active {
    display: flex;
}

@keyframes slideUpSub {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Top Glow Beams */
.portfolio-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--hover-glow-1), var(--hover-glow-2));
    filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.portfolio-card:hover::before {
    opacity: 1;
}

/* Unique Theme Colors */
.youtube-card {
    --hover-glow-1: rgba(255, 0, 50, 0.9);
    --hover-glow-2: rgba(255, 80, 80, 0.6);
}

.brand-card {
    --hover-glow-1: rgba(0, 240, 255, 0.9);
    --hover-glow-2: rgba(0, 120, 255, 0.6);
}

.social-card {
    --hover-glow-1: rgba(148, 101, 242, 0.9);
    --hover-glow-2: rgba(224, 40, 136, 0.6);
}

.portfolio-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    /* More space before grid */
    display: flex;
    align-items: center;
    gap: 8px;
}

.portfolio-title-youtube i {
    font-size: 20px;
    color: rgba(255, 0, 50, 0.9);
    /* YouTube Red */
    filter: drop-shadow(0 0 8px rgba(255, 0, 50, 0.6));
}

.portfolio-title-brand i {
    font-size: 20px;
    color: rgba(0, 240, 255, 0.9);
    /* Brand Identity Cyan */
    filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.6));
}

.portfolio-title-social i {
    font-size: 20px;
    color: rgba(148, 101, 242, 0.9);
    /* Social Media Rich Purple */
    filter: drop-shadow(0 0 8px rgba(148, 101, 242, 0.6));
}

.portfolio-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

/* Category-specific Aspect Ratios */
.youtube-card .portfolio-gallery img {
    aspect-ratio: 16 / 9;
}

.brand-card .portfolio-gallery img {
    aspect-ratio: 1 / 1;
}

.social-card .portfolio-gallery img {
    aspect-ratio: 3 / 2;
    /* Horizontal Social Landscape ratio */
}

.portfolio-gallery img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

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

/* --- About Section --- */
.about-card {
    display: flex;
    flex-direction: column;
    padding: 32px;
    text-align: left; /* Reverted text to left-aligned */
    align-items: center; /* Kept item centering */
}

.about-subtitle {
    font-size: 18px;
    font-weight: 800; /* Strengthened for hierarchy */
    color: #ffffff;   /* Pure white to pop on black */
    margin-bottom: 6px;
    font-style: italic;
    letter-spacing: 0.5px;
}

.about-role {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.about-desc {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.5;
    /* Exact line height */
    margin-bottom: 16px;
}

.gradient-line {
    height: 1.6px; /* Increased for bolder presence */
    width: 100%;
    /* Brightened 7-color Rainbow Spectrum */
    background: linear-gradient(90deg, #00f0ff, #104cff, #8a2be2, #e02888, #ff7300, #ffc94d, #00ff80, #00f0ff);
    background-size: 200% auto;
    border-radius: 2px;
    opacity: 1; /* Full brightness */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); /* Subtle glow for luminosity */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    animation: liquidFlow 4s linear infinite;
}

@keyframes liquidFlow {
    0% {
        background-position: 200% center;
    }

    100% {
        background-position: 0% center;
    }
}

/* --- Team Section --- */
.glass-panel::before {
    display: none; /* Removed the tracing border from all panels globally */
}

#team-tab {
    max-width: 440px;
    /* Wider to match Portfolio tab symmetry */
}

.team-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 24px;
    /* Reduced vertical padding for smaller height */
    border-radius: var(--card-radius);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.08);
    height: 96px; /* Explicit height for all three cards matching */
}

.disabled-card {
    filter: grayscale(100%);
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

.team-card-content {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
}

.team-card:hover {
    transform: translateY(-5px) scale(1.02);
    background-color: rgba(255, 255, 255, 0.04);
}

.team-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: all 0.4s ease;
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    min-width: 0; /* Prevents text from pushing separator out */
}

.team-name {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    transition: all 0.4s ease;
}

.team-role {
    font-size: 14px;
    color: var(--text-secondary);
}

.team-separator {
    width: 1.2px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
    position: relative;
    transition: all 0.4s ease;
    flex-shrink: 0; /* Locked in place regardless of text length */
}

.team-card:hover .team-separator {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    animation: neonPulse 1.5s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    from { opacity: 0.4; height: 35px; }
    to { opacity: 1; height: 45px; }
}

@keyframes smoothGridDrift {
    0% { transform: translate3d(-40px, -40px, 0); }
    100% { transform: translate3d(0px, 0px, 0); }
}

/* Glassmorphic Particles */
.particle {
    position: fixed;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    backdrop-filter: blur(5px);
    z-index: -1;
    pointer-events: none;
}

.p1 { width: 100px; height: 100px; top: 15%; left: -50px; animation: drift 25s linear infinite; }
.p2 { width: 150px; height: 150px; bottom: 10%; right: -70px; animation: drift 35s linear infinite; opacity: 0.5; }
.p3 { width: 70px; height: 70px; top: 50%; right: 10%; animation: drift 20s linear infinite reverse; }

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(100px, 50px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.team-personal-role {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.role-title {
    font-size: 14px;
    /* Slightly smaller for better fit */
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0.9;
}

/* Dynamic Rainbow for Fractal Byte */
.fractal-btn:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.fractal-btn::before {
    /* True 7-Color Rainbow: Cyan, Blue, Purple, Pink, Orange, Yellow, Green */
    background: linear-gradient(90deg, #00f0ff, #104cff, #8a2be2, #e02888, #ff7300, #ffc94d, #00ff80, #00f0ff);
    background-size: 200% auto;
    animation: liquidFlow 3s linear infinite;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fractal-btn:hover::before {
    opacity: 1;
}

.fractal-btn .team-logo {
    position: relative;
    /* High-contrast Chiaroscuro shadow overlay for 3D depth */
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.3) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.3) 100%);
    /* Enhances the 'etched-metal' feel of the rainbow colors */
    filter: brightness(1.1) contrast(1.1);
}

.fractal-btn:hover .team-logo {
    filter: none; /* Logo glow removed — specificity from .fractal-btn:hover overrides .fractal-btn .team-logo */
}

.fractal-btn:hover .team-name {
    /* 7-Color Gradient Text - Refined Blue & tighter 150% size */
    background: linear-gradient(90deg, #00f0ff, #00aaff, #8a2be2, #e02888, #ff7300, #ffc94d, #00ff80);
    background-size: 150% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidFlow 3s linear infinite;
}

.synthia-btn {
    --hover-glow-1: rgba(0, 240, 255, 0.9); /* Cyan */
    --hover-glow-2: rgba(0, 150, 255, 0.6); /* Blue */
}

.synthia-btn:hover .team-name {
    /* Flowing Cyan/Blue Gradient */
    background: linear-gradient(90deg, #00f0ff, #0096ff, #00f0ff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidFlow 2.5s linear infinite;
    text-shadow: none;
}

.strategi3s-btn {
    --hover-glow-1: rgba(0, 255, 128, 0.9); /* Emerald Green */
    --hover-glow-2: rgba(166, 255, 0, 0.6); /* Lime/Yellow */
}

.strategi3s-btn:hover .team-name {
    /* Flowing Green/Lime Gradient */
    background: linear-gradient(90deg, #00ff80, #a6ff00, #00ff80);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: liquidFlow 2.5s linear infinite;
    text-shadow: none;
}

.synthia-ai-btn {
  --hover-glow-1: rgba(0, 225, 255, 0.9); /* Cyan */
  --hover-glow-2: rgba(160, 49, 225, 0.6); /* Purple */
}

.synthia-ai-btn:hover .team-name {
  /* Flowing Cyan → Lime → Bronze → Purple → Pink gradient from Synthia AI SVG */
  background: linear-gradient(90deg, #00e1ff, #ccff00, #b36b00, #a031e1, #ffb9ff, #00e1ff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: liquidFlow 3s linear infinite;
  text-shadow: none;
}

.team-card::before {
    display: none; /* Removed the top glow beam — .glass-panel::before already sets display:none */
}

.team-card:hover .team-logo {
    filter: none; /* Removed all logo glows — hover specificity is sufficient */
}

.global-tooltip {
    z-index: 200000;
}

.strategi3s-btn .team-logo {
    transition: all 0.4s ease;
}

.strategi3s-btn:hover .team-logo {
    transform: scale(1.05);
}

/* --- Lightbox Modal Styles --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    padding: 24px;
    z-index: 10000;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-modal.active .lightbox-content {
    transform: scale(1);
}

.lightbox-image-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.4s ease forwards;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1) rotate(90deg);
}

.lightbox-close i {
    font-size: 24px;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Standardizing the body height for proper scroll matching */
body.modal-open {
    overflow: hidden;
}

/* --- Responsive Mobile Optimizations --- */
@media (max-width: 768px) {
    body {
        padding: 0 16px 40px;
    }

    .header-nav {
        top: 20px;
        max-width: calc(100% - 32px);
        width: calc(100% - 32px);
    }

    .header-nav.minified {
        top: 12px;
        max-width: calc(100% - 48px);
        width: calc(100% - 48px);
    }

    /* Icon-only tabs on mobile to prevent overflow */
    .nav-text {
        display: none;
    }

    .nav-btn {
        gap: 0;
    }

    .business-card-container {
        padding-top: 110px;
    }

    .content-wrapper {
        gap: 16px;
        align-items: flex-start;
        /* Reset stretch on mobile */
    }

    /* On mobile, only show ONE tab at a time */
    .tab-content {
        max-width: 100% !important;
        display: none !important;
        /* Hide all by default in CSS */
    }

    .tab-content.active-tab {
        display: flex !important;
        /* Show only active */
    }

    /* Portfolio Specific Mobile Fixes */
    .portfolio-card {
        min-height: 500px;
    }

    .portfolio-gallery {
        grid-template-columns: 1fr;
        /* Single column for clarity */
    }

    .portfolio-sub-nav {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .sub-nav-btn {
        flex: 1 1 auto;
        padding: 8px 12px;
        min-width: 80px;
    }

    /* Team Section Mobile Refinements (Scaling Down to Fit) */
    .team-card {
        padding: 12px 14px;
        height: auto;
        min-height: 88px;
    }

    .team-card-content {
        gap: 12px;
    }

    .team-logo {
        width: 44px;
        height: 44px;
    }

    .team-name {
        font-size: 16px;
        line-height: 1.2;
    }

    .team-role {
        font-size: 11px;
        line-height: 1.3;
    }

    .team-separator {
        margin: 0 6px;
        height: 32px;
    }

    .role-title {
        font-size: 11px;
    }
}

/* ========================================= */
/* UI/UX Upgrades Phase 1                    */
/* ========================================= */

/* UI Idea 8: Skeleton Loaders */
.skeleton-img {
    width: 100%;
    aspect-ratio: 16 / 9; /* Defaults but overridden naturally since it fits bounds */
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 400% 100%;
    animation: skeletonLoading 1.5s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.social-card .skeleton-img { aspect-ratio: 3 / 2; }
.brand-card .skeleton-img { aspect-ratio: 1 / 1; }
.youtube-card .skeleton-img { aspect-ratio: 16 / 9; }

@keyframes skeletonLoading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* White-Gradient Gallery Spinner */
.gallery-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: simpleSpin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes simpleSpin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* UI Idea 9: Glassmorphism Tooltips (Global JS Version) */
.global-tooltip {
    position: fixed;
    transform: translate(-50%, -100%);
    background: rgba(20, 20, 20, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, margin-top 0.2s ease;
    z-index: 20000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    margin-top: 5px; /* Slight offset for animation */
}

.global-tooltip.visible {
    opacity: 1;
    margin-top: 0;
}

/* ========================================= */
/* Footer                                    */
/* ========================================= */

.site-footer {
    width: 100%;
    max-width: 440px;
    text-align: center;
    padding: 32px 0 8px;
    color: var(--text-secondary);
    font-size: 12px;
    opacity: 0.6;
}

/* ========================================= */
/* Focus-Visible Styles (Accessibility)      */
/* ========================================= */

:focus-visible {
    outline: 2px solid rgba(0, 240, 255, 0.8);
    outline-offset: 2px;
}

.nav-btn:focus-visible,
.sub-nav-btn:focus-visible,
.social-btn:focus-visible,
.team-card:focus-visible,
.lightbox-close:focus-visible {
    outline: 2px solid rgba(0, 240, 255, 0.8);
    outline-offset: 2px;
}

/* ========================================= */
/* Portfolio Error Overlay & Retry           */
/* ========================================= */

.portfolio-error-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
    grid-column: 1 / -1;
}

.portfolio-error-overlay i {
    font-size: 32px;
    color: rgba(255, 80, 80, 0.8);
}

.portfolio-error-overlay p {
    font-size: 14px;
}

.retry-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    color: #ffffff;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.retry-btn i {
    font-size: 16px;
    color: #ffffff;
}

/* ========================================= */
/* Coming Soon Text                          */
/* ========================================= */

.coming-soon-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.7;
    font-style: italic;
}

/* ========================================= */
/* Portfolio Image Fade-In                   */
/* ========================================= */

.portfolio-gallery img {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.portfolio-gallery img.loaded {
    opacity: 1;
}

.portfolio-gallery img.img-error {
    opacity: 1;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================= */
/* Tab Transition Animations                 */
/* ========================================= */

.tab-content {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.tab-content.active-tab {
    animation: fadeInTab 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Staggered card entrance */
.tab-content.active-tab > * {
    animation: staggeredIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tab-content.active-tab > *:nth-child(1) { animation-delay: 0.05s; }
.tab-content.active-tab > *:nth-child(2) { animation-delay: 0.12s; }
.tab-content.active-tab > *:nth-child(3) { animation-delay: 0.19s; }
.tab-content.active-tab > *:nth-child(4) { animation-delay: 0.26s; }

@keyframes staggeredIn {
    0% {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================= */
/* Tablet Breakpoint (769px–1024px)          */
/* ========================================= */

@media (min-width: 769px) and (max-width: 1024px) {
    .content-wrapper {
        gap: 20px;
    }

    .tab-content {
        max-width: 480px;
    }

    #portfolio-tab {
        max-width: 480px;
    }

    #team-tab {
        max-width: 480px;
    }

    .header-nav {
        max-width: 460px;
    }

    .portfolio-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* ========================================= */
/* Mobile Backdrop-Filter Optimization       */
/* ========================================= */

@media (max-width: 768px) {
    .glass-panel {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .portfolio-header {
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
}

/* ========================================= */
/* Prefers Reduced Motion                    */
/* ========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ambient-glow,
    .particle,
    .bg-grid-layer::before {
        animation: none !important;
    }

    .gradient-line {
        animation: none !important;
    }

    .portfolio-gallery img {
        transition: none;
    }

    .tab-content.active-tab {
        animation: none;
    }

    .tab-content.active-tab > * {
        animation: none;
    }

    /* Keep opacity transitions for state changes (not motion) */
    .glass-panel::after,
    .lightbox-modal,
    .global-tooltip {
        transition: opacity 0.15s ease;
    }
}