.contact-card {
    width: min(620px, 100%);
    justify-self: center;
    margin-top: 0.5rem;
    background: linear-gradient(145deg, rgba(16, 38, 60, 0.92), rgba(12, 29, 46, 0.82));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: clamp(1.2rem, 3vw, 2rem);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.contact-card h2 {
    margin: 0 0 0.85rem;
    font-size: 1.5rem;
    letter-spacing: 0.02em;
}

.form-alert {
    margin: 0 0 0.9rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.92rem;
}

.form-alert.success {
    background: rgba(0, 184, 148, 0.18);
    border-color: rgba(0, 184, 148, 0.45);
}

.form-alert.error {
    background: rgba(255, 118, 117, 0.15);
    border-color: rgba(255, 118, 117, 0.45);
}

.contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.contact-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-form-field label {
    font-size: 0.88rem;
    color: var(--muted);
}

.contact-form-field input,
.contact-form-field textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    outline: none;
    font-family: inherit;
}

.contact-form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-field input::placeholder,
.contact-form-field textarea::placeholder {
    color: #d4dde3;
}

.contact-form-full-width {
    grid-column: 1 / -1;
}

.field-error {
    color: #ffd4d4;
    font-size: 0.8rem;
}

.contact-form-submit {
    grid-column: 1 / -1;
    justify-self: start;
    border: 0;
    background: linear-gradient(120deg, var(--accent), #40e0b8);
    color: #111;
    padding: 0.8rem 1.3rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 150ms ease, filter 150ms ease;
}

.contact-form-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

@media (max-width: 640px) {
    .contact-form {
        grid-template-columns: 1fr;
    }
}
