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

html,
body {
    height: 100%;
}

body {
    font-family: sans-serif, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    line-height: 1.6;
    color: #333;
    background-color: #e5e5e5;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font: inherit;
}

input,
textarea,
select {
    font: inherit;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
}
ul,
ol {
    list-style: none;
}

img,
video {
    max-width: 100%;
    height: unset;
    display: block;
}
.menu {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 4rem;

    display: flex;
    flex-flow: column;
    justify-content: flex-end;
    padding: 0 2rem;
    background: transparent;
    z-index: 1000;
}
.menu::before {
    content: '';
    position: absolute;
    inset: 0;

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    background: transparent;

    mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 35%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        black 0%,
        black 35%,
        transparent 100%
    );

    pointer-events: none;
    z-index: 0;
}
.menu > * {
    position: relative;
    z-index: 1;
}

.menu__list {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.menu__link--brand {
    font-size: 2rem;
    line-height: 0;
    text-transform: uppercase;
}
.menu__sublist {
    display: flex;
    gap: 1rem;
    align-items: end;
}
.menu__sublink {
    font-size: 1.5rem;
}
.menu__sublink--active {
    text-decoration: underline;
    text-underline-offset: 5px;
}
/* content general */
.main {
    padding: 2rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}
.section__left {
    /* Ensure left column stacks its article blocks with a gap so the Education block sits below the image */
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.article {
    /* Let articles size to their content so stacked blocks don't overlap */
    height: auto;
    padding: 1rem 0 2rem 0;
    width: 100%;
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
}
.article__title {
    font-size: 2rem;
    text-transform: uppercase;
}
.article__link:hover {
    color: #ff3900;
}
.article__image {
    object-fit: cover;
}
/* left */
.section__left .article__paragraph {
    max-width: 50ch;
    font-size: 2rem;
    line-height: 1;
}
.section__left .article__list-item {
    line-height: 2;
}
.article__image--about {
    aspect-ratio: 3 / 2;
    max-width: 50%;
    margin-bottom: 2rem; /* add spacing below profile image so Education text doesn't sit flush */
}

/* Ensure the about image is block-level and not floated so following content can't sit beside it */
.article__image--about {
    display: block;
    float: none;
}

/* Make sure the CV/article clears any previous content and starts on a new line */
.section__left #cv {
    clear: both;
}

/* Ensure left column stacks articles and provides a gap */
.section__left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Extra safety: make sure CV article itself has margin-top so it never overlaps the image */
.section__left #cv {
    margin-top: 1rem;
}

/* When `main` contains paired articles (left/right as grid cells),
   target odd children as left-column articles and even as right-column. */
.main > .article:nth-child(odd) .article__paragraph {
    max-width: 50ch;
    font-size: 2rem;
    line-height: 1;
}
.main > .article:nth-child(odd) .article__list-item {
    line-height: 2;
}
.main > .article:nth-child(odd) .article__list {
    list-style-type: square;
}
.main > .article:nth-child(even) .article__list {
    position: sticky;
    top: 5rem;
    line-height: 1;
}
.main > .article:nth-child(even) .article__paragraph {
    max-width: 50ch;
    font-size: 1.5rem;
    line-height: 1.3;
}
.section__left .article__list {
    list-style-type: square;
}
.article__list--menu .article__link {
    font-size: 2rem;
    text-transform: uppercase;
}
/* right */
.section__right .article__list {
    position: sticky;
    top: 5rem;
    line-height: 1;
}
/* Right column articles should stack content from the top instead of spacing items apart */
.section__right .article {
    justify-content: flex-start;
}
.section__right .article__paragraph {
    max-width: 50ch;
    font-size: 1.5rem;
    line-height: 1.3;
}
/* work */
.article--projects {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.article__project {
    height: max-content;
}
.article__image--project,
.article__video--project {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
.section__right--work article {
    height: 100%;
}
.wrapper--project {
    display: flex;
    justify-content: space-between;
}
.article__image--fs,
.article__video--fs {
    max-height: 100%;
    object-fit: cover;
}

/* Make media (large work images/videos) a consistent visual size */
.article__image--fs,
.article__video--fs,
.article__image--project,
.article__video--project {
    width: 100%;
    height: 60vh; /* consistent display height */
    max-height: 60vh;
    object-fit: cover;
}

/* On smaller screens, let media size naturally to avoid cropping too much */
@media (max-width: 800px) {
    .article__image--fs,
    .article__video--fs,
    .article__image--project,
    .article__video--project {
        height: auto;
        max-height: none;
    }
}
p{
    margin-bottom: 3rem;
}

/* Compact the Contact block: reduce vertical spacing between contact lines */
.article__contact .article__paragraph {
    margin: 0 0 0.25rem 0; /* small gap between lines */
}
.article__contact .article__paragraph:last-child {
    margin-bottom: 0; /* no extra gap after the last line */
}