:root {
    color-scheme: light dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    font-weight: 400;
    color: #202124;
    background: #fafafa;
}

* { box-sizing: border-box; }

html { 
    min-width: 320px; 
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    min-height: 100vh;
}

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

a:hover { text-decoration: none; }

.site-shell {
    width: min(100% - 2rem, 80ch);
    margin-inline: auto;
}

.header-div {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.5rem 0 1.25rem;
    border-bottom: 1px solid color-mix(in srgb, currentColor 18%, transparent);
}

.site-title {
    margin: 0 0 .4rem;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.1;
}

.site-subtitle { font-size: .85rem; }

.site-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
}

.site-nav a {
    padding: .18rem .35rem;
    border: 1px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
    border-color: currentColor;
}

.projects-list {
    width: 100%;
    margin: 2rem 0;
}

.project-item {
    display: grid;
    grid-template-columns: 90px 5rem minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: .75rem 1.5rem;
    padding: 2.5rem 0;
    border-bottom: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    position: relative;
    transition: transform 120ms ease, opacity 120ms ease;
}

.project-item:first-child {
    border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.project-item:hover {
    transform: translateX(.25rem);
}

.project-item-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.project-item-img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 40%;
    background: color-mix(in srgb, currentColor 8%, transparent);
}

.project-item-year {
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
}

.project-item-name {
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
    font-size: 1.4rem;
    font-weight: 650;
}

.project-item-text {
    grid-column: 2 / 5;
    grid-row: 2;
    font-size: .92rem;
}

.project-code-link {
    grid-column: 4;
    grid-row: 1;
    z-index: 2;
    padding: .45rem .75rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: #fafafa;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1;
    opacity: 0;
    transform: translateY(-.25rem);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease, background 120ms ease;
}

.project-item:hover .project-code-link,
.project-item:focus-within .project-code-link {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.project-code-link:hover {
    background: color-mix(in srgb, currentColor 10%, #fafafa);
}

.project-item-link:focus-visible,
.project-code-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.gray { opacity: .58; }

.placeholder-page {
    padding: 2rem 0;
}

.placeholder-page h2 { margin-top: 0; }

.placeholder-page p {
    max-width: 65ch;
    margin: 0 0 1rem;
}

@media (hover: none) {
    .project-code-link {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        color: #ededed;
        background: #141414;
    }

    .project-code-link {
        background: #141414;
    }

    .project-code-link:hover {
        background: color-mix(in srgb, currentColor 10%, #141414);
    }
}

@media (max-width: 560px) {
    .project-item {
        grid-template-columns: 60px minmax(0, 1fr) 60px;
        grid-template-rows: 60px auto auto;
        gap: .5rem .75rem;
        padding: 1.5rem 0;
    }

    .project-item:hover {
        transform: none;
    }

    .project-item-img {
        grid-column: 1;
        grid-row: 1;
        width: 60px;
        height: 60px;
        z-index: 1;
    }

    .project-item-name {
        grid-column: 1 / -1;
        grid-row: 1;
        align-self: center;
        justify-self: center;
        text-align: center;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .project-item-year {
        grid-column: 1;
        grid-row: 2;
        justify-self: center;
        align-self: center;
    }

    .project-code-link {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        align-self: start;
        z-index: 2;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .project-item-text {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: .35rem;
    }
}



.cv-page {
    padding: 2rem 0 3rem;
}

.cv-section {
    padding: 1.75rem 0;
    border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
}

.cv-section h3 {
    margin-bottom: 1.5rem;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cv-entry {
    display: grid;
    grid-template-columns: 8rem minmax(0, 1fr);
    gap: 1.5rem;
    padding: 0 0 1.75rem;
}

.cv-entry:last-child {
    padding-bottom: 0;
}

.cv-entry-meta {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.cv-entry-logo {
    width: 64px;
    height: 64px;
    margin-top: .75rem;
    object-fit: contain;
    border-radius: .25rem;
}

.cv-entry h4,
.cv-skills h4 {
    margin-bottom: .35rem;
    font-size: 1rem;
}

.cv-entry p {
    margin: .35rem 0 0;
}

.cv-skills {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.cv-skills p {
    margin: 0;
    font-size: .92rem;
}

.cv-contact {
    padding-top: 1.75rem;
    border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent);
    font-size: .92rem;
}

.cv-contact a:hover {
    text-decoration: underline;
    text-underline-offset: .2em;
}

@media (prefers-color-scheme: dark) {
    .logo-invert-dark {
        filter: invert(1);
    }
}

@media (max-width: 560px) {
    .cv-entry {
        grid-template-columns: 1fr;
        gap: .35rem;
        padding-bottom: 2rem;
    }

    .cv-entry h4 {
        margin-top: 0;
    }

    .cv-entry-meta {
        display: grid;
        grid-template-columns: auto max-content;
        grid-template-rows: auto auto;
        column-gap: .75rem;
        row-gap: .15rem;
        justify-content: start;
        align-items: start;
    }

    .cv-entry-logo {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
        width: 48px;
        height: 48px;
        margin: 0;
    }

    .cv-entry-meta > span {
        grid-column: 2;
    }

    .cv-entry-meta > span:first-child {
        grid-row: 1;
    }

    .cv-entry-meta > span:nth-of-type(2) {
        grid-row: 2;
    }

    .cv-entry-meta > span:only-of-type {
        grid-row: 1 / span 2;
        align-self: center;
    }
}

