/* --- 1. Global Styles and Variables --- */

/* Default: Light Mode */
:root {
    --primary-color: #5B90FF;
    --background-dark: #ffffff;
    /* Main Body Background */
    --background-light: #ffffff;
    /* Card/Header Background */
    --text-color: #0d0c0c;
    /* Main Text Color */
    --text-secondary: #555555;
    --border-color: #e0e0e0;
    --font-stack: 'Poppins', sans-serif;
}

/* Dark Mode Variables */
body.dark-mode {
    --primary-color: #5B90FF;
    --background-dark: #121212;
    --background-light: #1E1E1E;
    --text-color: #E0E0E0;
    --text-secondary: #A0A0A0;
    --border-color: #333333;
}

/* Base Body Setup */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-stack);
    background-color: var(--background-dark);
    color: var(--text-color);
    line-height: 1.6;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #8bb7ff;
}

/* --- 2. Buttons and CTAs --- */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-color);
    /* Uses text color for contrast */
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    margin-top: 15px;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

body.dark-mode .cta-button {
    color: var(--background-dark);
    /* Dark theme CTA text is dark on blue */
}


.cta-button:hover {
    background-color: #8bb7ff;
    transform: translateY(-2px);
}

.text-link {
    display: inline-block;
    margin-top: 10px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 2px;
}

/* --- 3. Header and Navigation --- */
.header {
    background-color: var(--background-light);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5em;
    color: var(--text-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 300;
    color: var(--text-color);
    padding: 5px 0;
    position: relative;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8em;
    cursor: pointer;
}

.mode-toggle {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.2em;
    cursor: pointer;
    margin-right: 15px;
    padding: 5px;
    transition: color 0.3s;
}

.mode-toggle:hover {
    color: var(--primary-color);
}

/* --- 4. Hero Section --- */
.hero {
    padding: 80px 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
}

.greeting {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-text h2 {
    font-size: 3.5em;
}

.hero-text p {
    color: var(--text-secondary);
}

.hero-image-placeholder {

    min-width: 300px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Styling the actual image */
.profile-image {
    width: 100%;
    /* Make it fill the parent container */
    height: 100%;
    object-fit: cover;
    /* Ensures the image covers the area without distortion */
    border-radius: 50%;
    /* Cuts the image into a perfect circle */
    border: 5px solid var(--primary-color);
    /* Matches the border style */
    display: block;
}

/* Remove the placeholder box styles as they are no longer needed */
.placeholder-box {
    display: none;
}

.placeholder-box {
    width: 100%;
    height: 100%;
    background-color: var(--border-color);
    /* subtle color */
    border-radius: 50%;
    border: 5px solid var(--primary-color);
}

/* --- 5. Generic Section & Cards --- */
.section {
    padding: 80px 0;
    border-top: 1px solid var(--border-color);
}

.section h3 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5em;
}

/* Skills Grid */
.skills-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-card {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Light shadow for light theme */
}

body.dark-mode .skill-card {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Darker shadow for dark theme */
}

.skill-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.skill-card p {
    color: var(--text-secondary);
}

/* Project Cards */
.project-card {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: 8px;
    transition: transform 1.3s, box-shadow 1.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(91, 144, 255, 0.15);
}

.project-link {
    display: block;
    margin-top: 15px;
    font-weight: 600;
}

/* --- 6. Contact Section & Footer --- */
.contact {
    text-align: center;
    padding-bottom: 100px;
}

.social-links {
    margin-top: 30px;
    font-size: 1.1em;
}

.footer {
    padding: 20px 0;
    background-color: var(--background-light);
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/* --- 7. Responsive Design --- */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-image-placeholder {
        margin-top: 40px;
    }

    .hero-text h2 {
        font-size: 2.8em;
    }
}

@media (max-width: 768px) {

    /* Menu Toggle for Mobile */
    .nav-bar {
        position: relative;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--background-light);
        /* Uses background variable */
        border-top: 1px solid var(--border-color);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }

    .hero-text h2 {
        font-size: 2.2em;
    }

    .section {
        padding: 50px 0;
    }
}