:root {
    --primary-color: #2563eb;
    --secondary-color: #1e293b;
    --bg-color: #f8fafc;
    --text-color: #334155;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden; /* Prevents side-scrolling on mobile */
}

/* Navigation */
nav {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(30, 41, 59, 0.8), rgba(30, 41, 59, 0.8)), 
                url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 40px 20px;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 10px; }
.hero p { font-size: 1.1rem; max-width: 700px; opacity: 0.9; }

/* Layout & Containers */
.container {
    max-width: 1100px;
    width: 90%;
    margin: 60px auto;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--secondary-color);
}

/* About Section Flexbox Fix */
.about-flex-container {
    display: flex;
    align-items: center;
    gap: 40px;
}

.about-photo { flex: 1; }
.about-photo img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.about-text { flex: 1.5; }

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.project-card:hover { transform: translateY(-5px); }
.project-img { width: 100%; height: 220px; object-fit: cover; }
.project-content { padding: 25px; }

/* Skills */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.skill-badge {
    background: white;
    padding: 10px 20px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

/* Footer */
footer {
    background: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

/* Responsive Breakpoint (Tablets & Phones) */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* Changed from right:-100% for cleaner toggle */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--secondary-color);
        padding: 20px;
        text-align: center;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

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

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

    .about-flex-container {
        flex-direction: column; /* Stacks image on top of text */
        text-align: center;
        gap: 20px;
    }

    .about-photo img {
        max-width: 300px;
    }

    .project-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }
}