@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --accent-color: #fd79a8;
    --bg-color: #0f0e17;
    --text-color: #fffffe;
    --card-bg: rgba(20, 20, 30, 0.8);
    --card-border: rgba(108, 92, 231, 0.2);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
    margin: 0;
    padding: 0;
    perspective: 1000px;
}

.rtl {
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
    text-align: right;
}

/* 3D Cube */
.scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2500px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(15, 14, 23, 0.5) 0%, var(--bg-color) 70%);
    contain: content;
    max-height: 100vh;
    z-index: 0;
}

.scene::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(108, 92, 231, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.scene::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(108, 92, 231, 0.1) 0%, transparent 20%),
        radial-gradient(circle at 80% 70%, rgba(0, 206, 201, 0.1) 0%, transparent 20%);
    pointer-events: none;
    z-index: -1;
    animation: scenePulse 8s infinite alternate ease-in-out;
}

@keyframes scenePulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cube__face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px 30px 60px;
    transform-style: preserve-3d;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.4s ease;
}

.cube__face::-webkit-scrollbar {
    width: 8px;
}

.cube__face::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 10px 0;
}

.cube__face::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.cube__face--front {
    transform: rotateY(0deg) translateZ(0px);
}

.cube__face--back {
    transform: rotateY(180deg) translateZ(0px);
}

.cube__face--right {
    display: none;
}

.cube__face--left {
    display: none;
}

.cube__face--top {
    display: none;
}

.cube__face--bottom {
    display: none;
}

.cube.show-persian {
    transform: rotateY(180deg);
}

/* Content Styling */
.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 50px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
    position: relative;
    min-height: calc(100vh - 120px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Profile Section */
.profile {
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.profile-image {
    margin: 0 auto 20px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
}

.avatar {
    font-size: 80px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.profile h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
}

/* Add new styles for name and intro */
.profile .name {
    font-size: 4.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 5px;
    font-weight: 900;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.profile .intro {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 500;
    color: #fff;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

/* Section Styling */
.about-section,
.skills-section,
.services-section,
.contact-section {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    position: relative;
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

.about-section::before,
.skills-section::before,
.services-section::before,
.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    border-radius: 15px;
    transform: translateZ(-50px);
    transition: opacity 0.6s, transform 0.6s;
    z-index: -1;
}

.about-section:hover,
.skills-section:hover,
.services-section:hover,
.contact-section:hover {
    transform: translateZ(10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(108, 92, 231, 0.3);
    transition: all 0.4s ease-out;
}

.about-section:hover::before,
.skills-section:hover::before,
.services-section:hover::before,
.contact-section:hover::before {
    opacity: 0.05;
    transform: translateZ(-20px) scale(1.05);
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    overflow: hidden;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.rtl h2::after {
    left: auto;
    right: 0;
}

h2:hover::after {
    width: 100%;
}

/* Skills Section */
.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.skill {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    transition: all var(--transition-speed);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-3px);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.skill i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: all 0.5s ease;
}

.skill:hover i {
    transform: translateY(-5px);
    color: var(--primary-color);
}

/* Services Section */
.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
    margin-top: 20px;
}

.service {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 300px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05) 0%, rgba(0, 206, 201, 0.05) 100%);
    border-radius: 15px;
    z-index: -1;
    transition: opacity 0.4s ease;
    opacity: 0;
}

.service:hover {
    transform: translateY(-8px) translateZ(20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(108, 92, 231, 0.15);
    border-color: rgba(108, 92, 231, 0.15);
}

.service:hover::before {
    opacity: 1;
}

.service i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    transition: all 0.4s ease;
}

.service:hover i {
    transform: translateY(-5px);
    color: var(--primary-color);
}

.service h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    transition: all 0.4s ease;
}

.service:hover h3 {
    transform: translateY(-3px);
    color: var(--primary-color);
}

.service p {
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.4s ease;
}

.service:hover p {
    transform: translateY(-2px);
}

/* Special styling for first two services (Telegram and Rubika) */
.service:nth-child(1),
.service:nth-child(2) {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.08) 0%, rgba(0, 0, 0, 0.05) 100%);
    border: 1px solid rgba(108, 92, 231, 0.1);
}

.service:nth-child(1):hover,
.service:nth-child(2):hover {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.12) 0%, rgba(0, 0, 0, 0.08) 100%);
    border-color: rgba(108, 92, 231, 0.2);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2), 0 0 20px rgba(108, 92, 231, 0.2);
}

.service:nth-child(1) i,
.service:nth-child(2) i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(108, 92, 231, 0.2);
}

/* Subtle glow for all sections on hover */
.about-section:hover,
.skills-section:hover,
.services-section:hover,
.contact-section:hover {
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.1), 0 0 15px rgba(0, 206, 201, 0.1);
    border-color: rgba(108, 92, 231, 0.1);
}

/* Contact Section */
.telegram-link {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #0088cc, #0099ff);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 50px;
    margin-top: 20px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    outline: none;
    box-shadow: 0 5px 15px rgba(0, 136, 204, 0.4);
}

.telegram-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 136, 204, 0.6);
}

.telegram-link i {
    margin-right: 10px;
    font-size: 1.2em;
}

.rtl .telegram-link i {
    margin-right: 0;
    margin-left: 10px;
}

/* Language Toggle */
.language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
    transition: all 0.4s ease;
}

.language-toggle button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-toggle button.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.language-toggle button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Particle Animation */
.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: var(--primary-color);
    border-radius: 50%;
    opacity: 0.5;
    animation: floatParticle 15s infinite linear;
}

.particle:nth-child(2n) {
    background-color: var(--secondary-color);
    width: 7px;
    height: 7px;
}

.particle:nth-child(3n) {
    background-color: var(--accent-color);
    width: 3px;
    height: 3px;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }

    100% {
        transform: translate(100px, 100px) rotate(360deg);
        opacity: 0.3;
    }
}

.particle:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-duration: 20s;
}

.particle:nth-child(2) {
    top: 20%;
    left: 80%;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    top: 30%;
    left: 20%;
    animation-duration: 16s;
}

.particle:nth-child(4) {
    top: 40%;
    left: 65%;
    animation-duration: 14s;
}

.particle:nth-child(5) {
    top: 50%;
    left: 30%;
    animation-duration: 22s;
}

.particle:nth-child(6) {
    top: 60%;
    left: 70%;
    animation-duration: 19s;
}

.particle:nth-child(7) {
    top: 70%;
    left: 20%;
    animation-duration: 21s;
}

.particle:nth-child(8) {
    top: 80%;
    left: 40%;
    animation-duration: 15s;
}

.particle:nth-child(9) {
    top: 10%;
    left: 60%;
    animation-duration: 23s;
}

.particle:nth-child(10) {
    top: 30%;
    left: 45%;
    animation-duration: 17s;
}

.particle:nth-child(11) {
    top: 70%;
    left: 90%;
    animation-duration: 24s;
}

.particle:nth-child(12) {
    top: 20%;
    left: 30%;
    animation-duration: 25s;
}

.particle:nth-child(13) {
    top: 80%;
    left: 20%;
    animation-duration: 18s;
}

.particle:nth-child(14) {
    top: 40%;
    left: 90%;
    animation-duration: 16s;
}

.particle:nth-child(15) {
    top: 90%;
    left: 80%;
    animation-duration: 20s;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .services {
        grid-template-columns: 1fr;
    }

    .profile h1 {
        font-size: 2.5rem;
    }

    .skills {
        justify-content: space-between;
    }

    .skill {
        min-width: 100px;
    }

    .scene {
        padding: 0;
    }

    /* Fix for mobile view */
    body {
        overflow-y: hidden;
    }

    .cube__face {
        padding: 20px 20px 80px;
        /* More padding at bottom for mobile */
    }

    .content {
        padding: 20px 15px 60px;
    }

    /* Adjust service cards for better mobile experience */
    .service {
        transform: translateZ(5px);
        /* Less extreme 3D effect on mobile */
    }

    .service:hover {
        transform: translateZ(20px);
        /* Less extreme hover effect on mobile */
    }

    /* Fix name size on mobile */
    .profile .name {
        font-size: 3.5rem;
    }

    .profile .intro {
        font-size: 1.5rem;
    }

    /* Make sure all service cards are the same height on mobile */
    .service {
        min-height: 250px;
        margin-bottom: 20px;
    }

    /* Fix RTL alignment on mobile */
    .rtl .service h3,
    .rtl .service p {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .profile h1 {
        font-size: 2rem;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .avatar {
        font-size: 60px;
    }

    .content {
        padding: 10px;
    }

    .about-section,
    .skills-section,
    .services-section,
    .contact-section {
        padding: 20px;
    }

    /* Add these additional small screen fixes */
    .profile .name {
        font-size: 2.8rem;
    }

    .profile .intro {
        font-size: 1.4rem;
    }

    .service {
        min-height: 200px;
        padding: 20px 15px;
    }

    .service i {
        font-size: 3rem;
        margin-bottom: 15px;
    }
}

/* Add 3D ring decorations to services */
.services .service:nth-child(1)::before,
.services .service:nth-child(2)::before,
.services .service:nth-child(3)::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s, transform 0.6s;
}

.services .service:nth-child(1)::before {
    border: 2px solid var(--primary-color);
    transform: translateZ(-20px) scale(1.05);
}

.services .service:nth-child(2)::before {
    border: 2px solid var(--secondary-color);
    transform: translateZ(-20px) scale(1.05);
}

.services .service:nth-child(3)::before {
    border: 2px solid var(--accent-color);
    transform: translateZ(-20px) scale(1.05);
}

.services .service:nth-child(1):hover::before,
.services .service:nth-child(2):hover::before,
.services .service:nth-child(3):hover::before {
    opacity: 0.3;
    transform: translateZ(-40px) scale(1.1);
}

/* Add special styling for Telegram and Rubika services */
/* First service card is Telegram */
.services .service:nth-child(1) {
    background: linear-gradient(135deg, rgba(0, 136, 204, 0.1), rgba(0, 153, 255, 0.1));
    border: 1px solid rgba(0, 136, 204, 0.2);
    transform: translateZ(8px);
}

.services .service:nth-child(1)::before {
    background: linear-gradient(135deg, #0088cc, #0099ff);
    opacity: 0.05;
}

.services .service:nth-child(1):hover {
    transform: translateZ(15px);
    border-color: rgba(0, 136, 204, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 20px rgba(0, 136, 204, 0.15);
}

.services .service:nth-child(1):hover::before {
    opacity: 0.15;
}

.services .service:nth-child(1) i {
    color: #0088cc;
    text-shadow: 0 0 15px rgba(0, 136, 204, 0.3);
}

.services .service:nth-child(1):hover i {
    transform: translateZ(20px) scale(1.1);
    color: #0099ff;
    text-shadow: 0 0 15px rgba(0, 136, 204, 0.4);
}

/* Second service card is Rubika */
.services .service:nth-child(2) {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(145, 130, 253, 0.1));
    border: 1px solid rgba(108, 92, 231, 0.2);
    transform: translateZ(8px);
}

.services .service:nth-child(2)::before {
    background: linear-gradient(135deg, #6c5ce7, #9182fd);
    opacity: 0.05;
}

.services .service:nth-child(2):hover {
    transform: translateZ(15px);
    border-color: rgba(108, 92, 231, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15), 0 0 20px rgba(108, 92, 231, 0.15);
}

.services .service:nth-child(2):hover::before {
    opacity: 0.15;
}

.services .service:nth-child(2) i {
    color: #6c5ce7;
    text-shadow: 0 0 15px rgba(108, 92, 231, 0.3);
}

.services .service:nth-child(2):hover i {
    transform: translateZ(20px) scale(1.1);
    color: #9182fd;
    text-shadow: 0 0 15px rgba(108, 92, 231, 0.4);
}

/* Add floating animation for Telegram and Rubika icons */
.services .service:nth-child(1) i,
.services .service:nth-child(2) i {
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateZ(8px) translateY(0);
    }

    50% {
        transform: translateZ(8px) translateY(-5px);
    }
}

/* Special text animation for Telegram and Rubika */
.services .service:nth-child(1) h3,
.services .service:nth-child(2) h3 {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

.services .service:nth-child(1) h3::after,
.services .service:nth-child(2) h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

.services .service:nth-child(1):hover h3::after,
.services .service:nth-child(2):hover h3::after {
    width: 100%;
}

/* Fix for RTL direction and ensure content fits properly */
.rtl .content {
    text-align: right;
    direction: rtl;
}

.rtl .service {
    text-align: center;
    direction: rtl;
}

.rtl .skills {
    direction: rtl;
}

.rtl .profile {
    direction: rtl;
}

.rtl .about-section p,
.rtl .skills-section p,
.rtl .services-section p,
.rtl .contact-section p {
    text-align: right;
}

/* Fix height issue that may cause black area at bottom */
html {
    height: 100%;
    overflow: hidden;
}

/* Ensure content is fully visible without cutoff */
.contact-section {
    margin-bottom: 30px;
}

/* Base animations and transitions */
*,
*::before,
*::after {
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.4s ease, box-shadow 0.4s ease, border-color 0.3s ease;
}

/* Improved button hover effects */
button,
.button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 1;
}

button::before,
.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

button:hover::before,
.button:hover::before {
    opacity: 1;
}

button:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
    color: white;
}

/* Smooth section transitions */
section {
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
}

/* Improved profile animations */
.profile:hover .name {
    text-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
    transform: translateY(-5px);
}

.profile:hover .intro {
    transform: translateY(-3px);
}

.profile:hover .avatar {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 15px 30px rgba(108, 92, 231, 0.3);
}

/* Improved animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Subtle animations for skill icons */
.skill i {
    transition: all 0.5s ease;
}

.skill:hover i {
    transform: translateY(-5px);
    color: var(--primary-color);
}

/* Smooth language toggle transitions */
.language-toggle {
    transition: all 0.4s ease;
}

.language-toggle button {
    transition: all 0.3s ease;
}

.language-toggle button.active {
    transform: scale(1.1);
}

/* Subtle page load animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.container {
    animation: fadeIn 0.6s ease-out;
}

/* Staggered animation for services */
.services {
    perspective: 1000px;
}

.service {
    animation: fadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.service:nth-child(1) {
    animation-delay: 0.1s;
}

.service:nth-child(2) {
    animation-delay: 0.2s;
}

.service:nth-child(3) {
    animation-delay: 0.3s;
}

.service:nth-child(4) {
    animation-delay: 0.4s;
}

/* Cube transition improvements */
.cube {
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cube__face {
    transition: opacity 0.4s ease;
}

/* Section entry animations */
.about-section,
.skills-section,
.services-section,
.contact-section {
    animation: fadeIn 0.8s ease-out;
    animation-fill-mode: both;
}

.skills-section {
    animation-delay: 0.1s;
}

.services-section {
    animation-delay: 0.2s;
}

.contact-section {
    animation-delay: 0.3s;
}

/* Animate section headers */
section h2 {
    position: relative;
    overflow: hidden;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
}

section:hover h2::after {
    width: 100%;
}