/* Shared values used throughout the website */
:root {
    --background: #141416;
    --surface: #1C1C20;
    --text: #F2F2F3;
    --text-muted: #B0B0B8;
    --accent: #D92D42;
    --border: #35353C;
}

/* Include padding and borders in an element's total size */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--text);
    font-family: system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-underline-offset: 0.2em;
}

a:hover {
    text-decoration: none;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

.sidebar {
    background-color: var(--surface);
    padding: 2rem;

    display: flex;
    flex-direction: column;
    gap: 0;
}

.site-name {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;

    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.profile-picture {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

/* Social profile links at the bottom of the sidebar */
.social-links {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;
    border-radius: 0.4rem;

    color: var(--text-muted);
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent);
    background-color: var(--background);
}

.social-links svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.social-links a + a {
    position: relative;
}

.social-links a + a::before {
    content: "";
    position: absolute;
    left: -0.25rem;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: var(--border);
}

main {
    max-width: 48rem;
    padding: 2rem;
}

h1,
h2,
h3 {
    line-height: 1.25;
}

h1 {
    font-size: 2.5rem;
}

p {
    color: var(--text-muted);
}

main > section + section {
    margin-top: 3rem;
}

#introduction + #current-work {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
}

article + article {
    margin-top: 2rem;
}

/* Navigation shared by desktop and mobile */
nav ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;

    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    display: block;
    padding: 0.6rem 1rem;
    border-radius: 0.4rem;

    color: var(--text-muted);
    text-decoration: none;
}

nav a:hover {
    background-color: var(--background);
    color: var(--text);
}

nav a[aria-current="page"] {
    background-color: var(--background);
    color: var(--accent);
    font-weight: 600;
}

.work-update {
    border-left: 3px solid var(--accent);
    padding-left: 1.25rem;
}

.update-date {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Homepage introduction */
#introduction h1 {
    margin: 0 0 1rem;
}

#introduction p {
    margin: 0;
}

/* Current-work heading */
#current-work > h2 {
    margin: 0 0 2rem;
}

/* Individual updates */
.work-update h3 {
    margin: 0;
}

.work-update p {
    margin: 0.75rem 0 0;
}

.work-update .update-date {
    margin-top: 0.5rem;
}

.project {
    min-width: 0;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: var(--surface);
}

.project h2 {
    margin: 0;
}

.project-tools {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.project-grid > article + article {
    margin-top: 0;
}

.project-image {
    margin: 1.25rem 0;
}

.project-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.4rem;
}

.project-image figcaption {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Reusable WIP page decoration */
.page-wip {
    --tape-color: #E8B931;
    --tape-height: 10px;
}

.page-wip::before,
.page-wip::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    height: var(--tape-height);
    z-index: 10;
    pointer-events: none;

    background: repeating-linear-gradient(
        135deg,
        var(--tape-color) 0,
        var(--tape-color) 12px,
        var(--background) 12px,
        var(--background) 24px
    );
}

.page-wip::before {
    top: 0;
}

.page-wip::after {
    bottom: 0;
}

.wip-notice {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--accent);
    background-color: var(--surface);
    font-size: 0.875rem;
}

/* Desktop layout */
@media (min-width: 48rem) {
    body {
        display: grid;
        grid-template-columns: 17rem minmax(0, 1fr);
    }

    .sidebar {
        grid-column: 1;
        grid-row: 1;

        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    nav ul {
        flex-direction: column;
    }

    main {
        grid-column: 2;
        grid-row: 1;

        width: 100%;
        margin-inline: 0;
        padding: 4rem 2rem;
    }

    main:has(.project-grid) {
        max-width: 72rem;
    }
}

/* Smaller screens */
@media (max-width: 47.999rem) {
    h1 {
        font-size: 2rem;
    }

    .social-links {
        margin-top: 2rem;
    }
}

@media (min-width: 75rem) {
    .project-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}