@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom styles that can't be easily achieved with Tailwind */
.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.fade-in.appear {
    opacity: 1;
}

/* Parallax effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Typing animation */
.typing-animation::after {
    content: '|';
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Floating animation for skill cloud */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}


/* Card flip animation */
.card-flip {
    perspective: 1000px;
    background-color: transparent;
    width: 100%;
    height: 400px;
    /* Increased overall card height */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s, box-shadow 0.3s;
    transform-style: preserve-3d;
    border-radius: 0.5rem;
}

.card-flip:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 0.5rem;
    overflow: hidden;
}

.card-front {
    background-color: #fff;
    color: black;
    display: flex;
    flex-direction: column;
}

.card-back {
    background-color: #3b82f6;
    color: white;
    transform: rotateY(180deg);
}

.card-image {
    width: 100%;
    height: 75%;
    /* Increased to take up more space */
    object-fit: cover;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Progress bar animation */
.progress-bar {
    width: 0;
    transition: width 1s ease-in-out;
}


/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Add some depth to sections */
.section-depth {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Enhance button hover effect */
.button-hover {
    transition: all 0.3s ease;
}

.button-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}