/* Inner pages (About, Services, Experience, Portfolio, Contact) */

.inner-page {
    background: #f1f5f9;
}

.page-shell {
    padding-bottom: 0;
}

.page-shell.page-offset {
    padding-top: calc(88px + env(safe-area-inset-top, 0px));
}

/* ——— Hero ——— */
.page-hero {
    padding: 1.25rem 0 2rem;
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.page-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.page-breadcrumb a:hover {
    color: #4c68d7;
}

.page-breadcrumb-sep {
    color: #cbd5e1;
    font-size: 0.65rem;
}

.page-breadcrumb-current {
    color: #1e293b;
    font-weight: 600;
}

.page-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.page-hero-media {
    min-height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(1.75rem, 4vw, 2.75rem);
    text-align: left;
}

.page-hero-copy--full {
    grid-column: 1 / -1;
}

.page-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #ff6b35;
    margin: 0 0 0.65rem;
}

.page-title {
    font-size: clamp(1.85rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: #0f172a;
    margin: 0 0 1rem;
}

.page-lead {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    line-height: 1.65;
    color: #475569;
    margin: 0;
    max-width: 52ch;
}

.page-hero-accent {
    width: 56px;
    height: 4px;
    margin-top: 1.5rem;
    border-radius: 2px;
    background: linear-gradient(135deg, #4c68d7, #6b46c1);
}

/* Hero image variants (backgrounds in styles2.css) */
.experience-entry-image {
    background-image: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%),
        url("fives.jpg");
    background-blend-mode: overlay;
}

.contact-hero-image {
    background-image: linear-gradient(135deg, rgba(15, 23, 42, 0.5), rgba(15, 23, 42, 0.2)),
        url("four.jpg");
}

/* ——— Page sections ——— */
.page-body {
    padding-bottom: 3rem;
}

.page-section {
    padding: clamp(2rem, 5vw, 3rem) 0;
}

.page-section--alt {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.page-section-header {
    text-align: left;
    margin-bottom: 1.75rem;
    max-width: 720px;
}

.page-section-header h2 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.page-section-header p {
    color: #64748b;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.6;
}

.page-section-header .section-divider {
    margin: 1rem 0 0;
    margin-left: 0;
}

.content-card {
    background: #ffffff;
    border-radius: 16px;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    box-shadow: 0 2px 16px rgba(15, 23, 42, 0.06);
    border: 1px solid #e2e8f0;
}

.content-card + .content-card {
    margin-top: 1.5rem;
}

.page-prose {
    max-width: 68ch;
    text-align: left;
}

.page-prose p {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #334155;
    margin-bottom: 1.25rem;
}

.page-prose p:last-child {
    margin-bottom: 0;
}

/* Stats on inner pages */
.inner-page .about-stats {
    margin-top: 0;
}

.inner-page .stat {
    border: 1px solid #e2e8f0;
    box-shadow: none;
}

.inner-page .stat-number {
    background: linear-gradient(135deg, #4c68d7, #6b46c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Services grid in page context */
.inner-page .services-grid {
    margin-top: 0;
}

.inner-page .service-card {
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

/* Timeline */
.inner-page .timeline {
    max-width: 900px;
    margin: 0 auto;
}

.inner-page .timeline-content {
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

/* Portfolio cards */
.inner-page .portfolio-grid {
    margin-top: 0;
}

.inner-page .portfolio-card {
    border: 1px solid #e2e8f0;
    height: 100%;
}

/* Contact form feedback */
#contact-form-feedback.contact-alert {
    margin-bottom: 1.25rem;
}

#contact-form-feedback[hidden] {
    display: none !important;
}

.contact-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: 14px;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}

.contact-alert__icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.1rem;
}

.contact-alert__title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 0.25rem;
    color: #0f172a;
}

.contact-alert__text {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.55;
    color: #475569;
}

.contact-alert--success {
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.contact-alert--success .contact-alert__icon {
    background: #10b981;
    color: #fff;
}

.contact-alert--error {
    background: #fef2f2;
    border-color: #fecaca;
}

.contact-alert--error .contact-alert__icon {
    background: #ef4444;
    color: #fff;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Contact page */
.page-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: start;
}

.page-contact-grid > .content-card {
    min-width: 0;
}

.contact-info-card h3,
.contact-form-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
}

.contact-info-card p {
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.inner-page .contact-method {
    color: #334155;
}

.inner-page .contact-method a {
    color: inherit;
    text-decoration: none;
}

.inner-page .contact-method a:hover {
    color: #4c68d7;
}

.inner-page .contact-info-card .social-links a {
    background: #f1f5f9;
    color: #4c68d7;
}

.inner-page .contact-info-card .social-links a:hover {
    background: #4c68d7;
    color: #fff;
}

.inner-page .contact-form-card {
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* Contact form — stacked fields (no .inner-page required; supports legacy .form-group) */
.contact-form-card .contact-page-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-width: 0;
    margin-top: 0.25rem;
}

.contact-form-card .contact-page-form .contact-field,
.contact-form-card .contact-page-form .form-group {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    margin: 0 0 1.25rem;
    padding: 0;
    float: none;
    clear: both;
    position: static;
}

.contact-form-card .contact-page-form .contact-field--message {
    margin-bottom: 1.5rem;
}

.contact-form-card .contact-page-form label {
    display: block;
    width: 100%;
    margin: 0 0 0.5rem;
    padding: 0;
    font-weight: 500;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.4;
}

.contact-form-card .contact-page-form input:not([type="hidden"]),
.contact-form-card .contact-page-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    min-height: 44px;
    box-sizing: border-box;
    position: static;
    float: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-card .contact-page-form textarea {
    resize: vertical;
    min-height: 140px;
    height: auto;
}

.contact-form-card .contact-page-form input::placeholder,
.contact-form-card .contact-page-form textarea::placeholder {
    color: #94a3b8;
}

.contact-form-card .contact-page-form input:focus,
.contact-form-card .contact-page-form textarea:focus {
    outline: none;
    border-color: #4c68d7;
    box-shadow: 0 0 0 3px rgba(76, 104, 215, 0.2);
}

.contact-form-card .contact-page-form .btn.is-loading {
    opacity: 0.85;
    cursor: wait;
}

.contact-form-card .contact-page-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: none;
    margin: 0.25rem 0 0;
    flex-shrink: 0;
}

/* Bottom CTA band */
.page-cta-band {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 45%, #0f3460 100%);
    padding: clamp(2.5rem, 6vw, 3.5rem) 0;
    margin-top: 1rem;
}

.page-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.page-cta-text h2 {
    color: #ffffff;
    font-size: clamp(1.35rem, 3vw, 1.85rem);
    margin: 0 0 0.5rem;
    font-weight: 700;
}

.page-cta-text p {
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    max-width: 520px;
    line-height: 1.6;
}

.page-cta-actions {
    flex-shrink: 0;
}

.page-cta-band .section-cta .btn.btn-secondary {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.55);
}

.page-cta-band .section-cta .btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: #fff;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

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

    .page-hero-media {
        min-height: 220px;
        order: -1;
    }

    .page-contact-grid {
        grid-template-columns: 1fr;
    }

    .page-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .page-cta-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .page-cta-actions {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .page-cta-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .page-cta-actions .btn {
        width: 100%;
    }

    .page-actions {
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
