/* Hand-Drawn Doodles and Elements - Ali Abdaal Style */

/* Doodle Animations */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes float-doodle {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-doodle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Doodle Container */
.doodle {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.doodle svg {
    animation: float-doodle 3s ease-in-out infinite;
}

/* Hero Doodles */
.hero {
    position: relative;
}

.hero-doodle-arrow {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 120px;
    opacity: 0.6;
}

.hero-doodle-star {
    position: absolute;
    top: 30%;
    left: 5%;
    width: 80px;
    opacity: 0.5;
    animation: wiggle 2s ease-in-out infinite;
}

.hero-doodle-underline {
    position: relative;
    display: inline-block;
}

.hero-doodle-underline::after {
    content: '';
    position: absolute;
    left: -5px;
    right: -5px;
    bottom: -10px;
    height: 15px;
    background: url("data:image/svg+xml,%3Csvg width='100%25' height='15' viewBox='0 0 300 15' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2,10 Q75,2 150,8 T298,10' stroke='%23FFD700' stroke-width='3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* Newsletter Box Doodles */
.newsletter-box {
    position: relative;
    overflow: visible;
}

.newsletter-doodle-1 {
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    opacity: 0.5;
}

.newsletter-doodle-2 {
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    opacity: 0.5;
}

/* Section Title Doodles */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='30' cy='30' r='25' stroke='%230066ff' stroke-width='2' fill='none' stroke-dasharray='5,5'/%3E%3Cpath d='M15,30 L25,40 L45,20' stroke='%230066ff' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.3;
}

/* Service Card Doodles */
.service-card {
    position: relative;
    overflow: visible;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5,20 L15,25 L20,35 L25,25 L35,20 L25,15 L20,5 L15,15 Z' stroke='%23FFD700' stroke-width='2' fill='none' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.4;
    animation: float-doodle 3s ease-in-out infinite;
}

/* Squiggly Underlines */
.squiggle-underline {
    position: relative;
    display: inline-block;
}

.squiggle-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 8px;
    background: url("data:image/svg+xml,%3Csvg width='100%25' height='8' viewBox='0 0 200 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2,4 Q10,2 20,4 T40,4 T60,4 T80,4 T100,4 T120,4 T140,4 T160,4 T180,4 T198,4' stroke='%230066ff' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-size: 100% 100%;
    opacity: 0.5;
}

/* Arrow Doodles */
.arrow-doodle {
    display: inline-block;
    margin-left: 10px;
    animation: wiggle 1.5s ease-in-out infinite;
}

/* Bubble Doodles */
.bubble-doodle {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px dashed #0066ff;
    opacity: 0.2;
    animation: float-doodle 4s ease-in-out infinite;
}

/* Work Card Doodles */
.work-card::after {
    content: '✨';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-card:hover::after {
    opacity: 0.6;
}

/* Hand-drawn Border Effect */
.hand-drawn-border {
    position: relative;
    border: none;
}

.hand-drawn-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: url("data:image/svg+xml,%3Csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' fill='none' stroke='%23000' stroke-width='2' stroke-dasharray='5,5' rx='8'/%3E%3C/svg%3E");
    border-radius: 8px;
    pointer-events: none;
}

/* Scribble Backgrounds */
.scribble-bg-1 {
    position: absolute;
    top: 50px;
    right: 100px;
    width: 150px;
    height: 150px;
    background: url("data:image/svg+xml,%3Csvg width='150' height='150' viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20,75 Q40,50 60,75 T100,75 Q120,90 130,75' stroke='%23FFD700' stroke-width='2' fill='none' opacity='0.2'/%3E%3Cpath d='M25,85 Q45,60 65,85 T105,85 Q125,100 135,85' stroke='%230066ff' stroke-width='2' fill='none' opacity='0.2'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

/* Highlight Marker Effect */
.marker-highlight {
    position: relative;
    display: inline;
    background: linear-gradient(180deg, transparent 60%, #FFD700 60%, #FFD700 90%, transparent 90%);
    padding: 0 4px;
}

/* Emoji Doodles */
.emoji-doodle {
    display: inline-block;
    font-size: 1.5rem;
    animation: wiggle 2s ease-in-out infinite;
}

/* Corner Doodles */
.corner-doodle-tl {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 50px;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5,45 Q5,5 45,5' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3Cpath d='M2,35 L12,38 L8,48' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.corner-doodle-br {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 50px;
    height: 50px;
    background: url("data:image/svg+xml,%3Csvg width='50' height='50' viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M45,5 Q45,45 5,45' stroke='%23000' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

/* Dotted Path */
.dotted-path {
    position: absolute;
    width: 100%;
    height: 2px;
    background: repeating-linear-gradient(
        to right,
        #0066ff 0,
        #0066ff 10px,
        transparent 10px,
        transparent 20px
    );
    opacity: 0.2;
}

/* Thought Bubble */
.thought-bubble {
    position: relative;
    background: white;
    border: 2px solid #000;
    border-radius: 20px;
    padding: 1rem;
}

.thought-bubble::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 30px;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #000;
    border-radius: 50%;
    border-top: none;
    border-right: none;
}

.thought-bubble::after {
    content: '';
    position: absolute;
    bottom: -25px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: white;
    border: 2px solid #000;
    border-radius: 50%;
    border-top: none;
    border-right: none;
}

/* Section Decorative Doodles */
.section-doodle-left {
    position: absolute;
    top: 100px;
    left: 5%;
    width: 100px;
    opacity: 0.4;
    animation: float-doodle 4s ease-in-out infinite;
}

.section-doodle-right {
    position: absolute;
    top: 150px;
    right: 5%;
    width: 120px;
    opacity: 0.4;
    animation: float-doodle 5s ease-in-out infinite;
}

/* Card Doodles */
.card-doodle {
    position: absolute;
    width: 60px;
    height: 60px;
    opacity: 0;
    transition: all 0.4s ease;
}

.exp-card:hover .card-doodle {
    opacity: 0.5;
}

.card-doodle-1 {
    top: -15px;
    right: -15px;
    animation: wiggle 2s ease-in-out infinite;
}

.card-doodle-2 {
    top: -15px;
    right: -15px;
    animation: spin-slow 8s linear infinite;
}

.card-doodle-3 {
    top: -15px;
    right: -15px;
    animation: pulse-doodle 2s ease-in-out infinite;
}

/* Mini arrow animation */
.mini-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.link-view:hover .mini-arrow {
    transform: translateX(5px);
}

/* Sparkle effect on cards */
.exp-card::after {
    content: '✨';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exp-card:hover::after {
    opacity: 0.7;
}

/* Responsive Doodles */
@media (max-width: 768px) {
    .hero-doodle-arrow,
    .hero-doodle-star,
    .newsletter-doodle-1,
    .newsletter-doodle-2,
    .scribble-bg-1,
    .section-doodle-left,
    .section-doodle-right {
        display: none;
    }

    .section-title::before {
        width: 40px;
        height: 40px;
        top: -30px;
    }
    
    .card-doodle {
        display: none;
    }
}
