@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap'); 

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html { 
    background-color: #f4f7f6; 
}

body {
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    line-height: 1.7; 
    color: #333;
    max-width: 1000px; 
    margin: 30px auto; 
    padding: 30px; 
    border: 1px solid #ddd; 
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08); 
    background-color: #fff; 
    font-size: 17px; 
}

header {
    border-bottom: 2px solid #eee;
    padding-bottom: 10px; 
    margin-bottom: 30px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}

.main-nav {
    width: 100%; 
    background-color: #f8f9fa; 
    padding: 10px 0; 
    border-radius: 5px; 
}

.main-nav ul {
    list-style: none; 
    padding: 0;
    margin: 0;
    display: flex; 
    justify-content: center; 
    gap: 20px; 
}

.main-nav li {
    margin: 0; 
}

.main-nav a {
    text-decoration: none; 
    color: #1a73e8; 
    padding: 8px 15px; 
    border-radius: 4px;
    transition: background-color 0.3s ease; 
    font-weight: 600;
}

.main-nav a:hover,
.main-nav a:focus { 
    background-color: #e7f3ff;
    color: #0f4fa8; 
}

#about {
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px; 
    margin-bottom: 40px; 
}

.header-content {
    display: flex;
    align-items: flex-start; 
    gap: 20px;
    flex: 3; 
    min-width: 300px; 
}

.profile-pic {
    width: 150px;  
    height: 150px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 3px solid #eee;
}

.header-text h1 {
    margin-bottom: 5px;
    color: #1a73e8; 
    font-weight: 700; 
}

.header-text h2 {
    margin-bottom: 10px;
    font-weight: normal;
    color: #555;
    font-size: 1.2em;
}

.summary {
    font-size: 0.95em;
    color: #444;
}

.contact-info {
    flex: 1; 
    min-width: 250px; 
    background-color: #f0f8ff; 
    border-radius: 8px;
    font-size: 0.9em;
    margin-top: 0;
}

.contact-info ul {
    list-style: none;
}

.contact-info li {
    margin-bottom: 8px;
}

.contact-info a {
    color: #1a73e8;
    text-decoration: none;
}

contact-info a:hover {
    text-decoration: underline;
}

main {
    padding: 0 10px; 
}

section {
    margin-bottom: 40px;
}

h2 { 
    color: #1a73e8;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 700; 
}

h3 { 
    color: #333;
    margin-bottom: 10px;
    font-size: 1.3em;
    font-weight: 700; 
    margin-top: 20px; 
}

h4 { 
    color: #555;
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 1.1em;
    font-weight: 700; 
}

p, li {
    margin-bottom: 12px; 
    color: #444;
}

ul {
    list-style-position: inside; 
    padding-left: 10px; 
}

strong {
    font-weight: 600; 
}

a {
    color: #1a73e8;
}

a:hover {
    color: #0f4fa8;
}

#skills .skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px;
}

.soft-skills {
    list-style: none;
    padding-left: 0;
}

.soft-skills li {
    display: inline-block; 
    background-color: #e7f3ff;
    color: #1a73e8;
    padding: 5px 12px;
    border-radius: 15px;
    margin-right: 8px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.education-entry, .project-entry {
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid #e0e0e0; 
}

.institution, .project-dates {
    font-style: italic;
    color: #666;
    font-size: 0.95em;
    margin-bottom: 10px;
}
.project-link {
    font-size: 0.8em;
    margin-left: 10px;
    text-decoration: none;
    color: #1a73e8;
    font-weight: normal;
    vertical-align: middle;
}
.project-link:hover {
    text-decoration: underline;
}
.project-dates {
    margin-left: 5px;
    font-weight: normal;
}

#languages p {
    margin-bottom: 5px;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.9em;
    color: #777;
}

@media (max-width: 768px) {
    body {
        margin: 10px;
        padding: 15px;
        font-size: 16px; /* Slightly reduce base font size */
    }

    header {
        flex-direction: column; 
        align-items: center; 
        text-align: center;
        margin-bottom: 20px; /* Reduce margin */
    }

    .main-nav ul {
        gap: 10px; /* Reduce gap between nav items */
        flex-wrap: wrap; /* Allow nav items to wrap */
        justify-content: center; /* Keep items centered */
    }

    #about {
        gap: 15px; /* Reduce gap in about section */
        flex-direction: column; /* Stack children vertically */
        align-items: center; /* Center items now that it's a column */
    }

    .header-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        min-width: auto; /* Remove min-width */
        width: 100%; /* Ensure it takes full width */
    }

    .contact-info {
        width: 100%;
        margin-top: 15px;
        text-align: left;
        min-width: auto; /* Remove min-width */
    }

    h1 {
        font-size: 1.8em;
    }
    h2 { /* Section titles */
        font-size: 1.4em;
    }
    h3 { /* Sub-section titles */
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px; /* Further reduce padding */
        font-size: 15px; /* Further reduce base font size */
    }

    .main-nav ul {
        flex-direction: column; /* Stack nav items vertically */
        align-items: center; /* Center stacked items */
        gap: 5px; /* Reduce gap for vertical stack */
    }

    .main-nav a {
        padding: 6px 10px; /* Slightly reduce nav link padding */
    }

    .profile-pic {
        width: 100px; /* Make picture smaller */
        height: 100px;
    }
     h1 {
        font-size: 1.6em;
    }
    h2 { /* Section titles */
        font-size: 1.3em;
    }
    h3 { /* Sub-section titles */
        font-size: 1.1em;
    }
    .skills-grid {
        grid-template-columns: 1fr; /* Already set, but good to confirm */
        gap: 15px; /* Reduce gap in skills grid */
    }

    .education-entry, .project-entry {
        padding-left: 10px; /* Reduce padding */
    }
    /* Adjust font sizes for smaller screens */
}