:root {
    --bg-dark: #121212;      /* Near-black */
    --bg-card: #121212;      /* Dark Card */
    --accent: #ff7a00;       /* Vibrant Orange */
    --accent-glow: rgba(255, 122, 0, 0.3);
    --text-main: #fffaf0;    /* Warm-tinted White */
    --text-muted: #94a3b8;   /* Muted Slate */
}

/* Light Mode Colors */
body.light-mode {
    --bg-dark: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #ff7a00; 
    --accent-glow: rgba(255, 122, 0, 0.2);
}

/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    scroll-behavior: smooth;
}

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

/* --- UNIVERSAL PRELOADER --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 122, 0, 0.1);
    border-top: 5px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    background: #121212;
    backdrop-filter: blur(12px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 122, 0, 0.1);
}

body.light-mode nav {
    background: rgba(248, 250, 252, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -1px;
}

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

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--text-main);
    z-index: 1001;
}

.nav-links { display: flex; align-items: center; }

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    margin-left: 35px;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active { 
    color: var(--accent) !important; 
    font-weight: 700;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    margin-left: 25px;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

#theme-toggle:hover { transform: scale(1.1); }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    gap: 50px;
}

.hero-content { flex: 1; max-width: 650px; }
.hero h2 { color: var(--accent); font-size: 1.2rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 2px; }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; font-weight: 800; }

.cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background-color: var(--accent);
    margin-left: 5px;
    animation: blink 0.75s step-end infinite;
    vertical-align: middle;
}

@keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } }

.hero p { font-size: 1.15rem; color: white; margin-bottom: 35px; }

.btn-container { display: flex; gap: 15px; }
.btn { padding: 14px 32px; border-radius: 8px; font-weight: 600; text-decoration: none; transition: 0.3s; }
.btn-solid { background: var(--accent); color: white; border: 2px solid var(--accent); }
.btn-solid:hover { background: transparent; color: var(--accent); transform: translateY(-3px); }
.btn-outline { border: 2px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: #ffffff; transform: translateY(-3px); }

/* --- HERO IMAGE --- */
.hero-image { flex: 1; display: flex; justify-content: center; }

.image-wrapper {
    position: relative;
    width: 320px; 
    height: 380px; 
    background-color: var(--accent); 
    border-radius: 20px; 
    margin-top: 20px;
    margin-left: 20px; 
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    position: absolute;
    top: -20px; 
    left: -20px; 
    border: 2px solid #121212; 
    transition: transform 0.3s ease;
}

.image-wrapper img:hover { transform: translate(-5px, -5px); }

/* --- SECTIONS & CARDS --- */
.section { padding: 100px 10%; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; font-weight: 800; }
.section-title span { color: var(--accent); }

.cards-container { display: flex; gap: 25px; justify-content: center; flex-wrap: wrap; }
.card {
    background: #272727;
    padding: 40px; border-radius: 16px; width: 350px;
    transition: 0.4s; border: 1px solid rgba(255, 122, 0, 0.05);
    border-left: 1px solid var(--accent);
    border-top: 1px solid var(--accent);
    border-right: 1px solid var(--accent);
    border-bottom: 1px solid var(--accent);
    opacity: 0; transform: translateY(40px);
}



.card.show-on-scroll { opacity: 1; transform: translateY(0); }
.card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent); 
    box-shadow: 0 10px 30px rgba(255, 122, 0, 0.2); 
}

/* --- SKILLS GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.skill-badge {
    background: #272727;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255, 122, 0, 0.05);
    border-left: 5px solid var(--accent); 
    width: 100%;
    opacity: 0; 
    transform: translateY(40px);
    transition: 0.3s ease;
}

.skill-badge:hover {
    border-left-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 122, 0, 0.4);
    background: rgba(255, 122, 0, 0.05);
}

.skill-icon {
    width: 42px; height: 42px; border-radius: 8px;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem; font-weight: 800; color: white;
}

.skill-name {
    color: var(--text-main); font-size: 1.05rem;
    font-weight: 600; letter-spacing: 0.5px;
}

/* Light Mode Overrides */
body.light-mode .card, body.light-mode .skill-badge {
    border: 1px solid var(--accent); 
    background-color: #fffaf5;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .card:hover, body.light-mode .skill-badge:hover {
    background-color: #fffaf5; 
    box-shadow: 0 10px 20px rgba(255, 122, 0, 0.2);
    border-color: #ff7a00; 
}












/* --- CONTACT PAGE LAYOUT --- */
.contact-container { 
    display: flex; 
    gap: 40px; 
    max-width: 1000px; 
    margin: 0 auto; 
    align-items: flex-start; 
}

.contact-details, .contact-form-wrapper { 
    flex: 1; 
    width: 100%; 
}

.contact-details h3 { 
    color: var(--text-main); 
    font-size: 1.8rem; 
    margin-bottom: 15px; 
}

.contact-details p { 
    color: white; 
    margin-bottom: 30px; 
}

.info-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    margin-bottom: 20px; 
    color: var(--text-main); 
    font-size: 1.1rem; 
}

.info-item i { 
    color: var(--accent); 
    font-size: 1.5rem; 
}

/* --- CONTACT FORM --- */
.contact-form { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
}

.input-group input, 
.input-group textarea {
    width: 100%; 
    padding: 15px; 
    background: var(--bg-dark);
    border: 1px solid rgba(255, 122, 0, 0.2); 
    border-radius: 8px;
    color: var(--text-main); 
    font-size: 1rem; 
    transition: 0.3s; 
    font-family: inherit;
}

.input-group input:focus, 
.input-group textarea:focus {
    outline: none; 
    border-color: var(--accent); 
    box-shadow: 0 0 10px var(--accent-glow);
}

.submit-btn {
    width: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* --- LIGHT MODE FORM OVERRIDES --- */
body.light-mode .input-group input, 
body.light-mode .input-group textarea {
    border: 1px solid #cbd5e1; 
    background: #ffffff;
}

body.light-mode .input-group input:focus, 
body.light-mode .input-group textarea:focus {
    border-color: var(--accent);
}

 .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(5px);
            display: none; /* Initially hidden */
            justify-content: center;
            align-items: center;
            z-index: 9999;
        }

        .modal-content {
            background: #1e1e1e; /* Dark theme to match portfolio */
            padding: 40px;
            border-radius: 15px;
            text-align: center;
            position: relative;
            max-width: 400px;
            width: 90%;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
            animation: popIn 0.3s ease-out forwards;
        }

        .modal-content h3 {
            color: #ffffff;
            margin-top: 15px;
            font-size: 24px;
        }

        .modal-content p {
            color: #bbbbbb;
            margin-top: 10px;
            font-size: 16px;
            line-height: 1.5;
        }

        .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 28px;
            color: #888;
            cursor: pointer;
            transition: color 0.3s;
        }

        .close-btn:hover {
            color: #ffffff;
        }

        /* Popup Animation */
        @keyframes popIn {
            from { transform: scale(0.8); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }







/* --- FOOTER --- */
.professional-footer {
    background-color: #121212; color: var(--text-main);
    padding: 4rem 2rem 1rem; text-align: center;
    border-top: 1px solid rgba(255, 122, 0, 0.2);
}

body.light-mode .professional-footer { background: #f1f5f9; }

.footer-container { max-width: 800px; margin: 0 auto; }
.footer-header h2 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.footer-header span { color: var(--accent); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 2rem; margin-bottom: 3rem; }
.contact-info-block { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; justify-content: center; gap: 0.75rem; font-size: 1.1rem; }
.contact-item i { color: var(--accent); font-size: 1.2rem; }
.contact-item a { color: var(--text-main); text-decoration: none; transition: color 0.3s ease; }
.contact-item a:hover { color: var(--accent); }

.social-links { display: flex; gap: 1.5rem; justify-content: center; margin-top: 15px;}





/* --- SOCIAL ICONS (Premium Border) --- */
.social-icon {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 45px; 
    height: 45px; 
    border-radius: 50%;
    background-color: #272727; 
    color: var(--text-main); 
    font-size: 1.2rem; 
    text-decoration: none; 
    transition: all 0.3s ease;
    border: 1px solid #121212;; 
}

.social-icon:hover {
    background-color: #121212; 
    color: #ffffff; 
    transform: translateY(-3px); 
    border-color: var(--accent);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Conatct icons*/
.social-icons {
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 45px; 
    height: 45px; 
    border-radius: 50%;
    background-color: #121212; 
    color: var(--text-main); 
    font-size: 1.2rem; 
    text-decoration: none; 
    transition: all 0.3s ease;
    
}

.social-icons:hover {
    background-color: #121212; 
    color: #ffffff; 
    transform: translateY(-3px); 
    border-color: #ff7a00;
    box-shadow: 0 4px 12px var(--accent-glow);
}













/* --- LIGHT MODE SOCIAL ICONS --- */
body.light-mode .social-icon {
    background-color: transparent;
    color: var(--text-main); /* Dark color (#0f172a) for light mode */
    border: 1px solid var(--text-muted); /* Muted slate border */
}

body.light-mode .social-icon:hover {
    background-color: var(--accent); /* Hover par green ho jayega */
    color: #ffffff; /* Hover par icon wapas white ho jayega */
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}
body.light-mode .social-icons {
    background-color: transparent;
    color: #121212;; /* Dark color (#0f172a) for light mode */
    border: 1px solid var(--text-muted); /* Muted slate border */
}

body.light-mode .social-icons:hover {
    background-color: var(--accent); /* Hover par green ho jayega */
    color: #ffffff; /* Hover par icon wapas white ho jayega */
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.2);
}

.footer-bottom { padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.85rem; color: #718096; }

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (min-width: 768px) {
    .contact-info-block { flex-direction: row; gap: 3rem; }
}

@media (max-width: 1024px) {
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Merged Mobile Breakpoint */
@media (max-width: 968px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 250px;
        background-color: var(--bg-card);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-end;
        padding-top: 100px;
        padding-right: 40px;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }
    
    .nav-links.nav-active { right: 0; }
    
    .nav-links a { 
        margin: 15px 0; 
        font-size: 1.2rem; 
        display: block; 
        text-align: right; 
    }
    
    #theme-toggle { margin-left: 0; margin-top: 20px; }
    
    .hero { flex-direction: column-reverse; text-align: center; height: auto; padding-top: 150px; padding-bottom: 50px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-image { margin-top: 40px; margin-bottom: 40px; justify-content: center; padding-left: 0; }
    .image-wrapper { width: 280px; height: 360px; }
    .btn-container { justify-content: center; }
}

@media (max-width: 768px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-container { flex-direction: column; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: 1fr; }
}






     .projects-section { 
            padding: 120px 10% 80px; /* Top padding increased for fixed navbar */
            text-align: center;
        }

        .projects-section-title { 
            font-size: 2.5rem; 
            margin-bottom: 60px; 
            font-weight: 800; 
        }
        .projects-section-title span { color: var(--accent); }

        .projects-cards-container { 
            display: flex; 
            gap: 25px; 
            justify-content: center; 
            flex-wrap: wrap; 
        }

.projects-card {
    background: #272727;
    padding: 30px; 
    border-radius: 16px; 
    width: 350px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: 0.4s; 
    border: 1px solid rgba(255, 122, 0, 0.05);
    border-top: 1px solid var(--accent); 
    border-left: 1px solid var(--accent); 
    border-right: 1px solid var(--accent); 
    border-bottom: 1px solid var(--accent); 
}

        .projects-card:hover { 
            transform: translateY(-10px); 
            border-color: var(--accent); 
            box-shadow: 0 10px 30px rgba(255, 122, 0, 0.2); 
        }

        .projects-card img {
            width: 100%;
            height: 200px;
            object-fit: cover;
            border-radius: 10px;
            margin-bottom: 20px;
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        .projects-card i {
            font-size: 2.5rem;
            color: var(--accent);
            margin-bottom: 15px;
            display: block;
        }

        .projects-card h3 {
            font-size: 1.4rem;
            margin-bottom: 10px;
        }

        .projects-card p {
            color: var(--text-muted);
            font-size: 0.95rem;
        }
   
body.light-mode .projects-card {
    border: 1px solid var(--accent); 
    background-color: #fffaf5;
    
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body.light-mode .projects-card:hover{
    background-color: #fffaf5; 
    box-shadow: 0 10px 20px rgba(255, 122, 0, 0.2);
    border-color: #ff7a00; 
}        












    /* सिर्फ Resume पेज के लिए ज़रूरी CSS */
    .resume-wrapper {
        padding: 120px 20px 60px; /* Navbar के नीचे से शुरू करने के लिए */
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: var(--bg-dark); /* डार्क बैकग्राउंड */
        min-height: 100vh;
    }

    .resume-page {
        max-width: 800px;
        width: 100%;
        background-color: #fff;
        padding: 40px;
        box-sizing: border-box;
        box-shadow: 0 0 15px rgba(255, 122, 0, 0.2); 
        color: #000;
        font-family: Arial, sans-serif;
        font-size: 11pt;
        line-height: 1.4;
    }

    .resume-page h1, .resume-page h2 {
        font-family: "Times New Roman", Times, serif;
        color: #000;
    }

    .resume-page h1 {
        font-size: 2.5em;
        margin: 0 0 10px 0;
        font-weight: bold;
        letter-spacing: 0.5px;
    }

    .resume-page h2 {
        font-size: 1.4em;
        border-bottom: 2px solid #000;
        padding-bottom: 4px;
        margin-top: 25px;
        margin-bottom: 15px;
    }

    .resume-page .contact-info {
        font-size: 0.95em;
        margin-bottom: 25px;
    }
    
    .resume-page .contact-info a {
        color: #000;
        text-decoration: underline;
    }

    .resume-page .flex-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2px;
    }

    .resume-page .bold { font-weight: bold; }
    .resume-page .text-right { text-align: right; }
    .resume-page .section-item { margin-bottom: 15px; }
    
    .resume-page ul {
        margin-top: 4px;
        margin-bottom: 15px;
        padding-left: 20px;
    }
    
    .resume-page li { margin-bottom: 4px; }
    .resume-page .additional-section p { margin: 6px 0; }

    /* =========================================
       BUTTON CSS: PC के लिए 280px margin-left
       ========================================= */
    .download-btn-container {
        margin-top: 40px;
        width: 100%;
        max-width: 800px;
        margin-left: 500px; /* PC पर 280px खिसकेगा */
    }

    /* =========================================
       MOBILE CSS: मोबाइल में Margin 0 और Center
       ========================================= */



    @media (max-width: 768px) {
    .resume-page {
        padding: 20px; 
        font-size: 10pt;
    }
    .resume-page h1 { font-size: 2em !important; }
    .resume-page .flex-row { 
        flex-direction: column; 
        margin-bottom: 8px;
    }
    .resume-page .text-right { 
        text-align: left !important; 
        color: #555; 
        font-size: 0.9em;
    }
    .download-btn-container {
        margin-left: 0; /* Updated from 130px */
        display: flex;
        justify-content: center;
    }
}




/* --- SECURITY HARDENING (NO UI CHANGE) --- */

/* Prevent accidental text selection on icons/buttons */
.social-icon,
.social-icons,
.btn,
button,
.hamburger,
#theme-toggle {
    user-select: none;
    -webkit-user-select: none;
}

/* Prevent image dragging / save via drag */
img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Safe focus visibility for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;

}

/* Prevent hidden horizontal injection issues */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Safer box rendering */
iframe,
embed,
object {
    max-width: 100%;
    border: none;
}

/* Remove square focus box from navbar links and theme toggle */
.nav-links a:focus,
.nav-links a:focus-visible,
#theme-toggle:focus,
#theme-toggle:focus-visible,
#theme-toggle:active {
    outline: none !important;
    box-shadow: none !important;
}
