@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

.gradient-text {
    background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-effect {
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.1);
}

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

@keyframes float {

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

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

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 1.5s ease-out forwards;
}

.fade-in-delay {
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
}

.fade-in-delay-2 {
    animation: fadeIn 1.5s ease-out forwards;
    animation-delay: 1s;
    opacity: 0;
}

.card-fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Projects Flip Card */
.project-flip-card {
    perspective: 1200px;
    height: 100%;
    min-height: 320px;
    position: relative;
}

.project-flip-inner {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    position: relative;
    height: 100%;
}

/* Desktop/tablet: flip on hover */
@media (min-width: 768px) {
    .project-flip-card:hover .project-flip-inner {
        transform: rotateY(180deg);
    }
}

.project-flip-front,
.project-flip-back {
    backface-visibility: hidden;
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid #27272a;
    height: 100%;
    width: 100%;
}

.project-flip-front {
    background: #0a0a0a;
    z-index: 2;
}

.project-flip-back {
    background: linear-gradient(135deg, #00d4ff22 0%, #8b5cf622 100%);
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mobile: flip when .flipped is present on the card */
@media (max-width: 767px) {
    .project-flip-card.flipped .project-flip-inner {
        transform: rotateY(180deg);
    }

    /* Tap indicator shown on mobile only */
    .tap-indicator {
        position: absolute;
        bottom: 0.75rem;
        right: 0.75rem;
        background: rgba(17, 17, 17, 0.8);
        border: 1px solid #27272a;
        color: #d1d5db;
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: 9999px;
        display: inline-flex;
        align-items: center;
        gap: 0.25rem;
        pointer-events: none;
    }
}

/* About Timeline */
.timeline {
    position: relative;
    margin-left: 0;
    padding-left: 0;
}

.timeline-step {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem; /* tighter space between dot and text */
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s, transform 0.8s;
}

.timeline-step.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-dot {
    position: static;
    width: 1.2rem;
    height: 1.2rem;
    background: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    border-radius: 50%;
    box-shadow: 0 0 10px #8b5cf6aa;
    border: 2px solid #222;
    flex: 0 0 1.2rem;
    margin-top: 0.15rem; /* align vertically with first line of text */
}

/* Ensure the text sits flush with the bullet (override any ml-4 in HTML) */
.timeline-step > span {
    margin-left: 0 !important;
    display: block;
}

/* Bases Pin Drop */
.base-drop-in {
    opacity: 0;
    transform: translateY(-60px) scale(0.8);
    transition: opacity 0.8s, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.base-drop-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Mobile adjustments */
@media (max-width: 767px) {

    /* Prevent hero title from shifting upward on small screens */
    .floating-animation {
        animation: none !important;
    }

    /* Disable card hover/glow effects on mobile */
    .card-hover {
        transition: none !important;
    }

    .card-hover:hover {
        transform: none !important;
    }

    .glow-effect {
        box-shadow: none !important;
    }

    .pulse-glow {
        animation: none !important;
    }

    /* Ensure Services section has no glow/pulse on mobile */
    #services .glow-effect {
        box-shadow: none !important;
    }

    #services .pulse-glow {
        animation: none !important;
    }
}