/* ============================================================
   Home: Hero
   ============================================================ */

.hero {
    position: relative;
    height: 90vh;
    height: 90svh; /* svh ignores mobile browser chrome; vh line above is the fallback */
    min-height: 34rem;
    overflow: hidden;
    color: var(--ink);
    background-color: var(--sky);
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
}

/* Two washes: a fixed one at the top so the overlay header reads on any
   crop, and a left-side one behind the title. skyline-wash.js sets --wash
   only when the text overlaps a building, which happens on wide, short
   windows where object-fit: cover crops the sky off the top. */
.hero {
    --wash: 0;
    transition: --wash 0.3s ease;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, rgba(230, 229, 225, 0.6), transparent 12rem),
        linear-gradient(
            to right,
            rgba(230, 229, 225, var(--wash)) 0%,
            rgba(230, 229, 225, calc(var(--wash) * 0.6)) 40%,
            transparent 70%
        );
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding-top: calc(var(--header-h) + clamp(2rem, 6vh, 4.5rem));
}

.hero h1 {
    font-size: clamp(2.75rem, 7.5vw, 6.5rem);
    margin-bottom: 1.25rem;
}

.hero p {
    max-width: 34rem;
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    margin-bottom: 2rem;
}

/* ============================================================
   Home: Services
   ============================================================ */

.services {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* 2x2 grid divided by hairlines, like curtain-wall mullions */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--text);
    margin-top: 2.5rem;
}

.service {
    padding: 2rem;
    border-left: 1px solid var(--rule);
}

/* Left column: flush to the wrap edge, no mullion */
.service:nth-child(odd) {
    padding-left: 0;
    border-left: none;
}

.service:nth-child(even) {
    padding-right: 0;
}

/* Second row gets a transom line */
.service:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
}

.service p {
    color: var(--text-muted);
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service,
    .service:nth-child(odd),
    .service:nth-child(even),
    .service:nth-child(n + 3) {
        padding: 2rem 0;
        border-left: none;
        border-top: none;
        border-bottom: 1px solid var(--rule);
    }
}

@media (max-width: 768px) {
    .services {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* ============================================================
   About
   ============================================================ */

.bio {
    padding-top: 4rem;
    padding-bottom: 5rem;
}

/* Cap line length for reading, but keep the left edge on the grid */
.bio > * {
    max-width: 44rem;
}

.bio p {
    font-size: 1.1rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .bio {
        padding-top: 2.5rem;
        padding-bottom: 3rem;
    }

    .bio p {
        font-size: 1rem;
    }
}

/* ============================================================
   Projects
   ============================================================ */

.projects {
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.project-card {
    border-top: 1px solid var(--text);
    padding-top: 2rem;
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 1rem 3rem;
}

.project-card h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

/* Shrink-wrap the heading so the logo centers under the words,
   not under the whole grid column */
.project-meta {
    justify-self: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* The title wraps in the 16rem column; centered lines keep it
       visually aligned with the logo */
    text-align: center;
}

/* Logo ships on a cream square; the circle crop hides it on dark backgrounds */
.project-logo {
    display: block;
    width: 100%;
    max-width: 12rem;
    height: auto;
    border-radius: 50%;
    margin-top: 1.5rem;
}

.project-body p {
    max-width: 42rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.project-link {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .projects {
        padding-top: 2.5rem;
        padding-bottom: 3rem;
    }

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

/* ============================================================
   Contact
   ============================================================ */

.contact-section {
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.contact-section .content-wrap > p {
    max-width: 34rem;
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.email-cta {
    border-top: 1px solid var(--text);
    border-bottom: 1px solid var(--rule);
    padding: 2rem 0;
    margin-bottom: 2.5rem;
}

.email-cta a {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 4.5vw, 3rem);
    font-weight: 400;
    overflow-wrap: anywhere;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .contact-section {
        padding-top: 2.5rem;
        padding-bottom: 3rem;
    }
}

@media (max-width: 480px) {
    .social-links {
        flex-direction: column;
    }

    .social-links .btn {
        text-align: center;
    }
}
