/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: #0f172a;
    color: #fff;
}

/* NAVBAR */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background: #020617;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* NAV LINKS */
.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    position: relative;
    transition: 0.3s;
}

/* Hover underline */
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}


.btn {
    display: inline-block;
    padding: 12px 25px;
    background: #38bdf8;
    color: #000;
    text-decoration: none;
    border-radius: 6px;
    transition: 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
}

/* SECTION */
section {
    padding: 80px 10%;
    scroll-margin-top: 80px;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* ================= EDUCATION TIMELINE ================= */
.timeline {
    position: relative;
    max-width: 900px;
    margin: auto;
    padding: 40px 0;
}

/* static center line */
.timeline::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: #1e293b;
    z-index: 0;
}

/* animated progress line */
.timeline-progress {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: #38bdf8;
    z-index: 0;
}

/* timeline item */
.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 40px;
}

/* alternating layout */
.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

/* timeline dot with icon */
.timeline-dot {
    position: absolute;
    top: 30px;
    width: 32px;
    height: 32px;
    background: #38bdf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #020617;
    font-size: 14px;
    box-shadow: 0 0 12px #38bdf8;
    z-index: 3;
    transition: 0.3s;
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -16px;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -16px;
}

/* glowing animation */
.timeline-item.active .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 20px #38bdf8;
}

/* timeline card */
.timeline-content {
    background: #020617;
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s;
    position: relative;
    z-index: 2;
    text-align: left;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

/* badges */
.edu-badges {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.edu-badges span {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid #38bdf8;
    color: #38bdf8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
}

/* mobile fallback */
@media(max-width:768px) {

    .timeline::before,
    .timeline-progress {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left;
        padding-left: 60px;
    }

    .timeline-dot {
        left: 12px !important;
        right: auto;
    }
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
}

.skills-grid div {
    background: #020617;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
}

.skills-grid div:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* PROJECTS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.project-card {
    background: #020617;
    padding: 20px;
    border-radius: 10px;
    transition: 0.3s;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    border-radius: 10px;
    transition: 0.4s;
}

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

/* CONTACT */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input,
textarea,
button {
    padding: 12px;
    border: none;
    border-radius: 6px;
}

button {
    background: #38bdf8;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px);
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: 0.3s;
}

/* Animation to X */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* MOBILE NAVBAR */
@media(max-width:768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background: #020617;
        flex-direction: column;
        width: 200px;
        display: none;
        padding: 10px 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px;
    }
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    max-width: 80%;
    max-height: 80%;
    border-radius: 10px;
    animation: zoomIn 0.3s ease;
}

.close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    cursor: pointer;
    color: white;
}

@keyframes zoomIn {
    from {
        transform: scale(0.6);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.nav-links a.active {
    color: #38bdf8;
}

.nav-links a.active::after {
    width: 100%;
}

#typing::after {
    content: "|";
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}


/* ================= PRELOADER ================= */
#preloader {
    position: fixed;
    inset: 0;
    background: #020617;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.8s ease, visibility 0.8s;
}

#welcomeText {
    font-size: 42px;
    color: #38bdf8;
    opacity: 0;
    animation: fadeText 1s ease forwards;
}

#welcomeText {
    font-family: 'Noto Sans Bengali', 'Noto Sans Devanagari', 'Poppins', sans-serif;
}

@keyframes fadeText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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


/* ================= HERO FINAL ================= */
.hero {
    min-height: 100vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    gap: 40px;

    background: linear-gradient(-45deg,
            #020617,
            #0f172a,
            #1e293b,
            #020617);
    background-size: 400% 400%;
    animation: gradientBG 12s ease infinite;

    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

/* spotlight layer */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 200px at var(--x, 50%) var(--y, 50%),
            rgba(56, 189, 248, 0.25),
            transparent 60%);
    pointer-events: none;
}

/* text */
.hero-left p {
    min-height: 28px;
    /* prevents collapsing */
    margin: 15px 0;
}

.hero-sub {
    font-size: 18px;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

.hero-left {
    flex: 1;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero h1 {
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    transition: transform 0.2s ease;
    transform-style: preserve-3d;
}

/* image */
.hero-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #38bdf8;
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.4);
    transition: 0.3s;
}

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

/* mobile */
@media(max-width:768px) {
    .hero {
        flex-direction: column-reverse;
        text-align: center;
    }

    .hero-img {
        width: 200px;
        height: 200px;
    }
}

/* ================= FOOTER ================= */
.footer {
    background: #020617;
    text-align: center;
    padding: 20px 10%;
    margin-top: 40px;
    border-top: 1px solid #1e293b;
}

.footer p {
    opacity: 0.7;
    font-size: 14px;
}

/* ================= FOOTER SOCIAL ================= */


.footer-social {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.footer-social a {
    color: #38bdf8;
    font-size: 20px;
    transition: 0.3s;
}

.footer-social a:hover {
    transform: translateY(-3px) scale(1.1);
    text-shadow: 0 0 12px #38bdf8;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: #38bdf8;
    width: 0%;
    z-index: 2000;
}

/* ================= HERO TECH ICONS ================= */

.hero-right {
    position: relative;
    align-items: center;
}

/* icon style */
.hero-tech {
    position: absolute;
    font-size: 26px;
    color: #38bdf8;
    background: #020617;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
    animation: float 4s ease-in-out infinite;
}

/* positions */
.tech-html {
    top: 10%;
    left: 10%;
}

.tech-css {
    top: 20%;
    right: 10%;
}

.tech-js {
    bottom: 20%;
    left: 15%;
}

.tech-python {
    bottom: 10%;
    right: 15%;
}

.tech-db {
    top: 50%;
    left: -20px;
}

.hero-tech:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px #38bdf8;
}

/* floating animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(6deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

@media(max-width:768px) {

    .hero-tech {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

}

/* hero buttons layout */
.hero-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.github-btn {
    background: #020617;
    color: #38bdf8;
    border: 1px solid #38bdf8;
}

.github-btn:hover {
    background: #38bdf8;
    color: #000;

}

.project-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.project-link {
    padding: 6px 12px;
    background: #0f172a;
    border: 1px solid #38bdf8;
    border-radius: 5px;
    text-decoration: none;
    color: #38bdf8;
    font-size: 14px;
    transition: 0.3s;
}

.project-link:hover {
    background: #38bdf8;
    color: #000;
}

/*Live button highlight */
.project-link.live {
    background: #38bdf8;
    color: #000;
}

.project-link.live:hover {
    background: #0ea5e9;
}

.project-content {
    padding: 15px;
}

.project-content h3 {
    margin-bottom: 8px;
}

.tech {
    font-size: 13px;
    color: #00f7ff;
    margin-bottom: 10px;
}

.project-links {
    margin-top: 10px;
}

.project-link {
    padding: 6px 12px;
    border: 1px solid #00f7ff;
    border-radius: 6px;
    text-decoration: none;
    margin-right: 8px;
    transition: 0.3s;
}

.project-link:hover {
    background: #00f7ff;
    color: black;
}

.project-link.live {
    border-color: #00ff88;
}

.project-link.live:hover {
    background: #00ff88;
}


.contact-container {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.contact-info {
    flex: 1;
    min-width: 250px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.05);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.input-group {
    margin-bottom: 15px;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border: none;
    outline: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.input-group textarea {
    height: 120px;
    resize: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border: 1px solid #00f7ff;
}

button {
    width: 100%;
    padding: 12px;
    border: none;
    background: linear-gradient(45deg, #00f7ff, #0077ff);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    transform: scale(1.05);
}

#form-status {
    margin-top: 10px;
    font-size: 14px;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.skill-category {
  background: rgba(255,255,255,0.05);
  padding: 15px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
}

.skill {
    margin-bottom: 15px;
}

.skill span {
    display: block;
    margin-bottom: 5px;
}

.bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #00f7ff, #0077ff);
    width: 0;
    transition: 1s ease;
}

/* Skill Levels */
.progress.html {
    width: 90%;
}

.progress.css {
    width: 85%;
}

.progress.js {
    width: 65%;
}

.progress.python {
    width: 80%;
}

.progress.flask {
    width: 70%;
}

.progress.java {
    width: 75%;
}

.progress.git {
    width: 75%;
}

.progress.mysql {
    width: 70%;
}

.progress.oop {
    width: 80%;
}

.progress.dbms {
    width: 75%;
}

.progress.os {
    width: 65%;
}

.progress.cn {
    width: 55%;
}

.skill:hover {
    transform: scale(1.03);
}

.skill span {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.skill i {
    font-size: 18px;
    transition: 0.3s;
}

/* Hover effect */
.skill:hover i {
    transform: scale(1.2);
}

/* Category icon spacing */
.skill-category h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}
.skill-category h3 i {
  color: #00f7ff;
  margin-right: 8px;
}

.progress.java {
    background: linear-gradient(90deg, #f89820, #007396);
}

.skill span {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tag {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 8px;
}

/* Levels */
.tag.beginner {
  background: #ff4d4d;
  color: white;
}

.tag.intermediate {
  background: #ffaa00;
  color: black;
}

.tag.advanced {
  background: #00ff88;
  color: black;
}
.skill span {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.skill span {
  display: flex;
  align-items: center;
  gap: 10px;
}

.skill span i {
  color: #00f7ff;
  font-size: 16px;
  transition: 0.3s;
}
.skill span i {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.skill:hover span i {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px #00f7ff);
}
.skill span i {
  color: #00f7ff;
}

.skill:hover span i {
  color: #ffffff;
}



.skill {
  position: relative;
  overflow: hidden;
}
.skill::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  background: rgba(0, 247, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  left: 50%;
  top: 50%;
  opacity: 0;
  transition: width 0.5s ease, height 0.5s ease, opacity 0.5s;
}


.skill::before {
  pointer-events: none;
  z-index: 0;
}

.skill * {
  position: relative;
  z-index: 1;
}
.skill:hover::before {
  width: 320px;
  height: 320px;
  opacity: 1;
}