* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: #090612;
    color: #fff;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(9, 6, 18, 0.85);
    backdrop-filter: blur(10px);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
}

.logo {
    color: #a855f7;
    font-size: 26px;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #a855f7;
}

/* All Sections */
.section {
    min-height: 100vh;
    padding: 120px 8% 60px;
}

/* Home */
.home {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;

    background:
        radial-gradient(circle at 80% 50%, rgba(168, 85, 247, 0.25), transparent 35%),
        #090612;
}

.home-content {
    max-width: 600px;

    animation: slideLeft 1s ease forwards;
}

.home-content p {
    line-height: 1.7;
}

.home-content h1 {
    font-size: 60px;
    color: #a855f7;
    margin: 10px 0;
}

.home-content h2 {
    font-size: 30px;
    margin-bottom: 20px;
}

/* Profile Image */
.home-image {
    animation: floatImage 4s ease-in-out infinite;
}

.home-image img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #a855f7;

    box-shadow:
        0 0 20px #a855f7,
        0 0 60px rgba(168, 85, 247, 0.5);
}
/* Button */
.btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 28px;

    background: #a855f7;
    color: #fff;

    border-radius: 8px;
    text-decoration: none;

    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px #a855f7;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 40px;
    color: #a855f7;
    margin-bottom: 50px;
}

/* About */
.about-content {
    max-width: 800px;
    margin: auto;
    text-align: center;
    line-height: 1.8;
}

/* Skills */
.skills-container,
.projects-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-card,
.project-card {
    padding: 30px;
    background: #151020;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 15px;
    text-align: center;

    transition: 0.4s;
}

.skill-card:hover,
.project-card:hover {
    transform: translateY(-10px);
    border-color: #a855f7;
    box-shadow: 0 0 25px rgba(168, 85, 247, 0.5);
}

.skill-card h3,
.project-card h3 {
    color: #a855f7;
    margin-bottom: 15px;
}

/* Contact */
.contact {
    background: #090612;
}

.contact-form {
    max-width: 650px;
    margin: auto;

    display: flex;
    flex-direction: column;
    gap: 18px;

    padding: 35px;

    background: rgba(21, 16, 32, 0.8);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-radius: 20px;

    box-shadow: 0 0 30px rgba(168, 85, 247, 0.08);

    animation: contactUp 1s ease;
}

.contact-form input,
.contact-form textarea {
    width: 100%;

    padding: 16px 18px;

    background: #0d0817;
    color: white;

    border: 1px solid #302044;
    border-radius: 10px;

    outline: none;

    font-size: 15px;

    transition:
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        transform 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #888;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #a855f7;

    box-shadow:
        0 0 10px rgba(168, 85, 247, 0.4),
        0 0 25px rgba(168, 85, 247, 0.15);

    transform: translateY(-3px);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    align-self: center;

    padding: 13px 35px;

    border: none;
    cursor: pointer;

    transition: 0.4s ease;
}

.contact-form .btn:hover {
    transform: translateY(-5px) scale(1.03);

    box-shadow:
        0 0 15px #a855f7,
        0 0 35px rgba(168, 85, 247, 0.4);
}


/* Contact animation */

@keyframes contactUp {
    from {
        opacity: 0;
        transform: translateY(70px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    background: #151020;
}


/* =========================
   ANIMATIONS
========================= */

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(-80px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes floatImage {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0);
    }
}


/* Mobile */
@media (max-width: 768px) {

    .navbar {
        padding: 15px 5%;
    }

    .nav-links {
        gap: 12px;
        font-size: 13px;
    }

    .home {
        flex-direction: column;
        text-align: center;
    }

    .home-content h1 {
        font-size: 45px;
    }

    .home-image img {
        width: 220px;
        height: 220px;
    }

    .skills-container,
    .projects-container {
        grid-template-columns: 1fr;
    }
}

.section {
    opacity: 0;
    transform: translateY(80px);
    transition: opacity 1.5s ease, transform 1.58s ease;
}

.section.show {
    opacity: 1;
    transform: translateY(0);
}

/* Home প্রথম থেকেই visible থাকবে */
#home {
    opacity: 1;
    transform: translateY(0);
}

.about {
    background: #0d0817;
}

.about .section-title span {
    color: #fff;
}

.about-container {
    max-width: 1100px;
    margin: auto;

    display: grid;
    grid-template-columns: 1fr 1.3fr;
    align-items: center;
    gap: 80px;
}

.about-image {
    position: relative;
    width: 320px;
    height: 400px;
    margin: auto;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    border-radius: 25px;

    position: relative;
    z-index: 2;

    filter: grayscale(100%);

    transition: 0.5s ease;
}

.about-image:hover img {
    filter: grayscale(0%);
    transform: scale(1.03);
}

.image-glow {
    position: absolute;
    width: 100%;
    height: 100%;

    top: 20px;
    left: 20px;

    border-radius: 25px;

    background: #a855f7;

    filter: blur(35px);
    opacity: 0.35;
}

.about-content {
    max-width: 600px;
}

.about-label {
    color: #a855f7;
    letter-spacing: 4px;
    font-size: 13px;
    font-weight: bold;
}

.about-content h3 {
    font-size: 38px;
    line-height: 1.2;
    margin: 15px 0 20px;
}

.about-content h3 span {
    color: #a855f7;
}

.about-content p {
    color: #bdb7c8;
    line-height: 1.8;
    margin-bottom: 15px;
}

.about-stats {
    display: flex;
    gap: 18px;
    margin-top: 30px;
}

.stat {
    min-width: 110px;
    padding: 18px;

    background: #171022;
    border: 1px solid rgba(168, 85, 247, 0.25);

    border-radius: 12px;

    transition: 0.3s;
}

.stat:hover {
    transform: translateY(-7px);
    border-color: #a855f7;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.stat h4 {
    color: #a855f7;
    font-size: 25px;
}

.stat p {
    margin: 5px 0 0;
    font-size: 13px;
}

@media (max-width: 768px) {

    .about-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .about-image {
        width: 250px;
        height: 320px;
    }

    .about-content h3 {
        font-size: 30px;
    }

    .about-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
}


.skills .section-title span {
    color: #fff;
}

.skills-container {
    max-width: 1000px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-card {
    background: #151020;
    padding: 30px 25px;
    border-radius: 18px;
    text-align: center;

    border: 1px solid rgba(168, 85, 247, 0.2);

    transition: 0.4s ease;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.skill-card i {
    font-size: 55px;
    color: #a855f7;
    margin-bottom: 18px;

    transition: 0.4s;
}

.skill-card:hover i {
    transform: scale(1.15);
}

.skill-card h3 {
    margin-bottom: 15px;
}

.skill-card p {
    margin-top: 10px;
    color: #aaa;
}

.skill-bar {
    width: 100%;
    height: 7px;
    background: #292039;
    border-radius: 10px;
    overflow: hidden;
}

.skill-bar span {
    display: block;
    height: 100%;
    background: #a855f7;
    border-radius: 10px;

    animation: skillFill 1.5s ease;
}

@keyframes skillFill {
    from {
        width: 0;
    }
}

@media (max-width: 768px) {
    .skills-container {
        grid-template-columns: 1fr;
    }
}

.projects {
    background: #090612;
}

.projects .section-title span {
    color: #fff;
}

.projects-container {
    max-width: 1100px;
    margin: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.project-card {
    background: #151020;
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 18px;
    overflow: hidden;

    transition: 0.4s ease;
}

.project-card:hover {
    transform: translateY(-12px);
    border-color: #a855f7;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.4);
}

.project-image {
    width: 100%;
    height: 210px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.08);
}

.project-content {
    padding: 25px;
}

.project-content h3 {
    color: #a855f7;
    font-size: 23px;
    margin-bottom: 12px;
}

.project-content p {
    color: #bbb;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.project-tech span {
    padding: 6px 12px;
    background: #241936;
    color: #c084fc;
    border-radius: 20px;
    font-size: 12px;
}

.project-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.project-buttons .btn {
    margin-top: 0;
}

.github-btn {
    display: inline-block;
    padding: 12px 20px;

    color: #fff;
    border: 1px solid #a855f7;
    border-radius: 8px;
    text-decoration: none;

    transition: 0.3s;
}

.github-btn:hover {
    background: #a855f7;
}

@media (max-width: 900px) {
    .projects-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-container {
        grid-template-columns: 1fr;
    }
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #a855f7;
    border-radius: 50%;

    color: #a855f7;
    font-size: 20px;

    text-decoration: none;
    transition: 0.3s ease;
}

.social-links a:hover {
    background: #a855f7;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 0 20px #a855f7;
}


.animated-text {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 3px solid #a855f7;
  width: 0;
  animation: typing 1.5s steps(17, end) forwards,
             blink 0.4s step-end 4;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 17ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}