@font-face {
    font-family: "Caslon Pro";
    src: url("/fonts/ACaslonPro-Regular.otf") format("opentype");
    font-weight: 400;
}
@font-face {
    font-family: "Caslon Pro";
    src: url("/fonts/ACaslonPro-Bold.otf") format("opentype");
    font-weight: 700;
}
@font-face {
    font-family: "Caslon Pro";
    src: url("/fonts/ACaslonPro-Italic.otf") format("opentype");
    font-style: italic;
}

body {
    font-family: "Caslon Pro", serif;
    font-size: 1rem;
}

h1, h2, h3 {
    font-weight: normal;
}

h1 {
    font-size: 1em;
}

h3 {
    font-size: 1em;
    font-style: italic;
    font-weight: 400;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
}

.cv-download {
    font-style: italic;
    font-weight: 400;
}

.smallcaps {
    font-variant: small-caps;
}

h2 {
    font-size: 1em;
}

p {
    line-height: 1.6em;
    margin-bottom: 1em;
    font-variant-numeric: oldstyle-nums;
    text-align: justify;
    hyphens: auto;
    hyphenate-limit-chars: 8 4 4;
}

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

body {
    font-family: "Caslon Pro", serif;
    font-size: 1rem;
    min-height: 100vh;
    background-color: #FFF8F4;
}

a {
    text-decoration: none;
    color: #9A918A;
    transition: color 0.4s ease;
}

a:visited {
    color: #9A918A;
}

a:hover {
    color: #144E84;
}

.page-wrap {
    max-width: 960px;
    margin: 0 auto;
    padding: 3em 1.5em;
    display: flex;
    gap: 4em;
}

.site-name {
    font-size: 1.2em;
    font-weight: normal;
    font-variant: small-caps;
    margin-bottom: 1em;
}

.site-name a {
    text-decoration: none;
    color: #333;
    transition: color 0.4s ease;
}

.site-name a:hover {
    color: #144E84;
}

.sidebar {
    width: 180px;
    flex-shrink: 0;
    position: sticky;
    top: 3em;
    align-self: flex-start;
    overflow: visible;
}

.nav-line {
    position: absolute;
    height: 1px;
    background-color: #333;
    width: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.6em;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    transition: color 0.4s ease;
}

.sidebar a:hover {
    color: #144E84;
}

.content {
    flex: 1;
    max-width: 640px;
    min-width: 0;
    overflow: hidden;
    animation: fade-in 0.35s ease forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

img {
    max-width: 100%;
    height: auto;
}

.gallery {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.gallery img {
    max-width: 100%;
    height: auto;
    display: block;
}

table.cv {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

table.cv td {
    vertical-align: top;
    padding-bottom: 1.4em;
    line-height: 1.5em;
    font-variant-numeric: oldstyle-nums;
}

table.cv td:first-child {
    width: 6em;
    color: #333;
    font-size: 0.875em;
}

table.cv td:nth-child(2) {
    width: 60%;
    padding-right: 2em;
}

table.cv td:nth-child(3) {
    font-size: 0.75em;
    color: #333;
}

.project-list {
    list-style: none;
    font-size: 0.875em;
}

.project-list li {
    padding-bottom: 1.4em;
}

.ornament {
    font-feature-settings: 'ornm' 45;
}

.figure-left {
    float: right;
    width: 50%;
    margin: 0.5em 0 0 1.5em;
}

.figure-left img {
    width: 100%;
    height: auto;
    display: block;
}

.figure-left figcaption {
    display: block;
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #9A918A;
    text-align: right;
}

.figure-full {
    display: block;
    width: 100%;
    margin: 1.5em 0;
}

.figure-full img {
    width: 100%;
    height: auto;
    display: block;
}

.figure-full figcaption {
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #9A918A;
    text-align: right;
}

.figure {
    display: block;
    width: 50%;
    margin: 1.5em auto;
}

.figure img {
    width: 100%;
    height: auto;
    display: block;
}

.figure figcaption {
    margin-top: 0.5em;
    font-size: 0.85em;
    color: #9A918A;
    text-align: right;
}

@media (max-width: 600px) {
    .nav-line {
        display: none;
    }

    .page-wrap {
        padding: 1.5em 1em;
        flex-direction: column;
        gap: 1.5em;
    }

    .sidebar {
        width: 100%;
        position: static;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4em 1.2em;
    }

    .sidebar li {
        margin-bottom: 0;
    }
}