:root {
    --primary-color: #0056b3;
    --secondary-color: #17a2b8;
    --accent-color: #ffc107;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --light-gray: #e9ecef;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

header {
    background-color: var(--primary-color);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

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

.nav-menu li {
    margin-left: 1rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    nav {
        justify-content: space-between;
    }

    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1.5rem 0;
    }

    .nav-menu a {
        font-size: 1.2rem;
    }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem; /* Reduced from 2rem */
}

section {
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
}

#home {
    text-align: center;
    padding: 3rem 0 1.5rem; /* Reduced bottom padding */
}

#home p {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem; /* Added to create some space below the tagline */
}

#home .profile-photo {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#home .profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

#tagline {
    font-style: italic;
    font-size: 1.2rem;
    color: var(--secondary-color);
    text-align: center;
    margin: 2rem 0;
}

#skills ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style-type: none;
    margin-top: 0.3rem; /* Reduced space after skill section titles */
}

#skills li {
    background-color: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    margin: 0.3rem; /* Reduced from 0.5rem */
    border-radius: 20px;
    transition: transform 0.3s ease;
}

#skills li:hover {
    transform: scale(1.05);
}

.skill-list, .cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.skill-list li, .cert-list li {
    display: flex;
    align-items: center;
    background-color: var(--bg-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.skill-list i, .cert-list i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.project {
    background-color: white;
    padding: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.project:hover {
    transform: translateY(-5px);
}

form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    margin: 0 auto;
}

input, textarea {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: 3px;
}

button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: var(--secondary-color);
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.social-links {
    margin-bottom: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 0.5rem 0;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .contact-buttons .button {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    main {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 2rem;
    }

    #home, #tagline, #about, #experience, #projects {
        grid-column: 1 / -1;
    }
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 250px;
    text-align: center;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.5);
}

.linkedin-button {
    background-color: #0077B5;
    color: white;
}

.linkedin-button:hover {
    background-color: #005f8d;
}

.email-button {
    background-color: var(--primary-color);
    color: white;
}

.email-button:hover {
    background-color: var(--secondary-color);
}

.button i {
    margin-right: 10px;
}

@media (max-width: 768px) {
    .button {
        width: 100%;
    }
}

html {
    scroll-behavior: smooth;
}

.contact-intro {
    margin-bottom: 1.5rem;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.hero-text {
    text-align: center;
}

.tagline {
    font-style: italic;
    color: var(--secondary-color);
}

.skills-grid, .cert-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-category, .cert-list li {
    background-color: var(--light-gray);
    padding: 1rem;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.skill-category:hover, .cert-list li:hover {
    transform: translateY(-5px);
}

.skill-category h3 {
    margin-bottom: 1rem;
}

.skill-category ul {
    list-style-type: none;
}

.skill-category li, .cert-list li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.skill-category i, .cert-list i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    section {
        padding: 2rem 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .button {
        padding: 10px 20px;
    }
}

/* Experience Section */
.experience-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light-gray);
}

.experience-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.experience-item h3 {
    margin-bottom: 0.5rem;
}

.experience-meta {
    font-style: italic;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.experience-item ul {
    padding-left: 1.5rem;
}

.experience-item li {
    margin-bottom: 0.5rem;
}

/* Skills Section */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style-type: none;
    padding: 0;
}

.skills-list li {
    background-color: var(--light-gray);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skills-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skills-list i {
    margin-right: 0.5rem;
}