/* =========================================
   SECTIONS SPECIFIC STYLES (PREMIUM REDESIGN)
   ========================================= */

/* Hero Section */
.hero-content {
    text-align: center;
    width: 100%;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-dim);
    margin-top: 20px;
    font-weight: 300;
    text-shadow: 0 0 10px rgba(255,255,255,0.1);
}

/* Who Am I / Skills Section */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: relative;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-cyan), transparent);
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--accent-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 2;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Skill Bars */
.skills-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.skill-item {
    width: 100%;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-terminal);
    font-size: 0.9rem;
}

.skill-info .accent {
    color: var(--accent-cyan);
}

.skill-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 4px;
    position: relative;
    width: 0%; /* Set via JS or inline style for animation */
    transition: width 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 10px var(--accent-cyan);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.project-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.project-icon {
    font-size: 2rem;
}

.project-title {
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    color: var(--text-main);
}

.project-desc {
    color: var(--text-dim);
    margin-bottom: 20px;
    flex-grow: 1;
    line-height: 1.6;
}

/* Asignaturas (La Carrera) */
.subjects-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.col-title {
    font-family: var(--font-terminal);
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.col-desc {
    color: var(--text-dim);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.subject-grid {
    display: grid;
    gap: 15px;
}

.subject-card {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.boring-subjects { opacity: 0.7; filter: grayscale(0.7); transition: all 0.3s; }
.boring-subjects:hover { opacity: 1; filter: grayscale(0); }

.subject-card.boring {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #777;
    font-family: var(--font-terminal);
}

.subject-card.cool {
    background: rgba(0, 229, 255, 0.05);
    border: 1px solid var(--accent-cyan);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.subject-card.cool:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 229, 255, 0.2);
    background: rgba(0, 229, 255, 0.1);
}

.subject-card.cool .emoji { font-size: 1.5rem; }
.subject-card.cool h4 { color: #fff; margin: 0; }
.subject-card.cool p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

/* Erasmus Banner */
.erasmus-banner {
    background: linear-gradient(135deg, rgba(255,0,110,0.1) 0%, rgba(0,229,255,0.1) 100%);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.erasmus-banner::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.subsection-title {
    font-family: var(--font-terminal);
    color: var(--accent-green);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

/* Chat Bubbles */
.chat-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
}

.chat-bubble {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 15px;
    position: relative;
    background: var(--bg-card);
    border: var(--glass-border);
    backdrop-filter: blur(5px);
}

.chat-bubble.left {
    align-self: flex-start;
    border-bottom-left-radius: 0;
    border-left: 2px solid var(--accent-cyan);
}

.chat-bubble.right {
    align-self: flex-end;
    border-bottom-right-radius: 0;
    border-right: 2px solid var(--accent-magenta);
}

.chat-header {
    font-weight: 700;
    margin-bottom: 5px;
    color: #fff;
}

.chat-reaction {
    position: absolute;
    bottom: -10px;
    right: 10px;
    background: #1a1a2e;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 1.2rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.chat-bubble.right .chat-reaction { right: auto; left: 10px; }

/* CTFs & Hackatones */
.competitions-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.comp-box {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    border: var(--glass-border);
}

.platform-logos {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.platform {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    flex: 1;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.platform.htb { background: rgba(159, 239, 0, 0.05); border: 1px solid #9fef00; color: #9fef00; }
.platform.pico { background: rgba(255, 0, 0, 0.05); border: 1px solid #ff0000; color: #ff0000; }

.hackathon-box {
    border-color: var(--accent-amber);
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.1);
}

.hackathon-perks {
    list-style: none;
    margin-top: 20px;
}

.hackathon-perks li {
    margin-bottom: 12px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-badge {
    margin-top: 20px;
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(45deg, var(--accent-magenta), var(--accent-purple));
    color: #fff;
    border-radius: 20px;
    font-family: var(--font-terminal);
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(255, 0, 110, 0.3);
}

/* IA & Ciberseguridad */
.ai-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.ai-list {
    list-style: none;
    margin-top: 20px;
}

.ai-list li {
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.ai-demo {
    border-color: var(--accent-purple);
    box-shadow: 0 0 20px rgba(179, 136, 255, 0.15);
}

.demo-header {
    background: rgba(179, 136, 255, 0.1);
    padding: 15px;
    border-bottom: 1px solid rgba(179, 136, 255, 0.3);
    border-radius: 12px 12px 0 0;
    margin: -2rem -2rem 1.5rem -2rem;
    font-family: var(--font-terminal);
    display: flex;
    align-items: center;
    color: var(--accent-purple);
    font-weight: bold;
}

/* CTF Section */
.ctf-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    border-color: var(--accent-green);
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.15);
}

.ctf-progress {
    margin: 20px 0;
    font-family: var(--font-terminal);
    font-size: 1.2rem;
}

.flag-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.feedback-msg {
    min-height: 24px;
    margin-bottom: 15px;
    font-family: var(--font-terminal);
    font-weight: bold;
}

.feedback-msg.success { color: var(--accent-green); text-shadow: 0 0 10px var(--accent-green); }
.feedback-msg.error { color: var(--accent-magenta); }

.found-flags-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.flag-item {
    background: rgba(0, 255, 65, 0.05);
    border-left: 3px solid var(--accent-green);
    padding: 12px 15px;
    font-family: var(--font-terminal);
    animation: fadeInUp 0.5s ease forwards;
    border-radius: 0 8px 8px 0;
}

/* Cierre Section */
.giant {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(45deg, var(--accent-cyan), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.motivational {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 40px;
    font-style: italic;
    opacity: 0.9;
}

.contact-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.qr-container {
    padding: 20px;
    text-align: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(255,255,255,0.2);
}

.qr-image {
    width: 150px;
    height: 150px;
    margin-bottom: 0;
    display: block;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cyber-link {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    text-decoration: none;
    font-family: var(--font-terminal);
    font-size: 1.2rem;
    transition: all 0.3s;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.cyber-link:hover {
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    background: rgba(0, 229, 255, 0.1);
    transform: translateX(10px);
}

/* Responsive */
@media (max-width: 900px) {
    .profile-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .subjects-split, .competitions-layout, .ai-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .giant {
        font-size: 3rem;
    }
    
    .contact-grid {
        flex-direction: column;
        gap: 30px;
    }
}
