/* --- Variables & Themes --- */
:root {
    /* Dark Theme (Default) */
    --bg-main: #0a0f1c;
    --bg-alt: #111827;
    --bg-card: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-main: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-primary: #2563eb;
    --accent-secondary: #7c3aed;
    --border-color: rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

/* --- Resets & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.bg-alt {
    background-color: var(--bg-alt);
}

/* --- Typography & Utilities --- */

.section-title {
    text-align: center;
    width: 100%;
    margin: 0 auto 50px;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title.left-align {
    left: 0;
    transform: none;
    text-align: left;
    margin-bottom: 2rem;
}


.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    margin-left: 40%;
    width: 20%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

.section-title.left-align::after {
    width: 50px;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    opacity: 0;
    z-index: -1;
    transition: var(--transition);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    color: #fff;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: translateY(-2px);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(10, 15, 28, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: var(--shadow-md);
}

[data-theme="light"] .navbar.scrolled {
    background: rgba(255, 255, 255, 0.9);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: var(--transition);
}

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

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

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: var(--transition);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--accent-primary);
}

[data-theme="dark"] #moonIcon {
    display: none;
}

[data-theme="light"] #sunIcon {
    display: none;
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 5rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0) 70%);
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    padding: 0 2rem;
    z-index: 2;
}

.greeting {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.name {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.role {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 2rem;
}

.dot {
    color: var(--accent-primary);
    margin: 0 0.5rem;
}

.intro-statement {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

.profile-image {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
    display: block;
}

.about-image-wrapper {
    position: relative;
    z-index: 1;
}

.about-image-wrapper::after {
    content: '';
    position: absolute;
    inset: -10px;
    border: 2px solid var(--accent-primary);
    border-radius: 25px;
    z-index: -1;
    opacity: 0.3;
    transform: translate(15px, 15px);
    transition: var(--transition);
}

.about-image-wrapper:hover::after {
    transform: translate(0, 0);
    opacity: 0.8;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.objective-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border-left: 4px solid var(--accent-primary);
    border-radius: 0 10px 10px 0;
    box-shadow: var(--shadow-sm);
}

.objective-box h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.objective-box p {
    margin-bottom: 0;
    font-style: italic;
}

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

.skill-card {
    background: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    text-align: center;
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
}

.skill-card i {
    font-size: 3rem;
    color: var(--accent-primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.project-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-secondary);
}

.project-image {
    height: 200px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

[data-theme="light"] .project-image {
    color: rgba(0,0,0,0.05);
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.project-card:hover .project-image::before {
    left: 0%;
}

.project-info {
    padding: 2rem;
    flex-grow: 1;
}

.project-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project-info h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.project-card img{
    width:100%;
    height:240px;
    object-fit:cover;
    border-radius:15px;
    transition:.4s;
}

.project-card{
    overflow:hidden;
}

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

.project-video{
    width:100%;
    height:240px;
    object-fit:cover;
    border-radius:15px;
    display:block;
}
/* --- Services & Experience Section --- */
.se-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    top: 5px;
    left: -2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    transform: translateX(-6px);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.timeline-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Services List */
.services-list {
    display: grid;
    gap: 1rem;
}

.services-list li {
    background: var(--bg-card);
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.services-list li:hover {
    transform: translateX(10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.services-list i {
    color: var(--accent-secondary);
    font-size: 1.2rem;
}

/* --- Contact Section --- */
.contact-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-top: -2rem;
    margin-bottom: 3rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.info-item h4 {
    margin-bottom: 0.3rem;
}

.info-item a {
    color: var(--text-secondary);
}

.info-item a:hover {
    color: var(--accent-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}

.contact-form {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    width: 100%;
    gap: 0.5rem;
}

/* --- Footer --- */
.footer {
    background: var(--bg-card);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.back-to-top {
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: var(--transition);
}

.back-to-top:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

/* --- Animations --- */
.fade-in-up {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

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

/* Scroll Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .about-grid, .se-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-image-wrapper {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding: 2rem 0;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: all 0.4s ease;
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .cta-group {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .name {
        font-size: 2.5rem;
    }
    
    .role {
        font-size: 1rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

.popup{
    display:none;
    position:fixed;
    z-index:9999;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.95);
    justify-content:center;
    align-items:center;
}

.popup-content{
    max-width:90%;
    max-height:90%;
    border-radius:15px;
}

.close{
    position:absolute;
    top:20px;
    right:35px;
    color:#fff;
    font-size:45px;
    cursor:pointer;
}


/* FIX ONLY (important for all devices) */
img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    overflow-x: hidden;
}

