/* --- 1. Global Reset --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif; /* Clean, modern font */
    line-height: 1.7;
    background-color: #0f172a; /* Dark Navy Background */
    color: #cbd5e1; /* Light Grey Text for readability */
}

/* --- 2. Header: Flexbox Navbar --- */
header {
    background-color: #1e293b; /* Slightly lighter dark shade */
    padding: 1rem 2rem;
    border-bottom: 3px solid #0d9488; /* Teal Accent Border */
    
    /* FLEXBOX IMPLEMENTATION */
    display: flex; 
    justify-content: space-between; /* Pushes Name to left, Nav to right */
    align-items: center; /* Vertically centers content */
    flex-wrap: wrap; /* Allows wrapping on very small screens */
}

header h1 {
    color: #f1f5f9; /* White text */
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.tagline {
    display: none; /* Hidden in header for a cleaner look */
}

nav {
    /* FLEXBOX IMPLEMENTATION */
    display: flex;
    gap: 20px; /* Space between links */
}

nav a {
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #2dd4bf; /* Bright Teal on hover */
}

/* --- 3. Main Layout --- */
main {
    max-width: 1000px; /* Wider layout than before */
    margin: 40px auto;
    padding: 0 20px;
    
    /* FLEXBOX COLUMN LAYOUT for main content */
    display: flex;
    flex-direction: column;
    gap: 40px; /* Consistent space between sections */
}

/* --- 4. About Section: Side-by-Side Flex Layout --- */
.about-grid {
    background-color: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    
    /* FLEXBOX IMPLEMENTATION */
    display: flex;
    align-items: center; /* Vertically centers image and text */
    gap: 3rem; /* Space between image and text */
}

.profile-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px; /* Rounded square instead of circle */
    border: 2px solid #0d9488; /* Teal border */
    
    /* Prevent image from shrinking */
    flex-shrink: 0; 
}

/* --- 5. Skills Section: Flex Wrapping --- */
section {
    /* Common styles for other sections */
    background-color: #1e293b;
    padding: 2rem;
    border-radius: 12px;
}

h2 {
    color: #f1f5f9;
    border-left: 5px solid #0d9488; /* Left border accent */
    padding-left: 15px;
    margin-bottom: 20px;
}

.skills-container {
    /* FLEXBOX IMPLEMENTATION */
    display: flex;
    flex-wrap: wrap; /* Critical: Wraps tags to next line */
    gap: 12px;
}

.skill-tag {
    background-color: #334155; /* Dark grey pill */
    color: #2dd4bf; /* Teal text */
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid #475569;
}

/* --- 6. Footer --- */
footer {
    text-align: center;
    padding: 3rem;
    margin-top: auto;
    border-top: 1px solid #334155;
}

.contact-list {
    list-style: none;
    margin-top: 1.5rem;
    
    /* FLEXBOX IMPLEMENTATION */
    display: flex;
    justify-content: center; /* Centers items horizontally */
    gap: 30px;
}

.contact-list a {
    color: #f1f5f9;
    text-decoration: none;
    border-bottom: 1px dotted #0d9488;
}

/* --- 7. RESPONSIVENESS (Mobile View) --- */
@media (max-width: 768px) {
    /* Stack Header Elements */
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Stack About Section (Image on top, text below) */
    .about-grid {
        flex-direction: column; /* Switches row to column */
        text-align: center;
    }

    .profile-img {
        width: 140px;
        height: 140px;
    }
    
    /* Adjust padding for mobile */
    main {
        margin: 20px auto;
    }
}
