/* src/portfolio.css */

:root {
    --primary: #111827;
    --secondary: #4b5563;
    --accent: #7DBD94;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --border-color: #e5e7eb;
}

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

body {
    font-family: "Inter", sans-serif;
    background-color: #fff;
    color: var(--primary);
    line-height: 1.5;
    animation: pageSettle 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes pageSettle {
    from {
        opacity: 0.985;
        transform: translateY(4px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

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

ul {
    list-style: none;
}

.container {
    max-width: 70.9rem;
    margin: 0 auto;
    padding: 0 1.75rem;
}

.layout-border-x {
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.spacer-line {
    width: 100%;
    height: 1rem;
    border: 1px solid var(--border-color);
}

.content-wrapper {
    padding: 2.25rem 1.75rem;
}

.site-header .content-wrapper {
    padding-top: 1.35rem;
    padding-bottom: 1.35rem;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
}

#branding {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

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

#branding .logo {
    max-width: 55px;
    border-radius: 50%;
}

.site-title {
    font-size: 1.3rem;
    line-height: 1.33;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-pronouns {
    display: inline-block;
    font-size: 0.66rem;
    font-weight: 400;
    margin-left: 0.4rem;
    color: var(--muted-foreground);
    text-transform: lowercase;
    font-style: oblique 15deg;
    letter-spacing: 0.04em;
}

.site-description {
    display: block;
    font-size: 0.77rem;
    color: var(--secondary);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.main-navigation {
    position: relative;
}

.menu-toggle {
    display: none;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--primary);
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    font-size: 1.05rem;
}

.menu {
    display: flex;
    align-items: center;
    gap: 0;
}

.menu-item a {
    display: inline-block;
    padding: 0.5rem 0.95rem 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.73rem;
    color: var(--secondary);
    position: relative;
    border-bottom: 2px solid transparent;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.menu-item.current-menu-item a::before,
.menu-item a:hover::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: -0.95rem;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.25s ease;
    width: 100%;
}

.menu-item.current-menu-item a,
.menu-item a:hover {
    color: var(--accent);
}

.menu-item:not(:last-child) a::after {
    content: "/";
    margin-left: 0.95rem;
    color: var(--border-color);
}

.menu .menu-item.menu-item--parent:not(:last-child) a::after {
    content: "\2192";
    margin-left: 0.95rem;
    color: var(--accent);
    font-weight: 700;
}

.mobile-navigation {
    display: none;
}

.mobile-menu-panel {
    display: none;
}

.entry-title {
    font-size: 2rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
}

.entry-text {
    margin-top: 1rem;
    font-weight: 250;
    margin-bottom: 2.25rem;
    color: var(--secondary);
    font-style: oblique 15deg;
    letter-spacing: 0.0001em;
}

.filterable-nav {
    margin-top: 1.65rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.mobile-filter {
    display: none;
    width: 100%;
    padding: 0.75rem 0.85rem;
    font: inherit;
    color: var(--primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

.filterable-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    color: var(--secondary);
    font-size: 0.79rem;
    font-weight: 500;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.filterable-nav a.current,
.filterable-nav a:hover {
    color: #fff;
    border-color: var(--accent);
    background-color: var(--accent);
}

.grid-wrapper {
    padding-top: 0.5rem;
}

.filterable-items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.project-item {
    min-width: 0;
}

.project-item a {
    display: block;
}

.featured-image {
    margin: 0;
}

.featured-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.5s ease;
    display: block;
}

.project-item:hover .featured-image img {
    transform: scale(1.03);
}

.featured-image figcaption {
    padding-top: 0.9rem;
}

.project-title {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.project-item:hover .project-title {
    color: var(--accent);
}

.project-subtitle {
    margin-top: 0.33rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-excerpt {
    margin-top: 0.5rem;
    font-size: 0.89rem;
    color: var(--secondary);
    line-height: 1.5;
}

.site-footer .content-wrapper {
    text-align: center;
}

.footer__text {
    font-size: 0.875rem;
    color: var(--secondary);
}

.project-item.is-filter-enter {
    animation: filterItemIn 260ms ease;
}

.project-item.is-filter-leave {
    animation: filterItemOut 170ms ease forwards;
}

@keyframes filterItemIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.99);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes filterItemOut {
    from {
        opacity: 1;
        transform: none;
    }

    to {
        opacity: 0;
        transform: translateY(8px) scale(0.99);
    }
}

@media (prefers-reduced-motion: reduce) {
    .project-item.is-filter-enter,
    .project-item.is-filter-leave {
        animation: none;
    }

    body {
        animation: none;
    }
}

@media (max-width: 990px) {
    .header-flex {
        flex-wrap: nowrap;
        align-items: center;
        row-gap: 0.35rem;
        position: relative;
    }

    #branding {
        flex: 1 1 auto;
    }

    .main-navigation {
        margin-left: auto;
        flex: 0 0 auto;
        width: auto;
        display: block;
        min-width: 44px;
        position: static;
    }

    .mobile-menu-panel {
        display: block;
        width: 100%;
        max-height: 0;
        opacity: 0;
        transform: translateY(-0.2rem);
        overflow: hidden;
        pointer-events: none;
        transition:
            max-height 0.32s ease,
            opacity 0.22s ease,
            transform 0.22s ease,
            margin-top 0.22s ease,
            border-color 0.22s ease;
    }

    .mobile-menu-panel.active {
        max-height: 30rem;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 0.65rem;
        border: 1px solid var(--border-color);
        background: #fff;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .main-navigation .menu {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        background: #fff;
        border: 0;
        padding: 0;
        position: static;
        max-height: 0;
        opacity: 0;
        transform: translateY(-0.2rem);
        pointer-events: none;
        overflow: hidden;
        transition:
            max-height 0.32s ease,
            opacity 0.22s ease,
            transform 0.22s ease,
            margin-top 0.22s ease,
            border-color 0.22s ease;
    }

    .mobile-menu-panel .menu {
        display: block;
        max-height: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        overflow: visible;
        transition: none;
        margin-top: 0;
        border: 0;
        padding: 0.35rem 0 0;
    }

    .main-navigation .menu.active {
        max-height: 30rem;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        margin-top: 0;
        padding: 0.35rem 0 0;
        border: 1px solid var(--border-color);
    }

    .main-navigation .menu-item,
    .mobile-menu-panel .menu-item {
        display: block;
    }

    .main-navigation .menu-item + .menu-item,
    .mobile-menu-panel .menu-item + .menu-item {
        border-top: 1px solid var(--border-color);
    }

    .main-navigation .menu-item--parent + .menu-item--sub,
    .mobile-menu-panel .menu-item--parent + .menu-item--sub {
        border-top: 0;
    }

    .main-navigation .menu-item a,
    .mobile-menu-panel .menu-item a {
        display: block;
        padding: 0.78rem 0.75rem;
        border-bottom: 0;
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .main-navigation .menu-item a::before,
    .mobile-menu-panel .menu-item a::before {
        display: none;
    }

    .main-navigation .menu-item a::after,
    .mobile-menu-panel .menu-item a::after {
        display: none;
    }

    .main-navigation .menu-item--sub a,
    .mobile-menu-panel .menu-item--sub a {
        margin-left: 0;
        padding-left: 1.35rem;
        font-size: 0.69rem;
        letter-spacing: 0.06em;
    }

    .main-navigation .menu-item--sub a::before,
    .mobile-menu-panel .menu-item--sub a::before {
        display: none;
        content: none;
    }

    .filterable-items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.35rem;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 1.75rem 1.2rem;
    }

    #branding {
        gap: 0.6rem;
    }

    .site-description {
        font-size: 0.71rem;
    }

    .mobile-filter {
        display: block;
    }

    .filterable-nav a {
        display: none;
    }

    .filterable-items {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 450px) {
    .site-title {
        font-size: 1.1rem;
    }

    .site-pronouns {
        display: block;
        margin-left: 0;
        margin-top: 0.1rem;
    }

    .site-description {
        display: none;
    }

    .main-navigation {
        margin-left: auto;
    }
}