.hero {
    position: relative;
    max-width: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    animation: fade-in 0.8s ease-out both;
}

/* The hero image is a real <picture> so it can be served responsively and
   prioritised as the LCP element; it is painted as the hero's background
   layer, below the contrast overlay and the copy. */
.hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: block;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.65));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 9rem 2rem 6rem 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: rise-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 700;
    max-width: 850px;
    margin-bottom: 1.5rem;
    color: #ffffff;
    animation: rise-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.12s both;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.92);
    max-width: 650px;
    margin-bottom: 2.5rem;
    animation: rise-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) 0.24s both;
}

@media (max-width: 900px) {
    .hero-content {
        padding-top: 6rem;
    }

    .hero-title {
        font-size: 2.25rem;
        overflow-wrap: break-word;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }
}

.projects-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 2rem 6rem 2rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.projects-section {
    animation: fade-in 0.8s ease-out 0.5s both;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-gold);
}

.project-image-wrapper {
    width: 100%;
    height: 260px;
    overflow: hidden;
    position: relative;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image-wrapper img {
    transform: scale(1.05);
}

.project-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--accent-gold);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.project-content {
    padding: 1.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-code {
    font-family: var(--font-display);
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.project-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.project-location i {
    color: var(--accent-gold);
}
