/* Custom Cursor Styles - DISABLED */
* {
    cursor: auto !important;
}

body {
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    min-width: 320px; /* Prevent layout issues on very small screens */
    scroll-behavior: smooth; /* Smooth scrolling */
    -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
}

/* Enhanced responsive containers */
.container {
    width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100%;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Responsive text scaling */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    h3 {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
    }
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Mobile-first navigation improvements */
@media (max-width: 768px) {
    .nav-mobile-adjustments {
        padding: 0.5rem 1rem;
    }
    
    /* Better mobile card spacing */
    .project-card-mobile {
        margin-bottom: 0.75rem;
    }
    
    /* Improved touch targets */
    .interactive-element {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better mobile text sizing */
    .mobile-text-adjust {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Ultra-small screen improvements */
@media (max-width: 375px) {
    .ultra-mobile-text {
        font-size: 0.75rem;
    }
    
    .ultra-mobile-padding {
        padding: 0.25rem 0.5rem;
    }
}

/* Grid layout improvements for different screen sizes */
@media (min-width: 1280px) {
    .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3.xl\\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1536px) {
    .grid-cols-1.sm\\:grid-cols-2.lg\\:grid-cols-3.xl\\:grid-cols-4 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Ensure proper aspect ratios are maintained */
.aspect-square {
    aspect-ratio: 1 / 1;
}

.aspect-4-3 {
    aspect-ratio: 4 / 3;
}

/* Better hover effects on touch devices */
@media (hover: hover) {
    .group:hover .group-hover\\:scale-105 {
        transform: scale(1.05);
    }
    
    .group:hover .group-hover\\:opacity-100 {
        opacity: 1;
    }
}

/* Cursor elements hidden */
.cursor {
    display: none !important;
}

.cursor-trail {
    display: none !important;
}

/* Technical Clip Paths and Geometric Shapes */
.clip-path-hexagon {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.clip-path-angle {
    clip-path: polygon(0% 0%, calc(100% - 12px) 0%, 100% 100%, 12px 100%);
}

.clip-path-corner {
    clip-path: polygon(0% 0%, calc(100% - 20px) 0%, 100% 20px, 100% 100%, 0% 100%);
}

/* Technical Grid Pattern */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(30, 64, 175, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 64, 175, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 100%;
    height: 100%;
}

/* Technical Border Effects */
.technical-border {
    position: relative;
}

.technical-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #1E40AF, transparent, #F97316, transparent, #9CA3AF);
    z-index: -1;
    clip-path: polygon(0% 0%, calc(100% - 8px) 0%, 100% 8px, 100% 100%, 8px 100%, 0% calc(100% - 8px));
}

/* Industrial Button Styles */
button.interactive-element {
    position: relative;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.05em;
    border: 1px solid rgba(156, 163, 175, 0.3);
    background: linear-gradient(135deg, rgba(30, 64, 175, 1) 0%, rgba(30, 64, 175, 0.9) 100%);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

button.interactive-element::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(249, 115, 22, 0.1) 0%, rgba(249, 115, 22, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    clip-path: inherit;
}

button.interactive-element:hover::before {
    opacity: 1;
}

/* Interactive Element Hover Effects - Technical Style */
.interactive-element {
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.interactive-element:hover {
    transform: translateY(-3px) translateX(1px);
}

/* Subtle elevation utility */
.elevate {
    transition: box-shadow .35s ease, transform .35s ease;
}
.elevate:hover {
    box-shadow: 0 12px 30px -5px rgba(0,0,0,.18);
    transform: translateY(-4px);
}

/* Technical Button Hover Effects */
button.interactive-element:hover {
    box-shadow: 
        0 8px 25px rgba(30, 64, 175, 0.3),
        0 0 20px rgba(249, 115, 22, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-color: rgba(249, 115, 22, 0.5);
}

/* Link Hover Effects - Technical */
a.interactive-element:hover {
    text-shadow: 
        0 0 8px rgba(249, 115, 22, 0.4),
        1px 1px 2px rgba(30, 64, 175, 0.2);
    border-bottom: 1px solid rgba(249, 115, 22, 0.5);
}

/* Card Hover Effects - Angular */
.interactive-element.bg-light-smoke:hover {
    transform: translateY(-6px) translateX(2px);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.15),
        0 0 25px rgba(30, 64, 175, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-left-width: 6px;
}

/* Gallery Item Hover Effects - Technical */
.interactive-element.group:hover {
    transform: scale(1.02) rotateY(2deg);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.25),
        0 0 30px rgba(249, 115, 22, 0.15),
        inset 0 0 20px rgba(30, 64, 175, 0.05);
}

/* Form Input Hover Effects */
input.interactive-element:hover,
textarea.interactive-element:hover {
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.1);
}

/* Premium Glow Effects */
.premium-glow {
    position: relative;
}

.premium-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #1E40AF, #F97316, #9CA3AF);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.premium-glow:hover::before {
    opacity: 0.7;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Backdrop */
nav {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #1E40AF;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #F97316;
}

/* Text Selection */
::selection {
    background: rgba(249, 115, 22, 0.2);
    color: #1E40AF;
}

/* Ensure main content is always visible */
main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 10;
}

/* Ensure sections are visible */
section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile Cursor Disable - NOT NEEDED ANYMORE */
@media (max-width: 768px) {
    .cursor,
    .cursor-trail {
        display: none;
    }
    
    * {
        cursor: auto !important;
    }
    
    /* Ensure mobile content is visible */
    body {
        min-height: 100vh;
        overflow-x: hidden;
    }
    
    /* Fix main content display on mobile */
    main {
        position: relative;
        z-index: 1;
        min-height: 100vh;
    }
    
    /* Ensure sections are visible */
    section {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Fix navigation issues */
    nav {
        z-index: 50 !important;
    }
    
    /* Ensure project cards are visible */
    .grid > div {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Debug: Ensure background colors are visible on mobile */
    .bg-light-smoke {
        background-color: #FAFAFA !important;
    }
    
    /* Ensure project cards have visible background */
    .bg-white {
        background-color: #ffffff !important;
    }
    
    /* Make sure the grid container is visible */
    .grid {
        display: grid !important;
        visibility: visible !important;
    }
    
    /* Fix for potential Tailwind grid issues on mobile */
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    /* Ensure project grid items are properly displayed */
    .grid > .group {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Cursor animations disabled */
.cursor.pulsing {
    display: none !important;
}

/* Loading States */
.cursor.loading {
    background: conic-gradient(from 0deg, #1E40AF, #F97316, #1E40AF);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Text Cursor for Text Areas - DISABLED */
.cursor.text-cursor {
    display: none !important;
}

/* Link Following Effect - DISABLED */
.cursor.link-following {
    display: none !important;
}

/* Technical Loading Animation - DISABLED */
.cursor.loading {
    display: none !important;
}

@keyframes technical-spin {
    from { 
        transform: translate(-50%, -50%) rotate(0deg) scale(1); 
    }
    50% { 
        transform: translate(-50%, -50%) rotate(180deg) scale(1.2); 
    }
    to { 
        transform: translate(-50%, -50%) rotate(360deg) scale(1); 
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1E40AF, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass Morphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 3s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (min-width: 1024px) {
    .cursor {
        transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .cursor-trail {
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .cursor {
        box-shadow: 
            0 0 10px rgba(30, 64, 175, 0.4),
            0 0 20px rgba(30, 64, 175, 0.2);
    }
}

/* Focus States for Accessibility */
.interactive-element:focus {
    outline: 2px solid #F97316;
    outline-offset: 2px;
}

/* Hamburger Menu */
#mobile-menu-toggle .hamburger-line {
    width: 22px;
    height: 2px;
    background: #1E40AF;
    margin: 3px 0;
    border-radius: 2px;
    transition: all .35s cubic-bezier(.65,.05,.36,1);
}
#mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Mobile menu animation */
#mobile-menu {
    animation: dropdown .45s cubic-bezier(.25,.46,.45,.94);
}
@keyframes dropdown {
    from { opacity:0; transform: translateY(-8px); }
    to { opacity:1; transform: translateY(0); }
}

/* Fade-in utility for new revealed sections */
.reveal { opacity:0; transform: translateY(25px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity:1; transform: translateY(0); }

/* Floating quote button pulse */
a[href*="contact"].fixed { position:fixed; }
a[href*="contact"].fixed::after {
    content:''; position:absolute; inset:0; border-radius:999px; box-shadow:0 0 0 0 rgba(249,115,22,.45); animation:pulse-ring 2.5s infinite;
}
@keyframes pulse-ring { 0% { box-shadow:0 0 0 0 rgba(249,115,22,.45);} 70% { box-shadow:0 0 0 14px rgba(249,115,22,0);} 100% { box-shadow:0 0 0 0 rgba(249,115,22,0);} }

/* Hero animations */
@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromRight {
    0% { opacity: 0; transform: translateX(50px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInFromBottom {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: #F97316; }
}

/* Animation classes */
.animate-slide-in-left { animation: slideInFromLeft 0.8s ease-out; }
.animate-slide-in-right { animation: slideInFromRight 0.8s ease-out; }
.animate-slide-in-bottom { animation: slideInFromBottom 0.6s ease-out; }
.animate-fade-in-scale { animation: fadeInScale 0.7s ease-out; }
.animate-bounce-in { animation: bounceIn 0.9s ease-out; }

/* Delayed animations */
.animate-delay-200 { animation-delay: 0.2s; animation-fill-mode: both; }
.animate-delay-400 { animation-delay: 0.4s; animation-fill-mode: both; }
.animate-delay-600 { animation-delay: 0.6s; animation-fill-mode: both; }
.animate-delay-800 { animation-delay: 0.8s; animation-fill-mode: both; }
.animate-delay-1000 { animation-delay: 1s; animation-fill-mode: both; }

/* Hover animations */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 25px rgba(30, 64, 175, 0.3);
}

/* Counter animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-count-up { animation: countUp 0.6s ease-out; }

/* Background elements animation */
.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(2deg); }
    66% { transform: translateY(5px) rotate(-1deg); }
}

/* Card reveal animation */
.card-reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Stagger animation delays for cards */
.card-reveal:nth-child(1) { transition-delay: 0.1s; }
.card-reveal:nth-child(2) { transition-delay: 0.2s; }
.card-reveal:nth-child(3) { transition-delay: 0.3s; }
.card-reveal:nth-child(4) { transition-delay: 0.4s; }

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
    position: relative;
}

.text-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #FAFAFA, transparent);
    transform: translateX(-100%);
    animation: shimmer 2s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .cursor,
    .cursor-trail,
    .interactive-element {
        transition: none;
        animation: none;
    }
}

/* Font utility */
.font-inter { font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; }
