/* CSS Variables for Theming */
:root {
    --primary: #6366f1;
    --primary-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --secondary: #10b981;
    --dark: #0f172a;
    --dark-alt: #1e293b;
    --light: #f1f5f9;
    --light-alt: #e2e8f0;
    --text-dark: #334155;
    --text-light: #64748b;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.3s ease;
}

.light-mode {
    --dark: #f1f5f9;
    --dark-alt: #e2e8f0;
    --light: #0f172a;
    --light-alt: #1e293b;
    --text-dark: #e2e8f0;
    --text-light: #94a3b8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --glass: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    transition: var(--transition);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    color: white;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.light-mode header {
    background: rgba(241, 245, 249, 0.8);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.theme-toggle {
    background: var(--glass);
    width: 50px;
    height: 24px;
    border-radius: 50px;
    position: relative;
    cursor: pointer;
    border: 1px solid var(--glass-border);
}

.theme-toggle-circle {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    transition: var(--transition);
}

.light-mode .theme-toggle-circle {
    left: calc(100% - 22px);
}

.hamburg {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1), transparent 70%);
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 50%;
    margin: 0 auto;
    display: block;
    border: 5px solid var(--glass);
    box-shadow: var(--shadow);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text h1 span {
    color: var(--primary);
    position: relative;
}

.typewriter {
    font-size: 1.8rem;
    margin-bottom: 20px;
    min-height: 2.5rem;
}

.typewriter-text {
    color: var(--primary);
    font-weight: 600;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-light);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-5px);
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

/* Skills Section */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.skill-item {
    padding: 25px;
}

.skill-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.skill-name {
    font-weight: 600;
}

.skill-percentage {
    color: var(--primary);
    font-weight: 700;
}

.skill-bar {
    height: 8px;
    background: var(--dark-alt);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 4px;
    position: relative;
    width: 0;
    transition: width 1.5s ease;
}

/* Projects Section */
.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 8px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 300px;
    cursor: pointer; /* Make card look clickable */
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    transform: translateY(100px);
    transition: var(--transition);
    /* Remove pointer events so the card below can be clicked */
    pointer-events: none; 
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.project-category {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 15px;
}

/* Timeline (Education & Experience) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: var(--primary-gradient);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-content {
    padding: 20px;
    position: relative;
    border-radius: 16px;
}

.timeline-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.timeline-desc {
    color: var(--text-light);
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    top: 20px;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -10px;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

/* Certificates Section */
.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.certificate-card {
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.certificate-image {
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}

.certificate-content {
    padding: 20px;
    flex-grow: 1;
}

.certificate-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.certificate-issuer {
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 15px;
}

/* Modal Styles (Shared) */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 90%;
    max-width: 800px;
    background: var(--dark-alt);
    border-radius: 16px;
    padding: 20px;
    position: relative;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--primary);
}

/* Project Modal Specific Styles */
#project-modal .modal-content {
    display: flex;
    flex-direction: column;
    height: 90%;
    max-height: 800px;
    padding: 20px;
}

.project-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 15px;
    flex-shrink: 0;
}

.project-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 1rem;
}

.project-modal-controls {
    display: flex;
    gap: 10px;
}

.project-modal-controls button,
.project-modal-controls a {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--light);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

.project-modal-controls button:hover,
.project-modal-controls a:hover {
    background: var(--primary);
    color: white;
}

.project-modal-body {
    flex-grow: 1;
    overflow: hidden;
    border-radius: 8px;
}

#project-modal-iframe {
    width: 100%;
    height: 100%;
    background: #fff; /* Loading background */
}

/* Fullscreen state for project modal */
.modal-content.fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary-gradient);
    font-size: 1.2rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-input, .form-textarea {
    padding: 15px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--light);
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background: var(--dark-alt);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo span {
    color: var(--primary);
}

.footer-desc {
    color: var(--text-light);
    margin-bottom: 20px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-light);
}

/* Hire Me Floating Button */
.hire-me-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
    animation: pulse 2s infinite;
    transition: var(--transition);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.hire-me-btn:hover {
    transform: scale(1.1);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-content, .about-content, .contact-container {
        grid-template-columns: 1fr;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item::after {
        left: 21px;
    }

    .timeline-item:nth-child(even)::after {
        left: 21px;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--dark-alt);
        flex-direction: column;
        padding: 100px 20px;
        transition: var(--transition);
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .hamburg {
        display: block;
        z-index: 1001;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .typewriter {
        font-size: 1.5rem;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: 15px;
    }
}






/* Add these new styles to your main CSS file for the live preview effect */

.project-card {
    /* Keep padding on other glass cards but remove from project cards */
    padding: 0; 
}

.project-preview-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    
    /* This creates the "zoomed-out" preview effect */
    transform: scale(0.25);
    transform-origin: 0 0;
    width: 400%; /* Must be 1 / scale */
    height: 400%; /* Must be 1 / scale */
    
    background-color: #fff; /* Show a white background while the site loads */
    
    /* IMPORTANT: This disables all mouse clicks and scrolling on the small preview */
    pointer-events: none;
    
    transition: transform 0.4s ease;
}

.project-card:hover .project-preview-iframe {
    /* Optional: A subtle zoom-in effect on hover */
    transform: scale(0.3);
}

.project-overlay {
    /* Ensure overlay is still on top */
    z-index: 2;
}