/* ---------- Contact page ----------
   Static page styled with the existing design system: global .page-title /
   .page-subtitle for the header, the About "Tech Specs" card + hairline table
   for the contact-details card, SF fonts, surface tokens. No eyebrows. */

/* Widen the content column (and the footer, via the shared --page-width
   mechanism in site.css). */
body:has(.contact) {
    --page-width: 1300px;
}

.contact {
    margin-top: 40px;
}

/* Clamp the centered subtitle to a comfortable measure (the global rule sets
   centering + color; this just bounds the width). */
.contact .page-subtitle {
    max-width: 600px;
    font-size: 1.15em;
    line-height: 1.5;
    margin: 0 auto 3em;
}

/* Email on the left (primary), the contact/social card alongside it. The text
   column is capped at a comfortable reading measure and the card at the width
   that keeps the Mastodon handle on one line; the pair is centred, so any
   spare width insets both instead of opening a gap between them. */
.contact-cols {
    display: grid;
    grid-template-columns: minmax(0, 30em) minmax(0, 470px);
    gap: 36px;
    justify-content: center;
    align-items: start;
}

.contact-cols > * {
    min-width: 0;
}

/* The big email - the lead element of the left column (no eyebrow above it). */
.contact-email {
    display: inline-block;
    font-size: 2.4em;
    font-weight: 700;
    color: var(--heading);
    text-decoration: none;
    border-bottom: 2px solid var(--link);
    padding-bottom: 0.05em;
    margin-bottom: 0.8em;
    word-break: break-word;
}

.contact-email:hover {
    color: var(--heading);
}

.contact-blurb {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.contact-blurb + .contact-blurb {
    margin-top: 0.9em;
}

/* Contact-details card - recreates the About "Tech Specs" card + hairline
   table (kept independent of .about-colophon so About's markup stays decoupled). */
.contact-card {
    padding: 26px 34px;
    background: var(--bg-secondary);
    border-radius: 24px;
    corner-shape: squircle;
    margin: 0;
    align-self: start;
}

.contact-card dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 0;
    row-gap: 0.75em;
    margin: 0;
    align-items: baseline;
}

.contact-card dd + dt,
.contact-card dd:not(:first-of-type) {
    border-top: 1px solid var(--border);
    padding-top: 0.75em;
}

.contact-card dt {
    font-size: 1.05em;
    font-weight: 600;
    color: var(--text-secondary);
    padding-right: 1.5em;
}

.contact-card dd {
    min-width: 0;
    overflow-wrap: anywhere;
    margin: 0;
    text-align: right;
    font-size: 1.05em;
    color: var(--text);
}

.contact-link {
    color: var(--text);
    text-decoration: none;
}

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

/* Stack the email + card below 850px. */
@media (max-width: 850px) {
    .contact-cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 2em;
    }
}

@media (max-width: 720px) {
    .contact-email {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .contact-card {
        padding: 20px 20px;
    }

    .contact-card dl {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.25em;
    }

    .contact-card dt {
        padding-right: 0;
    }

    .contact-card dd {
        text-align: left;
    }

    .contact-card dd:not(:first-of-type) {
        border-top: 0;
        padding-top: 0;
    }

    .contact-card dd + dt {
        margin-top: 0.5em;
    }
}
