/* Colors */
:root {
    --background: #faf9f5;   /* ivory */
    --text: #1f1e1d;         /* slate */
    --muted: #87867f;
    --secondary: #5e5d59;    /* description text */
    --accent: hwb(0 18% 80%);       /* toggle knob; change to taste */
}
:root.dark {
    --background: #1f1e1d;
    --text: #faf9f5;
    --muted: #b0aea5;
    --secondary: #d1cfc5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--text);
    font-family: "Newsreader", "Times New Roman", serif;
    font-size: 1.25rem;
    line-height: 1.5;
    transition: color .5s, background-color .5s;
}

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

/* Layout: one narrow centered column */
.container {
    width: 100%;
    max-width: 38.75rem;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 30px 0 10px;
    margin-bottom: 25px;
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-name {
    font-size: 1.44em;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
}

/* Dark mode switch */
.toggle-switch {
    position: relative;
    width: 40px;
    height: 20px;
    cursor: pointer;
}
.toggle-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-label {
    position: absolute;
    inset: 0;
    border: 1px solid var(--text);
    border-radius: 2rem;
    background-color: var(--background);
}
.toggle-label::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--accent);
    transition: transform .1s;
}
.toggle-checkbox:checked + .toggle-label::before {
    transform: translateX(20px);
}
.toggle-checkbox:focus-visible + .toggle-label {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Sections */
section + section {
    margin-top: 1.3em;
}
h2 {
    font-size: 1.2em;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 .7em;
}

/* Bio: full on wide screens, collapsed behind "More" on small ones */
.intro-more,
.intro-ellipsis {
    display: none;
}
@media (max-width: 767px) {
    .intro:not(.expanded) .intro-more,
    .intro:not(.expanded) .intro-ellipsis {
        display: inline;
    }
    .intro:not(.expanded) .intro-more-content,
    .intro:not(.expanded) .intro-period {
        display: none;
    }
}
.intro {
    margin-bottom: 3em;
}

/* Lists */
.bullet-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1em;
    display: flex;
    flex-direction: column;
    gap: .8em;
}
.year {
    color: var(--muted);
}
.project-desc {
    margin: .3em 0 0;
    font-size: .85em;
    line-height: 1.45;
    color: var(--secondary);
}
.project-controls {
    font-style: italic;
    color: var(--muted);
}

main {
    padding-bottom: 4rem;
}

@media (max-width: 479px) {
    body {
        font-size: 1.15rem;
    }
}
