/* --- Variables --- */
:root {
    --primary-color: rgb(8, 5, 38);
    --accent-color: skyblue;
    --text-color: #333;
    --bg-color: #f9f9f9;
    --white: #ffffff;
    --divider-color: rgba(255, 255, 255, 0.2);
    --shadow: 0 2px 14px var(--accent-color);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    display: flex;
    min-height: 100vh;
}

#sidebar {
    width: 25%;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 30px 20px;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.profile-container {
    text-align: center;
    margin-bottom: 20px;
}

.pfp {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--white);
    object-fit: cover;
    box-shadow: var(--shadow);
}

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

#name {
    margin: 10px 0 5px;
    font-size: 28px;
    font-weight: bold;
    color: var(--white);
}

#job {
    margin: 0;
    font-size: 14px;
    color: var(--accent-color);
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.contact-item .icon {
    flex-shrink: 0;
}

.sidebar-section h3 {
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 18px;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-section ul {
    padding-left: 20px;
    list-style-type: square;
}

.sidebar-section li {
    margin-bottom: 8px;
    font-size: 14px;
}

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

.link-list li {
    margin-bottom: 10px;
}

.link-list a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    display: block;
}

.link-list a:hover {
    color: var(--white);
    padding-left: 5px;
}

.sidebar-divider {
    border: 0;
    border-top: 1px solid var(--divider-color);
    margin: 20px 0;
}

/* --- Main Body Styling --- */
#mainbody {
    width: 75%;
    padding: 40px 50px;
    background-color: var(--bg-color);
}

.section_title {
    font-size: 28px;
    color: var(--primary-color);
    margin-top: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 40px auto;
    width: 80%;
}

.section_title:first-child {
    margin-top: 0;
}

.summary-text {
    text-align: justify;
    color: #555;
    margin-bottom: 20px;
}

ul,
ol {
    margin-top: 0;
    padding-left: 20px;
}

li {
    margin-bottom: 10px;
}

.experience-list li,
.education-list li {
    margin-bottom: 15px;
}

strong {
    color: var(--primary-color);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    #sidebar {
        width: 100%;
        text-align: center;
    }

    #mainbody {
        width: 100%;
        padding: 20px;
    }

    .sidebar-section ul {
        display: inline-block;
        text-align: left;
    }
}

/* --- Download Button --- */
.download-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

.download-btn:hover {
    background-color: var(--white);
    color: var(--primary-color);
}

/* --- Print Styling --- */
@media print {
    @page {
        margin: 0;
    }

    html,
    body {
        margin: 0;
        padding: 0;
        height: 100%;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        font-size: 10.5pt;
    }

    .download-btn {
        display: none;
    }

    .container {
        flex-direction: row;
        min-height: 100vh;
        height: auto;
        display: flex;
        align-items: stretch;
    }

    #sidebar {
        width: 30%;
        text-align: left;
        padding: 25px;
        background-color: var(--primary-color) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        min-height: 100vh;
    }

    #mainbody {
        width: 70%;
        padding: 25px 35px;
    }

    /* Display simplified URLs in print */
    .link-list a::after {
        content: " (" attr(data-print-url) ")";
        font-size: 0.9em;
        opacity: 0.8;
    }

    .link-list a {
        text-decoration: none !important;
        color: var(--accent-color) !important;
    }

    .sidebar-section ul {
        display: block;
        text-align: left;
    }

    h1 {
        font-size: 22px;
        margin: 0 0 5px 0;
    }

    h2 {
        font-size: 16px;
        margin: 10px 0 5px 0;
    }

    h3 {
        font-size: 14px;
        margin: 0 0 5px 0;
    }

    p {
        margin-bottom: 5px;
    }

    li {
        margin-bottom: 2px;
    }

    ul,
    ol {
        margin-bottom: 5px;
    }

    .pfp {
        width: 100px;
        height: 100px;
        border-width: 2px;
    }

    #self {
        margin-bottom: 10px;
    }

    .sidebar-divider {
        margin: 10px 0;
    }

    .sidebar-section {
        margin-bottom: 10px;
    }

    .section_title {
        margin-top: 10px;
        margin-bottom: 5px;
        font-size: 18px;
    }

    .experience-list li,
    .education-list li {
        margin-bottom: 6px;
    }

    .summary-text {
        margin-bottom: 10px;
    }
}

/* --- JavaScript Animation Styles --- */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

.skill-animate {
    opacity: 0;
    animation: slideIn 0.5s ease-out forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.active-section {
    border-left: 3px solid var(--accent-color);
    padding-left: 15px;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .active-section {
        border-left: none;
        padding-left: 0;
    }
}

.link-list a {
    transition: color 0.3s, padding-left 0.3s, transform 0.3s ease;
}

.pfp {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#name {
    display: inline-block;
    min-height: 1.2em;
}

@media print {
    .reveal-element {
        opacity: 1;
        transform: none;
    }

    .skill-animate {
        opacity: 1;
        animation: none;
    }

    .active-section {
        border-left: none;
        padding-left: 0;
    }
}