@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    font-family: "Poppins", sans-serif;
}

:root {
    --bg-color: #1f242d;
    --second-bg-color: #323946;
    --main-color:#7cf03d;
    --white-color: #fff;
    --disabled-color: #fff3;
}

html {
    font-size: 62.5%;
}

body {
    color: var(--white-color);
}

main {
    width: 100%;
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 9%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white-color);
}

nav a {
    color: var(--white-color);
    font-size: 2rem;
    font-weight: 500;
    margin-left: 3.5rem;
    transition: .5s;
}

nav a:hover,
nav a.active {
    color: var(--main-color);
}

#menu-icon {
    display: none;
    font-size: 4rem;
}

section {
  position: static;
  width: 100%;
  min-height: 100vh;
  padding: 10rem 9% 2rem;
  background: var(--bg-color);
  visibility: visible;
  opacity: 1;
  overflow: visible;
  transition: none;
}

.home {
    display: flex;
    align-items: center;
    gap: 5rem;
}
.home-detail h1{
    font-size: clamp(3.5rem, 10vw, 5.5rem);
}
.home-detail h2 {
    display: inline-block;
    font-size: 3.2rem;
    margin-top: -1rem;
}
.home-detail h2 span{
    position: relative;
    display: inline-block;
    color: transparent;
    -webkit-text-stroke: .07rem var(--main-color);
    animation: display-text 16s linear infinite;
    animation-delay: calc(-4s * var(--i));
}
@keyframes display-text {
    25%, 100% {
        display: none;
    }
}
.home-detail h2 span::before {
    content: attr(data-text);
    position: absolute;
    width: 0;
    border-right: .2rem solid var(--main-color);
    color: var(--main-color);
    overflow: hidden;
    white-space: nowrap;
    animation: fill-text 4s linear infinite;
}
@keyframes fill-text {
    10%, 100% {
        width: 0;
    }
    70%, 90% {
        width: 100%;
    }
}

.home-detail p {
    font-size: 1.6rem;
    margin: 1rem 0 2.5rem;
}
.home-detail .btn-sci {
    display: flex;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 1rem 3rem;
    background: var(--main-color);
    border: .2rem solid var(--main-color);
    border-radius: 4rem;
    font-size: 1.6rem;
    color: var(--bg-color);
    font-weight: 500;
    transition: .5s;
}

.btn:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: none;
}

.home-detail .btn-sci .sci {
    margin-left: 2rem;
}
.home-detail .btn-sci .sci a {
    display: inline-flex;
    padding: .8rem;
    border: .2rem solid var(--main-color);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--white-color);
    margin: 0 .8rem;
    transition: .5s;
}
.home-detail .btn-sci .sci a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 1rem var(--main-color);
}
.home-img .img-box{
    position: relative;
    width: 32vw;
    height: 32vw;
    border-radius: 50%;
    padding: .5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.home-img .img-box::before,
.home-img .img-box::after {
    content: '';
    position: absolute;
    width: 50rem;
    height: 50rem;
    background: conic-gradient(transparent, transparent, transparent, var(--main-color));
    transform: rotate(0deg);
    animation: rotate-border 10s linear infinite;
}

.home-img .img-box::after {
    animation-delay: -5s;
}

@keyframes rotate-border{
    100% {
        transform: rotate(360deg);
    }
}

.home-img .img-box .img-item {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    border-radius: 50%;
    border: .01rem solid var(--bg-color);
    display: flex;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}
.home-img .img-box .img-item img {
    position: absolute;
    top: 3rem;
    display: block;
    width: 85%;
    object-fit: cover;
    mix-blend-mode: lighten;
}

/* About Section */
.about {
    padding: 10rem 9% 2rem;
    background: var(--second-bg-color);
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--white-color);
    margin-bottom: 1.5rem;
}

.section-title p {
    font-size: 1.6rem;
    color: var(--white-color);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-img .img-box {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    border: 0.2rem solid var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
}

.about-img .img-box .img-item {
    width: 100%;
    height: 100%;
}

.about-img .img-box .img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about .content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

.about .content ul li {
    margin-bottom: 1.5rem;
}

.about .content ul li i {
    font-size: 2rem;
    color: var(--main-color);
    margin-right: 1rem;
}

.about .content ul li strong {
    display: block;
    font-size: 1.6rem;
    color: var(--white-color);
    margin-bottom: 0.5rem;
}

.about .content ul li span {
    font-size: 1.4rem;
    color: var(--white-color);
}
/* Enhanced Hover Effects */
.btn:hover {
    transform: translateY(-0.3rem);
    box-shadow: 0 0.5rem 1.5rem rgba(124, 240, 61, 0.4);
}

nav a:hover {
    text-shadow: 0 0 1rem var(--main-color);
    transform: translateY(-0.2rem);
}

.home-detail .btn-sci .sci a:hover {
    transform: translateY(-0.3rem) scale(1.1);
}

/* Glowing Effects */
.logo {
    transition: text-shadow 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 1rem var(--main-color);
}

.section-title h2 {
    position: relative;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    height: 0.3rem;
    background: var(--main-color);
    box-shadow: 0 0 1rem var(--main-color);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    html {
        font-size: 55%;
    }
    
    .home-img .img-box {
        width: 40vw;
        height: 40vw;
    }
}

@media (max-width: 991px) {
    header {
        padding: 2rem 3%;
    }
    
    section {
        padding: 10rem 3% 2rem;
    }
    
    .home-img .img-box {
        width: 45vw;
        height: 45vw;
    }
}

@media (max-width: 768px) {
    #menu-icon {
        display: block;
    }
    
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 1rem 3%;
        background: var(--bg-color);
        border-top: .1rem solid rgba(0, 0, 0, .2);
        box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .2);
        display: none;
    }
    
    nav.active {
        display: block;
    }
    
    nav a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        text-align: center;
    }
    
    .home {
        flex-direction: column-reverse;
        gap: 3rem;
    }
    
    .home-img .img-box {
        width: 70vw;
        height: 70vw;
    }
    
    .home-detail {
        text-align: center;
    }
    
    .home-detail .btn-sci {
        justify-content: center;
    }
}

@media (max-width: 450px) {
    html {
        font-size: 50%;
    }
    
    .home-img .img-box {
        width: 90vw;
        height: 90vw;
    }
    
    .btn {
        padding: 0.8rem 2rem;
    }
}

/* Additional Glow Effects */
.home-img .img-box:hover::before,
.home-img .img-box:hover::after {
    animation: rotate-border 4s linear infinite, glow-border 2s ease-in-out infinite alternate;
}

@keyframes glow-border {
    from {
        box-shadow: 0 0 1rem var(--main-color);
    }
    to {
        box-shadow: 0 0 2.5rem var(--main-color);
    }
}

.about-img .img-box:hover {
    animation: glow-box 2s ease-in-out infinite alternate;
}

@keyframes glow-box {
    from {
        box-shadow: 0 0 1rem var(--main-color);
    }
    to {
        box-shadow: 0 0 3rem var(--main-color);
    }
}
/* Add these at the end of your existing CSS */

/* About Section Image Fix for Mobile */
@media (max-width: 768px) {
    .about-img .img-box {
        height: 300px;
        margin: 0 auto 3rem;
        width: 90%;
    }
}

@media (max-width: 450px) {
    .about-img .img-box {
        height: 250px;
    }
}

/* Certificates Section Hover Effects */
.certificates-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.certificate-box {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    border: 0.2rem solid var(--second-bg-color);
    transition: all 0.5s ease;
    height: 250px;
}

.certificate-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.certificate-box:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 2rem var(--main-color);
    transform: translateY(-0.5rem);
}

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

.certificate-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.8));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.certificate-box:hover::before {
    opacity: 1;
}

.certificate-box .certificate-info {
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: rgba(31, 36, 45, 0.9);
    z-index: 2;
    transition: bottom 0.5s ease;
}

.certificate-box:hover .certificate-info {
    bottom: 0;
}

/* Resume Section Hover Effects */
.resume-item {
    background: var(--second-bg-color);
    border-left: 0.3rem solid var(--second-bg-color);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.resume-item:hover {
    border-left-color: var(--main-color);
    transform: translateX(0.5rem);
    box-shadow: 0.5rem 0.5rem 1rem rgba(0,0,0,0.2);
}

.resume-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.5rem;
    height: 100%;
    background: var(--main-color);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s ease;
}

.resume-item:hover::before {
    transform: scaleY(1);
}

.resume-item h3 {
    position: relative;
    padding-left: 2rem;
}

.resume-item h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background: var(--main-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.resume-item:hover h3::before {
    background: var(--white-color);
    box-shadow: 0 0 0 0.3rem var(--main-color);
}

/* --- Resume Item Glow Effect --- */
.resume-item {
  position: relative;
  box-shadow: 0 0 0 rgba(124, 240, 61, 0);
  transition: box-shadow 0.4s, transform 0.3s;
}
.resume-item:hover {
  box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
  transform: translateX(0.5rem) scale(1.03);
  z-index: 2;
}
.resume-item:focus-within {
  box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
  transform: translateX(0.5rem) scale(1.03);
  z-index: 2;
}

@media (hover: none) and (pointer: coarse) {
  .resume-item.touch-hover {
    box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
    transform: translateX(0.5rem) scale(1.03);
    z-index: 2;
  }
}

@keyframes resume-glow {
  from {
    box-shadow: 0 0 1rem var(--main-color);
  }
  to {
    box-shadow: 0 0 2.5rem var(--main-color);
  }
}
.resume-item:hover,
.resume-item.touch-hover {
  animation: resume-glow 1.5s ease-in-out infinite alternate;
}
/* --- End Resume Item Glow Effect --- */

/* Responsive Adjustments for Certificates */
@media (max-width: 768px) {
    .certificates-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .certificate-box {
        height: 200px;
    }
}

@media (max-width: 450px) {
    .certificates-container {
        grid-template-columns: 1fr;
    }
    
    .certificate-box {
        height: 180px;
    }
}
/* Add these at the end of your existing CSS */

/* Skills Section Hover Effects */
.skill-item {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    padding: 1.5rem;
    border-radius: 0.8rem;
}

.skill-item:hover {
    background: rgba(124, 240, 61, 0.1);
    transform: translateY(-0.3rem);
    box-shadow: 0 0.5rem 1.5rem rgba(124, 240, 61, 0.2);
}

.skill-item:hover .progress-bar div {
    box-shadow: 0 0 1rem var(--main-color);
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0.5rem;
    height: 100%;
    background: var(--main-color);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.5s ease;
}

.skill-item:hover::before {
    transform: scaleY(1);
}

/* Certificates Section Hover Effects */
.certificate {
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
    border-left: 0.3rem solid transparent;
}

.certificate:hover {
    transform: translateY(-0.5rem);
    border-left-color: var(--main-color);
    box-shadow: 0 0.5rem 1.5rem rgba(124, 240, 61, 0.3);
}

.certificate:hover .btn {
    background: var(--bg-color);
    color: var(--main-color);
}

.certificate::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0.3rem;
    background: var(--main-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.certificate:hover::after {
    transform: scaleX(1);
}

.certificate h3 {
    position: relative;
    transition: color 0.3s ease;
}

.certificate:hover h3 {
    color: var(--main-color);
}

/* About Section Image Fix for Mobile */
@media (max-width: 768px) {
    .about .container {
        flex-direction: column;
    }
    
    .about-img, .content {
        flex: 1 1 100%;
        width: 100%;
    }
    
    .about-img {
        order: -1;
        margin-bottom: 3rem;
    }
    
    .about-img .img-box {
        height: 300px;
        margin: 0 auto;
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 450px) {
    .about-img .img-box {
        height: 250px;
    }
}

/* Responsive Adjustments for Skills and Certificates */
@media (max-width: 768px) {
    .skills-container, .certificates-container {
        grid-template-columns: 1fr;
    }
    
    .skill-item, .certificate {
        width: 100%;
    }
}

/* Animation for Skills Progress Bars */
@keyframes fill-progress {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width);
    }
}

.progress-bar div {
    position: relative;
    overflow: hidden;
}

.progress-bar div::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1s ease;
}

.skill-item:hover .progress-bar div::after {
    transform: scaleX(1);
}

/* --- Project Card Glow Effect --- */
.project-card {
  position: relative;
  box-shadow: 0 0 0 rgba(124, 240, 61, 0);
  transition: box-shadow 0.4s, transform 0.3s;
}
.project-card:hover {
  box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
  transform: translateY(-0.5rem) scale(1.03);
  z-index: 2;
}
.project-card:focus-within {
  box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
  transform: translateY(-0.5rem) scale(1.03);
  z-index: 2;
}

@media (hover: none) and (pointer: coarse) {
  .project-card.touch-hover {
    box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
    transform: translateY(-0.5rem) scale(1.03);
    z-index: 2;
  }
}

@keyframes project-glow {
  from {
    box-shadow: 0 0 1rem var(--main-color);
  }
  to {
    box-shadow: 0 0 2.5rem var(--main-color);
  }
}
.project-card:hover,
.project-card.touch-hover {
  animation: project-glow 1.5s ease-in-out infinite alternate;
}
/* --- End Project Card Glow Effect --- */

/* --- Unified Glow and Hover Effects for .resume-item, .project-card, .skill-item, .certificate --- */
.resume-item,
.project-card,
.skill-item,
.certificate {
  position: relative;
  box-shadow: 0 0 0 rgba(124, 240, 61, 0);
  transition: box-shadow 0.4s, transform 0.3s;
}
.resume-item:hover,
.resume-item.touch-hover,
.resume-item:focus-within,
.project-card:hover,
.project-card.touch-hover,
project-card:focus-within,
.skill-item:hover,
.skill-item.touch-hover,
skill-item:focus-within,
.certificate:hover,
.certificate.touch-hover,
certificate:focus-within {
  box-shadow: 0 0 2rem var(--main-color), 0 0 1rem var(--main-color);
  z-index: 2;
}
.resume-item:hover,
.resume-item.touch-hover,
resume_item:focus-within {
  transform: translateX(0.5rem) scale(1.03);
}
.project-card:hover,
project-card.touch-hover,
project-card:focus-within {
  transform: translateY(-0.5rem) scale(1.03);
}
.skill-item:hover,
.skill-item.touch-hover,
skill-item:focus-within {
  transform: translateY(-0.3rem) scale(1.03);
}
.certificate:hover,
.certificate.touch-hover,
certificate:focus-within {
  transform: translateY(-0.5rem) scale(1.03);
}
@keyframes unified-glow {
  from {
    box-shadow: 0 0 1rem var(--main-color);
  }
  to {
    box-shadow: 0 0 2.5rem var(--main-color);
  }
}
.resume-item:hover,
.resume-item.touch-hover,
.resume-item:focus-within,
.project-card:hover,
project-card.touch-hover,
project-card:focus-within,
.skill-item:hover,
.skill-item.touch-hover,
skill-item:focus-within,
.certificate:hover,
.certificate.touch-hover,
certificate:focus-within {
  animation: unified-glow 1.5s ease-in-out infinite alternate;
}
/* --- End Unified Glow and Hover Effects --- */
/* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
  }
  
  .chatbot-toggle {
    background: var(--main-color);
    color: var(--bg-color);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(124, 240, 61, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s, color 0.3s;
  }
  
  .chatbot-toggle:hover {
    background: transparent;
    color: var(--main-color);
    box-shadow: 0 0 1rem var(--main-color);
    transform: scale(1.1);
  }
  
  .chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--second-bg-color);
    border: 5px solid #323946;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
  }
  
  .chatbot-iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
  
  /* Active state */
  .chatbot-container.active .chatbot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .chatbot-window {
      width: 300px;
      height: 450px;
    }
  }
  
  @media (max-width: 480px) {
    .chatbot-container {
      bottom: 20px;
      right: 20px;
    }
    
    .chatbot-window {
      width: calc(100vw - 40px);
      right: -20px;
    }
  }
  /* Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chatbot-toggle {
    background: #323946;
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(84, 89, 128, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background: #323946;
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 600px; /* Adjusted height */
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chatbot-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Active state */
.chatbot-container.active .chatbot-window {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .chatbot-window {
        width: 350px;
        height: 500px;
    }
}

@media (max-width: 480px) {
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
    
    .chatbot-window {
        width: calc(100vw - 30px);
        right: 0;
        height: 70vh;
        bottom: 60px;
    }
}