body {
    margin: 0;
    padding: 50px;
    color: var(--text);
    background: var(--background);
}

.wrapper {
    width: 860px;
    margin: 0 auto;
}

header {
    width: 270px;
    float: left;
}

section {
    width: 500px;
    float: right;
    padding-bottom: 50px;
}

h1,
h2,
h3 {
    margin-top: 0;
    line-height: 1.2;
}

h1 {
    margin-bottom: 16px;
}

h2 {
    margin-top: 32px;
    margin-bottom: 12px
}

h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

section > :first-child {
    margin-top: 0;
}

section p {
    text-align: justify;
    hyphens: auto;
}

header h1 {
    margin: 0 0 12px;
}

header p {
    margin: 0 0 12px;
}

header h1 a {
    color: inherit;
    text-decoration: none;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

nav li {
    margin-bottom: 8px;
}

nav a {
    display: block;
    padding: 8px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--button-text);
    background: var(--button);
    border-radius: 8px
}

nav a:hover,
nav a:focus {
    color: var(--button-text);
    background: var(--active-button);
}
nav a.is-active {
    color: var(--button-text);
    background: var(--active-button);
}

a {
    color: var(--anchor);
}

@media screen and (max-width: 960px) {
    body{
	padding: 30px;
    }

    .wrapper {
	width:  auto;
    }

    header,
    section {
	float: none;
	width: auto;
    }

    section {
	margin-top: 25px;
	padding-top: 25px;
    }
}

@media screen and (max-width: 480px) {
    body {
	padding: 15px;
    }
}

.smallcaps {
    font-variant-caps: small-caps;
    font-variant-numeric: oldstyle-nums;
}

.portrait {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 16px;
}

.contact {
    margin: 0 0 16px;
}

.profile-links {
    display: flex;
    gap: 12px;
    align-items: center;
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.profile-links li {
    margin: 0;
}

.profile-links a {
    display: inline-flex;
    align-items: center;
}

.profile-icon {
    width: 28px;
    height: 28px;
    display: block;
}

.profile-icon-dark {
    display: none;
}

html[data-theme="dark"] .profile-icon-light {
    display:none;
}

html[data-theme="dark"] .profile-icon-dark {
    display:block;
}

.palette-painting {
    position: relative;
    margin: 2rem 0;
}

.palette-painting img {
    display: block;
    width: 100%;
    height: auto;
}

.palette-row {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    gap: .5rem;
}

.palette-row span {
    display: block;
    width: 3rem;
    height: 1.5rem;
    background: var(--swatch);
}

.entry-figure {
    display: block;
    width: 100%;
    height: auto;
    margin: 1.5rem auto;
}

.entry-doublefig {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.entry-doublefig img {
    width: 50%;
    min-width: 0;
    height: auto;
}

.vesper {
    display:block;
    width: 100%;
    margin: 0 0 20px;
    padding: 8px 12px;
    color: var(--button-text);
    background: var(--button);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
}

.vesper:hover,
.vesper:focus {
    background: var(--active-button);
}

.dark-only {
    display: none;
}

html[data-theme="dark"] .light-only {
    display: none;
}

html[data-theme="dark"] .dark-only {
    display: block;
}
