:root {
    --hero-padding: 1rem;
    --title-size: 1.8rem;
    --hero-min-height: 300px;
    --description-size: 1rem;
}

.container {
    gap: 5vh;
    margin: 0 5vw;
}

.hero {
    padding: 0;
    position: relative;
    display: grid;
    place-items: center;
    background: none;
}

.hero-card {
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.hero-image {
    width: 100%;
    object-position: center;
}

.hero-title {
    position: absolute;
    top: 25%;
    line-height: 1.2;
    margin: 0 0 0.8rem;
    font-size: var(--title-size);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-description {
    margin: 0;
    opacity: 0.95;
    line-height: 1.4;
    font-size: var(--description-size);
}

.author-meta {
    --spacing: 0.5rem;
    --border-color: #eee;
    width: 100%;
    margin: 2rem auto;
    padding: var(--spacing);
    border-bottom: 2px solid var(--secondary);
}

.meta-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.meta-text {
    flex: 1;
}

.meta-name {
    font-size: 1.25rem;
    margin: 0;
    color: var(--secondary);
}

.meta-role {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    color: var(--primary);
    font-weight: 500;
}

.meta-date {
    display: block;
    font-size: 0.85rem;
    color: #666;
}

.meta-linkedin {
    align-self: flex-start;
    color: var(--primary);
    transition: color 0.2s ease;
    padding: 0.25rem;
}

.meta-linkedin svg {
    width: 32px;
    height: 32px;
}

.meta-linkedin:hover {
    color: var(--secondary);
}

.project-context {
    --card-spacing: 1.5rem;
    --border-radius: 8px;
    --accent-border: 2px solid var(--primary);

    padding: 2rem 1rem;
    background: white;
}

.description-f-w {
    grid-column: span 2;
}

.context-container {
    max-width: 1440px;
    margin: 0 auto;
}

.context-header {
    text-align: center;
    margin-bottom: 2rem;
}

.context-grid {
    display: grid;
    gap: 1.5rem;
}

.context-card {
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: var(--card-spacing);
    background: white;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--secondary);
    margin: 0 0 1.5rem;
    padding-bottom: 1rem;
    border-bottom: var(--accent-border);
}

.title-icon {
    flex-shrink: 0;
}

.design-phases {
    --phase-gap: 2rem;
    --border-color: rgba(var(--secondary-rgb), 0.15);
    padding: 2rem 1rem;
}

.phases-title {
    color: var(--secondary);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2.5rem;
}

.phases-subtitle {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 2rem 0 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--secondary);
}

.phase-item {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: var(--phase-gap);
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.phase-item.full-width .phase-text {
    width: 100%;
}

.phase-text {
    order: 1;
    width: 90%;
}

.phase-image {
    order: 2;
    width: 100%;
    height: auto;
    object-fit: scale-down;
    align-self: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.phase-subtitle {
    color: var(--secondary);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.contact-cta:hover,
.contact-cta:focus {
    transform: translateY(-2px);
    outline: 2px solid var(--secondary);
}

@media (min-width: 48em) {
    :root {
        --title-size: 2.2rem;
        --hero-padding: 1.5rem;
        --hero-min-height: 400px;
        --description-size: 1.1rem;
    }

    .hero-card {
        border-radius: 12px;
    }

    .author-meta {
        border-radius: 8px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }

    .meta-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .meta-date {
        font-size: 0.9rem;
    }

    .project-context {
        padding: 3rem 2rem;
    }

    .context-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .design-phases {
        max-width: 1440px;
        margin: 0 auto;
        padding: 4rem 2rem;
    }

    .phase-item {
        gap: 1.5rem;
        padding: 2rem;
        display: grid;
        align-items: start;
    }

    .phase-img-reversed {
        grid-column: 1;
    }


    .phase-item.full-width {
        grid-template-columns: 1fr;
    }

    .phase-image {
        height: auto;
        max-height: 400px;
    }
}

@media (min-width: 64em) {
    :root {
        --hero-padding: 2rem;
        --title-size: 2.8rem;
        --hero-min-height: 500px;
        --description-size: 1.25rem;
    }

    .container {
        gap: 1vh;
    }
    
    .hero-card {
        max-height: var(--hero-min-height);
    }
    
    .hero {
        padding: 3vh 5vw;
        margin-bottom: 2.5rem;
    }
    
    .hero-title {
        margin-bottom: 1.2rem;
    }
    
    .hero-description {
        max-width: 65ch;
    }
    
    .meta-name {
        font-size: 1.5rem;
    }
    
    .meta-role {
        font-size: 1rem;
    }
    
    .meta-linkedin svg {
        width: 36px;
        height: 36px;
    }
    
    .project-context {
        padding: 4rem;
    }
    
    .context-header {
        margin-bottom: 3rem;
    }
    
    .card-title {
        font-size: 1.5rem;
    }
    
    .phase-item {
        grid-template-columns: 50% 50%;
        grid-auto-flow: column;

    }
}

@media (hover: hover) {
    .phase-item {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

    .phase-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
}