/* style.css - Complete Interactive and Responsive CV Styles */

/* ======================================================= */
/* 1. Theme Color Variables (Light Mode Default) */
/* ======================================================= */
:root {
    --text-dark: #111827;      /* Primary headings/high contrast */
    --text-body: #4b5563;      /* General text */
    --text-muted: #6b7280;     /* Dates, taglines */
    --bg-page: #ffffff;        /* Main page background */
    --bg-surface: #f9fafb;     /* Card/skill background */
    --border-color: #e5e7eb;   /* Light borders/dividers */
    --accent-color: #3b82f6;   /* Accent color (blue) */

    /* Global Transitions */
    --transition-speed: 0.3s ease-in-out;
}

/* ======================================================= */
/* 2. Dark Mode Styling */
/* ======================================================= */
/* System Default Dark Mode */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #f3f4f6;
        --text-body: #d1d5db;
        --text-muted: #9ca3af;
        --bg-page: #1f2937;
        --bg-surface: #374151;
        --border-color: #4b5563;
        --accent-color: #60a5fa; /* Lighter accent for dark contrast */
    }
}

/* Explicit class for the JS toggle */
body.dark-theme {
    /* Apply dark mode variables directly to body for toggle override */
    --text-dark: #f3f4f6;
    --text-body: #d1d5db;
    --text-muted: #9ca3af;
    --bg-page: #1f2937;
    --bg-surface: #374151;
    --border-color: #4b5563;
    --accent-color: #60a5fa;
    background-color: var(--bg-page);
    color: var(--text-dark);
}

/* ======================================================= */
/* 3. Reset and Global Styles */
/* ======================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /* Apply global transition for all interactive elements */
    transition: all var(--transition-speed);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-page);
    color: var(--text-dark);
}

a {
    color: var(--accent-color);
    text-decoration: none;
}
a:hover {
    color: #2563eb;
}

/* ======================================================= */
/* 4. Theme Toggle Button */
/* ======================================================= */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    z-index: 1000;
}
.theme-toggle i {
    color: var(--text-dark);
    font-size: 1rem;
}
.theme-toggle:hover {
    background: var(--border-color);
}

/* ======================================================= */
/* 5. Header and Contact Info */
/* ======================================================= */
header {
    padding: 20px;
    text-align: center;
}
header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: var(--text-dark);
}
header .tagline {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* FIX: Targeted the correct class 'contact' from HTML */
.contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 10px;
}
.contact a {
    /* Styles for the <a> link itself */
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--text-body); /* Default color from text-body */
}
.contact a i {
    color: var(--accent-color);
    font-size: 1rem;
}
.contact a:hover {
    color: var(--accent-color); /* Highlight color on hover */
}

/* ======================================================= */
/* 6. Main Container and Headings */
/* ======================================================= */
main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

section {
    margin: 50px 0;
}

section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--text-dark);
    position: relative;
    margin-bottom: 25px; /* Increased margin for visual break */
}
section h2 i {
    margin-right: 8px;
    color: var(--accent-color);
}
section h2::after {
    content: '';
    position: absolute;
    bottom: -10px; /* Moved line lower */
    left: 0;
    width: 60px; /* Slightly longer line */
    height: 3px;
    background-color: var(--accent-color);
}

/* ======================================================= */
/* 7. Skills Section */
/* ======================================================= */
.skills-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
/* FIX: Targeted the correct class 'skill' from HTML */
.skill {
    flex: 1;
    min-width: 200px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.skill:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Interactive lift */
}
.skill h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.skill h3 i {
    margin-right: 8px;
}
.skill ul {
    list-style: none;
    padding-left: 0;
}
.skill ul li {
    margin-bottom: 6px;
    color: var(--text-body);
}

/* ======================================================= */
/* 8. Work Experience Section */
/* ======================================================= */
.job {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid var(--accent-color);
    transition: border-color 0.3s ease;
}
.job:hover {
    border-left-color: #2563eb; /* Interactive border highlight */
}
.job h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 4px;
}
.job .company {
    font-size: 1rem;
    font-style: italic;
    color: var(--text-muted);
}
.job .date {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.job ul {
    list-style: disc inside;
    margin-left: 0.5rem;
    color: var(--text-body);
}
.job ul li {
    margin-bottom: 5px;
}

/* ======================================================= */
/* 9. Projects Section */
/* ======================================================= */
/* FIX: Targeted the correct class 'project' from HTML */
.project {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.project:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Interactive lift */
}
.project h3 {
    color: var(--accent-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.project p {
    margin-top: 5px;
    color: var(--text-body);
}

/* ======================================================= */
/* 10. Education and Footer */
/* ======================================================= */
.education-list {
    list-style: none;
    padding: 0;
}
.education-list li {
    margin-bottom: 15px;
    color: var(--text-body);
}
.education-list li strong {
    color: var(--accent-color);
    font-family: 'Montserrat', sans-serif;
}
.education-details {
    font-size: 0.9rem;
    color: var(--text-body);
}

footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
}

/* ======================================================= */
/* 11. Responsive Design */
/* ======================================================= */
@media (max-width: 768px) {
    .skills-grid {
        flex-direction: column;
    }
    .contact {
        flex-direction: column;
        gap: 10px;
    }
    header h1 {
        font-size: 2rem;
    }
    header .tagline {
        font-size: 1rem;
    }
    .job {
        padding-left: 10px;
    }
}
