/* ==========================================
   1. CSS VARIABLES (DARK/LIGHT MODE)
   ========================================== */
:root {
    --bg-color: #fbfbfb;
    --text-color: #1a253f; /* Navy text for light mode */
    --text-light: #666666;
    --header-bg: #ffffff;
    --icon-color: #495057;
    --icon-hover: #0d6efd;
    --quote-color: #6c757d;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --btn-bg: #0d6efd;
    --btn-hover: #0b5ed7;
    --btn-text: #ffffff;
    --green-accent: #90ee90; /* Keeping the green accent from the image */
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #e0e0e0; /* White text for dark mode */
    --text-light: #a0a0a0;
    --header-bg: #1e1e1e;
    --icon-color: #b0b0b0;
    --icon-hover: #6ea8fe;
    --quote-color: #a0a0a0;
    --shadow-color: rgba(0, 0, 0, 0.5);
    --btn-bg: #0d6efd;
    --btn-hover: #0b5ed7;
    --btn-text: #ffffff;
    --green-accent: #4caf50; /* Slightly darker green for dark mode */
}

/* ==========================================
   2. BASE RESET & HEADER
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--header-bg);
    padding: 15px 40px;
    box-shadow: 0 4px 6px -1px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-section { display: flex; gap: 24px; }
.logo-section a { color: var(--icon-color); transition: color 0.3s ease; }
.logo-section a:hover { color: var(--icon-hover); }

.quote-section {
    flex: 1;
    text-align: center;
    font-style: italic;
    color: var(--quote-color);
    font-weight: 500;
}

.info-section { display: flex; align-items: center; gap: 30px; }

#theme-toggle {
    background: none;
    border: none;
    color: var(--icon-color);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.time-weather {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--icon-color);
}

/* ==========================================
   3. MAIN PORTFOLIO LAYOUT
   ========================================== */
.main-content {
    padding: 40px 60px;
    max-width: 1400px;
    margin: 0 auto;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr 1fr;
    gap: 3rem;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* --- Custom Uploaded Logo in Header --- */
.custom-logo {
    height: 32px; /* Matches the size of the other FontAwesome icons */
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

/* Adds the same hover animation the other icons have */
.logo-section a:hover .custom-logo {
    transform: translateY(-2px);
}

/* Column 1 */
/* --- Column 1: Resume Button --- */
.btn-resume {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 1.5rem;
    border: 2px solid var(--text-color);
    color: var(--text-color);
    border-radius: 50px;
    background: transparent;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

.btn-resume:hover {
    background: var(--text-color);
    color: var(--bg-color);
}

/* Column 2 */
.project-card { margin-bottom: 2.5rem; }
.project-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }

.chart-placeholder {
    width: 100%;
    height: 160px;
    background-color: var(--header-bg);
    border: 1px dashed var(--quote-color);
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--quote-color);
    font-size: 0.8rem;
}

/* Column 3 */
.col-badges { display: flex; flex-direction: column; gap: 1rem; }

.badge {
    border: 2px solid var(--text-color);
    color: var(--text-color);
    border-radius: 50px;
    padding: 1rem;
    text-align: center;
    font-weight: 800;
    font-size: 0.8rem;
    width: 90%;
    box-shadow: -4px 4px 0px var(--green-accent);
    background-color: var(--bg-color);
    transition: all 0.3s ease;
}

.decorative-shapes {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.shape-pill { width: 40px; height: 120px; background-color: var(--text-color); border-radius: 20px; }
.shape-circle { width: 80px; height: 80px; background-color: var(--green-accent); border-radius: 50%; }
.shape-ring { width: 70px; height: 70px; border: 2px solid var(--text-color); border-radius: 50%; }

/* --- Column 4: Passport Style Photo --- */
.profile-image-container {
    width: 100%;
    max-width: 200px; /* Keeps it from getting too massive */
    aspect-ratio: 3.5 / 4.5; /* Forces the exact Indian Passport ratio */
    margin: 1.5rem 0 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 4px solid var(--btn-bg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.profile-image-container:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.2);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================
   4. RESOURCES GRID & FOOTER
   ========================================== */
.section-divider {
    border: none;
    border-top: 2px dashed var(--quote-color);
    margin: 60px 0;
    opacity: 0.3;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 25px;
    text-align: center;
}

.resource-card {
    background-color: var(--header-bg);
    border: 1px solid var(--shadow-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.resource-card i { font-size: 2.5rem; color: var(--btn-bg); transition: transform 0.3s ease; }
.resource-card h3 { font-size: 1.1rem; font-weight: 600; }

.resource-card:hover {
    transform: translateY(-8px);
    border-color: var(--btn-bg);
    box-shadow: 0 10px 20px rgba(13, 110, 253, 0.15);
    background-color: var(--btn-bg);
    color: var(--btn-text);
}
.resource-card:hover i { color: var(--btn-text); transform: scale(1.2); }

.site-footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--shadow-color);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

/* ==========================================
   5. RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .portfolio-grid { grid-template-columns: 1fr 1fr; }
    .col-projects { grid-column: span 2; }
}

@media (max-width: 768px) {
    .top-header { flex-direction: column; gap: 15px; }
    .info-section { width: 100%; justify-content: space-between; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .col-projects { grid-column: span 1; }
    .main-title { text-align: center; font-size: 2.5rem; }
}
/* ==========================================
   6. COMPACT TIMELINE (Experience & Education)
   ========================================== */
.timeline-compact {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.timeline-item-compact {
    border-left: 2px solid var(--btn-bg);
    padding-left: 12px;
    margin-left: 5px;
}

.timeline-item-compact h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--text-color);
    line-height: 1.3;
}

.timeline-item-compact .company {
    font-size: 0.8rem;
    color: var(--btn-bg);
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
/* ==========================================
   7. SKILLS TAGS (Column 1)
   ========================================== */
.skill-category-small { margin-bottom: 1.2rem; }
.skill-category-small h4 { 
    font-size: 0.85rem; 
    color: var(--text-color); 
    margin-bottom: 0.5rem; 
    text-transform: uppercase; 
    font-weight: 700;
}
.skill-tags-small { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 6px; 
}
.skill-tags-small span { 
    background: rgba(13, 110, 253, 0.1); 
    color: var(--btn-bg); 
    font-size: 0.75rem; 
    padding: 5px 10px; 
    border-radius: 4px; 
    font-weight: 600; 
    border: 1px solid rgba(13, 110, 253, 0.2);
}

/* ==========================================
   8. CONTACT ME SECTION
   ========================================== */
.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    background: var(--header-bg); 
    padding: 40px; 
    border-radius: 12px; 
    border: 1px solid var(--shadow-color);
    box-shadow: 0 4px 6px var(--shadow-color);
}
.sub-title { 
    font-size: 1.2rem; 
    margin-bottom: 15px; 
    color: var(--text-color); 
    font-weight: 700;
}
.sub-title i { color: var(--btn-bg); margin-right: 8px; }

.social-links { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}
.social-btn { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    padding: 12px 15px; 
    border: 1px solid var(--shadow-color); 
    border-radius: 8px; 
    color: var(--text-color); 
    text-decoration: none; 
    transition: all 0.3s ease; 
    font-weight: 500; 
    background: var(--bg-color);
}
.social-btn:hover { 
    border-color: var(--btn-bg); 
    color: var(--btn-bg); 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.1);
}

.contact-form { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}
.form-row { display: flex; gap: 15px; }
.form-row input { flex: 1; }

.contact-form input, .contact-form textarea { 
    padding: 12px 15px; 
    border: 1px solid var(--shadow-color); 
    border-radius: 8px; 
    background: var(--bg-color); 
    color: var(--text-color); 
    font-family: inherit; 
    transition: all 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus { 
    outline: none; 
    border-color: var(--btn-bg); 
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.submit-btn { 
    padding: 15px; 
    background: var(--btn-bg); 
    color: var(--btn-text); 
    border: none; 
    border-radius: 8px; 
    font-weight: 600; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.submit-btn:hover { 
    background: var(--btn-hover); 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

/* Responsive adjustment for Contact Section */
@media (max-width: 768px) { 
    .contact-grid { grid-template-columns: 1fr; padding: 25px;} 
    .form-row { flex-direction: column; }
}
/* ==========================================
   9. DETAILED TIMELINE & PROJECT LINKS
   ========================================== */

/* Experience Section Styling */
.timeline-detailed {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline-item-detailed {
    border-left: 2px solid var(--btn-bg);
    padding-left: 15px;
    margin-left: 5px;
}

.timeline-item-detailed h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: var(--text-color);
    line-height: 1.3;
}

.timeline-item-detailed .company {
    font-size: 0.8rem;
    color: var(--btn-bg);
    font-weight: 600;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.exp-bullets {
    list-style-type: disc;
    padding-left: 15px;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.5;
}

.exp-bullets li {
    margin-bottom: 6px;
}

/* Project Link Styling */
.project-card {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--shadow-color);
}
.project-card:last-child {
    border-bottom: none;
}

.project-title-link {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.project-title-link h3 {
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.project-title-link:hover h3 {
    color: var(--btn-bg);
}


/* ==========================================
   10. FLEXIBLE RESPONSIVE LAYOUT
   ========================================== */

/* Laptops / Desktop */
.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr 1fr;
    gap: 2.5rem;
}

/* Tablets (iPad Landscape & Portrait) */
@media (max-width: 1024px) {
    .portfolio-grid { 
        grid-template-columns: 1fr 1fr; 
        gap: 3rem;
    }
    
    /* Allow columns to stretch to fill the 2x2 grid naturally */
    .col-about, .col-education, .col-projects, .col-experience {
        grid-column: span 1;
    }
    
    /* Contact form adjustment for tablet */
    .contact-grid { 
        grid-template-columns: 1fr; 
        padding: 30px;
    } 
}

/* Mobile Phones */
@media (max-width: 768px) {
    .main-content {
        padding: 30px 20px;
    }
    
    .portfolio-grid { 
        grid-template-columns: 1fr; 
        gap: 2.5rem;
    }
    
    .profile-image-container {
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .form-row { 
        flex-direction: column; 
    }
}
