:root {
    --page-bg: #f2f2f2;
    --green-main: #025951;
    --green-dark: #012326;
    --text-light: #d0d4ab;
    --text-dark: #011114;
    --card-grey: #d9d9d9;
    --reel-grey: #bebebe;
    --green-accent: #038c7f;
    --surface-light: #ffffff;
    --border-soft: rgba(1, 17, 20, 0.1);
    --shadow-soft: 0 12px 34px rgba(1, 17, 20, 0.12);
    --shadow-card: 0 18px 45px rgba(1, 17, 20, 0.16);
    --radius: 15px;
    --lexend: "Lexend", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(3, 140, 127, 0.08), transparent 360px),
        var(--page-bg);
    color: var(--text-dark);
    font-family: var(--lexend);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.nav-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    min-height: 92px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--green-main);
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(1, 17, 20, 0.18);
}

.site-title,
.contact-label,
.home-label,
.filter-input,
.page-footer p {
    font-family: var(--lexend);
    font-weight: 400;
    line-height: 1;
}

.site-title {
    margin: 0;
    color: var(--text-light);
    font-size: 34px;
    line-height: 1.12;
}

.nav-link {
    color: inherit;
    text-decoration: none;
}

.contact-button,
.home-button {
    min-height: 62px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--green-dark);
    color: var(--text-light);
    border-radius: var(--radius);
    box-shadow: 0 6px 18px rgba(1, 17, 20, 0.18);
    transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.contact-icon,
.home-icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    background-color: currentColor;
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.contact-icon {
    width: 42px;
    height: 33px;
    mask-image: url("../svg/contact_icon.svg");
    -webkit-mask-image: url("../svg/contact_icon.svg");
}

.contact-label,
.home-label {
    font-size: 28px;
    color: inherit;
    transition: color 220ms ease;
}

.home-icon {
    width: 42px;
    height: 42px;
    mask-image: url("../svg/home_icon.svg");
    -webkit-mask-image: url("../svg/home_icon.svg");
}

.nav-link:hover .contact-button,
.nav-link:focus-visible .contact-button,
.nav-link:hover .home-button,
.nav-link:focus-visible .home-button {
    background: var(--green-accent);
    color: var(--text-dark);
    transform: translateY(-2px);
}

.demo-reel {
    width: 100%;
    min-height: 610px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--reel-grey);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.demo-reel p {
    margin: 0;
    font-family: var(--lexend);
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    color: #000;
}

.content-column {
    width: min(1365px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
}

.contact-page-main {
    width: min(1365px, calc(100% - 40px));
    flex: 1 0 auto;
}

.contact-page {
    gap: 36px;
}

.contact-page .contact-page-main {
    width: min(1360px, calc(100% - 40px));
    padding-top: 28px;
    padding-bottom: 40px;
}

.contact-intro {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.contact-about {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;
}

.contact-photo-placeholder {
    width: 385px;
    min-width: 385px;
    min-height: 385px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--card-grey);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.contact-photo {
    display: block;
    width: 100%;
    height: 385px;
    object-fit: cover;
    object-position: center;
}

.contact-about-copy {
    width: 925px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    color: var(--text-dark);
    background: var(--surface-light);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.contact-section-title {
    margin: 0;
    font-family: var(--lexend);
    font-size: 36px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-dark);
    text-align: left;
}

.contact-body-text,
.contact-email,
.contact-email a {
    margin: 0;
    font-family: var(--lexend);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.45;
    color: var(--text-dark);
}

.contact-body-text {
    text-align: left;
}

.resume-link {
    align-self: center;
    min-height: 50px;
    padding: 10px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green-main);
    color: var(--text-light);
    border-radius: var(--radius);
    font-family: var(--lexend);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(2, 89, 81, 0.18);
    transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.resume-link:hover,
.resume-link:focus-visible {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.contact-details {
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: var(--surface-light);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.contact-email a {
    text-decoration: none;
}

.contact-socials {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-decoration: none;
    transition: opacity 220ms ease;
}

.social-link:hover,
.social-link:focus-visible {
    opacity: 0.72;
}

.social-icon {
    display: block;
    object-fit: contain;
}

.social-icon--linkedin {
    width: 54px;
    height: 50px;
}

.social-icon--github {
    width: 51px;
    height: 50px;
}

.filter-dropdown {
    width: 100%;
    position: relative;
    min-height: 68px;
}

.filter-input {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 2;
    width: 1360px;
    max-width: 100%;
    min-height: 68px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--green-main);
    border-radius: var(--radius);
    color: var(--text-light);
    font-size: 30px;
    border: 0;
    text-align: left;
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, background-color 220ms ease;
}

.filter-input:hover,
.filter-input:focus-visible,
.filter-input[aria-expanded="true"] {
    background: var(--green-dark);
}

.filter-input:hover,
.filter-input:focus-visible {
    transform: translateY(-1px);
}

.filter-input__label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.filter-icon {
    width: 42px;
    height: 42px;
    display: inline-block;
    flex: 0 0 auto;
    background-color: currentColor;
    mask-image: url("../svg/filter_icon.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: url("../svg/filter_icon.svg");
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.dropdown-arrow {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    background-color: var(--text-light);
    mask-image: url("../svg/dropdown_down_icon.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    -webkit-mask-image: url("../svg/dropdown_down_icon.svg");
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
}

.filter-input[aria-expanded="true"] .dropdown-arrow {
    mask-image: url("../svg/dropdown_up_icon.svg");
    -webkit-mask-image: url("../svg/dropdown_up_icon.svg");
}

.filter-menu {
    width: 1360px;
    max-width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    background: var(--green-main);
    border-radius: var(--radius);
    opacity: 0;
    box-shadow: var(--shadow-soft);
    transition: max-height 220ms ease, opacity 220ms ease, padding 220ms ease;
}

.filter-menu.is-open {
    max-height: 1600px;
    padding: 90px 20px 20px;
    opacity: 1;
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-button {
    min-height: 46px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: var(--radius);
    background: var(--green-accent);
    color: var(--text-dark);
    font-family: var(--lexend);
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 5px 14px rgba(1, 17, 20, 0.12);
    transition: transform 220ms ease, background-color 220ms ease, color 220ms ease;
}

.tag-button:hover,
.tag-button:focus-visible {
    background: var(--green-dark);
    color: var(--text-light);
    transform: translateY(-1px);
}

.tag-button.is-active {
    background: var(--green-dark);
    color: var(--text-light);
}

.tag-icon {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
}

.tag-icon::before,
.tag-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 15px;
    height: 3px;
    background: currentColor;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.tag-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.tag-button.is-active .tag-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.tag-button.is-active .tag-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.tag-icon--cross::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.tag-icon--cross::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.projects-heading {
    width: 100%;
    margin: 4px 0 0;
    font-family: var(--lexend);
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
    text-align: center;
    color: #000;
}

.projects-grid {
    width: 100%;
}

.project-card {
    position: relative;
    display: block;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    min-height: 430px;
    padding: 0;
    background: var(--card-grey);
    border-radius: var(--radius);
    margin-bottom: 24px;
    max-height: 700px;
    opacity: 1;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition:
        max-height 280ms ease,
        min-height 280ms ease,
        margin-bottom 280ms ease,
        opacity 180ms ease,
        transform 220ms ease,
        box-shadow 220ms ease;
}

.project-card.is-filter-hidden {
    min-height: 0 !important;
    max-height: 0;
    margin-bottom: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    box-shadow: none;
}

.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(1, 17, 20, 0.04) 35%, rgba(1, 17, 20, 0.58) 100%),
        rgba(1, 17, 20, 0.08);
    opacity: 1;
    transition: opacity 220ms ease;
    z-index: 1;
    pointer-events: none;
}

.project-card:hover::before,
.project-card:focus-visible::before,
.project-card:focus-within::before {
    opacity: 0.82;
}

.project-card:hover,
.project-card:focus-visible {
    box-shadow: 0 24px 54px rgba(1, 17, 20, 0.22);
    transform: translateY(-3px);
}

.project-card:focus-visible {
    outline: 4px solid var(--green-dark);
    outline-offset: 4px;
}

.project-card > * {
    position: relative;
    z-index: 2;
}

.project-card-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.project-card img,
.project-card picture,
.project-card video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 360ms ease;
}

.project-card:hover img,
.project-card:focus-visible img {
    transform: scale(1.025);
}

.project-card p {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    z-index: 2;
    margin: 0;
    display: inline-flex;
    max-width: 100%;
    font-family: var(--lexend);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-light);
}

.project-card p span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    max-width: 100%;
    padding: 10px 24px;
    background: var(--green-main);
    border-radius: var(--radius);
    color: inherit;
    overflow-wrap: anywhere;
    text-align: center;
    box-shadow: 0 10px 24px rgba(1, 17, 20, 0.18);
    transition: background-color 220ms ease;
}

.project-card:hover p span,
.project-card:focus-visible p span {
    background: var(--green-dark);
}

.page-footer {
    width: 100%;
    padding: 14px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--green-main);
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    box-shadow: 0 -8px 24px rgba(1, 17, 20, 0.12);
}

.page-footer p {
    margin: 0;
    color: var(--text-light);
    font-size: 26px;
}

.project-page {
    gap: 40px;
}

.project-page-main {
    width: min(1360px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.project-hero {
    --project-hero-height: clamp(240px, 42.4vw, 610px);
    width: 100%;
    height: var(--project-hero-height);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--reel-grey);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

.project-hero:has(img),
.project-hero:has(picture),
.project-hero:has(video) {
    width: fit-content;
    max-width: 100%;
    height: var(--project-hero-height);
    min-height: 0;
    background: transparent;
}

.project-hero img,
.project-hero picture,
.project-hero video {
    display: block;
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: var(--radius);
}

.project-hero picture img {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.project-hero p,
.project-media p {
    margin: 0;
    font-family: var(--lexend);
    font-size: 36px;
    font-weight: 400;
    line-height: 1;
    color: var(--text-dark);
    text-align: center;
}

.project-detail {
    width: min(980px, 100%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.project-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--text-dark);
    padding: 24px;
    background: var(--surface-light);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.project-section[hidden] {
    display: none;
}

.project-section h1,
.project-section h2 {
    margin: 0;
    font-family: var(--lexend);
    font-size: 32px;
    font-weight: 400;
    line-height: 1.1;
}

.project-section p {
    margin: 0;
    font-family: var(--lexend);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.35;
}

.project-section ul {
    margin: 5px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    list-style: none;
}

.project-section li {
    position: relative;
    padding-left: 24px;
    font-family: var(--lexend);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.35;
}

.project-section li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 10px;
    height: 10px;
    background: var(--green-main);
    border-radius: 50%;
}

.project-link-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.project-link {
    min-height: 50px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-family: var(--lexend);
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    border-radius: var(--radius);
    transition: transform 220ms ease, opacity 220ms ease, background-color 220ms ease;
}

.project-link:hover,
.project-link:focus-visible {
    opacity: 0.72;
    background: rgba(3, 140, 127, 0.1);
    transform: translateY(-1px);
}

.project-link--steam {
    width: 96px;
    background: #000;
    color: #fff;
    border-radius: 3px;
    font-size: 13px;
    text-transform: uppercase;
}

.project-link--itch {
    font-size: 28px;
    font-weight: 700;
}

.project-link--github {
    font-size: 28px;
    font-weight: 700;
}

.project-link--icon {
    gap: 10px;
}

.project-link-icon {
    display: block;
    width: 50px;
    height: 50px;
}

.project-link--icon span {
    font-size: 24px;
    line-height: 1;
}

.project-link--itch-logo {
    width: 194px;
}

.project-link-itch-logo {
    display: block;
    width: 194px;
    height: 50px;
    object-fit: contain;
}

.project-media {
    width: 100%;
    min-height: 465px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--card-grey);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

@media (max-width: 1100px) {
    body {
        gap: 24px;
    }

    .nav-bar {
        padding: 24px;
        min-height: auto;
    }

    .site-title {
        font-size: 28px;
    }

    .contact-label,
    .home-label,
    .filter-input,
    .page-footer p {
        font-size: 24px;
    }

    .filter-menu.is-open {
        padding: 82px 12px 12px;
    }

    .tag-button {
        font-size: 18px;
    }

    .demo-reel,
    .project-card,
    .project-hero,
    .project-media {
        min-height: 360px;
    }

    .demo-reel p,
    .project-card p,
    .projects-heading,
    .project-hero p,
    .project-media p,
    .project-section h1,
    .project-section h2 {
        font-size: 26px;
    }

    .project-section p,
    .project-section li,
    .project-link,
    .project-link--icon span {
        font-size: 20px;
    }

    .contact-page .contact-page-main {
        width: calc(100% - 32px);
        padding-top: 40px;
    }

    .contact-about {
        flex-direction: column;
        align-items: center;
    }

    .contact-photo-placeholder,
    .contact-about-copy {
        width: 100%;
        min-width: 0;
    }

    .contact-photo-placeholder {
        min-height: 320px;
    }

    .contact-photo {
        height: 320px;
        object-fit: contain;
        object-position: center;
    }

    .contact-section-title {
        font-size: 30px;
    }

    .contact-body-text,
    .resume-link,
    .contact-email,
    .contact-email a {
        font-size: 20px;
    }
}

@media (max-width: 720px) {
    .nav-bar {
        padding: 16px;
        gap: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .content-column {
        width: calc(100% - 24px);
    }

    .site-title {
        font-size: 22px;
        text-align: center;
    }

    .contact-button,
    .home-button {
        min-height: 52px;
        justify-content: center;
    }

    .contact-label,
    .home-label,
    .filter-input,
    .page-footer p {
        font-size: 20px;
    }

    .contact-icon,
    .home-icon,
    .filter-icon,
    .dropdown-arrow {
        transform: scale(0.82);
        transform-origin: left center;
    }

    .demo-reel,
    .project-card,
    .project-hero,
    .project-media {
        min-height: 240px;
    }

    .filter-menu {
        padding-inline: 12px;
    }

    .filter-menu.is-open {
        padding-top: 76px;
    }

    .tag-button {
        min-height: 44px;
        font-size: 16px;
    }

    .demo-reel p,
    .project-card p,
    .projects-heading,
    .project-hero p,
    .project-media p,
    .project-section h1,
    .project-section h2 {
        font-size: 22px;
    }

    .project-page-main {
        width: calc(100% - 24px);
    }

    .project-section p,
    .project-section li,
    .project-link,
    .project-link--icon span {
        font-size: 16px;
    }

    .project-link-row {
        gap: 12px;
    }

    .contact-page .contact-page-main {
        width: calc(100% - 24px);
        padding-top: 28px;
        padding-bottom: 24px;
    }

    .contact-photo-placeholder {
        min-height: 260px;
        aspect-ratio: 1;
    }

    .contact-photo {
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .contact-section-title {
        font-size: 24px;
    }

    .contact-body-text,
    .resume-link,
    .contact-email,
    .contact-email a {
        font-size: 18px;
    }

    .contact-details {
        width: 100%;
    }

    .contact-about-copy,
    .contact-details,
    .project-section {
        padding: 18px;
    }

    .project-card p {
        top: 14px;
        left: 14px;
        right: 14px;
    }

    .project-card p span {
        min-height: 46px;
        padding: 8px 14px;
    }
}

.project-hero:has(img),
.project-hero:has(picture),
.project-hero:has(video) {
    min-height: 0;
}
