/* Animation */
@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes fade-bottom {
  0% {
    transform: translateY(50px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes fade-left {
  0% {
    transform: translateX(-10px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fade-right {
  0% {
    transform: translateX(20px);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Header animation */
@keyframes fade-up {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

header .navbar.animate {
    animation: fade-up 0.5s ease-in;
}

/* ToolTip */

.tooltip {
    line-height: 1rem;
    border-radius: .5rem !important;
}
.tooltip-inner {
    line-height: 1rem;
}
.tooltip .tooltip-arrow { 
    visibility: hidden !important;
}

/* hero */

#hero {
    min-height: 100vh;
    line-height: 2rem;
    max-width: 100%;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* Floating particles background */
#hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(74, 144, 226, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.05) 0%, transparent 50%);
    animation: float-particles 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes float-particles {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.7;
    }
}

#hero > * {
    position: relative;
    z-index: 1;
}

#hero .content.animate {
    animation: fade-left 1s ease-out;
}

#hero .hero-bottom-svg {
    opacity: 0.5;
    position: absolute;
    bottom: -50px;
    left: -150px;
}

#hero .subtitle {
    font-size: clamp(14px,5vw,16px);
    opacity: 0.6;
}

#hero h1 {
    font-size: clamp(40px, 8vw, 80px);
    color: var(--primary-color) !important;
    background: linear-gradient(135deg, var(--primary-color), #64b5f6, var(--primary-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-text 4s ease infinite;
}

@keyframes gradient-text {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

#hero h2 {
    font-size: clamp(40px, 8vw, 60px);
    opacity: 0.5;
    animation: fade-in 1.5s ease-out;
}

#hero p {
    margin: 20px 0px 0px;
    max-width: 640px;
    opacity: 0.8;
}

#hero .image img {
    box-shadow:0px 8px 56px rgba(15, 80, 100, 0.16);
    padding: 0;
    border: 3px solid var(--secondary-color);
    border-radius: 1rem;
    position: relative;
}

#hero .image.animate img {
    animation: fade-in 1s ease-out;
    transition: box-shadow 0.3s, transform 0.3s;
}

#hero .image img:hover {
    cursor: pointer;
}

#hero .image.animate img:hover {
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.4);
    filter: contrast(1.2);
    cursor: pointer;
    transform: translateY(-20px) scale(1.05) !important;
}

#hero a.btn.social-icon {
    color: var(--primary-color) !important;
    line-height: 0%;
    border-radius: 50%;
    margin-top: 50px;
    padding: 0.7rem;
    border: 1px solid var(--primary-color);
    transition: none;
}

#hero a.btn.social-icon img {
    width: 1em;
}

#hero a.btn.social-icon:hover {
    opacity: 0.8;
}

#hero a.btn {
    margin-top: 50px;
    padding: 0.7rem 1.75rem;
    border: 1px solid var(--primary-color);
    color: var(--text-color) !important;
    border-radius: .75rem;
    transition: none;
}

#hero a.btn:focus {
    box-shadow: none;
}

#hero a.btn:hover {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    opacity: 0.9;
}

#hero a.btn.social-icon:hover {
    background-color: var(--background-color) !important;
    opacity: 0.7;
}

#hero .hero-content > a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-link-color) !important;
}

#hero .hero-content > a::after {
    content: "";
    display: block;
    width: 0px;
    height: 2px;
    bottom: 0.37em;
    background-color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.645,0.045,0.355,1);
    opacity: 0.5;
}

#hero .hero-content > a:hover::after, #hero .hero-content > a:focus::after, #hero .hero-content > a:active::after {
    width: 100%;
}



/* about me */
#about {
    position: relative;
    z-index: 1;
    background-color: var(--background-color);
    padding-top: 3rem;
}

#about h3 {
    color: var(--text-secondary-color) !important;
    position: relative;
    display: inline-block;
}

/* Animated underline for section titles */
#about h3::after,
#experience h3::after,
#education h3::after,
#projects h3::after,
#achievements h3::after,
#contact h3::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #64b5f6);
    transition: width 0.6s ease;
}

#about.animate-in h3::after,
#experience.animate-in h3::after,
#education.animate-in h3::after,
#projects.animate-in h3::after,
#achievements.animate-in h3::after,
#contact.animate-in h3::after {
    width: 100%;
}

/* Animated Image Container */
#about .animated-image-container {
    position: relative;
    display: inline-block;
    padding: 40px;
    margin-right: 2rem;
}

/* Profile Image Styling */
#about .profile-image {
    position: relative;
    z-index: 10;
    box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
    transition: all 0.3s ease;
    padding: 0;
    border: 0;
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 50% !important;
    aspect-ratio: 1 / 1;
}

#about .profile-image:hover {
    box-shadow: 0 0 30px rgba(15, 80, 100, 0.3);
    transform: scale(1.05);
}

/* Additional styling to ensure perfect circular image */
#about .profile-image.img-thumbnail {
    border-radius: 50% !important;
    padding: 0 !important;
    border: none !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center;
}

#about .profile-image.rounded-circle {
    border-radius: 50% !important;
}

/* Ensure container doesn't interfere with image shape */
#about .animated-image-container .img-thumbnail {
    max-width: none;
    width: 250px;
    height: 250px;
}

/* Animated Circles */
.circle-animation {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
}

.circle-1 {
    width: 280px;
    height: 280px;
    border-color: var(--primary-color, #4a90e2);
    animation: pulse-circle 3s ease-in-out infinite;
    animation-delay: 0s;
}

.circle-2 {
    width: 320px;
    height: 320px;
    border-color: rgba(var(--primary-color-rgb, 74, 144, 226), 0.6);
    animation: rotate-circle 4s linear infinite;
    animation-delay: 0.5s;
    border-style: dashed;
}

.circle-3 {
    width: 360px;
    height: 360px;
    border-color: rgba(var(--primary-color-rgb, 74, 144, 226), 0.4);
    animation: pulse-circle 5s ease-in-out infinite reverse;
    animation-delay: 1s;
    border-width: 1px;
}

/* Keyframe Animations */
@keyframes pulse-circle {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.3;
    }
}

@keyframes rotate-circle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Floating dots animation */
#about .animated-image-container::before,
#about .animated-image-container::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color, #4a90e2);
    border-radius: 50%;
    animation: float-dots 6s ease-in-out infinite;
}

#about .animated-image-container::before {
    top: 20%;
    right: 15%;
    animation-delay: 0s;
}

#about .animated-image-container::after {
    bottom: 25%;
    left: 10%;
    animation-delay: 3s;
}

@keyframes float-dots {
    0%, 100% {
        transform: translateY(0px);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px);
        opacity: 1;
    }
}

/* Original image styles for compatibility */
#about .image img:not(.profile-image) {
    box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
    transition: box-shadow 0.3s;
    padding: 0;
    border: 0;
}

#about .image img:not(.profile-image):hover {
    box-shadow: 0 0 11px rgb(15 80 100 / 20%);
}

/* About section layout improvements */
#about .image {
    justify-content: center !important;
    padding-right: 2rem !important;
}

#about .content {
    padding-left: 1.5rem;
}

/* Responsive spacing adjustments */
@media (max-width: 991px) {
    #about .image {
        padding-right: 1rem !important;
        margin-bottom: 2rem;
    }
    
    #about .content {
        padding-left: 0;
        text-align: center;
    }
    
    #about .animated-image-container {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    #about .animated-image-container {
        margin-right: 0;
        padding: 20px;
    }
    
    #about .content {
        padding-left: 0;
    }
}

/* Enhanced animation for better performance */
@media (prefers-reduced-motion: reduce) {
    .circle-animation,
    #about .animated-image-container::before,
    #about .animated-image-container::after {
        animation: none;
    }
}

#about .image img {
    box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
    transition: box-shadow 0.3s;
    padding: 0;
    border: 0;
}

#about .image img:hover {
    box-shadow: 0 0 11px rgb(15 80 100 / 20%);
}

#about ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(140px, 200px));
    gap: 0px 10px;
    padding: 0px;
    margin: 20px 0px 0px;
    overflow: hidden;
    list-style: none;
}

#about ul li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
}

#about ul li::before {
    content: "▹";
    color: var(--primary-color);
    position: absolute;
    left: 0px;
}

#about .content {
    font-weight: 500;
    opacity: 0.9 !important;
    line-height: 1.7rem !important;
    padding-left: 1.5rem;
}

#about a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-link-color) !important;
}

#about a::after {
    content: "";
    display: block;
    width: 0px;
    height: 2px;
    bottom: 0.37em;
    background-color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.645,0.045,0.355,1);
    opacity: 0.5;
}

#about a:hover::after, #about a:focus::after, #about a:active::after {
    width: 100%;
}

/* experience */

#experience {
    position: relative;
}

#experience h3 {
    color: var(--text-secondary-color) !important;
    position: relative;
    display: inline-block;
}

#experience * {
    background-color: transparent !important;
}

#experience .tab-pane > * {
    opacity: 0.9;
}

#experience .tab-pane small {
    opacity: 0.8;
}

#experience .tab-pane ul {
    padding-top: 1%;
    padding-bottom: 1%;
}

#experience .experience-container .tab-content > .tab-pane p {
    padding: 1% 0;
    margin: 0;
}

#experience .experience-container {
    background-color: var(--secondary-color) !important;
    border-radius: .75rem;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 16%);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

#experience .experience-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(74, 144, 226, 0.1), 
        transparent);
    transition: left 0.5s ease;
}

#experience .experience-container:hover::before {
    left: 100%;
}

#experience .experience-container:hover {
    transform: translateY(-5px);
    box-shadow: 0px 15px 70px rgba(74, 144, 226, 0.25);
}

#experience .nav-item .nav-link {
    color: var(--text-color) !important;
    border-bottom: 2px solid transparent; 
    border-radius: 0%;
    transition: none;
    cursor: pointer;
}

#experience .nav-item .nav-link.active {
    color: var(--text-color) !important;
    border-bottom: 2px solid var(--primary-color); 
    opacity: 0.8;
}

#experience .nav-item .nav-link.active:hover { 
    transition: none !important;
}

#experience .nav-item .nav-link:hover {
    border-bottom: 2px solid var(--primary-color);
    opacity: 0.8;
}

#experience a {
    opacity: 0.9;
    display: inline-block;
    text-decoration: none;
    color: var(--text-link-color) !important;
}

#experience a::after {
    content: "";
    display: block;
    width: 0px;
    height: 2px;
    bottom: 0.37em;
    background-color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.645,0.045,0.355,1);
    opacity: 0.5;
}

#experience a:hover::after, #experience a:focus::after, #experience a:active::after {
    width: 100%;
}

#experience .experience-container .tab-content .tab-pane ul {
    overflow: hidden;
    list-style: none;
    margin-bottom: 0;
}

#experience .experience-container .tab-content .tab-pane ul li {
    position: relative;
    margin-bottom: 10px;
    padding-left: 20px;
}

#experience .experience-container .tab-content .tab-pane ul li::before {
    content: "▹";
    color: var(--primary-color);
    position: absolute;
    left: 0px;
}

#experience .experience-container .tab-content .tab-pane .featuredLink a::after {
    display: block;
    width: auto;
    height: auto;
    bottom: 0em;
    background-color: transparent;
    transition: none;
    opacity: 1;
}

#experience .experience-container .tab-content .tab-pane .featuredLink a.btn {
    border: 1px solid var(--primary-color);
    border-radius: .75rem;
    transition: none;
}

#experience .experience-container .tab-content .tab-pane .featuredLink a.btn:focus {
    box-shadow: none;
}

#experience .experience-container .tab-content .tab-pane .featuredLink a.btn:hover {
    color: var(--text-color) !important;
    opacity: 0.7;
}

/* Education */

#education {
    position: relative;
}

#education .container > h3 {
    color: var(--text-secondary-color) !important;
    position: relative;
    display: inline-block;
}

#education .row .index {
    opacity: 0.8;
    padding: 13px 20px;
    line-height: 0%;
    border-radius: 50%;
    max-height: 50px;
    z-index: 2;
    background-color: var(--primary-color) !important;
    color: var(--secondary-color) !important;
    font-weight: bold;
}

#education .card * {
    background-color: var(--secondary-color) !important;
}

#education .card {
    border-radius: 1.5rem;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 16%);
    border: 2px solid var(--text-secondary-color) !important;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border 0.3s ease;
    position: relative;
    overflow: hidden;
}

#education .card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#education .card:hover::before {
    opacity: 1;
    animation: rotate-gradient 3s linear infinite;
}

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

#education .card .card-body {
    border-radius: 1.5rem;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

@media all and (max-width:768px) {
    #education .card .card-body {
        padding: 2rem 1rem;
    }
}

#education .card:hover {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease,
                border 0.3s ease;
    box-shadow: 0 15px 50px rgba(74, 144, 226, 0.3);
    border: 2px solid var(--primary-color) !important;
    transform: translateY(-8px) scale(1.02);
}

#education .card .card-body .education-content a {
    color: var(--text-link-color) !important;
    text-decoration: none;
    opacity: 0.9;
}

#education .card .card-body > a h6 {
    display: inline-block;
    text-decoration: none;
    color: var(--text-link-color) !important;
}

#education .card .card-body > a h6::after {
    content: "";
    display: block;
    width: 0px;
    height: 2px;
    bottom: 0.37em;
    background-color: var(--primary-color);
    transition: all 0.25s cubic-bezier(0.645,0.045,0.355,1);
    opacity: 0.5;
}

#education .card .card-body > a h6:hover::after, #education .card .card-body > a h6:focus::after, #education .card .card-body > a h6:active::after {
    width: 100%;
}

#education .card .card-body a.btn {
    opacity: 0.9;
    border: 1px solid var(--primary-color) !important;
    color: var(--text-color) !important;
    border-radius: .75rem;
    box-shadow: none;
    transition: none;
}

#education .card .card-body a.btn:hover {
    opacity: 0.8;
}

/* achievements */

#achievements {
    position: relative;
}

#achievements a {
    text-decoration: none;
}

#achievements h3 {
    color: var(--text-secondary-color) !important;
    position: relative;
    display: inline-block;
}

#achievements .card {
    cursor: context-menu;
    background-color: var(--secondary-color) !important;
    border-radius: 1rem;
    box-shadow: 0 0 36px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

#achievements .card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 144, 226, 0.2), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

#achievements .card:hover::after {
    width: 500px;
    height: 500px;
}

#achievements a.card {
    cursor: alias;
}

#achievements .card h5 {
    color: var(--text-color) !important;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

#achievements .card:hover h5 {
    transform: translateY(-3px);
}

#achievements .card:hover {
    border: 2px solid var(--primary-color);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
                box-shadow 0.4s ease,
                border 0.3s ease;
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 50px rgba(74, 144, 226, 0.25);
}
#achievements .card:focus {
    border: 2px solid var(--primary-color);
    transition: .3s;
}

#achievements .card-text {
    background-color: var(--secondary-color) !important;
    color: var(--text-secondary-color) !important;
}

#achievements img {
    border-radius: 0.7rem;
}

/* contact */

#contact {
    position: relative;
}

#contact h3 {
    color: var(--text-secondary-color) !important;
    position: relative;
    display: inline-block;
}

#contact .btn {
    transition: transform 0.3s ease, 
                background-color 0.3s ease,
                box-shadow 0.3s ease;
    border-radius: .5rem !important;
    border-color: var(--primary-color) !important;
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    position: relative;
    overflow: hidden;
}

#contact .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
    z-index: -1;
}

#contact .btn:hover::before {
    width: 300px;
    height: 300px;
}

#contact .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.3);
    color: var(--secondary-color) !important;
}

#contact .btn:focus {
    box-shadow: none !important;
}

#contact form .form-control {
    background-color: var(--secondary-color);
    color: var(--text-color);
    border-radius: .7rem;
    border: 1px solid var(--text-secondary-color);
    box-shadow: 0px 8px 56px rgb(15 80 100 / 5%);
}

#contact-form-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 1;
    transform: translate3d(0, 0, 0);
}

#contact-form-status svg {
    height: 18px;
    width: 18px;
}

#contact-form-status button {
    border-radius: 50%;
    border: none;
    background-color: white;
    padding: 0.5rem;
    margin-left: 0.5rem;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 5%);
    font-size: .6rem !important;
}

#contact-form-status .alert {
    border-radius: 0.5rem;
    box-shadow: 0px 8px 56px rgb(15 80 100 / 5%);
    padding: .5rem 1rem;
}