:root {
    --primary-gradient: linear-gradient(135deg, #6b6eff, #657af0);
    --secondary-gradient: linear-gradient(135deg, #5eabc2, #5db0d6);
    --accent-gradient: linear-gradient(135deg, #ffc107, #ff9800);
    --dark: #2d3436;
    --light: #ffffff;
    --bg-color: #f0f2f5;
}

html, body {
    width: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--dark);
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

.navbar {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s;
}

.navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--dark);
}

.navbar-toggler {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-weight: 700;
    color: var(--dark);
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    color: var(--dark);
    transition: color 0.3s;
}

.navbar-nav .nav-link:hover {
    color: #096900;
}

.gradient-header {
    background: var(--primary-gradient);
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.gradient-header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: var(--secondary-gradient);
    animation: gradientRotate 30s linear infinite;
    opacity: 0.4;
}

@keyframes gradientRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.gradient-header .container {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

.gradient-header h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gradient-header p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s 0.5s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-hero {
    background: var(--accent-gradient);
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    font-size: 1.2rem;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
    text-decoration: none;
}

.btn-hero:hover {
    transform: scale(1.1);
    background: #995656;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    color: var(--dark);
}

.section-title::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: var(--accent-gradient);
    border-radius: 5px;
}

#about {
    padding: 60px 0;
    background: var(--light);
}

.profile-img {
    width: 260px;
    height: 260px;
    border: 5px solid var(--light);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

.profile-img:hover {
    transform: scale(1.05);
}

#skills {
    padding: 90px 0;
    background: var(--light);
}

.icon-item {
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.icon-item img {
    width: 55px;
    height: 55px;
    margin-bottom: 8px;
    transition: transform 0.3s;
}

.icon-item:hover img {
    transform: scale(1.25);
}

.icon-item span {
    font-size: 0.95rem;
    font-weight: 500;
}

#projects {
    padding: 60px 0;
    background: #fafafa;
}

.flip-card {
    background: transparent;
    width: 100%;
    height: 450px;
    perspective: 1000px;
    margin: 0 auto;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

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

.flip-card-front,
.flip-card-back {
    position: relative;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
    background: var(--light);
}

.flip-card-back {
    background: var(--light);
    position: absolute;
    top: 0;
    left: 0;
    transform: rotateY(180deg);
    padding: 1rem;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.flip-card img {
    width: 100%;
    transition: transform 0.3s;
    object-fit: inherit;
}

.flip-card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.read-more-btn,
.flip-back-btn {
    margin-top: 10px;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

#skills .card {
    min-height: 350px;
}

#contact {
    padding: 60px 0;
    background: var(--light);
}

.contact-form .form-control {
    border-radius: 30px;
    padding: 15px 25px;
    border: 2px solid #ccc;
    transition: border-color 0.3s;
}

.contact-form .form-control:focus {
    border-color: var(--accent-gradient);
    box-shadow: none;
}

.btn-custom {
    background: var(--primary-gradient);
    border: none;
    color: #fff;
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s, background 0.3s;
}

.btn-custom:hover {
    transform: translateY(-5px);
    background: var(--accent-gradient);
}

footer {
    background: var(--dark);
    color: #fff;
    padding: 40px 0;
}

footer .social-icon {
    font-size: 24px;
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
}

footer .social-icon:hover {
    transform: translateY(-5px);
    color: var(--accent-gradient);
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background 0.3s, transform 0.3s;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 20px;
}

#backToTop:hover {
    background: var(--accent-gradient);
    transform: scale(1.1);
}