html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.font-arca {
    font-family: 'Outfit', sans-serif;
}

.font-serif {
    font-family: 'Fraunces', serif;
}

.glass-header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav-link {
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.reveal.fade-only {
    transform: none !important;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

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

.float-animation {
    animation: float 4s ease-in-out infinite;
}

@keyframes bounce-slow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 5s ease-in-out infinite;
}

@keyframes scroll-line {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }

    50% {
        transform: scaleY(1);
        transform-origin: top;
    }

    50.1% {
        transform: scaleY(1);
        transform-origin: bottom;
    }

    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scroll-line 2.5s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

@keyframes scroll-right {
    0% {
        transform: translateX(-50%);
    }

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

.animate-scroll-right {
    animation: scroll-right 40s linear infinite;
}

@keyframes scroll-up {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.animate-scroll-up {
    animation: scroll-up 20s linear infinite;
}

.animate-scroll-up-slow {
    animation: scroll-up 30s linear infinite;
}

/* Revamped Portfolio Item */
.portfolio-item {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .portfolio-item {
        border-radius: 2rem;
    }
}

.portfolio-item:hover {
    border-color: rgba(255, 255, 255, 1);
    transform: scale(0.98);
}

.portfolio-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.2) 50%, transparent);
    transition: all 0.7s ease;
}

.portfolio-item:hover .portfolio-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.4) 60%, rgba(0, 0, 0, 0.2));
}

.portfolio-title {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 0.5rem;
    transition: transform 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

@media (min-width: 768px) {
    .portfolio-title {
        font-size: 2.25rem;
    }
}

.portfolio-item:hover .portfolio-title {
    transform: translateY(-1rem);
}

.portfolio-line {
    height: 1px;
    width: 0;
    background: rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    transition: width 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-line {
    width: 3rem;
}

.portfolio-explore {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: white;
    opacity: 0;
    transform: translateY(1rem);
    transition: all 0.7s cubic-bezier(0.2, 1, 0.3, 1);
}

.portfolio-item:hover .portfolio-explore {
    opacity: 1;
    transform: translateY(0);
}

/* Image Loading State */
.img-loading {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.img-loaded {
    opacity: 1;
}

.image-container-loading {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.image-container-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Circle Loader */
.circle-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loader-spin 0.8s linear infinite;
    z-index: 1;
}

@keyframes loader-spin {
    to { transform: rotate(360deg); }
}

/* Bubble UI Styles */
.bubble-ceo {
    width: 100px;
    height: 100px;
    z-index: 10;
}

@media (max-width: 768px) {
    .bubble-ceo {
        width: 60px;
        height: 60px;
    }
}

.bubble-co {
    width: 140px;
    height: 140px;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-top: -70px;
    margin-left: -70px;
}

@media (max-width: 768px) {
    .bubble-co {
        width: 90px;
        height: 90px;
        margin-top: -45px;
        margin-left: -45px;
    }
}

.bubble-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

@keyframes float-bubble {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(2px, -4px); }
    66% { transform: translate(-2px, 2px); }
}

.animate-float-bubble {
    animation: float-bubble 6s ease-in-out infinite;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}