/* ===================================
   Premium Portfolio - Custom Styles
   Modern Dark Mode Luxury Aesthetic
   =================================== */

/* Root Variables */
:root {
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #1e293b;
    --accent-primary: #8b5cf6;
    --accent-secondary: #6366f1;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Noise Overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/noise.svg');
    background-repeat: repeat;
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

/* Glassmorphism Utility */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.glass:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Header & Navigation - Enhanced 2025 */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.7);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 0 0 rgba(255, 255, 255, 0.03);
}

.header-nav.scrolled {
    background: rgba(5, 5, 5, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Logo */
.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-logo:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link.active {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 1rem;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Button */
.hamburger-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn:hover .hamburger-line {
    background: var(--accent-primary);
}

/* Hamburger Animation when Active */
.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

.mobile-menu.active {
    max-height: 400px;
    opacity: 1;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
}

.mobile-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: var(--text-primary);
    padding-left: 1rem;
    background: rgba(139, 92, 246, 0.05);
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 4px;
}

/* ===================================
   Enhanced Hero Section - 2025
   =================================== */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1.5rem 4rem;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Animated Gradient Mesh Background */
.gradient-mesh {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.15), transparent),
        radial-gradient(ellipse 60% 50% at 80% 50%, rgba(99, 102, 241, 0.1), transparent),
        radial-gradient(ellipse 60% 50% at 20% 50%, rgba(168, 85, 247, 0.08), transparent);
    filter: blur(60px);
    animation: meshMove 20s ease-in-out infinite;
    opacity: 0.6;
}

@keyframes meshMove {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(5%, -5%) scale(1.1);
    }

    66% {
        transform: translate(-5%, 5%) scale(0.95);
    }
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    animation: pulse-slow 2s ease-in-out infinite;
}

/* Enhanced Hero Title */
.hero-title-enhanced {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Animated Gradient Text */
.gradient-text-animated {
    background: linear-gradient(90deg,
            #a78bfa 0%,
            #818cf8 25%,
            #c084fc 50%,
            #818cf8 75%,
            #a78bfa 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Hero Bio */
.hero-bio {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* Enhanced CTAs */
.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
}

/* Enhanced Buttons - 2025 Micro-interactions */
.btn-primary-enhanced,
.btn-secondary-enhanced {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.125rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: none;
}

.btn-primary-enhanced {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transition: left 0.6s ease;
}

.btn-primary-enhanced:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.4);
}

.btn-primary-enhanced:hover::before {
    left: 100%;
}

.btn-primary-enhanced:active {
    transform: translateY(-1px) scale(0.98);
}

.btn-secondary-enhanced {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.btn-secondary-enhanced::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.btn-secondary-enhanced:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary-enhanced:hover::after {
    opacity: 1;
}

.btn-secondary-enhanced:active {
    transform: translateY(-1px) scale(0.98);
}

/* Button Text & Icon Animations */
.btn-text {
    position: relative;
    z-index: 1;
}

.btn-icon,
.btn-arrow {
    position: relative;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-enhanced:hover .btn-icon {
    transform: scale(1.2) rotate(12deg);
}

.btn-secondary-enhanced:hover .btn-arrow {
    transform: translateY(4px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    opacity: 0.6;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 13px;
    position: relative;
    background: rgba(255, 255, 255, 0.02);
}

.scroll-wheel {
    width: 3px;
    height: 8px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {

    0%,
    100% {
        top: 8px;
        opacity: 1;
    }

    50% {
        top: 20px;
        opacity: 0.3;
    }
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(8px);
    }
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
}

/* Bento Grid Layout */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.bento-card {
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 250px;
}

/* Card 1 - Large (Featured Project) */
.bento-card.large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
}

.bento-card.large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(99, 102, 241, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-card.large:hover::before {
    opacity: 1;
}

/* Card 2 - Medium (Tech Stack) */
.bento-card.medium {
    grid-column: span 1;
    grid-row: span 2;
}

/* Tech Icons */
.tech-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.tech-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.tech-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-4px);
}

.tech-icon-emoji {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.tech-icon:nth-child(1) .tech-icon-emoji {
    animation-delay: 0s;
}

.tech-icon:nth-child(2) .tech-icon-emoji {
    animation-delay: 0.5s;
}

.tech-icon:nth-child(3) .tech-icon-emoji {
    animation-delay: 1s;
}

.tech-icon:nth-child(4) .tech-icon-emoji {
    animation-delay: 1.5s;
}

.tech-icon:nth-child(5) .tech-icon-emoji {
    animation-delay: 2s;
}

.tech-icon:nth-child(6) .tech-icon-emoji {
    animation-delay: 2.5s;
}

.tech-icon-name {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Card 3 & 4 - Small */
.bento-card.small {
    grid-column: span 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse-slow 2s ease-in-out infinite;
}

/* Location Card */
.location-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    padding: 2.5rem;
    border-radius: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(12px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-slow {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for bento cards */
.animate-in:nth-child(1) {
    transition-delay: 0s;
}

.animate-in:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-in:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-in:nth-child(4) {
    transition-delay: 0.3s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-card.large,
    .bento-card.medium {
        grid-column: span 2;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Show Hamburger, Hide Desktop Nav */
    .hamburger-btn {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-card.large,
    .bento-card.medium,
    .bento-card.small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .nav-logo {
        font-size: 1.25rem;
    }
}