/* ============================================================
   ABOUT.CSS — About Me Page
   Benjamin Yew's Portfolio
   ============================================================ */

#about {
    background-color: var(--bg-primary);
    min-height: calc(100vh - 70px);
    padding-bottom: 100px;
}

/* ── Banner ── */
.about-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0f172a 100%);
    border-bottom: 1px solid var(--border);
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

.about-banner::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.07) 0%, transparent 70%);
    top: -100px;
    right: 10%;
    pointer-events: none;
}

.about-banner-mono {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.about-banner-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    line-height: 1.2;
}

.about-banner-sub {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ── Body ── */
.about-body {
    padding-top: 64px;
    display: flex;
    flex-direction: column;
    gap: 56px;
}

/* ── Content Blocks ── */
.about-block {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 56px;
    border-bottom: 1px solid var(--border);
}

.about-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.about-block-label {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 4px;
    position: sticky;
    top: 90px;
}

.about-block-content p {
    font-size: 0.97rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 16px;
}

.about-block-content p:last-child {
    margin-bottom: 0;
}

/* ── Code Block ── */
.about-code-block {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 2;
    margin-top: 24px;
    color: var(--text-secondary);
}

.code-comment { color: #475569; font-style: italic; }
.code-keyword { color: #7dd3fc; }
.code-fn      { color: #38bdf8; }
.code-string  { color: #86efac; }

/* ── Passion Cards — full width side by side layout ── */
.about-passion-card.passion-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 28px;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.about-passion-card.passion-full:last-child {
    margin-bottom: 0;
}

.about-passion-card.passion-full:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow: var(--shadow-accent);
}

/* Reverse: image on right, text on left */
.passion-reverse {
    direction: rtl;
}

.passion-reverse .passion-body,
.passion-reverse .passion-img-wrapper {
    direction: ltr;
}

/* ── Image ── */
.passion-img-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 320px;
}

.passion-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
    background: var(--bg-primary);
}

.passion-chelsea {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.5s ease;
}

.passion-img-wrapper-chelsea {
    position: relative;
    overflow: hidden;
    min-height: 380px;
    height: 100%;
}

.about-passion-card:hover .passion-img {
    transform: scale(1.03);
}

.passion-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        transparent 60%,
        rgba(30, 41, 59, 0.6) 100%
    );
    pointer-events: none;
}

.passion-reverse .passion-img-overlay {
    background: linear-gradient(
        to left,
        transparent 60%,
        rgba(30, 41, 59, 0.6) 100%
    );
}

.passion-img-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-family: var(--font-mono);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    letter-spacing: 0.5px;
}

/* ── Text Side ── */
.passion-body {
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.passion-header {
    margin-bottom: 20px;
}

.passion-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.passion-subtitle {
    font-size: 0.8rem;
    color: var(--accent);
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
}

.passion-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 14px;
}

/* ── Stats Row ── */
.passion-stat {
    display: flex;
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 8px;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 0 12px;
    border-right: 1px solid var(--border);
}

.stat-item:first-child { padding-left: 0; }
.stat-item:last-child  { border-right: none; padding-right: 0; }

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
    font-family: var(--font-mono);
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Facts Grid ── */
.about-facts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}

.fact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    transition: var(--transition);
    text-align: center;
}

.fact-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.fact-icon {
    font-size: 1.8rem;
    margin-bottom: 12px;
}

.fact-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.fact-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .about-block {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .about-block-label {
        position: static;
    }

    .about-passion-card.passion-full {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .passion-img-wrapper {
        min-height: 240px;
    }

    .passion-img-overlay {
        background: linear-gradient(
            to bottom,
            transparent 60%,
            rgba(30, 41, 59, 0.6) 100%
        ) !important;
    }

    .about-facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .about-banner { padding: 48px 0 40px; }
    .about-facts-grid { grid-template-columns: 1fr; }
    .passion-body { padding: 24px 20px; }
    .passion-img-wrapper { min-height: 200px; }
}

/* ── Project Card Carousel ── */
.project-card-img {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.project-carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.project-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.project-carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.project-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: contain;  
    object-position: center;
    display: block;
    background: var(--bg-primary); 
}

.project-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    font-size: 0.75rem;
}

.project-carousel-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent);
    color: var(--accent);
}

.project-carousel-prev { left: 8px; }
.project-carousel-next { right: 8px; }

.project-carousel-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 10;
}

.project-carousel-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.project-carousel-dot.active {
    background: var(--accent);
    width: 14px;
    border-radius: 3px;
}


.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.fi-flag-icon {
    font-size: 2rem;
    border-radius: 4px;
    display: inline-block;
    width: 2em;
    line-height: 1.5em;
}