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

html {
    scroll-behavior: smooth;
}

/* Custom Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0c002b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #8a2be2, #4b0082);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #9b3eff, #5c00a3);
}

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

body {
    color: #fff;
    line-height: 1.6;
    background: #0c002b url('../img/bg-main-2.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

/* Preloader Styling */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0c002b;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: opacity 0.8s ease-out; /* For final fade-out */
}

.preloader-content {
    opacity: 1; /* Start visible to allow inner animations */
}

.preloader .final-icons {
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
    justify-content: center;
}

.preloader .final-icons i {
    font-size: 28px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid #8a2be2;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards;
}

/* Staggered animation for icons */
.preloader .final-icons i:nth-child(1) { animation-delay: 0.2s; }
.preloader .final-icons i:nth-child(2) { animation-delay: 0.4s; }
.preloader .final-icons i:nth-child(3) { animation-delay: 0.6s; }

.preloader .final-title h1 {
    font-size: 42px;
    line-height: 1.3;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards 0.8s;
}

.preloader .final-title span {
    color: #8a2be2;
}

.preloader .final-url {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s forwards 1s;
}

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

/* Main Content Styling (Initially Hidden) */
.main-content {
    display: none; /* Hidden by default, shown with JS */
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background: radial-gradient(circle at top left, #3a1c71, #0c002b 40%);
    min-height: 100vh;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 5%; /* Adjusted padding to move logo left */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.navbar a {
    font-size: 18px;
    color: #fff;
    text-decoration: none;
    margin-left: 35px;
    transition: .3s;
}

.navbar a:hover,
.navbar a.active {
    color: #8a2be2;
}

/* Home Section */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
}

.home-content {
    max-width: 600px;
}

.home-content .tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid #8a2be2;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Main Headings Gradient */
.home-content h1,
.about-header h2,
.portfolio-header h2,
.contact h2 {
    background: linear-gradient(90deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.home-content h1 {
    font-size: 78px;
    font-weight: 700;
    line-height: 1.2;
}

.home-content h3 {
    font-size: 28px;
    font-weight: 500;
    margin: 10px 0;
}

.home-content p {
    font-size: 16px;
    margin: 20px 0;
    max-width: 450px;
}

.tech-stack {
    margin: 20px 0;
}

.button-box {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-top: 30px;
}

.button-box .btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 100%;
    background: #8a2be2;
    border: 2px solid #8a2be2;
    border-radius: 8px;
    font-size: 19px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 1px;
    margin-right: 15px;
    transition: .5s;
}

.button-box .btn:hover {
    background: transparent;
    color: #8a2be2;
}

.social-icons {
    margin-top: 30px;
}

.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 20px;
    color: #fff;
    text-decoration: none;
    margin-right: 15px;
    transition: .5s;
}

.social-icons a:hover {
    background: #8a2be2;
    color: #fff;
    border-color: #8a2be2;
}

.home-img {
    margin-left: auto;
}

.home-img .hero-image {
    max-width: 450px;
    opacity: 0.9;
    border-radius: 10px;
}

/* General Section Styling */
section {
    padding: 80px 10% 40px;
}

/* About Section */
.about {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.about-header h2 {
    font-size: 42px;
}

.about-header p {
    font-size: 18px;
    color: #bdbdbd;
}

.about-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
    text-align: left;
    width: 100%;
}

.about-text h3 {
    font-size: 24px;
    font-weight: 500;
}

.about-text h2 {
    font-size: 48px;
    font-weight: 700;
    color: #8a2be2;
    margin-bottom: 10px;
}

.about-text p {
    font-size: 16px;
    max-width: 500px;
    margin-bottom: 30px;
}

.btn-outline {
    display: inline-block;
    padding: 12px 28px;
    background: transparent;
    border: 2px solid #fff;
    border-radius: 40px;
    font-size: 16px;
    color: #fff;
    letter-spacing: 1px;
    text-decoration: none;
    font-weight: 600;
    transition: all .3s;
}

.btn-outline:hover {
    background: #fff;
    color: #0c002b;
}

.about-image img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #8a2be2;
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.7);
}

.stats-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 60px;
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    width: 30%;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-card i {
    font-size: 40px;
    color: #8a2be2;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
}

.stat-info p {
    font-size: 16px;
    font-weight: 500;
}

.stat-info span {
    font-size: 12px;
    color: #bdbdbd;
}

/* Portfolio Section */
.portfolio {
    text-align: center;
}

.portfolio-header h2 {
    font-size: 42px;
}

.portfolio-header p {
    font-size: 18px;
    color: #bdbdbd;
    margin-bottom: 30px;
}

.portfolio-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

/* New Portfolio Tab Button Styles */
.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: #bdbdbd; /* Inactive color */
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px; /* Rounded corners for the active block */
    transition: all 0.3s ease;
}

.tab-btn i {
    font-size: 20px;
}

.tab-btn:hover {
    color: #fff; /* Hover color for inactive buttons */
}

.tab-btn.active {
    background: #6366f1; /* The block background */
    color: #fff; /* White text on active */
    font-weight: 600;
}

.tab-btn:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.portfolio-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: left;
    transition: transform .3s, box-shadow .3s;
}

.portfolio-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.portfolio-card img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

.portfolio-card h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.portfolio-card p {
    font-size: 14px;
    color: #bdbdbd;
    margin-bottom: 20px;
}

.portfolio-card .project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #4a5568;
    margin-bottom: 25px;
}

.portfolio-card .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.portfolio-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: rgba(138, 43, 226, 0.7);
    border-radius: 20px;
    font-size: 14px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: all .3s ease;
}

.card-link:hover {
    color: #8a2be2;
}

/* New Details Button Styling */
.details-btn {
    background: #6366f1;
    color: #fff !important; /* Use important to override other color rules */
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
}

.details-btn:hover {
    background: transparent;
    color: #6366f1 !important; /* Use important to override other hover effects */
    border-color: #6366f1;
}

.card-link:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* Portfolio Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Certificate Card */
.certificate-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.certificate-card img {
    width: 100%;
    display: block;
    transition: transform .3s;
}

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

/* Tech Stack Grid */
.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-align: center;
    transition: transform 0.3s ease;
}

.tech-item:hover {
    transform: translateY(-5px);
}

.tech-item img {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.tech-item span {
    font-size: 14px;
    font-weight: 500;
    color: #bdbdbd;
}

/* Contact Section */
.contact {
    text-align: center;
}

.contact-header h2 {
    font-size: 42px;
}

.contact-header p {
    font-size: 18px;
    color: #bdbdbd;
    margin-bottom: 40px;
}

.contact-container {
    display: flex;
    gap: 40px;
    text-align: left;
}

.contact-form-container, .contact-comments-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form-container h3, .contact-comments-container h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.contact-form-container p {
    color: #bdbdbd;
    margin-bottom: 20px;
}

.contact-form input, .contact-form textarea, .comment-form input, .comment-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    color: #fff;
    font-size: 16px;
}

.contact-form input::placeholder, .contact-form textarea::placeholder, .comment-form input::placeholder, .comment-form textarea::placeholder {
    color: #bdbdbd;
}

.contact-form .btn, .comment-form .btn {
    position: relative;
    width: 100%;
    border: none;
    border-radius: 8px;
    background: #8a2be2;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 50px;
}

.contact-form .btn:hover, .comment-form .btn:hover {
    background: #7a1dd1;
    box-shadow: 0 0 25px rgba(138, 43, 226, 0.4);
    transform: translateY(-2px);
}

.contact-form .btn:active, .comment-form .btn:active {
    transform: scale(0.97);
    background: #691bb0;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.5);
    transition: transform 0.1s ease;
}

.comment-upload {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
}

.comment-upload label {
    cursor: pointer;
    padding: 8px 12px;
    background: #8a2be2;
    border-radius: 5px;
    transition: .3s;
}

.comment-upload label:hover {
    background: #7a1dd1;
}

.comment-upload span {
    font-size: 12px;
    color: #bdbdbd;
}

/* Project Detail View */
.project-detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #0c002b;
    z-index: 1100;
    overflow-y: auto;
    padding: 40px 10%;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
}

.project-detail-container .tech-stack ul li:hover {
    transform: translateY(-3px);
    background-color: #4a5568;
}

.project-detail-view.active {
    transform: translateX(0);
}

.tech-subsection {
    margin-top: 20px;
}

.tech-subsection:first-child {
    margin-top: 10px;
}

.tech-subsection h5 {
    font-size: 1.1rem;
    color: #cbd5e0;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #4a5568;
}

.project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.project-detail-header .back-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.project-detail-header .back-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #a855f7;
}

.project-detail-header span {
    color: rgba(255, 255, 255, 0.6);
}

.project-detail-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.project-main-info h2 {
    font-size: 36px;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #a855f7, #6366f1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.project-main-info p {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.project-side-info img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-side-info h4, .project-main-info h4 {
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.project-side-info ul {
    list-style: none;
    padding-left: 0;
}

.project-side-info ul li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.project-side-info ul li::before {
    content: '\2713';
    color: #a855f7;
    position: absolute;
    left: 0;
}

.project-main-info .tech-stack-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 20px;
    align-items: start;
    margin: 40px 0;
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-item {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.button-box {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.button-box .btn, .button-box .btn-outline {
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.button-box .btn {
    background: #6366f1;
    color: #fff;
}

.button-box .btn:hover {
    background: #a855f7;
}

.button-box .btn-outline {
    background: transparent;
    border: 1px solid #6366f1;
    color: #fff;
}

.button-box .btn-outline:hover {
    background: #6366f1;
}

/* --- Standalone Project Detail Page --- */
.detail-page-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

.project-detail-view-standalone {
    width: 100%;
    max-width: 1100px;
    background: #12122c;
    border-radius: 15px;
    padding: 40px;
    border: 1px solid #3a3a5a;
    animation: fadeIn 0.6s ease-out;
}

/* --- Page Transition Animation --- */
/* --- Testimonials Section --- */
.testimonials-section {
    padding: 40px 0;
    margin-top: 30px;
    border-top: 1px solid #4a5568;
}

.testimonials-section h3 {
    text-align: center;
    font-size: 2rem;
    color: #e2e8f0;
    margin-bottom: 30px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.testimonial-card {
    background-color: #2d3748;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #4a5568;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #a855f7;
    margin-right: 15px;
}

.testimonial-user h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #e2e8f0;
}

.testimonial-stars {
    color: #facc15; /* Yellow for stars */
}

.testimonial-quote {
    font-style: italic;
    color: #cbd5e0;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Typing Animation Cursor --- */
.typed-cursor {
    color: #a855f7; /* Purple color to match the theme */
    font-weight: 300;
    animation: blink 0.7s infinite;
}

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