/* ============================================================
   EXPERIENCIA — Página de experiencia profesional (About)
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────── */
.about-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    min-height: 100vh;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem;
    gap: 5rem;
}

.about-sidebar {
    height: calc(100vh - 16rem);
    overflow-y: auto;
    position: sticky;
    top: 8rem;
    padding-right: 0.5rem;
}

.about-sidebar::-webkit-scrollbar { width: 6px; }
.about-sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.about-sidebar::-webkit-scrollbar-thumb { background: rgba(37, 99, 235, 0.5); border-radius: 3px; }
.about-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(37, 99, 235, 0.7); }

.about-sidebar img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 2px solid rgba(37, 99, 235, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.about-sidebar img:hover {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-content {
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
}

/* ── Hero text ──────────────────────────────────────────── */
.hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInDown 0.7s ease-out;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #f8fafc;
    margin-top: 0.5rem;
    font-weight: 600;
    animation: fadeInUp 0.7s ease-out 0.2s backwards;
}

.hero-bio {
    max-width: none;
    margin-top: 0.75rem;
    font-size: 0.87rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.65;
    animation: fadeInUp 0.7s ease-out 0.35s backwards;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--card-border);
}

/* ── CV Export button ───────────────────────────────────── */
.cv-export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.35);
    border-radius: 12px;
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
    text-decoration: none;
    box-sizing: border-box;
}

.cv-export-btn:hover {
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.6);
    color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.18);
}

.cv-export-btn svg { flex-shrink: 0; }

/* ── Knowledge button ───────────────────────────────────── */
.knowledge-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.2rem;
    width: 100%;
    padding: 0.75rem 1.2rem;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 12px;
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.03em;
}

.knowledge-btn:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.5);
    color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.knowledge-btn svg { flex-shrink: 0; }

/* ── Knowledge modal ────────────────────────────────────── */
.k-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.k-modal-overlay.open {
    display: flex;
    animation: kOverlayIn 0.25s ease;
}

@keyframes kOverlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.k-modal {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    animation: kModalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes kModalIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.k-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #1e1e1e;
    flex-shrink: 0;
}

.k-modal-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.k-modal-header-icon {
    width: 38px; height: 38px;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
}

.k-modal-title   { font-size: 1.15rem; font-weight: 600; color: #f1f5f9; margin: 0; }
.k-modal-subtitle { font-size: 0.78rem; color: #64748b; margin: 0; }

.k-modal-close {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.k-modal-close:hover { background: rgba(255,255,255,0.08); color: #fff; }

.k-modal-body {
    overflow-y: auto;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.k-modal-body::-webkit-scrollbar { width: 5px; }
.k-modal-body::-webkit-scrollbar-track { background: transparent; }
.k-modal-body::-webkit-scrollbar-thumb { background: rgba(37, 99, 235, 0.35); border-radius: 3px; }

.k-category-block { display: flex; flex-direction: column; gap: 0.75rem; }

.k-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.k-category-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(96, 165, 250, 0.15);
}

.k-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.k-tag {
    padding: 0.45rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-radius: 100px;
    font-size: 0.83rem;
    color: #93c5fd;
    font-weight: 500;
    transition: all 0.15s;
}

.k-tag:hover {
    background: rgba(37, 99, 235, 0.22);
    border-color: rgba(37, 99, 235, 0.5);
    color: #bfdbfe;
}

/* ── Sections ───────────────────────────────────────────── */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.section-title {
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--accent);
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--card-border);
    border-radius: 1px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.55rem;
}

/* ── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    border-color: var(--accent);
}

.card:hover::before { opacity: 1; }

.card h3 { font-size: 0.95rem; margin: 0 0 0.3rem 0; color: #ffffff; font-weight: 600; }
.card .meta { color: var(--text-muted); font-size: 0.72rem; margin-bottom: 0.5rem; font-weight: 400; }
.card p { color: #b0b0b0; font-size: 0.8rem; line-height: 1.55; margin: 0; }

/* ── Experience card ─────────────────────────────────────── */
.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.exp-company {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.exp-period {
    font-size: 0.65rem;
    color: var(--accent);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.exp-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.exp-card p { color: #999; }

/* ── Project card ────────────────────────────────────────── */
.proj-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.proj-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text);
}

.proj-date {
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.proj-card p { margin: 0 0 0.6rem; }

/* ── Buttons ────────────────────────────────────────────── */
.btn-live {
    display: inline-block;
    margin-top: 0;
    padding: 0.28rem 0.8rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.72rem;
    transition: all 0.2s;
    border: 1px solid rgba(37, 99, 235, 0.3);
}

.btn-live:hover { background: var(--accent); color: white; }

/* ── Admin link ─────────────────────────────────────────── */
.admin-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.admin-link:hover { color: var(--accent); }

/* ── Avatar placeholder (sidebar, no image) ─────────────── */
.avatar-placeholder-sidebar {
    height: 480px;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, rgba(37,99,235,0.07), rgba(37,99,235,0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 2px dashed rgba(37, 99, 235, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Arrow icon inside knowledge button */
.knowledge-btn svg:last-child { margin-left: auto; opacity: 0.6; }

/* Sections wrapper */
.sections-wrapper { margin-top: 1.5rem; }

/* Single-column grid override */
.grid-single { grid-template-columns: 1fr; }

/* Grid with bottom margin */
.grid-mb { margin-bottom: 1.75rem; }

/* Empty state text */
.empty-text { color: var(--text-muted); font-size: 0.8rem; padding: 0.5rem 0; }

/* Project action buttons row */
.project-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* GitHub button variant */
.btn-github {
    background: rgba(100,100,100,0.2);
    color: #888888;
    border-color: #3a3a3a;
}

/* ── Portfolio teaser link ───────────────────────────────── */
.portfolio-teaser { margin-bottom: 1.75rem; }

.portfolio-teaser-link {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.1rem;
    background: rgba(37, 99, 235, 0.07);
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 12px;
    color: #93c5fd;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.portfolio-teaser-link:hover {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(37, 99, 235, 0.5);
    color: #bfdbfe;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
}

.portfolio-teaser-link svg:last-child { margin-left: auto; opacity: 0.7; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
    .about-layout {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 4rem;
    }

    .about-sidebar {
        position: relative;
        top: 0;
        width: 280px;
        margin: 0 auto;
    }

    .about-content { text-align: center; align-items: center; }
    .about-sidebar img { height: 350px; }
    .hero-title { font-size: 2rem; }
    .exp-header, .proj-header { flex-direction: column; gap: 0.2rem; }
    .exp-period, .proj-date { align-self: flex-start; }
}
