:root {
    --bg: #3f3b32;
    --card: #817467;
    --text: #f2eee7;
    --line: rgba(242, 238, 231, .15);
    --wrap: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    margin: 0;
    font-family: 'Geist', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    overflow-x: hidden;
}

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

button {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
    cursor: pointer;
}

h1,
h2,
.poiret {
    font-family: 'Poiret One', sans-serif;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .015em;
}

.page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(900px 900px at 33% 8%, rgba(166, 149, 134, .18), transparent 64%),
        radial-gradient(800px 800px at 75% 18%, rgba(166, 149, 134, .14), transparent 62%),
        radial-gradient(1100px 1100px at 45% 66%, rgba(166, 149, 134, .14), transparent 65%),
        var(--bg);
}

.page:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: .48;
    background-image:
        linear-gradient(90deg, transparent 0, transparent calc(16.666% - .5px), var(--line) calc(16.666% - .5px), var(--line) calc(16.666% + .5px), transparent calc(16.666% + .5px)),
        linear-gradient(0deg, transparent 0, transparent calc(25% - .5px), var(--line) calc(25% - .5px), var(--line) calc(25% + .5px), transparent calc(25% + .5px));
    background-size: 100% 420px;
}

.page:after {
    content: "";
    position: absolute;
    left: -8vw;
    top: 465px;
    width: 78vw;
    height: 78vw;
    border: 1px solid rgba(242, 238, 231, .09);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    box-shadow: 720px 510px 0 0 rgba(242, 238, 231, .055);
}

.section {
    position: relative;
    z-index: 2;
    scroll-margin-top: 0;
}

.container-xl {
    max-width: 1180px;
}

.btn-underline {
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-transform: lowercase;
    display: inline-flex;
    align-items: center;
    padding-bottom: 9px;
    border-bottom: 1px solid rgba(255, 255, 255, .75);
    transition: opacity .25s ease;
}

.btn-underline:hover {
    opacity: .68;
}

.small-line {
    display: block;
    width: 31px;
    height: 2px;
    margin-top: 11px;
    background: rgba(255, 255, 255, .78);
}

.side-nav {
    position: fixed;
    z-index: 50;
    left: 0;
    top: 0;
    width: 184px;
    height: 100vh;
    gap: 26px;
    pointer-events: none;
}

.side-nav:before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(242, 238, 231, .18);
    transform: translateX(-50%);
}

.side-nav__item {
    position: relative;
    z-index: 2;
    width: 184px;
    min-height: 34px;
    gap: 20px;
    color: rgba(242, 238, 231, .72);
    pointer-events: auto;
}

.side-nav__dot {
    position: relative;
    z-index: 3;
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    margin-left: calc(50% - 4.5px);
    border-radius: 50%;
    background: #f1eee8;
    transition: .22s ease;
}

.side-nav__text {
    opacity: 0;
    font-size: 15px;
    line-height: 1;
    font-weight: 300;
    white-space: nowrap;
    transform: translateX(-2px);
    transition: .22s ease;
}

.side-nav__item.active .side-nav__dot {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    margin-left: calc(50% - 14px);
    border: 1px solid rgba(242, 238, 231, .82);
    background: rgba(63, 59, 50, .58);
}

.side-nav__item.active .side-nav__dot:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f1eee8;
    transform: translate(-50%, -50%);
}

.side-nav__item.active .side-nav__text,
.side-nav__item:hover .side-nav__text {
    opacity: 1;
}

.hero {
    height: 800px;
    background: #39362d;
}

.hero__left-space {
    width: 116px;
}

.hero__visual {
    background: #39362d;
}

.hero__visual img {
    object-fit: cover;
    object-position: center bottom;
    margin-left: 90px;
}

.hero__content {
    left: calc(200px + 8.4vw);
    top: 200px;
    width: 610px;
}

.hero h1 {
    margin: 0;
    font-size: 48px;
    line-height: 54px;
    color: rgba(245, 241, 233, .92);
    text-shadow: 0 1px 20px rgba(0, 0, 0, .18);
}

.hero__subtitle {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .84);
    font-weight: 300;
}

.hero .btn-underline {
    margin-top: 250px;
    font-size: 14px;
}

.about {
    padding: 120px 0 58px;
    min-height: 420px;
}

.about__label {
    font-size: 32px;
    line-height: 1;
    writing-mode: vertical-rl;
    transform: rotate(360deg);
    color: rgba(242, 238, 231, .86);
}

.portrait {
    position: relative;
    width: 196px;
    height: 196px;
}

.portrait svg {
    width: 100%;
    height: 100%;
    animation: spin 30s linear infinite;
}

.portrait__img {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 118px;
    height: 118px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    object-fit: cover;
    object-position: center top;
}

.about__text {
    font-size: 16px;
    line-height: 1.55;
    color: rgba(242, 238, 231, .82);
    font-weight: 300;
}

.about__text p:last-child {
    margin-bottom: 0;
}

.stats {
    margin-top: 68px;
}

.stat__num {
    font-family: 'Poiret One', sans-serif;
    text-transform: uppercase;
    font-size: 25px;
    letter-spacing: .05em;
    color: rgba(242, 238, 231, .82);
}

.stat .small-line {
    margin-top: 13px;
    margin-bottom: 22px;
}

.stat__label {
    font-size: 18px;
    font-family: 'Geist', Arial, sans-serif;
    font-weight: 400;
    color: rgba(242, 238, 231, .82);
    font-weight: 500;
}

.portfolio {
    padding: 36px 0 92px;
    overflow: visible;
}

.portfolio__head {
    z-index: 5;
    top: 92px;
    width: min(1180px, calc(100% - 116px));
}

.portfolio h2,
.blog h2 {
    font-size: 35px;
    line-height: 1;
    color: rgba(242, 238, 231, .92);
}

.portfolio__fluid {
    height: 700px;
    background: #403b32;
}

.portfolio__backgrounds {
    overflow: hidden;
    background: #403b32;
}

.portfolio__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 31%;
    opacity: 0;
    transform: scale(1.015);
    filter: saturate(.82) brightness(.76);
    transition: opacity .72s ease, transform 1.2s ease;
    will-change: opacity, transform;
}

.portfolio__bg.is-visible {
    opacity: 1;
    transform: scale(1);
}

.portfolio__shade {
    z-index: 1;
    background: linear-gradient(180deg, rgba(34, 30, 25, .22), rgba(34, 30, 25, .48)), linear-gradient(90deg, rgba(34, 30, 25, .24), transparent 48%, rgba(34, 30, 25, .18));
    pointer-events: none;
}

.portfolio__slider-wrap {
    z-index: 4;
    bottom: 80px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-left: calc((100% - min(var(--wrap), calc(100% - 116px)))/2 - 160px);
}

.portfolio__slider-wrap::-webkit-scrollbar,
.blog__cards::-webkit-scrollbar {
    display: none;
}

.portfolio__slider {
    gap: 20px;
    width: max-content;
    min-width: 100%;
}

.project {
    position: relative;
    flex: 0 0 266px;
    width: 266px;
    min-height: 350px;
    padding: 35px 28px;
    transition: background .25s ease;
    border-top: 3px solid #fff;
}

.project--active {
    min-height: 350px;
    border-top: 3px solid var(--card);
}

.project:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    /* background: rgba(255, 255, 255, .78); */
    transition: opacity .25s ease;
}

.project:hover,
.project--active {
    background: var(--card);
    border-top: 3px solid var(--card);
}

.project:hover:before,
.project--active:before {
    opacity: 0;
}

.project__num {
    font-family: 'Poiret One', sans-serif;
    font-size: 26px;
    line-height: 1;
    color: rgba(242, 238, 231, .92);
    letter-spacing: .04em;
}

.project__title {
    margin: 40px 0 22px;
    font-size: 18px;
    line-height: 1.2;
    font-weight: 700;
    min-height: 43px;
    color: rgba(255, 255, 255, .92);
}

.project__meta {
    margin-bottom: 40px;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .82);
    font-weight: 300;
}

.arrow {
    width: 32px;
    height: 12px;
    opacity: .9;
}

.cta {
    padding: 95px 0 130px;
}

.cta__over {
    margin-bottom: 28px;
    font-size: 16px;
    color: rgba(242, 238, 231, .82);
}

.cta__title {
    font-family: 'Poiret One', sans-serif;
    text-transform: uppercase;
    font-size: 48px;
    line-height: 1.28;
    color: rgba(242, 238, 231, .86);
}

.cta__title span {
    display: block;
}

.cta__bottom {
    margin-top: 64px;
}

.cta__note {
    font-size: 20px;
    color: rgba(242, 238, 231, .38);
    font-weight: 300;
}

.blog {
    padding: 35px 0 72px;
}

.blog__head {
    margin-bottom: 33px;
}

.blog__cards {
    gap: 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
    margin-right: calc((100vw - min(1180px, calc(100vw - 48px))) / -2);
}

.article {
    width: 268px;
    min-height: 315px;
    border: 1px solid rgba(242, 238, 231, .55);
    background: rgba(30, 28, 24, .08);
    padding-bottom: 22px;
}

.article img {
    width: 100%;
    height: 128px;
    object-fit: cover;
    display: block;
    filter: saturate(.82) brightness(.83);
}

.article__body {
    padding: 18px 20px 0;
}

.article__date {
    margin-bottom: 9px;
    font-size: 11px;
    color: rgba(242, 238, 231, .56);
}

.article__title {
    min-height: 70px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
}

.article .btn-underline {
    margin-top: 18px;
    padding-bottom: 7px;
    font-size: 11px;
    color: rgba(242, 238, 231, .84);
}

.footer {
    padding: 37px 0 26px;
}

.social a {
    width: 30px;
    height: 30px;
    opacity: .86;
}

.contact__label {
    font-size: 14px;
    font-weight: 700;
}

.contact .small-line {
    width: 27px;
    height: 2px;
    margin: 8px 0 16px;
}

.contact__text {
    min-height: 46px;
    display: flex;
    align-items: flex-end;
    font-size: 16px;
    line-height: 1.45;
    color: rgba(242, 238, 231, .8);
}

.copy {
    min-height: 97px;
    display: flex;
    align-items: flex-end;
    font-size: 11px;
    line-height: 1.45;
    color: rgba(242, 238, 231, .75);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1199.98px) {
    .portfolio__head {
        width: calc(100% - 48px);
    }

    .portfolio__slider-wrap {
        padding-left: 24px;
        padding-right: 24px;
    }

    .project {
        flex-basis: 280px;
        width: 280px;
    }
}

@media (max-width: 991.98px) {
    .hero {
        height: 640px;
    }

    .hero__content {
        left: 28px;
        right: 28px;
        top: 120px;
        width: auto;
    }

    .hero h1 {
        font-size: 40px;
        line-height: 1.13;
    }

    .hero__subtitle {
        font-size: 15px;
        line-height: 1.5;
    }

    .hero .btn-underline {
        margin-top: 85px;
    }

    .about__label {
        writing-mode: initial;
        transform: none;
    }

    .stats {
        margin-top: 48px;
    }

    .portfolio__fluid {
        height: 620px;
    }

    .portfolio__head {
        left: 20px !important;
        right: 20px;
        top: 70px;
        width: auto;
        transform: none !important;
    }

    .portfolio__slider-wrap {
        bottom: 32px;
        padding-left: 20px;
    }

    .project {
        flex-basis: 260px;
        width: 260px;
        min-height: 300px;
        padding: 58px 26px 28px;
    }

    .project--active {
        min-height: 350px;
    }

    .project__title {
        font-size: 18px;
    }

    .project__meta {
        font-size: 14px;
    }

    .blog__cards {
        margin-right: -20px;
        padding-right: 20px;
    }

    .copy {
        margin-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portfolio__bg {
        transition: none;
        transform: none;
    }
}

@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 31px;
    }

    .hero__content {
        top: 19vh;
    }

    .hero .btn-underline {
        margin-top: 60px;
    }

    .portfolio h2,
    .blog h2 {
        font-size: 30px;
    }

    .portfolio__head {
        display: block !important;
    }

    .portfolio__head .btn-underline {
        margin-top: 22px;
    }

    .project {
        flex-basis: 245px;
        width: 245px;
    }

    .cta__title {
        font-size: 34px;
    }
}

.blog {
    padding: 35px 0 72px;
}

.blog__head {
    margin-bottom: 56px;
}

.blog__cards {
    gap: 24px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    margin-right: calc((100vw - min(1180px, calc(100vw - 48px))) / -2);
    padding-bottom: 8px;
}

.blog__cards::-webkit-scrollbar {
    display: none;
}

.article {
    position: relative;
    width: 332px;
    height: 430px;
    border: 1px solid rgba(242, 238, 231, .72);
    overflow: hidden;
    background: rgba(39, 35, 29, .38);
}

.article img {
    width: 100%;
    object-fit: cover;
    display: block;
}

.article__body {
    position: relative;
    z-index: 2;
    padding: 28px;
}

.article__date {
    margin: 0 0 10px;
    font-size: 14px;
    color: rgba(242, 238, 231, .7);
}

.article__title {
    margin: 0;
    font-size: 20px;
    line-height: 1.25;
    font-weight: 700;
    color: rgba(255, 255, 255, .92);
}

.article .btn-underline {
    padding-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, .9);
}

.article--bottom img {
    height: 220px;
}

.article--cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    filter: brightness(.68);
}

.article--cover .article__body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.article--cover .btn-underline {
    margin-top: auto;
    align-self: flex-start;
}

.article--split {
    display: flex;
    flex-direction: column;
}

.article--split .article__body {
    height: 220px;
}

.article--split img {
    height: 210px;
    margin-top: auto;
}

@media (max-width: 575.98px) {
    .article {
        width: 286px;
        height: 390px;
    }

    .article__body {
        padding: 22px;
    }

    .article__title {
        font-size: 17px;
    }
}

/* Django integration: preserve the supplied layout while cards stay dynamic. */
.reference-home main:focus {
    outline: 0;
}

.project {
    color: var(--project-fg, var(--text));
}

.project:hover,
.project--active {
    background: var(--card, #817467);
    border-top-color: var(--project-accent, var(--card, #817467));
}

.project .small-line {
    background: var(--project-accent, rgba(255, 255, 255, .78));
}

.article > a {
    display: block;
    height: 100%;
}

.article--split > a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 575.98px) {
    .page,
    .section {
        max-width: 100%;
    }

    .portfolio__slider-wrap,
    .blog__cards {
        overscroll-behavior-inline: contain;
        scroll-snap-type: x proximity;
    }

    .project-link,
    .blog__cards > .col-auto {
        scroll-snap-align: start;
    }

    .cta__note {
        overflow-wrap: anywhere;
    }
}
