/* --- MONOCHROMATIC MINIMALIST THEME --- */
:root {
    /* Light Theme Palette */
    --color-background: #ffffff;
    --color-surface: #f8f9fa;
    --color-text-primary: #212529;
    --color-text-secondary: #6c757d;
    --color-border: #dee2e6;
    --color-fill: #343a40; /* For skill bars and highlights */

    /* Typography & Layout */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --container-width: 1140px;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease-in-out;
}

body.dark-mode {
    /* Dark Theme Palette */
    --color-background: #121212;
    --color-surface: #1e1e1e;
    --color-text-primary: #e9ecef;
    --color-text-secondary: #adb5bd;
    --color-border: #343a40;
    --color-fill: #f8f9fa; /* For skill bars and highlights */
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* --- Keyframe Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes drawUnderline {
    from { width: 0; }
    to { width: 60px; }
}

/* --- Base & Reset --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-text-primary);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.2;
}
a { color: var(--color-text-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--color-text-secondary); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
section { padding: 6rem 5%; }

.section-title {
    font-size: 2.5rem; text-align: center; margin-bottom: 4rem; position: relative;
}
.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 0; height: 3px;
    background-color: var(--color-fill);
}
.section-title.visible::after {
    animation: drawUnderline 0.6s ease forwards;
}

/* --- Header --- */
header {
    position: fixed; top: 0; left: 0; width: 100%; padding: 1.5rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: var(--transition);
}
header.scrolled {
    background-color: var(--color-surface); box-shadow: var(--shadow); padding: 1rem 5%;
}
.logo img {
    height: 40px; width: 40px; border-radius: 50%;
    object-fit:fill; transform: scale(1.50);
}
.logo:hover {
    transform: scale(1.25);
    transition: transform 0.5s ease-out;
}
nav ul { display: flex; align-items: center; gap: 2rem; }

/* --- Navlink Hover Effect --- */
.nav-link { 
    font-family: var(--font-heading); 
    font-size: 1rem; 
    font-weight: 500; 
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    z-index: 1;
    overflow: hidden;
    transition: color 0.35s ease-in-out;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    z-index: -1;
    background-color: var(--color-fill); 
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease-in-out;
}

.nav-link:hover { color: var(--color-background); }
.nav-link:hover::before { transform: scaleX(1); }
body.dark-mode .nav-link::before { background-color: var(--color-fill); }
body.dark-mode .nav-link:hover { color: var(--color-background); }

/* --- Theme Toggle --- */
#theme-switch { display: none; }
.theme-toggle-label {
    display: flex; align-items: center; justify-content: space-between;
    width: 55px; height: 28px; background-color: var(--color-fill);
    border-radius: 50px; cursor: pointer; position: relative;
    padding: 0 6px;
    transition: var(--transition);
}
.theme-toggle-label:hover { transform: scale(1.05); }
.theme-toggle-label .fa-sun, .theme-toggle-label .fa-moon { font-size: 0.8rem; }
.theme-toggle-label .fa-sun { color: #f1c40f; }
.theme-toggle-label .fa-moon { color: #f39c12; }
.theme-toggle-ball {
    position: absolute; width: 22px; height: 22px;
    background-color: var(--color-background); border-radius: 50%;
    top: 3px; left: 3px; transition: var(--transition);
}
#theme-switch:checked + .theme-toggle-label .theme-toggle-ball { transform: translateX(27px); }

/* --- Mobile Menu --- */
.mobile-menu-btn { display: none; }

/* --- Hero Section (#home) --- */
.hero-section {
    min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center;
}
.hero-content h1 { 
    font-size: clamp(2.5rem, 5vw, 4rem); 
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease backwards;
}
.typewriter {
    font-size: clamp(1.2rem, 3vw, 1.5rem); font-family: var(--font-body);
    color: var(--color-text-secondary); margin-bottom: 1rem; min-height: 2.2rem;
    animation: fadeInUp 0.6s ease 0.2s backwards;
}
.cursor { display: inline-block; background-color: var(--color-text-secondary); width: 3px; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-content .subtitle {
    font-size: 1.1rem; color: var(--color-text-secondary); max-width: 600px; margin: 0 auto 2rem auto;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}
.cta-buttons { 
    display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; 
    animation: fadeInUp 0.6s ease 0.6s backwards;
}
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.75rem; border-radius: var(--border-radius);
    font-family: var(--font-heading); font-weight: 500; border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s, color 0.3s, border-color 0.3s;
    cursor: pointer;
}
.btn:active { transform: translateY(-1px) scale(0.98); }
.btn-primary { background-color: var(--color-fill); color: var(--color-background); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.btn-secondary { border-color: var(--color-border); color: var(--color-text-primary); }

.btn-secondary:hover { 
    background-color: var(--color-fill); 
    border-color: var(--color-fill); 
    color: var(--color-background); 
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* WhatsApp Icon in Button */
.btn-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    object-fit: contain;
}


/* --- About Section --- */
.about-section { background-color: var(--color-surface); }
.about-content {
    display: grid; grid-template-columns: 1fr 2fr; gap: 4rem;
    align-items: center; max-width: var(--container-width); margin: 0 auto;
}

.about-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* UPDATED: Simplified Profile Image (No Hover Swap) */
.profile-image-container {
    width: 300px; height: 300px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid var(--color-border);
}
.profile-image-container img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.about-text p { color: var(--color-text-secondary); margin-bottom: 1.5rem; font-size: 1.1rem; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2rem; }
.tech-item { text-align: center; }
.tech-item i, .tech-item svg {
    font-size: 2.5rem; color: var(--color-text-secondary);
    transition: var(--transition);
    height: 2.5rem; width: 2.5rem; margin: 0 auto;
}
.tech-item:hover i, .tech-item:hover svg {
    color: var(--color-text-primary); transform: scale(1.1);
}
.tech-item p { font-size: 0.9rem; margin-top: 0.5rem; color: var(--color-text-secondary); }

/* --- Services Section (Tabbed Interface) --- */
.services-container { max-width: var(--container-width); margin: 0 auto; }
.services-tabs {
    display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2.5rem;
}
.service-tab-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-border);
    background-color: transparent;
    color: var(--color-text-secondary);
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.service-tab-btn:hover {
    border-color: var(--color-fill); color: var(--color-text-primary); transform: translateY(-3px);
}
.service-tab-btn.active {
    background-color: var(--color-fill); border-color: var(--color-fill);
    color: var(--color-background); transform: translateY(-3px);
}
.service-content {
    display: none; padding: 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    animation: fadeInUp 0.5s ease;
}
.service-content.active { display: block; }
.service-content h3 { font-size: 1.5rem; margin-bottom: 1rem; text-align: center; }
.service-content p {
    color: var(--color-text-secondary); font-size: 1.1rem; line-height: 1.8;
    max-width: 800px; margin: 0 auto 1rem auto; text-align: center;
}
.service-content .highlight { font-weight: 500; color: var(--color-text-primary); }

/* --- Journey Section (Vertical Timeline) --- */
.timeline {
    position: relative; max-width: var(--container-width); margin: 0 auto; padding: 2rem 0;
}
.timeline::after {
    content: ''; position: absolute; width: 3px; background-color: var(--color-border);
    top: 0; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 0;
}
.timeline-item {
    padding: 1rem 40px; position: relative; width: 50%; opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item::after {
    content: ''; position: absolute; width: 20px; height: 20px;
    background-color: var(--color-background); border: 4px solid var(--color-fill);
    top: 25px; border-radius: 50%; z-index: 1;
}
.timeline-item::before {
    content: " "; height: 0; position: absolute; top: 28px; width: 0; z-index: 1;
    border: medium solid var(--color-surface);
}
.timeline-left { left: 0; transform: translateX(-30px); }
.timeline-left::after { right: -10px; }
.timeline-left::before {
    right: 30px; border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent var(--color-surface);
}
.timeline-right { left: 50%; transform: translateX(30px); }
.timeline-right::after { left: -10px; }
.timeline-right::before {
    left: 30px; border-width: 10px 10px 10px 0;
    border-color: transparent var(--color-surface) transparent transparent;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-content {
    padding: 1.5rem; background-color: var(--color-surface); position: relative;
    border-radius: var(--border-radius); box-shadow: var(--shadow);
}
.timeline-date {
    font-family: var(--font-heading); font-size: 1.1rem; font-weight: 500;
    color: var(--color-fill); margin-bottom: 0.5rem;
}
.timeline-title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.timeline-description { font-size: 1rem; color: var(--color-text-secondary); }


/* --- Projects Section (Merged) --- */
.projects-section { background-color: var(--color-surface); }

.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem; max-width: var(--container-width); margin: 0 auto;
}
.project-card {
    background-color: var(--color-background); border: 1px solid var(--color-border);
    border-radius: var(--border-radius); overflow: hidden; transition: var(--transition);
    display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.project-card-special {
    background: linear-gradient(45deg, var(--color-surface), var(--color-background));
}
.project-card-special .project-info h3::after {
    content: 'In Progress'; font-size: 0.5rem; font-weight: 500;
    color: var(--color-text-secondary); background-color: var(--color-border);
    padding: 2px 15px; border-radius: 4px; margin-left: 10px; vertical-align: middle;
    border: 2px black;
}
.project-image img { width: 100%; height: 220px; object-fit: cover; }
.project-info { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.project-info h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.project-info p { color: var(--color-text-secondary); margin-bottom: 1rem; flex-grow: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.project-tech span {
    background-color: var(--color-surface); border: 1px solid var(--color-border);
    color: var(--color-text-secondary); padding: 0.25rem 0.75rem;
    border-radius: 50px; font-size: 0.8rem;
}
.project-links .btn { width: 100%; text-align: center; }
.view-more { text-align: center; margin-top: 3rem; }


/* --- Contact Section --- */
/* --- Contact Section (Redesigned) --- */
.contact-section { 
    background-color: var(--color-background); 
    display: flex;
    justify-content: center;
}

.contact-container { 
    width: 100%; 
    max-width: 600px; /* Slightly wider to fit icons */
    margin: 0 auto; 
}

/* The Card Container */
.contact-card {
    background-color: var(--color-surface);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

/* Social Icons Row */
.social-connect {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* Allows icons to wrap on small screens */
    margin-bottom: 2rem;
}

.social-icon-btn {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-size: 1.6rem;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* --- Brand Colors --- */
.social-linkedin { background-color: #0077b5; }

/* Fixed X Icon: Added a border so it's visible in dark mode */
.social-x { 
    background-color: #000000; 
    border: 2px solid #444; 
} 

.social-whatsapp { background-color: #25D366; }
.social-resume { background-color: #ff5722; }
.social-gmail { background-color: #ea4335; } /* Gmail Red */
.social-github { background-color: #24292e; border: 2px solid #444; } /* GitHub Black */
.social-call { background-color: #0984e3; } /* Phone Blue */


/* Hover Effects */
.social-icon-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    color: white;
}

/* Form Styling */
.contact-form { margin-top: 1rem; }

.form-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    background-color: var(--color-background);
    color: var(--color-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(--color-fill);
    box-shadow: 0 0 0 4px rgba(52, 58, 64, 0.1);
}

/* Submit Button */
.contact-form .btn {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}


/* --- Footer --- */
footer {
    padding: 3rem 5%; background-color: var(--color-surface); text-align: center;
    color: var(--color-text-secondary); border-top: 1px solid var(--color-border);
}

/* --- Scroll-based Animations --- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* --- INTERACTIVE EFFECTS (Mobile Fallback) --- */
@media (hover: none) and (pointer: coarse) {
    .btn:active, .theme-toggle-label:active, .nav-link:active, .tech-item:active {
        transform: scale(0.95) !important;
        transition: transform 0.1s ease;
    }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .about-content { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .about-image { justify-self: center; }
    .profile-image-container { width: 250px; height: 250px; }
    .tech-stack { justify-content: center; }
}
@media (max-width: 768px) {
    .logo img { height: 40px; width: 40px; transform: scale(1.0); }
    .logo:hover { transform: scale(1.1); }
    section { padding: 4rem 5%; }
    .section-title { font-size: 2rem; }

    .hero-section {
    min-height: 85vh;
   
}

    header { padding: 1rem 5%; background-color: var(--color-surface); box-shadow: var(--shadow); }
    
    nav {
        display: block; position: absolute; top: 100%; left: 0;
        width: 100%; background-color: var(--color-surface);
        box-shadow: var(--shadow); max-height: 0;
        overflow: hidden; transition: max-height 0.5s ease-in-out;
    }
    nav.active { max-height: 500px; }
    nav ul { flex-direction: column; align-items: stretch; padding: 1rem 0; gap: 0; }
    nav li { text-align: center; }

    .theme-toggle-li { display: flex; justify-content: center; padding: 1rem 0; }

    .nav-link { display: block; padding: 1rem 2rem; }
    .nav-link::before { display: none; }
    .nav-link:hover { color: var(--color-text-secondary); }
    body.dark-mode .nav-link:hover { color: var(--color-text-secondary); }
    
    .mobile-menu-btn {
        display: flex; flex-direction: column; justify-content: space-around;
        width: 28px; height: 24px; cursor: pointer; z-index: 10;
        background: transparent; border: none;
    }
    .mobile-menu-btn span {
        display: block; height: 3px; width: 100%; background-color: var(--color-text-primary);
        border-radius: 3px; transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }
    .mobile-menu-btn.active span:nth-child(1) { transform: translateY(10.5px) rotate(45deg); }
    .mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
    .mobile-menu-btn.active span:nth-child(3) { transform: translateY(-10.5px) rotate(-45deg); }
    
    .contact-grid { grid-template-columns: 1fr; }

    .timeline::after { left: 31px; transform: translateX(0); }
    .timeline-item, .timeline-left, .timeline-right {
        width: 100%; left: 0; padding-left: 70px; padding-right: 25px; transform: translateX(-30px);
    }
    .timeline-item.visible, .timeline-left.visible, .timeline-right.visible { transform: translateX(0); }
    .timeline-item::after, .timeline-left::after, .timeline-right::after { left: 21px; right: auto; }
    .timeline-item::before, .timeline-left::before, .timeline-right::before {
        left: 60px; right: auto; border-width: 10px 10px 10px 0;
        border-color: transparent var(--color-surface) transparent transparent;
    }
}   
/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-card {
        padding: 2rem 1rem;
        background-color: transparent;
        box-shadow: none;
    }
    .social-icon-btn {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}
