@view-transition {
    navigation: auto;
}

:root {
    --bg: #111113;
    --text-white: #ffffff;
    --text-cream: #ece6d9;
    --text-grey: #727272;
    --text-date: #616161;
    --text-role: #888888;
    --border-card: rgba(255, 255, 255, 0.1);
    --content-max-width: 600px;
}

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

body {
    font-family: 'Sentient', serif;
    font-weight: 400;
    color: var(--text-white);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    animation: page-fade-in 0.3s ease-out;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 0 24px;
    background-color: var(--bg);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: var(--content-max-width);
    width: 100%;
    padding: 72px 0;
}

/* Back link */

.back-link {
    font-family: 'Sentient', serif;
    font-weight: 300;
    font-size: 16px;
    color: var(--text-grey);
    text-decoration: none;
    transition: color 0.2s ease;
    align-self: flex-start;
    margin-bottom: -28px;
}

.back-link:hover {
    color: var(--text-cream);
}

/* Profile header */

.profile-header {
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 100%;
}

.header-row {
    display: flex;
    gap: 20px;
    align-items: center;
}

.profile-photo {
    flex-shrink: 0;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.header-info h1 {
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.9px;
    color: var(--text-white);
}

.subtitle {
    font-family: 'Sentient', serif;
    font-weight: 200;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-grey);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 13px;
    color: var(--text-grey);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.badge:hover {
    background-color: rgba(255, 255, 255, 0.14);
    color: var(--text-cream);
}

.ext {
    display: inline;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85em;
    vertical-align: 0.05em;
    margin-left: 2px;
    opacity: 0.7;
}

.about {
    width: 100%;
}

.about p {
    font-family: 'Sentient', serif;
    font-weight: 200;
    font-size: 18px;
    line-height: 1.65;
    color: var(--text-white);
    opacity: 0.8;
    max-width: 680px;
}

/* Sections */

.cv-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.section-label {
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1.145;
    letter-spacing: -0.4px;
    color: var(--text-grey);
    padding-bottom: 20px;
}

.items {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* CV Item rows */

.cv-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    padding: 20px 0;
}

.item-date {
    flex-shrink: 0;
    width: 130px;
    padding-right: 24px;
    font-family: 'Sentient', serif;
    font-weight: 200;
    font-style: italic;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-date);
}

.item-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.item-title {
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-cream);
}

.item-title-link {
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-cream);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.item-title-link:hover {
    opacity: 0.7;
}

.item-location {
    font-family: 'Sentient', serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-role);
}

.item-description {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.item-description p {
    font-family: 'Sentient', serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-role);
}

/* Mobile */

@media (max-width: 767px) {
    .content {
        padding: 48px 0;
        gap: 40px;
    }

    .header-info h1 {
        font-size: 28px;
        letter-spacing: -0.7px;
    }

    .about p {
        font-size: 16px;
    }

    .cv-item {
        flex-direction: column;
        gap: 4px;
    }

    .item-date {
        width: 100%;
        padding-right: 0;
    }

    .item-title,
    .item-title-link {
        font-size: 16px;
    }
}

/* Print */

@media print {
    :root {
        --bg: #ffffff;
        --text-white: #111111;
        --text-cream: #111111;
        --text-grey: #555555;
        --text-date: #555555;
        --text-role: #555555;
        --border-card: #dddddd;
    }

    body {
        animation: none;
    }

    .container {
        padding: 0;
    }

    .content {
        max-width: 100%;
        padding: 0;
        gap: 32px;
    }

    .back-link {
        display: none;
    }

    .about p {
        opacity: 1;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.75em;
        color: var(--text-grey);
        word-break: break-all;
    }
}

/* View Transitions */

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

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

@keyframes vt-slide-up-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

::view-transition-old(root) {
    animation: 280ms ease-out both vt-fade-out;
}

::view-transition-new(root) {
    animation: 280ms ease-in both vt-slide-up-in;
}

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