:root {
    --primary-color: #2c3333;
    --secondary-color: #395b64;
    --light-gray: #a5c9ca;
    --dark-gray: #2c3333;
    --background-color: #e7f6f2;
}

body {
    font-family: 'Roboto Mono', monospace;
    margin: 0;
    line-height: 1.4; /* Made line spacing more compact */
    color: var(--dark-gray);
    background-color: var(--light-gray);
    font-size: 0.85em; /* Smaller base font size */
}

.container {
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    max-width: 1200px;
    margin: 30px auto;
    background: var(--background-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.sidebar {
    background: var(--primary-color);
    color: var(--light-gray);
    padding: 30px 15px;
}

.main-content {
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    margin: 0;
    font-size: 1.7rem; /* Smaller font size */
    font-weight: 700;
    color: var(--light-gray);
}

header p {
    margin: 5px 0 0 0; /* Reduced top margin to bring it closer to h1 */
    font-size: 0.9rem; /* Smaller font size */
    font-weight: 300;
}

.profile-pic {
    width: 150px; /* Adjust size as needed */
    height: 150px; /* Ensure equal width and height for a perfect circle */
    border-radius: 50%; /* Make the image round */
    display: block; /* Center the image */
    margin: 0 auto 20px auto; /* Center and add spacing below */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border: 3px solid var(--secondary-color); /* Optional: Add a border */
}

#contact ul, #skills ul, #certifications ul {
    list-style: none;
    padding: 0;
}

#education ul {
    list-style: disc;
    list-style-position: inside;
    padding-left: 0; /* Align with main content header */
}

#contact li, #skills li, #certifications li {
    margin-bottom: 8px; /* Reduced spacing */
}

#contact a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s;
}

#contact a:hover {
    color: #ffffff;
}

#contact li i {
    margin-right: 8px; /* Space between icon and text */
}

:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.section-header-row {
    display: flex;
    align-items: baseline; /* Align items based on their baselines */
    justify-content: space-between; /* Pushes H2 left and button right */
    border-bottom: 3px solid var(--secondary-color); /* Underline goes all the way */
    padding-bottom: 8px; /* Consistent with previous H2 padding */
    margin-bottom: 10px; /* Spacing below the header row */
}

.section-header-row h2 {
    margin-bottom: 0; /* Remove default margin-bottom from h2 when in a flex container */
    border-bottom: none; /* Border handled by parent .section-header-row */
    padding-bottom: 0; /* Padding handled by parent .section-header-row */
}

h2 {
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 15px; /* Default margin for H2s not in section-header-row */
    font-size: 1.4rem; /* Smaller font size */
    font-weight: 700;
    /* Removed border-bottom and padding-bottom from here, as they are handled by .section-header-row */
}

.sidebar h2 {
    color: var(--light-gray);
    /* border-bottom and padding-bottom removed to avoid double line */
}

#experience article {
    margin-bottom: 20px; /* Reduced spacing */
}

#experience h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem; /* Smaller font size */
    font-weight: 700;
}

#experience p {
    margin-top: 2px; /* Reduced spacing */
    color: var(--primary-color);
}

#experience ul {
    margin-top: 5px; /* Reduced spacing */
    padding-left: 20px; /* Indentation for 4 spaces */
}

#skills ul {
    display: flex;
    flex-wrap: wrap;
}

#skills li {
    background: var(--light-gray);
    color: var(--primary-color);
    padding: 3px 8px; /* Smaller padding */
    border-radius: 4px;
    margin-right: 6px; /* Reduced spacing */
    margin-bottom: 6px; /* Reduced spacing */
    font-size: 0.75rem; /* Smaller font size */
    font-weight: 700;
}

.main-content a {
    color: var(--secondary-color);
    /*text-decoration: none;*/
    font-weight: 700;
    transition: color 0.3s ease;
}

.main-content a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 10px; /* Reduced padding */
    margin-top: 20px; /* Reduced spacing */
    font-size: 0.9em; /* Smaller font size for footer */
}

footer a {
    color: var(--secondary-color);
    /*text-decoration: none;*/
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Collapsible content styles */
.collapsible-content {
    display: none;
}

.collapsible-content.expanded {
    display: block;
}

.toggle-button {
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 6px; /* Even smaller padding */
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem; /* Even smaller font size */
    margin-top: 0;
    transition: background-color 0.3s ease;
    display: flex; /* Enable flexbox for icon and text alignment */
    align-items: center; /* Center icon and text vertically */
    gap: 3px; /* Space between icon and text */
}

.toggle-button:hover {
    background-color: #304850; /* Slightly darker secondary color */
}

/* --- Responsive adjustments --- */

/* Tablets and smaller devices */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr; /* Single column layout */
        margin: 20px auto; /* Slightly smaller margin */
        width: 95%; /* Use a percentage width */
        max-width: 768px; /* Ensure it doesn't get too wide on smaller screens */
    }

    .sidebar {
        padding: 20px 15px; /* Adjust padding */
    }

    .main-content {
        padding: 20px; /* Adjust padding */
    }

    header h1 {
        font-size: 1.5rem; /* Smaller for tablets */
    }

    header p {
        font-size: 0.8rem; /* Smaller for tablets */
    }

    h2 {
        font-size: 1.2rem; /* Smaller for tablets */
    }

    .profile-pic {
        width: 120px;
        height: 120px;
    }
}

/* Phones and smaller devices */
@media (max-width: 480px) {
    body {
        font-size: 0.8em; /* Even smaller base font size for phones */
    }

    .container {
        margin: 10px auto;
        border-radius: 0; /* Remove border-radius for full width on small screens */
        box-shadow: none; /* Remove shadow on small screens */
    }

    .sidebar {
        padding: 15px 10px; /* Further adjust padding */
    }

    .main-content {
        padding: 15px 10px; /* Further adjust padding */
    }

    header h1 {
        font-size: 1.3rem; /* Even smaller for phones */
    }

    header p {
        font-size: 0.75rem; /* Even smaller for phones */
    }

    h2 {
        font-size: 1.1rem; /* Even smaller for phones */
    }

    .section-header-row {
        border-bottom: 2px solid var(--secondary-color); /* Slightly thinner border for phones */
    }

    footer {
        font-size: 0.8em; /* Even smaller footer font size */
    }
}

