/* Small refinements only: original terminal card shape + existing slider preserved. */
.project-card .terminal-header .text-xs{font-size:.66rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.project-card .terminal-body{gap:8px}
.project-card .content h3{line-height:1.33;min-height:2.55em}
.project-terminal-lines{font-family:"Source Code Pro",monospace;font-size:.74rem;line-height:1.7;min-height:3.4em;overflow-wrap:anywhere}
.project-teaser{font-size:.83rem;color:var(--text-secondary);line-height:1.6;margin-top:.75rem;min-height:4.7em}
.project-card .terminal-body img{aspect-ratio:16/9;height:auto;max-height:185px;object-fit:cover;display:block}
.project-footer{background:var(--secondary-color);padding:10px 14px}
.project-footer .view-project-btn{margin:0}
.project-card .terminal-body .tag{font-size:.67rem}
.tools-extra{border-top:1px solid var(--terminal-border);padding-top:15px;margin-top:10px}
.tools-extra__label{color:#e5e7eb;font-size:.84rem;font-weight:700;margin-bottom:10px}
.tools-extra__note{color:#8793a2;font-size:.72rem;font-weight:400}
.tools-extra__tags{display:flex;flex-wrap:wrap;gap:7px}
.tools-extra__tags span{padding:5px 9px;color:#c4ccd6;border:1px solid #3c4550;border-radius:6px;background:#1b222c;font-size:.73rem}
@media(max-width:600px){.project-card .content h3{min-height:0}.project-teaser{min-height:0}}


/* Compact and grouped Technical Skills: no artificial height matching. */
#skills-aside{height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;gap:9px;padding:14px 13px 12px}
.skills-column{align-self:start}
.skills-list{gap:7px}
.skill-category-btn{min-height:59px;display:flex;align-items:center;gap:11px;padding:9px 11px;width:100%;box-sizing:border-box}
.skill-category-btn .skill-category-icon{flex:0 0 28px;color:var(--primary-color);font-size:23px;line-height:1}
.skill-category-copy{display:flex;flex-direction:column;gap:3px;min-width:0;align-items:flex-start}
.skill-category-name{font-weight:700;line-height:1.15;font-size:.84rem;color:var(--text-primary)}
.skill-category-tech{font-size:.66rem;line-height:1.35;color:#94a3b8;font-weight:400;text-wrap:balance}
.skill-category-btn.selected .skill-category-tech{color:#fdba74}
.select-instruction{font-size:.78rem;line-height:1.4;margin-bottom:1px}
#skills-aside .reset-btn{margin-top:2px}
.additional-tools-section{padding:22px 0 46px;border-top:1px solid rgba(148,163,184,.1)}
.additional-tools-container{display:flex;flex-direction:column;gap:12px}
.additional-tools-container .section-title{margin:0}
.additional-tools-description{margin:0;color:var(--text-secondary);font-size:.84rem}
.additional-tools-rail{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:3px}
.additional-tool{display:flex;align-items:center;justify-content:center;gap:10px;padding:13px 9px;border-radius:9px;background:#11161e;border:1px solid #303944;min-width:0;transition:border-color .18s,transform .18s}
.additional-tool:hover{border-color:#d97736;transform:translateY(-2px)}
.additional-tool-icon{position:relative;width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center}
.additional-tool-icon img{width:32px;height:32px;object-fit:contain;position:relative;z-index:2}
.additional-tool-fallback{position:absolute;inset:0;display:grid;place-items:center;border:1px solid #965729;background:#241e1a;color:#fb923c;border-radius:7px;font:700 11px 'Roboto Mono',monospace;z-index:1}
.additional-tool-label{font-size:.85rem;font-weight:600;color:#d1d5db;white-space:nowrap}
/* Chrome/GitHub black icon visibility against dark background */
.additional-tool[title="GitHub"] .additional-tool-icon img{filter:invert(1)}
@media(max-width:700px){.additional-tools-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.additional-tool{gap:7px;padding:10px 7px}.additional-tool-label{font-size:.77rem}}
@media(max-width:420px){.additional-tools-rail{grid-template-columns:repeat(3,minmax(0,1fr))}.additional-tool{flex-direction:column;gap:5px}}

/* Hide the uninitialized card grid before JS converts it to the slider.
   Visibility keeps its width measurable for the responsive slide layout. */
.js-enabled #projects-grid { visibility: hidden; }

/* ==========================================
   RESPONSIVE - SECTION HEADERS
   ========================================== */

@media (max-width: 768px) {

    /* Ocultar comandos de terminal en móviles */
    .stack-skills-counter {
        display: none !important;
    }

    /* Encabezados adaptables */
    .port-section-header {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    /* Evitar desbordamiento horizontal */
    .port-section-header .stack-skills-intro {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .port-section-header .stack-skills-intro > div {
        width: 100%;
        min-width: 0;
    }

    /* Títulos */
    .port-section-header .section-title,
    .stack-skills-intro .section-title {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: clamp(1.35rem, 5.5vw, 2rem) !important;
        line-height: 1.3 !important;

        white-space: normal !important;
        overflow-wrap: break-word;
        word-break: normal;
        text-align: left;
    }

    /* Texto naranja del título */
    .port-section-header .section-title span {
        white-space: normal !important;
    }

    /* Descripciones */
    .port-section-header .stack-skills-description,
    .port-section-header .section-subtitle,
    .stack-skills-intro .stack-skills-description {
        display: block;
        width: 100%;
        max-width: 100%;
        font-size: 0.85rem;
        line-height: 1.7;

        white-space: normal !important;
        overflow-wrap: break-word;
        word-break: normal;
        text-align: left;
    }
}

/* Teléfonos especialmente pequeños */
@media (max-width: 380px) {

    .port-section-header .section-title,
    .stack-skills-intro .section-title {
        font-size: 1.25rem !important;
    }
}
