/* Basic Reset and Body Styles */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6fa;
    color: #222;
    line-height: 1.6;
}

/* Header and Navigation */
header {
    background: #2d3e50;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
}
header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    letter-spacing: 2px;
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}
nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.2s;
}
nav a:hover, nav a:focus {
    color: #ffb347;
}

/* Main Sections */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}
section {
    margin-bottom: 2.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 2rem;
}
section h2 {
    margin-top: 0;
    color: #2d3e50;
    font-size: 2rem;
}

/* About Me */
#about-me p {
    text-align: center;
    font-size: 1.15rem;
    margin: 1rem 0 0 0;
}

/* Projects Section */
#projects {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
#projects article {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    padding: 1rem;
    gap: 1.5rem;
}
#projects figure {
    margin: 0;
}
#projects img {
    max-width: 120px;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
#projects figcaption {
    font-size: 1rem;
    color: #555;
}

/* Skills List with Icons */
#skills ul {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
#skills li {
    position: relative;
    padding-left: 2rem;
    font-size: 1.1rem;
}
#skills li::before {
    content: '\2714'; /* checkmark icon */
    position: absolute;
    left: 0;
    color: #4caf50;
    font-size: 1.2rem;
}

/* Education Section */
#education ul {
    list-style: none;
    padding: 0;
}
#education li {
    margin-bottom: 1rem;
}

/* Contact Form */
#contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}
#contact label {
    font-weight: 500;
}
#contact input, #contact textarea {
    padding: 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}
#contact button {
    background: #2d3e50;
    color: #fff;
    border: none;
    padding: 0.8rem;
    border-radius: 4px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
}
#contact button:hover, #contact button:focus {
    background: #ffb347;
    color: #222;
}

/* Contact Info Links */
.contact-info a {
    color: #0077b5; /* LinkedIn blue as default */
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.contact-info a[href^="mailto:"] {
    color: #d44638; /* Gmail red for email */
}
.contact-info a[href*="linkedin"],
.contact-info a:contains('LinkedIn') {
    color: #0077b5; /* LinkedIn blue */
}
.contact-info a[href*="github"],
.contact-info a:contains('GitHub') {
    color: #333; /* GitHub dark gray */
}
.contact-info a:hover, .contact-info a:focus {
    color: #ffb347;
}
footer .contact-info a,
footer .contact-info a[href^="mailto:"] {
    color: #fff;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
footer .contact-info a:hover, footer .contact-info a:focus {
    color: #ffb347;
}

/* Footer */
footer {
    background: #2d3e50;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    font-size: 1rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 900px) {
    main {
        max-width: 100%;
    }
    #projects article {
        flex-direction: column;
        align-items: flex-start;
    }
}
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    section {
        padding: 1rem;
    }
    #skills ul {
        flex-direction: column;
        gap: 0.75rem;
    }
}
@media (max-width: 500px) {
    header h1 {
        font-size: 1.5rem;
    }
    section h2 {
        font-size: 1.3rem;
    }
    #projects img {
        max-width: 90px;
    }
}

/* Cross-browser vendor prefixes */
header, nav, main, section, article, figure, footer {
    display: block;
}
