:root {
    --bg-color: #0b0e14;
    --card-bg: #161b22;
    --text-main: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #2f81f7;
    --accent-hover: #58a6ff;
    --accent-glow: rgba(47, 129, 247, 0.3);
    --border: #30363d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 2. LAYOUT COMPONENTS */
section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent);
    padding-left: 15px;
    color: var(--text-main);
}

a {
    text-decoration: none;
}

/* BUTTONS */
.hero-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.cta-section {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    text-align: center;     
    padding: 40px 20px;     
}

.cta-button {
    background-color: var(--accent);
    color: white;
    padding: 12px 28px;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    border: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    background-color: var(--accent-hover);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.cta-button.secondary {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.cta-button.secondary:hover {
    background-color: var(--card-bg);
    box-shadow: none;
}

/* TAGS */
.tag-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: #21262d;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-main);
    border: 1px solid var(--border);
}

/* 3. HERO SPLIT SECTION */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 20px;
    background: radial-gradient(circle at center, #1a2333 0%, var(--bg-color) 70%);
}

.hero-container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    gap: 40px;
    align-items: center;
}

.hero-content-area {
    flex: 1.2;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-badge {
    background: rgba(47, 129, 247, 0.1);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Availability Pulse Dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #238636;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(35, 134, 54, 0.7);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(35, 134, 54, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(35, 134, 54, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(35, 134, 54, 0); }
}

.hero-content-area h1 {
    font-size: 3.5rem;
    margin-bottom: 5px;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero-content-area h2 {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 20px;
    font-weight: 400;
    border-left: none;
    padding-left: 0;
}

.hero-content-area .subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 700px;
    margin-bottom: 35px;
}

.hero-content-area .subtitle strong {
    color: var(--text-main);
}

.hero-image-area {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-profile-photo {
    width: 340px;
    height: 340px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--border);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2;
}

.image-backdrop-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--accent);
    filter: blur(80px);
    opacity: 0.15;
    border-radius: 50%;
    z-index: 1;
}

/* 4. TECHNICAL SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skills-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.skills-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.skills-icon {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 15px;
}

.skills-card h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 12px;
}

.skills-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 15px;
}

/* 5. PORTFOLIO SPLIT CARDS */

.image-card {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top; 
    border-radius: 8px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); 
    transition: transform 0.3s ease;
}


.project-card:hover .image-card {
    transform: scale(1.02);
}
.portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.project-card {
    display: flex;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
}

.project-card.inverted {
    flex-direction: row-reverse;
}

.project-details {
    flex: 1.2;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-visual {
    flex: 1;
    background: #0d1117;
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-left: 1px solid var(--border);
}

.project-card.inverted .project-visual {
    border-left: none;
    border-right: 1px solid var(--border);
}

.project-badge {
    background: rgba(35, 134, 54, 0.15);
    color: #56d364;
    border: 1px solid rgba(35, 134, 54, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 20px;
}

.project-badge.simulation {
    background: rgba(241, 143, 1, 0.15);
    color: #f18f01;
    border: 1px solid rgba(241, 143, 1, 0.3);
}

.project-badge.enterprise {
    background: rgba(47, 129, 247, 0.15);
    color: #58a6ff;
    border: 1px solid var(--border);
}

.project-details h3 {
    font-size: 1.6rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.project-metrics {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    color: var(--text-main);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.project-metrics span i {
    color: var(--accent);
    margin-right: 6px;
}

/* TECH CODE WINDOWS */
.tech-window {
    width: 100%;
    max-width: 420px;
    background: #161b22;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.window-header {
    background: #21262d;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.window-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.window-title {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-family: monospace;
    margin-left: 10px;
}

.window-body {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #0b0e14;
}

.window-body code {
    display: block;
    color: #c9d1d9;
    white-space: pre-wrap;
    word-break: break-all;
}

.keyword { color: #ff7b72; }
.string { color: #a5d6ff; }
.comment { color: #8b949e; }

.terminal { background: #010409; }
.term-line { font-size: 0.75rem; line-height: 1.4; }
.term-success { color: #56d364; }
.term-info { color: #79c0ff; }
.term-accent { color: #d2a8ff; }

.central-flex { display: flex; justify-content: center; align-items: center; padding: 30px; background: #0b0e14; }
.mobile-wireframe { width: 100px; height: 180px; border: 2px solid var(--border); border-radius: 12px; padding: 15px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.wireframe-map { font-size: 2rem; color: var(--border); }
.wireframe-bar { width: 100%; height: 8px; background: var(--border); border-radius: 4px; }
.wireframe-bar.short { width: 60%; }

/* 6. CONTACT FORM SECTON */
.contact-container {
    display: flex;
    gap: 50px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: 12px;
}

.contact-info-block {
    flex: 1;
}

.contact-info-block h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.contact-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.contact-details-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.detail-icon {
    width: 45px;
    height: 45px;
    background: rgba(47, 129, 247, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 1.2rem;
}

.detail-text span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-text a, .detail-text p {
    color: var(--text-main);
    font-size: 1rem;
    text-decoration: none;
    margin: 0;
}

.detail-text a:hover {
    color: var(--accent);
}

.contact-form-block {
    flex: 1.2;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 500;
}

.form-group input, 
.form-group textarea {
    background: var(--bg-color);
    border: 1px solid var(--border);
    padding: 12px 16px;
    color: var(--text-main);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 129, 247, 0.15);
}

.form-submit-btn {
    width: 100%;
    cursor: pointer;
}

/* 7. FOOTER */
footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 8. MEDIA QUERIES (RESPONSIVENESS) */
@media (max-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .project-card, .project-card.inverted {
        flex-direction: column;
    }
    .project-visual {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--border);
        padding: 30px;
    }
}

@media (max-width: 900px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
    }
    .hero-content-area {
        align-items: center;
        text-align: center;
    }
    .hero-ctas {
        justify-content: center;
    }
    .hero-profile-photo {
        width: 260px;
        height: 260px;
    }
    .image-backdrop-glow {
        width: 300px;
        height: 300px;
    }
    .contact-container {
        flex-direction: column;
        gap: 40px;
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .hero-content-area h1 { font-size: 2.6rem; }
}

@media (max-width: 600px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   9. SUBPAGES & CASE STUDIES (MOBILE/WEB SPECIFIC)
   ========================================================================== */

.internal-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 0 20px;
}

.back-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.case-study-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
}

.case-study-header {
    margin-bottom: 5px;
}

.case-study-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 850px;
    margin-top: 15px;
    line-height: 1.5;
}

/* Nota NDA de Confidencialidad */
.nda-note {
    background: rgba(241, 143, 1, 0.05);
    border: 1px solid rgba(241, 143, 1, 0.2);
    border-left: 4px solid #f18f01;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.nda-note i {
    color: #f18f01;
    margin-right: 8px;
}

.section-desc {
    color: var(--text-secondary);
    margin-top: 40px;
    margin-bottom: 10px;
    font-size: 1rem;
}

/* Grilla de Galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 25px;
    margin-bottom: 10px;
}

.gallery-item {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-image-wrapper {
    width: 100%;
    height: 360px;
    background: #0d1117;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border);
}

.gallery-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item h4 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 8px;
}

.gallery-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.section-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0px 0;
}

/* Deep Dive Técnico */
.architecture-row {
    display: flex;
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
}

.arch-text {
    flex: 1.2;
}

.arch-text h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.arch-text p {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.arch-text strong {
    color: var(--text-main);
}

.arch-visual-box {
    flex: 0.8;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
}

/* Minidiagrama de arquitectura */
.mini-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.diag-node {
    width: 100%;
    text-align: center;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-main);
}

.diag-node.accent-node {
    border-color: var(--accent);
    background: rgba(47, 129, 247, 0.05);
    color: var(--accent);
    font-weight: bold;
}

.diag-arrow {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: monospace;
}

/* Cajas de especificaciones */
.tech-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.spec-box {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 12px;
}

.spec-box i {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.spec-box h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.spec-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Ajustes de Responsividad del Caso de Estudio */
@media (max-width: 900px) {
    .architecture-row {
        flex-direction: column;
    }
    .tech-spec-grid {
        grid-template-columns: 1fr;
    }
}
