:root {
    --paper: #faf7f2;
    --ink: #1c1a17;
    --muted: #57534a;
    --faint: #8a857a;
    --accent: #7c2d2d;
    --rule: #e2ddd3;
    --rule-heavy: #1c1a17;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 17px; }

body {
    font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 44rem;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 3rem;
}

a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

/* Accessibility: skip link */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.skip-link:focus {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 60;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    background: var(--ink);
    color: var(--paper);
    padding: 0.5rem 1rem;
    text-decoration: none;
}

/* Masthead */
.masthead h1 {
    font-size: 3.2rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    line-height: 1.05;
}
.masthead .role {
    margin-top: 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 500;
}
.masthead .contact {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--muted);
}
.masthead .contact .sep,
.resumes .links .sep {
    color: var(--faint);
    margin: 0 0.45rem;
}
.masthead::after {
    content: '';
    display: block;
    margin-top: 2rem;
    border-top: 2px solid var(--rule-heavy);
}

section { margin-top: 3.2rem; }

.section-label {
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--faint);
    font-weight: 600;
    margin-bottom: 1.1rem;
}

/* Intro */
.intro p {
    font-size: 1.35rem;
    line-height: 1.5;
    font-weight: 400;
}
.intro p + p {
    margin-top: 1rem;
    font-size: 1.05rem;
    color: var(--muted);
}

/* Currently */
.currently h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.7rem;
}
.currently p { max-width: 60ch; }
.currently p + p { margin-top: 0.8rem; }
.currently .visit {
    margin-top: 0.9rem;
    font-size: 0.95rem;
}

/* Experience tabs */
.tabs {
    display: flex;
    gap: 1.8rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 2.2rem;
}
.toggle-btn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0 0 0.7rem;
    cursor: pointer;
    color: var(--faint);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.toggle-btn:hover { color: var(--ink); }
.toggle-btn.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

/* Experience entries */
.track-content { display: none; }
.active-track { display: block; }

.entry { margin-bottom: 2.4rem; }
.entry-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}
.entry-head h3 {
    font-size: 1.25rem;
    font-weight: 600;
}
.entry-head .dates {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    color: var(--accent);
    white-space: nowrap;
}
.entry .org {
    font-style: italic;
    color: var(--muted);
    margin-top: 0.1rem;
}
.entry .desc {
    margin-top: 0.6rem;
    max-width: 62ch;
}

/* Competencies */
.comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
}
@media (max-width: 560px) {
    .comp-grid { grid-template-columns: 1fr; }
}
.comp-grid h3 {
    font-size: 1.05rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 0.7rem;
}
.comp-grid p {
    color: var(--muted);
    font-size: 0.98rem;
}

/* Resumes */
.resumes p { max-width: 60ch; color: var(--muted); }
.resumes .links { margin-top: 0.7rem; }

footer {
    margin-top: 4rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
    font-size: 0.85rem;
    color: var(--faint);
}
