:root {
    --color-text: #353d35;
    --color-muted: #626a60;
    --color-pink: #b47784;
    --color-sage: #64785e;
    --color-lightsage: #e7ebdd;
    --color-border: #d5dccf;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: clip;
}

body {
    margin: 0;
    background: #fbfaf6;
    color: var(--color-text);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

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

h1,
h2,
p {
    overflow-wrap: anywhere;
}

/* Navigation */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    background: transparent;
}

.header-inner {
    display: flex;
    width: calc(100% - 4rem);
    min-height: 4.25rem;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 auto;
}

.site-name {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.875rem);
}

.site-nav a {
    position: relative;
    padding: 0.5rem 0;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.site-nav a::after {
    position: absolute;
    right: 0;
    bottom: 0.125rem;
    left: 0;
    height: 1px;
    background: #ffffff;
    content: "";
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.site-nav a:hover::after,
.site-nav a.active::after {
    transform: scaleX(1);
}

.site-nav a:hover {
    color: var(--color-pink);
}

/* Home page hero */
.hero-section {
    position: relative;
    display: flex;
    height: 26rem; /*min-height: 30rem*/
    align-items: center;
    overflow: hidden;
    padding: 6.5625rem 8% 4.6875rem;
    background-color: #64785e;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.548)),
        url("../images/natureBackground.jpg");
    background-position: center;
    background-size: cover;
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
}

.hero-inner h1 {
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2rem, 5.4vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -0.07em;
    line-height: 0.95;
}

.hero-inner h1 span {
    display: inline-block;
    max-width: 100%;
}

.hero-copy {
    max-width: 83.125rem;
    margin: 1.5625rem 0 0.875rem;
    color: #ffffff;
    font-size: 1.0625rem;
    line-height: 1.5;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0 0.375rem;
    border-bottom: 1px solid var(--color-pink);
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.text-link:hover {
    color: var(--color-pink);
}

.text-link span {
    transition: transform 0.2s ease;
}

.text-link:hover span {
    transform: translateX(0.25rem);
}

.hero-inner .text-link {
    border-color: #ffffff;
    color: #ffffff;
}

.hero-inner .text-link:hover {
    color: var(--color-pink);
}

/* Introduction section */
.section-inner {
    width: min(62.5rem, calc(100% - 3rem));
    margin: 0 auto;
}

.innersection-A,
.innersection-B {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 3rem;
    text-align: left;
}

.innersection-A {
    flex-direction: row;
    background: #fbfaf6;
}

.innersection-B {
    flex-direction: row-reverse;
    background: transparent;
    z-index: 0;
}

.innersection-B::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: -1;
    width: 100vw;
    background: var(--color-lightsage);
    content: "";
    transform: translateX(-50%);
    pointer-events: none;
}

.section-image {
    flex: 0 0 35%;
    min-width: 0;
}

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

.section-content {
    flex: 1;
    min-width: 0;
}

.section-content h3 {
    margin: 0 0 1rem;
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.section-content p {
    margin: 0;
    color: var(--color-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.intro-band {
    padding: 1.4375rem 1.5rem 3.875rem;
    background: #fbfaf6;
}

.intro-inner {
    max-width: 57.5rem;
    text-align: center;
}

.intro-inner h2 {
    margin: 0 0 1rem;
    color: var(--color-text);
    font-size: clamp(1.6875rem, 3vw, 2.25rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.3;
}

/* Projects section */
.projects-section {
    padding: 15px 0 60px;
    background: var(--color-lightsage);
}

.projectssection-inner {
    width: min(1000px, calc(100% - 48px));
    margin: 0 auto;
}

.projectssection-inner > h2 {
    width: 100%;
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 38px 48px;
    padding: 18px 0 10px;
}

.project-card {
    min-width: 0;
    padding: 5%;
    border-radius: 12px;
    background: #fbfaf6;
}

.project-card a {
    color: var(--color-pink);
}

.project-image {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1.55 / 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fbfaf6;
    color: var(--color-text);
}

/* Images overlap, so only one is visible */
.project-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-image img.active {
    opacity: 1;
}

.project-info {
    padding: 18px 2px 0;
}

.project-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.project-title-row h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -0.035em;
    transition: color 0.2s ease;
}

.project-card:hover .project-title-row h2 {
    color: var(--color-pink);
}

.project-info p {
    margin: 8px 0 15px;
    color: var(--color-muted);
    font-size: 14px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    padding: 4px 10px;
    border: 1px solid var(--color-border);
    color: var(--color-muted);
    font-size: 11px;
}

.project-tags span:hover {
    border-color: var(--color-pink);
    color: var(--color-pink);
}

/* Image carousel arrows */
.image-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(251, 250, 246, 0.9);
    color: var(--color-text);
    font-size: 16px;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-50%);
    transition: opacity 0.2s ease,
                background 0.2s ease,
                color 0.2s ease;
}

.image-arrow.prev {
    left: 10px;
}

.image-arrow.next {
    right: 10px;
}

.project-image:hover .image-arrow,
.project-image:focus-within .image-arrow {
    opacity: 1;
}

.image-arrow:hover {
    background: var(--color-pink);
    color: #ffffff;
}

@media(hover:none) {
    .image-arrow {
        opacity: 1;
    }
}

/* Smaller screens */
@media (max-width: 620px) {
    .header-inner {
        width: calc(100% - 2rem);
        min-height: 4.75rem;
        flex-wrap: wrap;
        gap: 0.375rem 1rem;
        padding: 0.75rem 0;
    }

    .site-nav {
        gap: clamp(0.625rem, 3vw, 1rem);
    }

    .site-nav a {
        font-size: 0.625rem;
    }

    .hero-section {
        padding: 7.8125rem 1.75rem 4.375rem;
    }

    .hero-inner h1 {
        font-size: clamp(1.4rem, 7.5vw, 2.5rem);
        letter-spacing: -0.06em;
        line-height: 0.95;
    }

    .hero-copy {
        max-width: 18.75rem;
        margin-top: 1.5625rem;
        font-size: 0.9375rem;
    }

    .section-inner {
        width: calc(100% - 1.5rem);
    }

    .intro-band {
        padding: 2.625rem 0.75rem;
    }

    .innersection-A,
    .innersection-B {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .section-image {
        flex: auto;
        width: 100%;
    }

    .section-image img {
        aspect-ratio: 16 / 9;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }
}
