/* =============================================================
   ABOUT SECTION — Dr. Vipin Mathur Portfolio (Fixed Responsive)
   FIX: Image no longer overlaps heading on mobile/tablet.
        Removed negative margin-top that caused the overlap.
   ============================================================= */

/* ── Section wrapper ─────────────────────────────────────────── */
.about-section {
    position: relative;
    padding: 80px 48px;
    background-color: var(--color-bg);
    overflow: hidden;
}

/* Subtle radial glow — top-right corner accent */
.about-section::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -100px;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: radial-gradient(
        ellipse at center,
        rgba(23, 92, 82, 0.07) 0%,
        transparent 68%
    );
    pointer-events: none;
    z-index: 0;
}

/* ── Inner container ─────────────────────────────────────────── */
.about-inner {
    position: relative;
    z-index: 1;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Header block (eyebrow + heading + rule) ─────────────────── */
.about-header-col {
    margin-bottom: 36px;
}

/* ── Body row: text LEFT, image RIGHT ────────────────────────── */
.about-body-row {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 56px;
    align-items: start;
}

/* ── Vertical divider — not used ────────────────────────────── */
.about-divider-v {
    display: none;
}

/* ── LEFT: Content column ────────────────────────────────────── */
.about-content-col {
    padding-top: 0;
}

/* Eyebrow */
.about-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-rose);
    margin-bottom: 22px;
}

.about-eyebrow::before {
    content: '';
    display: inline-block;
    width: 28px;
    height: 1px;
    background: var(--color-rose);
    flex-shrink: 0;
}

/* Heading */
.about-heading {
    font-family: var(--font-serif);
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 800;
    line-height: 1.08;
    color: var(--color-fg);
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

.about-heading em {
    font-style: italic;
    font-weight: 700;
    color: var(--color-accent);
}

/* Rule */
.about-rule {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-rose), transparent);
    margin-bottom: 28px;
    border-radius: 2px;
}

/* Body text */
.about-body {
    font-family: var(--font-sans);
    font-size: 17px;
    font-weight: 450;
    line-height: 1.9;
    color: var(--color-fg);
    opacity: 0.85;
    margin-bottom: 18px;
    max-width: 640px;
}

/* ── Stats row ───────────────────────────────────────────────── */
.about-stats {
    display: flex;
    align-items: stretch;
    gap: 32px;
    margin: 32px 0 36px;
}

.about-stat-num {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 5px;
}

.about-stat-label {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-fg);
    opacity: 0.50;
}

.about-stat-sep {
    width: 1px;
    background: var(--color-fg);
    opacity: 0.10;
    align-self: stretch;
    flex-shrink: 0;
}

/* ── Capsule / pill CTA button ───────────────────────────────── */
.about-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    background: var(--color-accent);
    color: var(--color-fg-alt, #fff);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 13px 26px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    transition: background var(--transition), color var(--transition),
                gap var(--transition), border-color var(--transition);
    margin-top: 8px;
}

.about-link-pill:hover {
    background: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    gap: 16px;
}

.about-link-pill .about-link__arrow {
    display: flex;
    align-items: center;
    transition: transform var(--transition);
}

.about-link-pill:hover .about-link__arrow {
    transform: translateX(4px);
}

/* ── RIGHT: Media column ─────────────────────────────────────── */
.about-media-col {
    position: relative;
    margin-top: -100px;
    padding-top: 4px;
    padding-bottom: 24px;
}

/* Decorative background number */
.about-deco-num {
    position: absolute;
    top: -16px;
    right: -18px;
    font-family: var(--font-serif);
    font-size: clamp(80px, 10vw, 120px);
    font-style: italic;
    font-weight: 800;
    color: var(--color-stone);
    line-height: 1;
    letter-spacing: -0.04em;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

/* Portrait frame — arch top */
.about-portrait {
    position: relative;
    width: 100%;
    padding-bottom: 130%;
    border-radius: 180px 180px 24px 24px;
    overflow: hidden;
    background: var(--color-bg-alt);
    z-index: 1;
    cursor: pointer;
}

.about-portrait img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.7s ease, filter 0.5s ease;
    display: block;
}

.about-portrait:hover img {
    transform: scale(1.04);
    filter: brightness(0.85);
}

/* Hover overlay */
.about-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(23, 92, 82, 0.82) 0%,
        rgba(23, 92, 82, 0.18) 52%,
        transparent 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 32px 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.about-portrait:hover .about-card__overlay {
    opacity: 1;
}

.about-card__title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-style: italic;
    font-weight: 400;
    color: var(--color-fg-alt);
    text-align: center;
    margin-bottom: 6px;
    transform: translateY(8px);
    transition: transform 0.4s ease 0.05s;
}

.about-portrait:hover .about-card__title {
    transform: translateY(0);
}

.about-card__sub {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-fg-alt-muted);
    text-align: center;
    transform: translateY(8px);
    transition: transform 0.4s ease 0.10s;
}

.about-portrait:hover .about-card__sub {
    transform: translateY(0);
}

/* Floating role badge — always visible below portrait */
.about-badge {
    position: absolute;
    bottom: -0.6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg);
    border: 1px solid rgba(23, 92, 82, 0.14);
    border-radius: var(--radius-pill);
    padding: 9px 22px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(23, 92, 82, 0.10);
    z-index: 2;
}

.about-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-rose);
    flex-shrink: 0;
}

.about-badge__text {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--color-fg);
    opacity: 0.72;
}

/* =============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================= */

/* ── 1100px: smaller desktop / large laptop ──────────────────── */
@media (max-width: 1100px) {
    .about-body-row {
        grid-template-columns: 1fr 280px;
        gap: 40px;
    }
}

/* ── 900px: tablet portrait — stack to single column ─────────── */
@media (max-width: 900px) {
    .about-section {
        padding: 60px 32px;
    }

    /* Stack into a single column */
    .about-body-row {
        grid-template-columns: 1fr;
        gap: 40px;          /* positive gap, no overlap */
    }

    /* Image moves ABOVE the heading block on mobile */
    .about-media-col {
        order: -1;          /* renders before .about-header-col */
        margin-top: 0;      /* ensure no stray negative margin */
        margin-bottom: 0;
        padding-bottom: 32px; /* space for the badge that hangs below */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Fixed pixel size so the arch portrait is predictable */
    .about-portrait {
        width: 260px;
        height: 340px;
        padding-bottom: 0;  /* override the % padding-bottom used on desktop */
        border-radius: 130px 130px 20px 20px;
    }

    /* Centre all header text */
    .about-header-col {
        text-align: center;
        margin-bottom: 24px;
    }

    .about-content-col {
        text-align: center;
    }

    /* Hide the decorative line before eyebrow when centred */
    .about-eyebrow::before {
        display: none;
    }

    /* Keep body paragraphs left-aligned for readability */
    .about-body {
        text-align: left;
        margin-left: auto;
        margin-right: auto;
    }

    .about-stats {
        justify-content: center;
    }

    .about-rule {
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 28px;
    }

    .about-link-pill {
        margin-top: 8px;
    }

    /* Hide decorative large number on small screens */
    .about-deco-num {
        display: none;
    }
}

/* ── 640px: large phone ───────────────────────────────────────── */
@media (max-width: 640px) {
    .about-section {
        padding: 48px 24px;
    }

    .about-body-row {
        gap: 32px;
    }

    .about-portrait {
        width: 230px;
        height: 300px;
        border-radius: 115px 115px 18px 18px;
    }

    .about-heading {
        font-size: clamp(28px, 7vw, 40px);
    }

    .about-body {
        font-size: 16px;
        line-height: 1.8;
    }

    .about-stats {
        gap: 20px;
        flex-wrap: wrap;
    }

    .about-stat-num {
        font-size: 30px;
    }

    /* Badge: ensure it never overflows on small screens */
    .about-badge {
        white-space: normal;
        text-align: center;
        justify-content: center;
        padding: 8px 16px;
        max-width: 90%;
    }

    .about-badge__text {
        font-size: 10px;
    }
}

/* ── 480px: standard phone portrait ──────────────────────────── */
@media (max-width: 480px) {
    .about-section {
        padding: 40px 20px;
    }

    .about-body-row {
        gap: 28px;
    }

    .about-portrait {
        width: 265px;
        height: 265px;
        border-radius: 100px 100px 16px 16px;
    }

    .about-stats {
        gap: 16px;
    }

    .about-stat-num {
        font-size: 26px;
    }

    .about-stat-label {
        font-size: 10px;
    }

    .about-link-pill {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
    }
}

/* ── 360px: very small phones ─────────────────────────────────── */
@media (max-width: 360px) {
    .about-section {
        padding: 36px 16px;
    }

    .about-portrait {
        width: 240px;
        height: 240px;
        border-radius: 90px 90px 14px 14px;
    }

    .about-heading {
        font-size: 26px;
    }

    .about-body {
        font-size: 15px;
    }

    /* Stack stats vertically on tiny screens */
    .about-stats {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .about-stat-sep {
        width: 40px;
        height: 1px;
        align-self: auto;
    }
}

/* ── Reduced motion preference ───────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .about-portrait img,
    .about-card__overlay,
    .about-card__title,
    .about-card__sub,
    .about-link-pill,
    .about-link__arrow {
        transition: none;
    }

    .about-portrait:hover img {
        transform: none;
        filter: none;
    }
}