
: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;
}

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

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

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

/* Page heading */
.section-inner {
    width: min(1000px, calc(100% - 48px));
    margin: 0 auto;
}

.page-hero {
    padding: 30px 0 40px;
    background: #fbfaf6;
}

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

.page-hero > .section-inner > p:last-child {
    margin: 0;
    color: var(--color-muted);
    font-size: 17px;
}

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

.section-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: 760px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 620px) {
    .section-inner {
        width: calc(100% - 36px);
    }

    .page-hero {
        padding: 55px 0 30px;
    }

    .project-image {
        min-height: 220px;
    }
}
