
.contact-page {
    width: min(1050px, 90%);
    margin: auto;
    padding: 85px 0 110px;
}

.contact-intro {
    text-align: center;
    margin-bottom: 65px;
}

.contact-intro h1 {
    margin-top: 20px;
    font-size: clamp(48px, 7vw, 76px);
    line-height: 1.08;
    letter-spacing: -5px;
}

.contact-lead {
    max-width: 510px;
    margin: 22px auto 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.8;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.form-card,
.side-card {
    background: #fff;
    border: 1px solid #e8e8ea;
    border-radius: 20px;
}

.form-card {
    padding: 34px;
}

.form-card h2 {
    font-size: 27px;
    letter-spacing: -1px;
    margin: 10px 0 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field {
    margin-bottom: 23px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 9px;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    padding: 14px 15px;
    background: #f5f5f7;
    border: 1px solid #e5e5e7;
    border-radius: 10px;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #a1a1a6;
}


.field input:focus,
.field select:focus,
.field textarea:focus {
    background: #fff;
    border-color: #06c;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
}



.field textarea {
    resize: vertical;
    min-height: 145px;
    line-height: 1.7;
}

.field select {
    cursor: pointer;
}

.character-count {
    text-align: right;
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
}

.submit-button {
    width: 100%;
    margin-top: 3px;
    min-height: 47px;
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: wait;
}

.form-note {
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.7;
    margin-top: 16px;
}

.form-feedback {
    display: none;
    padding: 13px 15px;
    margin-top: 20px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.6;
}

.form-feedback.visible {
    display: block;
}

.form-feedback.success {
    background: #edf8ef;
    color: #206d35;
}

.form-feedback.error {
    background: #fff0ef;
    color: #a12d25;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.side-card {
    padding: 25px;
}

.side-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf3ff;
    color: #06c;
    font-size: 21px;
    margin-bottom: 22px;
}

.side-card .eyebrow {
    font-size: 9px;
    letter-spacing: 1.2px;
}

.side-card h3 {
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: -0.6px;
    margin: 12px 0;
}

.side-card > p:last-child {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
}

.side-note {
    background: #ececf0;
    border-color: #ececf0;
}

.back-link {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin: 12px 5px;
    font-size: 12px;
    color: var(--blue);
}

.back-link span {
    transition: transform 0.2s;
}

.back-link:hover span {
    transform: translateX(-4px);
}

@media (max-width: 760px) {
    .contact-page {
        padding-top: 65px;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .contact-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .back-link {
        grid-column: 1 / -1;
    }

    .contact-intro {
        margin-bottom: 40px;
    }
}

@media (max-width: 520px) {
    .contact-page {
        width: 92%;
        padding-bottom: 70px;
    }

    .contact-intro h1 {
        font-size: 46px;
        letter-spacing: -3px;
    }

    .form-card {
        padding: 23px 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-sidebar {
        grid-template-columns: 1fr;
    }

    .back-link {
        grid-column: auto;
    }
}


/* ===== DARK MODE: CONTACT PAGE ===== */

html[data-theme="dark"] .contact-page {
    color: var(--theme-text);
}

html[data-theme="dark"] .contact-lead,
html[data-theme="dark"] .character-count,
html[data-theme="dark"] .form-note,
html[data-theme="dark"] .side-card > p:last-child {
    color: var(--theme-muted);
}

html[data-theme="dark"] .form-card,
html[data-theme="dark"] .side-card {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select,
html[data-theme="dark"] .field textarea {
    background: #252527;
    border-color: #3a3a3c;
    color: var(--theme-text);
}

html[data-theme="dark"] .field input::placeholder,
html[data-theme="dark"] .field textarea::placeholder {
    color: #a1a1a6;
}

html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field select:focus,
html[data-theme="dark"] .field textarea:focus {
    background: #2b2b2e;
    border-color: #2997ff;
    box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.18);
}

html[data-theme="dark"] .field select option {
    background: #252527;
    color: #f5f5f7;
}

html[data-theme="dark"] .side-icon {
    background: #202f46;
    color: #70b5ff;
}

html[data-theme="dark"] .side-note {
    background: #252527;
    border-color: #3a3a3c;
}

html[data-theme="dark"] .form-feedback.success {
    background: #183323;
    color: #a6e6b5;
}

html[data-theme="dark"] .form-feedback.error {
    background: #3b2221;
    color: #ffb4ab;
}

html[data-theme="dark"] .navbar,
html[data-theme="dark"] footer {
    background-color: #101010;
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .navbar a,
html[data-theme="dark"] footer a {
    color: var(--theme-text);
}

html[data-theme="dark"] .theme-toggle {
    background: #252527;
    color: #f5f5f7;
    border-color: #454549;
}
/* =====================================
   SMOOTH PAGE ANIMATIONS
===================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.75s cubic-bezier(.2, .8, .2, 1),
        transform 0.75s cubic-bezier(.2, .8, .2, 1);
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card,
.contact-card {
    transition:
        transform 0.35s cubic-bezier(.2, .8, .2, 1),
        box-shadow 0.35s ease;
}

.project-card:hover,
.contact-card:hover {
    transform: translateY(-5px);
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* =====================================
   SOCIAL LINKS
===================================== */

.social-card {
    padding: 25px;
    background: #fff;
    border: 1px solid #e8e8ea;
    border-radius: 20px;
    min-width: 0;
}

.social-card > h3 {
    margin: 10px 0 8px;
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -1px;
}

.social-intro {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px 12px;
    border: 1px solid #e8e8ea;
    border-radius: 13px;
    color: var(--text);
    text-decoration: none;
    background: #fafafa;
    transition:
        transform 0.22s ease,
        background 0.22s ease,
        border-color 0.22s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    background: #f1f1f4;
    border-color: #d5d5da;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    border-radius: 11px;
    background: #ededf0;
    color: #252527;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.social-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.social-copy strong {
    font-size: 12px;
    font-weight: 650;
    letter-spacing: -0.2px;
}

.social-copy small {
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.social-arrow {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 16px;
    transition: transform 0.22s ease;
}

.social-link:hover .social-arrow {
    transform: translate(2px, -2px);
}

/* Dark mode */

html[data-theme="dark"] .social-card {
    background: var(--theme-surface);
    border-color: var(--theme-border);
    color: var(--theme-text);
}

html[data-theme="dark"] .social-intro {
    color: var(--theme-muted);
}

html[data-theme="dark"] .social-link {
    background: #202022;
    border-color: #38383c;
    color: var(--theme-text);
}

html[data-theme="dark"] .social-link:hover {
    background: #2b2b2e;
    border-color: #505056;
}

html[data-theme="dark"] .social-icon {
    background: #303034;
    color: #f5f5f7;
}

html[data-theme="dark"] .social-copy small,
html[data-theme="dark"] .social-arrow {
    color: var(--theme-muted);
}
