:root {
        /* Colors */
        --dark: #0a0a0c;
        --zinc-200: #e4e4e7;
        --zinc-300: #d4d4d8;
        --zinc-400: #a1a1aa;
        --zinc-500: #71717a;
        --zinc-700: #3f3f46;
        --zinc-800: #27272a;
        --zinc-900: #18181b;
        --indigo-400: #818cf8;
        --indigo-500: #6366f1;
        --purple-400: #c084fc;
        --purple-500: #a855f7;
        --emerald-400: #34d399;
        --emerald-500: #10b981;
        
        /* Glassmorphism */
        --card-bg: rgba(24, 24, 27, 0.4);
        --card-hover: rgba(39, 39, 42, 0.6);
        --card-border: rgba(255, 255, 255, 0.1);
    }

    body {
        background-color: var(--dark);
        color: #fafafa;
        font-family: 'Inter', sans-serif;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
    }

    h1, h2, h3, h4, h5, h6, .font-display {
        font-family: 'Outfit', sans-serif;
    }

    ::selection {
        background-color: rgba(99, 102, 241, 0.4);
        color: white;
    }

    /* Hide Scrollbar */
    .no-scrollbar::-webkit-scrollbar {
        display: none;
    }
    .no-scrollbar {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    /* Utility to enforce grid/flex boundaries */
    .min-w-0 {
        min-width: 0;
    }

    @keyframes blob {
        0% { transform: translate(0px, 0px) scale(1); }
        33% { transform: translate(30px, -50px) scale(1.1); }
        66% { transform: translate(-20px, 20px) scale(0.9); }
        100% { transform: translate(0px, 0px) scale(1); }
    }

    .animate-blob {
        animation: blob 7s infinite;
    }

    .bg-blob {
        position: absolute;
        border-radius: 50%;
        mix-blend-mode: screen;
        filter: blur(100px);
        pointer-events: none;
    }

    .bg-pattern {
        position: absolute;
        inset: 0;
        opacity: 0.03;
        background-image: radial-gradient(white 1px, transparent 1px);
        background-size: 24px 24px;
        pointer-events: none;
    }

    /* Glass Panel Base */
    .glass-panel {
        background-color: var(--card-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid var(--card-border);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        min-width: 0; /* Ensures child text-truncation doesn't break the grid */
    }

    .bento-hover {
        transition: all 0.3s ease;
    }
    .bento-hover:hover {
        transform: translateY(-4px);
        border-color: rgba(99, 102, 241, 0.3);
        box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.15);
        background-color: var(--card-hover);
    }

    .bento-grid {
        display: grid;
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
    .bento-grid-about {
        grid-auto-rows: minmax(160px, auto);
    }
    .bento-grid-work {
        grid-auto-rows: minmax(360px, 1fr);
    }

    /* Tablet breakpoint (768px to 1199px) */
    @media (min-width: 768px) {
        .bento-grid-about { grid-template-columns: repeat(3, 1fr); }
        .bento-grid-work { grid-template-columns: repeat(2, 1fr); }
        
        .md-col-span-2 { grid-column: span 2; }
        .md-col-span-3 { grid-column: span 3; }
        .md-row-span-2 { grid-row: span 2; }
    }

    @media (min-width: 992px) {
        .bento-grid-work { grid-template-columns: repeat(3, 1fr); }
        .lg-col-span-2 { grid-column: span 2; }
    }

    /* Large Desktop breakpoint (1200px+) */
    @media (min-width: 1200px) {
        .bento-grid-about { grid-template-columns: repeat(6, 1fr); }
        .xl-col-span-2 { grid-column: span 2; }
        .xl-col-span-3 { grid-column: span 3; }
        .xl-row-span-3 { grid-row: span 3; }
    }

    .text-gradient {
        background-clip: text;
        -webkit-background-clip: text;
        color: transparent;
        background-image: linear-gradient(to right, var(--indigo-400), var(--purple-400));
    }

    .skill-tag {
        background-color: rgba(39, 39, 42, 0.8);
        border: 1px solid rgba(63, 63, 70, 0.5);
        color: var(--zinc-200);
        font-size: 0.75rem;
        font-weight: 500;
        padding: 0.5rem 1rem;
        border-radius: 50rem;
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        transition: background-color 0.2s ease;
    }
    .skill-tag:hover {
        background-color: var(--zinc-700);
    }

    .work-img-container {
        position: relative;
        width: 100%;
        border-radius: 1.5rem;
        overflow: hidden;
        background-color: var(--zinc-900);
    }
    .work-img-container img {
        position: absolute; /* Ensures the image doesn't artificially stretch the flex parent */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.7s ease;
    }
    .work-overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(10, 10, 12, 0.2);
        transition: all 0.5s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        backdrop-filter: blur(4px);
    }
    .bento-hover:hover .work-img-container img {
        transform: scale(1.05);
    }
    .bento-hover:hover .work-overlay {
        opacity: 1;
        background-color: rgba(10, 10, 12, 0.4);
    }
    .view-btn {
        transform: translateY(15px);
        transition: all 0.3s ease;
    }
    .bento-hover:hover .view-btn {
        transform: translateY(0);
    }

    .nav-center-links {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
    .pointer-events-none { pointer-events: none; }
    .pointer-events-auto { pointer-events: auto; }

    .nav-link-item {
        opacity: 0.7;
        font-weight: 500;
        transition: all 0.3s ease;
    }
    .nav-link-item:hover {
        opacity: 1;
    }
    .nav-link-item.active {
        opacity: 1;
        font-weight: 700 !important;
        text-shadow: 0 0 10px rgba(255,255,255,0.3);
    }

    .nav-transition {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    #nav-container {
        border: 1px solid transparent;
        background-color: transparent;
    }

    #nav-container.scrolled {
        background-color: var(--card-bg);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-color: var(--card-border);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    #nav-links.scrolled {
        background-color: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border-color: transparent !important;
        box-shadow: none !important;
    }

    .social-link {
        transition: all 0.3s ease;
    }
    .social-link:hover .arrow-icon {
        transform: translate(4px, -4px);
        color: white !important;
    }

    /* Hamburger Button & Animation */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 32px;
        height: 32px;
        cursor: pointer;
        z-index: 1060;
    }
    
    .hamburger-line {
        display: block;
        width: 24px;
        height: 2px;
        background-color: white;
        border-radius: 2px;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        margin: 0 auto;
    }

    /* Morph into X */
    .nav-open .hamburger-line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-open .hamburger-line:nth-child(2) {
        opacity: 0;
    }
    .nav-open .hamburger-line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Mobile Nav Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(10, 10, 12, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 1040; 
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-link {
        font-size: 2.5rem;
        font-weight: 700;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .mobile-nav-overlay.active .mobile-nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-nav-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
    .mobile-nav-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
    .mobile-nav-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
    .mobile-nav-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
    
    body.nav-open {
        overflow: hidden;
    }