.contact-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    aspect-ratio: 1 / 1;
    height: 100%;
}

.form-frame {
    display: flex;
    aspect-ratio: 1 / 1;
    width: 100%;
    height: 100%;
    border: 1px solid #000;
    overflow: hidden;
}

.contact-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 1rem;
}

.contact-form label {
    margin-bottom: 0.5rem;
    font-size: 16px;
}

.contact-form input,
.contact-form textarea {
    -webkit-appearance: none;
    appearance: none;
    -webkit-border-radius: 0;
    width: 100%;
    min-height: 48px; /* touch-friendly minimum height */
    margin-bottom: 16px;
    border: 1px solid #000;
    border-radius: 0;
    padding: 8px 12px; /* improved horizontal padding */
    font-family: inherit;
    background: transparent;
}

.contact-form textarea {
    min-height: 96px; /* allow expansion if needed */
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form button:focus {
    outline: 2px solid #000;
    outline-offset: -2px;
}

/* visual feedback for validation states */
.contact-form input:not(:placeholder-shown):invalid,
.contact-form textarea:not(:placeholder-shown):invalid {
    border-color: #c00;
}


/* submit button - touch-friendly sizing */
.contact-form button {
    -webkit-appearance: none;
    appearance: none;
    -webkit-border-radius: 0;
    align-self: flex-end;
    min-height: 48px; /* meets 44px touch target minimum */
    padding: 8px 24px;
    border: 1px solid #000;
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.contact-form button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form button:focus,
.contact-form input:active,
.contact-form textarea:active,
.contact-form button:active {
    border-radius: 0;
}

.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form textarea:-webkit-autofill,
.contact-form textarea:-webkit-autofill:hover,
.contact-form textarea:-webkit-autofill:focus {
    border-radius: 0;
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #000;
}

.contact-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

#contact-prev,
#contact-next {
    cursor: pointer;
    padding-top: 0.5rem;
}

#contact-prev {
    padding-right: 2rem;
}

#contact-next {
    padding-left: 2rem;
}

/* navigation link styling */
#contact-link {
    padding-top: 0.5rem;
    transition: color 0.5s ease, opacity 0.5s ease;
    color: #000;
}

/* fade effect when transitioning pages */
#contact-link.fade-out {
    opacity: 0;
    color: #fff;
}

/*-------------- tablet styles (≤1024px) --------------*/
@media screen and (max-width: 1024px) {
    .contact-column {
        width: 85vw;
        max-width: 500px;
        height: auto;
        aspect-ratio: auto;
    }

    .form-frame {
        height: auto;
        aspect-ratio: auto;
    }

    .contact-nav {
        margin-top: 1rem;
    }
}

/*-------------- mobile styles (≤767px) --------------*/
@media screen and (max-width: 767px) {
    .contact-column {
        margin-top: 1rem;
    }
}