/* Global Styles */
:root {
    --primary-color: #007bff;
    --secondary-color: #ffc107;
    --bg-dark: #111;
    --bg-light: #1a1a1a;
    --text-white: #ffffff;
    --text-gray: #ccc;
    --transition: all 0.3s ease;
}

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

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    height: 80px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-white);
    letter-spacing: 1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-white);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.menu-btn {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-white);
}

/* Home Section */
.home {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
    gap: 2rem;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.home-content {
    z-index: 2;
    flex: 1;
}

.home-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home-content h1 span {
    color: var(--primary-color);
}

.home-content p {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 2rem;
}

.typing-text {
    color: var(--secondary-color);
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.social-links a {
    font-size: 1.8rem;
    color: var(--text-white);
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
}

.home-img {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    z-index: 2;
}

.home-img img {
    width: clamp(250px, 40vw, 450px);
    height: clamp(250px, 40vw, 450px);
    object-fit: cover;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 123, 255, 0.3);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Sections General */
section {
    padding: clamp(5rem, 10vh, 10rem) 10%;
}

.heading {
    font-family: 'Playfair Display', serif;
    text-align: center;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: clamp(3rem, 5vh, 5rem);
}

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

/* About Section */
.about {
    background: var(--bg-light);
}

.about-container {
    display: flex;
    justify-content: center;
    text-align: center;
}

.about-content {
    max-width: 1000px;
}

.about-content h3 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 1rem;
}

.about-content p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem 3rem;
    margin-top: 1rem;
}

.info p {
    font-size: clamp(1rem, 2vw, 1.2rem);
}

.info span {
    color: var(--primary-color);
    font-weight: 600;
}

.resumebtn {
    margin-top: 2rem;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.skill-box:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
}

.skill-box img {
    width: 50px;
    margin-bottom: 0.8rem;
}

.skill-box span {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Education & Experience */
.box-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.box-container .box {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
}

/* Timeline (Experience) */
.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -3px;
}

.container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.container::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    right: -17px;
    background-color: var(--bg-dark);
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left { left: 0; }
.right { left: 50%; }

.right::after { left: -16px; }

.timeline .content {
    padding: 20px 30px;
    background-color: var(--bg-light);
    position: relative;
    border-radius: 6px;
}

/* Work/Projects Section */
.work-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-white);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.4);
}

.work-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.work-container .box {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
}

/* CRITICAL FIX: Ensure .hide is absolute display:none and overrides everything */
.work-container .box.hide {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.work-container .box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.work-container .box .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(17, 17, 17, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transform: translateY(100%);
    transition: var(--transition);
    text-align: center;
}

.play-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-top: 1rem;
}

.category-label {
    background: var(--primary-color);
    color: var(--text-white);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.work-container .box:hover .content {
    transform: translateY(0);
}

.work-container .box:hover img {
    transform: scale(1.1);
}

/* Scroll Reveal Animations */
.reveal {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s ease;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 2rem 10%;
    text-align: center;
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 95%;
    height: 95%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.lightbox-back {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    z-index: 2100;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-caption {
    color: white;
    margin-top: 1.5rem;
    text-align: center;
    max-width: 800px;
}

.lightbox-caption h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 2100;
}

.lightbox-nav {
    position: absolute;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    pointer-events: none;
    z-index: 2100;
}

.lightbox-nav i {
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 50%;
}

/* Adaptive UI / Media Queries */

@media (max-width: 1200px) {
    .navbar { padding: 0 5%; }
    .home { padding: 0 5%; }
    section { padding: 6rem 5%; }
}

@media (max-width: 991px) {
    .home { flex-direction: column-reverse; text-align: center; padding-top: 10rem; justify-content: center; min-height: 100vh; }
    .home-img { justify-content: center; }
    .home-img img { width: 300px; height: 300px; }
    .social-links { justify-content: center; }
    
    .timeline::after { left: 31px; }
    .container { width: 100%; padding-left: 70px; padding-right: 25px; }
    .container::after { left: 18px; }
    .right { left: 0; }
}

@media (max-width: 768px) {
    .menu-btn { display: block; }
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(17, 17, 17, 0.98);
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        text-align: center;
        transition: 0.4s ease-in-out;
        z-index: 999;
    }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 1rem 0; }
    .nav-links a { font-size: 1.4rem; padding: 10px; display: block; }

    .home-img img { width: 250px; height: 250px; }
    .heading { font-size: 2.5rem; }
    
    .work-container { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

@media (max-width: 480px) {
    .navbar { height: 70px; }
    .nav-links { top: 70px; height: calc(100vh - 70px); }
    .home-content h1 { font-size: 2.5rem; }
    .home-img img { width: 200px; height: 200px; }
    section { padding: 4rem 5%; }
    .work-container { grid-template-columns: 1fr; }
    .filter-btn { padding: 0.5rem 1rem; font-size: 0.8rem; }
}
