body {
    scroll-behavior: smooth;
    overflow-x: hidden;
    position: relative;
    background: linear-gradient(180deg, #1f2937, #111827);
}

#typing {
    position: relative;
    display: inline-block;
    white-space: nowrap;
}

#typing::after {
    content: "|";
    position: absolute;
    right: -12px;
    top: 3px;
    font-size: 1.6rem;
    animation: blink 0.5s step-end infinite, pulse-cursor 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.1; }
}

@keyframes pulse-cursor {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(1.4); }
}

.hero-content {
    animation: float-hero 7s ease-in-out infinite;
}

@keyframes float-hero {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(2deg); }
}

.skill-card {
    background: rgba(31, 41, 55, 0.9);
    border-radius: 1.5rem;
    padding: 3rem;
    text-align: center;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform-style: preserve-3d;
    transform: perspective(1500px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.skill-card:hover {
    transform: perspective(1500px) rotateX(10deg) rotateY(10deg) translateY(-20px) scale(1.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.skill-icon {
    width: 90px;
    height: 90px;
    border-radius: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 3rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateZ(30px);
}

.skill-card:hover .skill-icon {
    transform: translateZ(50px) scale(1.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.project-card {
    background: rgba(31, 41, 55, 0.9);
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transform-style: preserve-3d;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.project-image {
    height: 300px;
    perspective: 1500px;
}

.project-image img {
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.project-card:hover .project-image img {
    transform: scale(1.2) rotate(3deg);
}

.project-content {
    transform: translateZ(40px);
}

.service-card {
    background: rgba(31, 41, 55, 0.9);
    border-radius: 1.5rem;
    padding: 3.5rem 3rem;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -70%;
    left: -70%;
    width: 240%;
    height: 240%;
    background: linear-gradient(75deg, transparent, rgba(96, 165, 250, 0.3), transparent);
    transform: rotate(45deg);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
}

.service-card:hover::before {
    animation: shine-effect 2s;
    opacity: 1;
}

@keyframes shine-effect {
    0% { transform: rotate(45deg) translate(-50%, -50%); }
    100% { transform: rotate(45deg) translate(50%, 50%); }
}

.service-icon {
    width: 100px;
    height: 100px;
    border-radius: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 3rem;
    font-size: 3rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .service-icon {
    transform: rotateY(360deg) scale(1.2);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.testimonial-card {
    background: rgba(31, 41, 55, 0.9);
    border-radius: 1.5rem;
    padding: 3rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.testimonial-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #93c5fd);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

section {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

section.show {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-bottom {
    opacity: 0;
    transform: translateY(100px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.show .reveal-right, .show .reveal-left, .show .reveal-bottom {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

#back-to-top {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #93c5fd);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.5);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.5);
    animation: pulse-ring 2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    80% { transform: scale(1.7); opacity: 0; }
    100% { opacity: 0; }
}

input, textarea {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

input:focus, textarea:focus {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

.gradient-text {
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #93c5fd, #bfdbfe, #60a5fa);
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    animation: gradient-flow 5s linear infinite;
}

@keyframes gradient-flow {
    0% { background-position: 0% center; }
    100% { background-position: 400% center; }
}

.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
    max-height: 150vh;
}

.particles {
    z-index: -2;
}

.particle {
    position: absolute;
    background: linear-gradient(45deg, #60a5fa, #bfdbfe);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
    animation: float-particle 10s linear infinite;
}

@keyframes float-particle {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.9; }
    90% { opacity: 0.9; }
    100% { transform: translateY(-150vh) rotate(1440deg); opacity: 0; }
}

.glow-button {
    position: relative;
    overflow: hidden;
}

.glow-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -200%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-button:hover::before {
    left: 200%;
}

.social-icon {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.social-icon:hover {
    transform: translateY(-8px) scale(1.2);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
}

.profile-img::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    padding: 10px;
    background: linear-gradient(45deg, #3b82f6, #bfdbfe, #3b82f6);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: rotate-glow 6s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.profile-img:hover::before {
    opacity: 1;
}

@keyframes rotate-glow {
    100% { transform: rotate(360deg); }
}

.section-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    position: relative;
    overflow: hidden;
}

.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: divider-flow 3s linear infinite;
}

@keyframes divider-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple-effect 1.2s linear;
    pointer-events: none;
}

@keyframes ripple-effect {
    to { transform: scale(5); opacity: 0; }
}