.about-me {
    position: relative;
    display: flex;
    width: 100%;
    height: 80vh;
    overflow: hidden;
    font-family: sans-serif;
    color: #fff;

    background: linear-gradient(135deg, #1e1e1e, #084e94);
    background-repeat: no-repeat;
    background-size: 100% auto, 100% 100%;
}

.about-me::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4vh;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0));
    z-index: 5;
}

.about-me .about-text {
    flex: 0 0 42.5%;
    max-width: 50%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-text h1 {
    font-size: 5rem;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

.about-text ul {
    list-style: none;
    padding: 0;
}

.about-text li {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.about-me .about-image {
    flex: 0 0 auto;
    width: 50%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background-color: #1e1e1e;
    clip-path: polygon(15% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.about-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(calc(15% + 16px) 0%, 100% 0%, 100% 100%, 16px 100%);
    transition: transform 0.3s ease;
}

/* Overlay container */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* vertically center the text */
    pointer-events: none;
    /* allow clicks only on hover */
    opacity: 0;
    transition: opacity 0.4s ease;
    text-decoration: none;
}

.image-overlay span {
    position: relative;
    z-index: 2;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
}

/* Gradient background */
.image-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    /*background: linear-gradient(137.48deg,
          rgba(255, 219, 59, 0.4) 10%,
          rgba(254, 83, 187, 0.45) 45%,
          rgba(143, 81, 234, 0.5) 67%,
          rgba(0, 68, 255, 0.55) 87%);*/
    background: rgba(255, 200, 0, 0.6);
    z-index: 1;
}

/* Hover effect */
.about-image:hover img {
    transform: scale(1.05);
}

.about-image:active img {
    transform: scale(0.95);
}

.about-image:hover .image-overlay {
    opacity: 1;
    pointer-events: auto;
}





.keywords {
    display: flex;
    /*justify-content: center;*/
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.keyword {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 12rem;
    height: 3rem;
    background: #212121;
    border-radius: 5rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.25s ease;
    overflow: visible;
    z-index: 0;
}

.keyword::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 5rem;
    padding: 4px;
    background: linear-gradient(137.48deg,
            #ffdb3b 10%,
            #fe53bb 45%,
            #8f51ea 67%,
            #0044ff 87%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.keyword:hover {
    transform: scale(1.08);
}

.keyword:hover::before {
    opacity: 1;
}

#popup {
    position: absolute;
    display: none;
    max-width: 25%;
    background: #1e1e1e;
    color: #fff;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

#popup::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-style: solid;
    border-color: #1e1e1e transparent transparent transparent;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popup-item {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 10px 14px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.popup-item h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #fff;
}

.popup-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #bfbfbf;
}



.scrolling-languages {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    padding: 1rem 0;
    background: #1e1e1e;
    border-radius: 1rem;
}

/* Fading edges */
.scrolling-languages::before,
.scrolling-languages::after {
    content: "";
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.scrolling-languages::before {
    left: 0;
    background: linear-gradient(to right, #1e1e1e 0%, transparent 100%);
}

.scrolling-languages::after {
    right: 0;
    background: linear-gradient(to left, #1e1e1e 0%, transparent 100%);
}

.scrolling-content {
    display: inline-block;
    animation: scroll-left 30s linear infinite;
}

.scrolling-content span {
    display: inline-block;
    margin: 0 1.5rem;
    font-size: 3rem;
    font-weight: bold;
    color: white;
}

@keyframes scroll-left {
    from {
        transform: translateX(0%);
    }

    to {
        transform: translateX(-50%);
    }
}


@media (max-width: 768px) {
  .about-me {
    flex-direction: column;
    height: auto;
  }

  .about-me .about-text {
    max-width: 100%;
    flex: none;
    padding: 32px 20px;
    text-align: center;
  }

  .about-me .about-image {
    width: 100%;
    flex: none;
    height: 50vh;
    clip-path: none;
  }

  .about-image img {
    clip-path: none;
  }
}
