/* --- Global Styles & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --main-color: #00ff95;
    --second-color: #00d4ff;
    --bg-color: #080808;
    --text-color: #fff;
    --card-bg: rgba(255, 255, 255, 0.05);
}

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

body {
    background: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

/* --- Background Video --- */
.back {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.2);
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 7%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.logo { font-size: 1.8rem; color: var(--main-color); }

.navbar a { 
    font-size: 1.1rem; 
    color: #fff; 
    margin-left: 2rem; 
    transition: 0.3s; 
}

.navbar a:hover, .navbar a.active { 
    color: var(--main-color); 
    text-transform: capitalize;
}

#menuicon { 
    font-size: 2.5rem; 
    display: none; 
    cursor: pointer; 
    color: var(--main-color);
}

/* --- Section General --- */
section { 
    min-height: 100vh; 
    padding: 10rem 7% 5rem; 
}

.heading { 
    font-size: 3.5rem; 
    text-align: center; 
    margin-bottom: 4rem; 
    text-transform: uppercase; 
}

.heading span { color: var(--main-color); }

/* --- Home Section --- */
.home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.home-content h1 {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1.1;
}

.home-content h3 {
    font-size: 2.2rem;
    margin: 1rem 0;
}

.home-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 2.5rem;
    color: #ccc;
}

.home-btns {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.btn {
    display: inline-block;
    padding: 1.2rem 2.8rem;
    background: var(--main-color);
    border-radius: 4rem;
    box-shadow: 0 0 10px var(--main-color);
    font-size: 1.2rem;
    color: var(--bg-color);
    letter-spacing: .1rem;
    font-weight: 600;
    transition: .5s ease;
}

.btn:hover {
    box-shadow: none;
    transform: scale(1.05);
}

.btn-outline {
    display: inline-block;
    padding: 1rem 2.8rem;
    border: 2px solid var(--main-color);
    border-radius: 4rem;
    color: var(--main-color);
    font-weight: 600;
    transition: 0.3s;
}

.btn-outline:hover {
    background: var(--main-color);
    color: #000;
}

/* Morphing Image Animation */
.img-box {
    width: 35vw;
    height: 35vw;
    min-width: 300px;
    min-height: 300px;
    background: var(--main-color);
    animation: morph 8s ease-in-out infinite;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    box-shadow: 0 0 30px var(--main-color);
}

.img-box img {
    width: 90%;
    filter: drop-shadow(0 0 10px #000);
}

@keyframes morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 30% / 50% 60% 30% 50%; }
}

/* --- Social Media --- */
.socialmedia {
    display: flex;
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.socialmedia a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    font-size: 22px;
    color: var(--main-color);
    transition: 0.5s ease;
}

.socialmedia a:hover {
    background: var(--main-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px var(--main-color);
    transform: translateY(-5px);
}

/* --- About Section --- */
.about-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6rem;
    max-width: 1200px;
    margin: 0 auto;
}

.about-img-box {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-img-box img {
    width: 85%;
    height: 85%;
    object-fit: cover;
    border-radius: 15px;
    border: 3px solid var(--main-color);
    z-index: 10;
}

.circlespin {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 4px solid transparent;
    border-top: 4px solid var(--main-color);
    border-bottom: 4px solid var(--main-color);
    animation: aboutSpin 6s linear infinite;
}

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

.about-content h3 { font-size: 2rem; color: var(--main-color); margin-bottom: 1rem; }
.about-content p { line-height: 1.8; margin-bottom: 2rem; font-size: 1.1rem; }

.education-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 3px solid var(--main-color);
    margin: 1.5rem 0;
}

.about-stats { display: flex; gap: 3rem; }
.stat-item span { display: block; font-size: 2.5rem; font-weight: 700; color: var(--main-color); }

/* --- Skills & Tech Stack --- */
.tech-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    padding-top: 2rem;
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    padding: 2.5rem 1rem;
    text-align: center;
    border-radius: 20px;
    transition: 0.4s ease;
    backdrop-filter: blur(10px);
}

.tech-card:hover {
    border-color: var(--main-color);
    transform: translateY(-10px);
    background: rgba(0, 255, 149, 0.05);
}

.tech-card i { font-size: 4rem; color: var(--main-color); margin-bottom: 1rem; }

/* Skills Progress Bars */
.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5rem;
}

.skills-column { flex: 1 1 40rem; }
.skills-box .skills-content {
    border: .2rem solid var(--main-color);
    border-radius: .6rem;
    padding: .5rem 1.5rem;
    margin-bottom: 2rem;
}

.skills-content .progress { padding: 1rem 0; }
.skills-content .progress h3 { display: flex; justify-content: space-between; font-size: 1.7rem; }
.skills-content .progress .bar {
    height: 2.5rem;
    border-radius: .6rem;
    border: .2rem solid var(--main-color);
    padding: .5rem;
    margin: 1rem 0;
}

.skills-content .progress .bar span {
    display: block;
    height: 100%;
    border-radius: .3rem;
    background: var(--main-color);
    transition: 2s cubic-bezier(1, 0, 0.5, 1);
}

/* --- Philosophy & Services --- */
.philosophy-container, .services-box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.phil-card, .service-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: 0.3s;
    backdrop-filter: blur(10px);
}

.phil-card:hover, .service-card:hover {
    border-color: var(--main-color);
    transform: translateY(-10px);
}

.phil-card i, .service-card i {
    font-size: 3.5rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

/* --- Projects Grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.project-detail-card {
    background: rgba(255,255,255,0.03);
    padding: 2rem;
    border-left: 4px solid var(--main-color);
    border-radius: 0 15px 15px 0;
    backdrop-filter: blur(5px);
}
/* --- Projects Gallery Section --- */
.projects-section {
    padding: 10rem 7% 5rem;
    background: var(--bg-color);
}

.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 30px;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.5);
}

.slide .web {
    width: 200px;
    height: 300px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 20px;
    background-position: center;
    background-size: cover;
    display: inline-block;
    transition: 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* The first two items are hidden/fullscreen background */
.slide .web:nth-child(1),
.slide .web:nth-child(2) {
    top: 0;
    left: 0;
    transform: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
}

/* Positioning the upcoming "cards" on the right */
.slide .web:nth-child(3) { left: 65%; }
.slide .web:nth-child(4) { left: calc(65% + 220px); }
.slide .web:nth-child(5) { left: calc(65% + 440px); }
.slide .web:nth-child(n + 6) { left: calc(65% + 660px); opacity: 0; }

/* Content inside the active (2nd) slide */
.web .content {
    position: absolute;
    top: 50%;
    left: 80px;
    width: 350px;
    text-align: left;
    color: #fff;
    transform: translateY(-50%);
    display: none; /* Hidden by default */
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: animate 1s ease-in-out 1 forwards;
}

.slide .web:nth-child(2) .content {
    display: block;
}

.content .name {
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--main-color);
    margin-bottom: 10px;
}

.content .des {
    font-size: 1.1rem;
    margin-bottom: 20px;
    line-height: 1.4;
    color: #eee;
}

@keyframes animate {
    from {
        opacity: 0;
        transform: translateY(100px);
        filter: blur(33px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%);
        filter: blur(0);
    }
}

/* --- Navigation Controls --- */
.nav-arrows {
    position: absolute;
    bottom: 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 25px;
    z-index: 100;
}

.nav-arrows button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--main-color);
    border: 1px solid var(--main-color);
    cursor: pointer;
    font-size: 22px;
    transition: 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.nav-arrows button:hover {
    background: var(--main-color);
    color: #000;
    box-shadow: 0 0 20px var(--main-color);
    transform: scale(1.1);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    .gallery-wrapper { height: 500px; }
    .web .content { left: 40px; width: 300px; }
    .content .name { font-size: 2.2rem; }
    .slide .web:nth-child(3) { left: 70%; }
    .slide .web:nth-child(n + 4) { display: none; } /* Hide extra cards on small screens */
}

@media (max-width: 600px) {
    .gallery-wrapper { height: 450px; }
    .web .content { 
        left: 20px; 
        right: 20px; 
        width: auto; 
        top: 40%;
    }
    .slide .web:nth-child(3) { display: none; } /* Only show the main active project */
}
.tech-stack {
    display: block;
    color: var(--main-color);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.project-detail-card ul li {
    list-style: none;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #ccc;
}

.project-detail-card ul li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--main-color);
}

/* --- Availability --- */
.availability { min-height: auto !important; padding: 5rem 7%; }
.avail-box {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 25px;
    border: 1px solid rgba(0, 255, 149, 0.2);
    text-align: center;
}

.status {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.pulse {
    width: 15px;
    height: 15px;
    background: var(--main-color);
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* --- Contact Form --- */
.contact form { max-width: 700px; margin: 0 auto; }
.input-box { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.contact form .item {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */

/* Tablets and Small Laptops */
@media (max-width: 991px) {
    header { padding: 1.5rem 4%; }
    section { padding: 8rem 4% 3rem; }
    .home, .about-container { flex-direction: column; text-align: center; }
    .home-content h1 { font-size: 4rem; }
    .home-content p { margin: 0 auto 2.5rem; }
    .about-stats { justify-content: center; }
    .img-box, .about-img-box { width: 300px; height: 300px; margin: 0 auto; }
}

/* Mobile Phones */
@media (max-width: 768px) {
    #menuicon { display: block; }
    .navbar {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(15px);
        transition: 0.4s;
        padding: 1rem 0;
    }
    .navbar.active { left: 0; }
    .navbar a { display: block; margin: 1.5rem 0; text-align: center; font-size: 1.2rem; }
    
    .home-content h1 { font-size: 3rem; }
    .home-btns { flex-direction: column; gap: 1rem; }
    .input-box { grid-template-columns: 1fr; }
    .heading { font-size: 2.5rem; }
    
    .skills-column .title { text-align: center; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .heading { font-size: 2.2rem; }
    .home-content h1 { font-size: 2.5rem; }
    .img-box, .about-img-box { width: 250px; height: 250px; }
}
