:root {
    --navy: #0f2747;           /* Deep navy: header, footer, headings */
    --navy-dark: #0a1a33;
    --primary-color: #0f2747;  /* Headings and organization names */
    --accent-color: #2a64ad;   /* Navy blue: positions, icons, hover */
    --accent-light: #8fb8e8;   /* Light blue for icons on the navy header */
    --text-color: #334155;     /* Readable dark charcoal */
    --muted-color: #5b6b82;    /* Dates, locations */
    --bg-color: #f5f7fb;       /* Cool off-white background */
    --card-bg: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* HEADER STYLE */
header {
    background: linear-gradient(135deg, #1d3d6b 0%, var(--navy) 55%, var(--navy-dark) 100%);
    color: white;
    padding: 50px 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 2.8rem;
    letter-spacing: -0.5px;
}

.subtitle {
    color: #b2c0d3;
    font-size: 1.2rem;
    margin-top: 10px;
    font-weight: 300;
}

.contact-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 30px;
}

.contact-links a {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.contact-links a:hover {
    color: #ffffff;
}

.contact-links i {
    margin-right: 5px;
    color: var(--accent-light);
}

/* CARDS & SECTIONS */
section {
    margin-bottom: 50px;
}

h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    border-bottom: 2px solid #dfe6f0;
    padding-bottom: 8px;
    margin-bottom: 20px;
}

h2 i {
    color: var(--accent-color);
    margin-right: 10px;
}

.card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
    border-left: 4px solid #c9d4e3;
    transition: transform 0.2s ease, border-left-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    border-left-color: var(--accent-color);
}

/* Row 1: organization (left) + location (right)
   Row 2: position in blue (left) + date (right) */
.card-header,
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.card-header {
    font-size: 1.1rem;
    color: var(--primary-color);
}

/* Let long names wrap instead of pushing the date/location off the card */
.card-header > strong,
.sub-header > .degree {
    min-width: 0;
    overflow-wrap: break-word;
}

.sub-header {
    margin-top: 4px;
}

.org-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.org-link:hover {
    color: var(--accent-color);
}

.date {
    flex-shrink: 0;
    white-space: nowrap;
    background: #eaf0f8;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted-color);
}

.location {
    flex-shrink: 0;
    white-space: nowrap;
    padding: 0 10px;
    font-size: 0.85rem;
    color: var(--muted-color);
}

.location i {
    margin-right: 4px;
    color: #9aabc2;
}

.degree {
    margin: 0;
    font-weight: 500;
    color: var(--accent-color);
}

ul {
    margin: 15px 0 0 0;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

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

/* SKILLS: label column + content column */
.skill-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid #eef2f7;
}

.skill-row:first-child {
    padding-top: 0;
}

.skill-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Tablet: keep dates on the right, let long titles wrap beside them */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    .subtitle {
        font-size: 1rem;
    }
}

/* Phone: dates stay on the right; long names and dates wrap instead */
@media (max-width: 560px) {
    .container {
        padding: 16px;
    }
    .card {
        padding: 18px;
    }
    .card-header,
    .sub-header {
        align-items: flex-start;
        gap: 10px;
    }
    .card-header {
        font-size: 1rem;
    }
    .date,
    .location {
        white-space: normal;
        max-width: 40%;
        text-align: right;
    }
    .date {
        font-size: 0.8rem;
        border-radius: 12px;
    }
    .location {
        font-size: 0.8rem;
        padding-right: 0;
    }
    .skill-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* FOOTER */
footer {
    text-align: center;
    padding: 30px;
    color: #9aabc2;
    font-size: 0.9rem;
    background: var(--navy-dark);
    margin-top: 60px;
}
