:root {
    --background: #050a10;
    --foreground: #ffffff;
    --navy-brand: #1D3D6A;
    --emerald-brand: #5EC492;
    --accent: var(--emerald-brand);
    --accent-glow: rgba(94, 196, 146, 0.4);
    --secondary: #B7B7B7;
    --card: #0a0a0a;
    --muted: #1a1a1a;
    --border: #1a1a1a;

    --z-nav: 9999;
    --z-overlay: 9998;
    --z-content: 100;
}

html {
    overflow-x: hidden;
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100%;
    width: 100%;
    margin: 0;
    position: fixed;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    /* Or fallback to sans if not loaded */
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.05em;
}

/* Utilities */
.bg-noise {
    position: relative;
}

.bg-noise::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("https://grainy-gradients.vercel.app/noise.svg");
    opacity: 0.05;
    pointer-events: none;
    z-index: 0;
}

.cyber-grid {
    background-image: linear-gradient(rgba(0, 255, 242, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 242, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Animations */
.section {
    position: absolute;
    inset: 0;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.section.active {
    opacity: 1;
    transform: translate(0, 0) !important;
    pointer-events: auto;
}

/* Section specific initial positions */
#home {
    transform: translate(0, 0);
}

#about {
    transform: translate(0, 100%);
}

#projects {
    transform: translate(100%, 0);
}

#services {
    transform: translate(0, -100%);
}

#contact {
    transform: translate(-100%, 0);
}

/* Custom Badge implementation since we don't have shadcn components */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid var(--border);
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: colors 0.2s;
}

.badge-outline {
    border-color: rgba(0, 255, 242, 0.5);
    color: var(--accent);
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
}

/* Hero Title Animation - no scale to prevent layout shift */
@keyframes fade-up {
    0% {
        transform: translateY(20px);
        opacity: 0;
    }

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

@keyframes fade-down {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-20px);
        opacity: 0;
    }
}

.animate-fade-up {
    animation: fade-up 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fade-down {
    animation: fade-down 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    color: #fff;
    font-size: 0.875rem;
    animation: toast-slide-in 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-exit {
    animation: toast-slide-out 0.3s ease forwards;
}

.toast-success {
    border-color: rgba(0, 255, 242, 0.3);
}

.toast-success .toast-icon {
    color: #00fff2;
}

.toast-error {
    border-color: rgba(255, 80, 80, 0.3);
}

.toast-error .toast-icon {
    color: #ff5050;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.toast-description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

@keyframes toast-slide-in {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes toast-slide-out {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Premium Animations & Interactions */
@keyframes scan {
    0% {
        top: -100%;
    }

    100% {
        top: 200%;
    }
}

.animate-scan {
    animation: scan 4s linear infinite;
}

.reveal {
    transition: transform 1.2s cubic-bezier(0.19, 1, 0.22, 1), opacity 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Specific reveal initial states */
.reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Navigation Overrides and Fixes */
.nav-btn.active {
    color: var(--accent);
}

/* Custom Scroll Progress */
#about-scroll-progress {
    transition: transform 0.1s ease-out;
}

#timeline-rail {
    transition: transform 0.1s ease-out;
}

/* Floating Nav States */
#about-floating-nav button {
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#about-floating-nav button.show {
    transform: scale(1);
    pointer-events: auto;
}

#about-floating-nav button.hide {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none;
}

/* Portfolio Masonry & Card Styles */
.break-inside-avoid {
    break-inside: avoid;
}

.aspect-4\/5 {
    aspect-ratio: 4 / 5;
}

.aspect-3\/4 {
    aspect-ratio: 3 / 4;
}

.aspect-2\/3 {
    aspect-ratio: 2 / 3;
}

.section#projects .columns-1 {
    column-gap: 2rem;
}

@media (min-width: 1024px) {
    .section#projects .lg\:[column-fill\:balance] {
        column-fill: balance;
    }
}

/* Video Modal States */
#video-modal.show {
    opacity: 1;
    pointer-events: auto;
}

#video-modal.show #video-container {
    transform: scale(1);
}

/* Services & Footer Styles */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}

.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    padding: 1rem;
}

@media (min-width: 768px) {
    .card-glass {
        padding: 1.5rem;
    }
}

.card-accent {
    border-left: 2px solid rgba(0, 255, 242, 0.2);
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .card-accent {
        padding-left: 1.5rem;
    }
}

/* Mobile Menu Premium Styles (Minimalist Luxury) */
#mobile-overlay.active {
    display: flex;
    pointer-events: auto;
    opacity: 1;
}

.mobile-menu-items button {
    opacity: 0;
    transform: translateX(-30px);
}

#mobile-overlay.active .mobile-menu-items button {
    animation: menu-item-enter-minimal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes menu-item-enter-minimal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 360px) {
    .timeline-item h4 {
        font-size: 1.1rem;
    }

    .timeline-item p {
        font-size: 10px;
    }

    #mobile-overlay .mobile-menu-items span:not(.text-xs) {
        font-size: 1.75rem;
    }
}

/* Contact Section Modernization */
#contact {
    background-image:
        radial-gradient(circle at 0% 0%, rgba(0, 255, 242, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(0, 255, 242, 0.03) 0%, transparent 50%);
}

#contact-form input,
#contact-form textarea {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#contact-form input:focus,
#contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 242, 0.1);
    transform: translateY(-2px);
}

#contact-submit-btn {
    background: linear-gradient(135deg, #333333 0%, #111111 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

#contact-submit-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--accent) 0%, #00b8ae 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

#contact-submit-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 255, 242, 0.2);
    color: #010101 !important;
    border-color: var(--accent);
}

#contact-submit-btn:hover::before {
    opacity: 1;
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.map-container {
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.map-container:hover {
    border-color: var(--accent);
    box-shadow: 0 0 40px rgba(0, 255, 242, 0.15);
}

/* Home Page Modernization */
#home #hero-title {
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.9);
    background: linear-gradient(to bottom, #fff 0%, #00fff2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero content - fixed center positioning */
#home .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 56rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Fixed height for title area to prevent layout shift */
#hero-title-container {
    height: 6.5rem;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    #hero-title-container {
        height: 6rem;
    }
}

@media (min-width: 1024px) {
    #hero-title-container {
        height: 7rem;
    }
}

/* Fixed height for tagline to prevent shift */
#hero-tagline {
    height: 5.5rem;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    #hero-tagline {
        height: 4rem;
    }
}

/* CTA Button - Color Sweep Hover Effect */
.cta-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 50%, #ffffff 100%);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.cta-btn:hover::before {
    left: 0;
}

.cta-btn:hover {
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.5);
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#home .reveal:nth-child(2) {
    transition-delay: 0.2s;
}

#home .reveal:nth-child(3) {
    transition-delay: 0.4s;
}

/* Transparent Logo Styling */
.logo-container-hero {
    margin-bottom: 0;
    filter: drop-shadow(0 0 20px rgba(0, 255, 242, 0.3));
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.logo-container-hero:hover {
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 0 30px rgba(0, 255, 242, 0.5));
}

/* Enlarged Logo - Minimalist Focus */
.logo-container-hero {
    margin-bottom: 0;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Soft White Blur Highlight - High Focus Logo */
.logo-container-hero::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 140%;
    /* Layer 1: Soft White Glow */
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    /* Layer 2: Premium Glass Blur */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

.logo-container-hero img {
    height: 150px;
    width: auto;
    object-fit: contain;
    filter:
        brightness(1.1) contrast(1.1) drop-shadow(0 0 15px rgba(0, 0, 0, 0.4));
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .logo-container-hero img {
        height: 220px;
    }
}

@media (min-width: 1024px) {
    .logo-container-hero img {
        height: 280px;
    }
}

.logo-container-hero:hover img {
    transform: scale(1.05) translateY(-5px);
    filter: brightness(1.2) contrast(1.2) drop-shadow(0 0 25px rgba(0, 0, 0, 0.6));
}

.logo-container-nav {
    filter: drop-shadow(0 0 15px rgba(0, 255, 242, 0.4));
    transition: all 0.4s ease;
}

.logo-container-nav:hover {
    transform: scale(1.05);
    filter: drop-shadow(0_0_25px_rgba(0, 255, 242, 0.6));
}

.logo-container-nav img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.bg-radial-at-c {
    background: radial-gradient(circle at center, var(--tw-gradient-from) 0%, var(--tw-gradient-to) 100%);
}

/* Contact Section Enhancements */
.contact-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(94, 196, 146, 0.1);
}

.contact-info-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.contact-info-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(94, 196, 146, 0.3);
    transform: translateY(-5px);
}

.map-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.map-container iframe {
    filter: grayscale(1) invert(0.9) contrast(1.2);
    opacity: 0.6;
    transition: all 1s ease;
}

.map-container:hover iframe {
    filter: grayscale(0.5) invert(0) contrast(1);
    opacity: 1;
}

.submit-btn {
    background: linear-gradient(135deg, var(--emerald-brand), var(--navy-brand));
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(94, 196, 146, 0.3);
}

.submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.submit-btn:hover::after {
    transform: translateX(100%);
}

.wrap-break-word {
    word-break: break-all;
    overflow-wrap: break-word;
}

/* Client Section Styles - Premium Modernization */
.clients-container {
    position: relative;
    z-index: 1;
}

/* Aurora Glow Backgrounds */
.aurora-glow {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    /* Prevent internal overflow */
}

@media (max-width: 768px) {
    .aurora-glow {
        width: 60vw;
        height: 60vw;
        filter: blur(80px);
    }
}

.glow-accent {
    top: -10%;
    right: 0;
    /* Align to edge to prevent overflow */
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

.glow-secondary {
    bottom: -10%;
    left: 0;
    /* Align to edge to prevent overflow */
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

/* Client Section Styles - Dark Neon Gallery Modernization */
.clients-container {
    position: relative;
    z-index: 1;
}

.client-item {
    background: rgba(29, 61, 106, 0.15);
    /* Dark Navy */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Removed Clean Pedestal as requested */
.client-item::before {
    display: none;
}

.client-item img {
    position: relative;
    z-index: 1;
    max-width: 100%;
    /* Increased for better presence */
    max-height: 250px;
    /* Increased from 140px */
    object-fit: contain;
    filter: brightness(1) opacity(1);
    /* Bright by default */
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-item:hover {
    background: rgba(29, 61, 106, 0.25);
    transform: translateY(-5px);
    border-color: rgba(0, 255, 242, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.client-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* Make dark text white while preserving colored logo elements */
.logo-text-white {
    filter: invert(1) hue-rotate(180deg) !important;
}

.logo-standard-size {
    max-width: 90% !important;
    max-height: 100vh !important;
}

.logo-brighten {
    filter: brightness(0) invert(1) !important;
}