:root {
    --bg-color-start: #fdfbfb;
    --bg-color-end: #ebedee;
    --card-bg-color: #ffffff;
    --primary-text-color: #2c3e50;
    --secondary-text-color: #7f8c8d;
    --accent-color: #2980b9;
    --border-color: #ecf0f1;
    --shadow-color: rgba(44, 62, 80, 0.09);

    /* Android-style CTA colours */
    --phone-green: #4CAF50;
    --email-blue: #2196F3;
    --whatsapp-green: #25D366;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-image: linear-gradient(120deg, var(--bg-color-start) 0%, var(--bg-color-end) 100%);
    color: var(--primary-text-color);
    margin: 0;
    padding: 25px 20px;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* --- General Layout & Typography --- */
.container { max-width: 1200px; margin: 0 auto; }
h1, h2, h3 { font-weight: 600; margin: 0; line-height: 1.2; }
h1 { font-size: 2.2em; font-weight: 700; }
h2 { font-size: 1.5em; color: var(--accent-color); margin-bottom: 25px; padding-bottom: 10px; border-bottom: 2px solid var(--border-color); }
h3 { font-size: 1.2em; margin-bottom: 5px; color: var(--primary-text-color); }
p { margin: 0 0 15px 0; color: #555; }
a { color: var(--accent-color); text-decoration: none; transition: color 0.3s ease; }
.card ul { padding-left: 20px; margin: 0; }
.card li { margin-bottom: 8px; }

/* --- Card & Animation --- */
.card {
    background: var(--card-bg-color); border-radius: 16px; padding: 35px;
    margin-bottom: 30px; border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px var(--shadow-color);
}
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* --- Header Section --- */
.header { text-align: center; }
.header-content p { font-size: 1.2em; color: var(--secondary-text-color); }
.headshot {
    width: 140px; height: 140px; border-radius: 50%; object-fit: cover;
    border: 5px solid var(--card-bg-color); box-shadow: 0 5px 20px var(--shadow-color);
    margin: 0 auto 20px auto;
}
.cta-buttons { display: flex; justify-content: center; gap: 25px; margin-top: 20px; }
.cta-btn {
    display: flex; align-items: center; justify-content: center;
    width: 56px; height: 56px;
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.17);
    transition: transform 0.3s ease, filter 0.3s ease;
}
.cta-btn:hover { transform: translateY(-4px); filter: brightness(95%); }
.cta-btn svg { width: 28px; height: 28px; }
/* Specific CTA Colours */
.cta-btn.phone { background-color: var(--phone-green); }
.cta-btn.email { background-color: var(--email-blue); }
.cta-btn.whatsapp { background-color: var(--whatsapp-green); }

/* --- Content Sections --- */
.job { margin-bottom: 25px; }
.job:last-child { margin-bottom: 0; }
.date { font-style: italic; font-size: 0.9em; color: var(--secondary-text-color); display: block; margin-bottom: 8px; }
.company { font-weight: 600; color: #555; display: block; margin-top: -5px; }

/* --- Recommendations List --- */
.recommendations-list { list-style: none; padding: 0; }
.recommendations-list li { margin-bottom: 15px; }
.recommendations-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600; color: var(--primary-text-color);
    text-decoration: none;
    transition: color 0.2s ease;
    padding: 10px;
    border-radius: 8px;
    background-color: transparent;
    transition: background-color 0.3s;
}
.recommendations-list a:hover {
    background-color: #f7f9fa;
    color: var(--accent-color);
}
.recommendations-list .subtext { display: block; font-weight: 400; font-size: 0.9em; color: var(--secondary-text-color); }
.icon-download {
    width: 24px;
    height: 24px;
    fill: var(--secondary-text-color);
    margin-left: 15px;
    transition: fill 0.3s;
}
.recommendations-list a:hover .icon-download {
    fill: var(--accent-color);
}

/* --- Mobile Layout & Section Ordering --- */
.main-layout {
    display: flex;
    flex-direction: column;
}

.main-column, .sidebar-column {
    display: contents;
}

/* New display order for mobile */
#profile { order: 1; }
#skills { order: 2; }
#experience { order: 3; }
#education { order: 4; }
#extramurals { order: 5; }
#recommendations { order: 6; }
#download-cv { order: 7; }


/* --- Desktop Layout --- */
@media (min-width: 992px) {
    body { padding: 50px; }
    h1 { font-size: 3em; }
    .card { padding: 40px; }
    .header { display: flex; text-align: left; align-items: center; gap: 30px; }
    .headshot { margin: 0; width: 150px; height: 150px; }
    .cta-buttons { justify-content: flex-start; }

    .main-layout {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 30px;
    }
    .main-column {
        flex: 2;
        display: block;
    }
    .sidebar-column {
        flex: 1;
        display: block;
        position: sticky;
        top: 30px;
    }
    #profile, #skills, #experience, #education, #extramurals, #recommendations, #download-cv {
        order: 0;
    }
}
