/* Modern Resume Page Styling */
body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    width: 100%;
}

body > *:not(#header):not(footer) {
    max-width: 1200px;
    width: 100%;
    padding: 1rem 1rem;
    margin: 0 auto;
    box-sizing: border-box;
}

h1, h2 {
    text-align: center;
    font-size: 1.4rem;
    color: #667eea;
    margin: 0.5rem 0 1rem;
    padding-bottom: 0;
    font-weight: 600;
    max-width: 900px;
    line-height: 1.5;
}

h3 {
    text-align: center;
    font-size: 1.5rem;
    color: #667eea;
    margin: 0.5rem 0 0.25rem;
    font-weight: 600;
}

.download-wrap {
    text-align: center;
    margin: 1rem 0;
}

#downloadBtn {
    display: inline-block;
    width: auto;
    padding: 0.35rem 0.9rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

#downloadBtn {
    background: linear-gradient(90deg,#667eea,#764ba2);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

#downloadBtn:hover { 
    opacity: .95; 
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.08);
}

body {
    padding-bottom: 30px;
}

.experience, .education, .activities, .projects {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    margin: 0 auto 1rem;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.experience .container, .education .container, .activities .container, .projects .container {
    display: flex;
    flex-direction: row;          /* title left, date right on desktop */
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;

    background: transparent;
    border-radius: 12px;
    padding: 1rem;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.experience .container:hover, .education .container:hover, .activities .container:hover, .projects .container:hover, .projects p:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.experience .container h4, .education .container h4, .activities .container h4, .projects .container h4 {
    margin: 0.5rem 0;
    color: #333;
    font-weight: 600;
}

.experience .container h4:first-child, .education .container h4:first-child, .activities .container h4:first-child, .projects .container h4 {
    color: #667eea;
    font-size: 1.2rem;
}

.experience ul, .education ul, .activities ul {
    list-style: none;
    padding-left: 0;
    margin: 0.75rem 0;
}

.experience ul li, .education ul li, .activities ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
}

.experience ul li::before, .education ul li::before, .activities ul li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.experience ul li:last-child, .education ul li:last-child, .activities ul li:last-child {
    border-bottom: none;
}

.activities p, .projects p {
    color: #555;
    line-height: 1.8;
    margin: 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

#ab {
    margin-top: 1rem;
}

.date {
    color: #667eea;
    font-weight: 500;
    /* text-align: right;            right-aligns the date text */
}

/* Responsive Design */
@media (max-width: 768px) {
    h2, h3 {
        font-size: 1.5rem;
    }
    
    .experience, .education, .activities, .projects {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .experience .container,
    .education .container,
    .activities .container,
    .projects .container {
        padding: 1.25rem;
        flex-direction: column;
        align-items: center;      /* center the flex items */
        text-align: center;       /* center text inside the container */
    }
    
    .date {
        margin-left: 0;           /* no push-right on small screens */
        width: 100%;
        text-align: center;
    }
}

@media (prefers-color-scheme: dark) {
    .experience, .education, .activities, .projects {
        background: transparent;
        color: #e0e0e0;
        box-shadow: none;
    }
    
    .experience .container, .education .container, .activities .container, .projects .container {
        border-left-color: #667eea;
        background: transparent;
        box-shadow: none;
    }
    
    .experience .container h4, .education .container h4, .activities .container h4, .projects .container h4 {
        color: #e0e0e0;
    }
    
    .experience .container h4:first-child, .education .container h4:first-child, .activities .container h4:first-child, .projects .container h4 {
        color: #8b9eff;
    }
    
    .experience ul li, .education ul li, .activities ul li {
        color: #d0d0d0;
        border-bottom-color: #3a3a3a;
    }
    
    .activities p, .projects p {
        background: transparent;
        color: #e0e0e0;
        border-left-color: #667eea;
    }
    
    p > a {
        color: #667eea;
    }

    .date {
        color: #667eea !important;
        /* text-align: right; */
    }
}