.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@font-face {
    font-family: "SC";
    src: url("/fonts/smallcaps.otf") format("opentype");
}

body {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1.05rem;
    font-variant-numeric: oldstyle-nums;
    font-feature-settings: 'onum' 1;
}

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-family: 'Cormorant SC', serif;
    font-variant-caps: normal;
    letter-spacing: 0.04em;
}

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: 'Cormorant Garamond', serif;
    font-size: 1.05rem;
    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-family: 'Cormorant SC', serif;
    font-size: 1.2em;
    font-weight: normal;
    font-variant-caps: normal;
    letter-spacing: 0.03em;
    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;
    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;
}

table.cv-skills td,
table.cv-skills td:first-child,
table.cv-skills td:nth-child(2) {
    width: 50%;
    color: inherit;
    font-size: 1em;
    padding-right: 2em;
}

table.cv-skills td:nth-child(2) {
    padding-right: 0;
}

.slash-12 {
    font-size: 9pt;
}

.slash-cv {
    font-size: 6pt;
}

.cv-detail {
    font-size: 0.75em;
    font-weight: 400;
    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: left;
    width: 50%;
    margin: 0.5em 1.5em 1em 0;
}

.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: left;
}

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

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

.figure-right 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;
}

.pullquote-right {
    float: right;
    width: 45%;
    aspect-ratio: 1 / 1;
    margin: 0 0 1.5em 1.5em;
    padding: 1.5em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid #333;
}

.pullquote-right blockquote {
    font-size: 1.5em;
    font-style: italic;
    line-height: 1.4;
    margin: 0;
    text-align: left;
}

.pullquote-right figcaption {
    margin-top: 1em;
    font-size: 0.8em;
    color: #9A918A;
    line-height: 2;
}

.content-with-images {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.post-text {
    min-width: 0;
}

.post-images {
    display: flex;
    flex-direction: row;
    gap: 0.75em;
}

.post-images img {
    flex: 1;
    width: 0;
    height: auto;
    object-fit: cover;
    display: block;
}

@media (max-width: 600px) {
    .content p, .content li {
        font-size: 0.875em;
    }

    .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;
    }

    table.cv,
    table.cv-skills {
        font-size: 0.75em;
    }

    .post-images img {
        min-width: 0;
    }
}