/* style.css */

/* CORREÇÃO: Classe utilitária para leitores de tela (acessibilidade).
   Elementos com esta classe ficam invisíveis visualmente mas
   são lidos por tecnologias assistivas. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000;
    color: #e0e0e0;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
}

/* === Fundo Matrix === */
#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* CORREÇÃO: pointer-events: none garante que o canvas nunca bloqueie
       cliques em elementos por cima dele */
    pointer-events: none;
}

/* === TELA 1: Terminal === */
#boot-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    transition: opacity 1s ease-in-out;
}

#terminal-window {
    width: 80%;
    max-width: 800px;
    height: 60%;
    max-height: 500px;
    background-color: rgba(28, 28, 28, 0.90);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,255,0,0.1);
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
}

#terminal-titlebar {
    background-color: #1f1f1f;
    padding: 8px 15px;
    color: #888;
    font-size: 14px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom: 1px solid #333;
}

#terminal-body {
    padding: 15px;
    color: #f0f0f0;
    font-size: 16px;
    line-height: 1.5;
    flex-grow: 1;
    overflow-y: auto;
}

.prompt-user      { color: #8AE234; font-weight: bold; }
.prompt-separator { color: #f0f0f0; }
.prompt-dir       { color: #729FCF; font-weight: bold; }
.cursor           { animation: blink 1s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

/* === TELA 2: Portfólio === */
#portfolio-screen {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(circle at top center, #1a2a3a 0%, #050505 100%);
    overflow-y: auto;
    overflow-x: hidden;
}

#portfolio-screen.visible {
    opacity: 1;
    z-index: 20;
}

.hidden { display: none !important; }

/* === Layout do Conteúdo do Portfólio === */
.portfolio-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
}

.hero-section {
    text-align: center;
    padding: 40px 0 60px 0;
    animation: slideUp 1.5s ease-out forwards;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #fff;
}

.highlight-text, h2 {
    background: linear-gradient(90deg, #8AE234, #729FCF);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    display: inline-block;
}

.subtitle {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #b0bec5;
}

.content-section { margin-bottom: 50px; }

.text-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
    color: #cfd8dc;
}

/* Estilo de Cartões (Cards) */
.card {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(114, 159, 207, 0.15);
    border-color: rgba(114, 159, 207, 0.3);
}

.card h3 {
    margin-top: 0;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background-color: #37474f;
    color: #8AE234;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: normal;
}

ul {
    line-height: 1.8;
    color: #cfd8dc;
}

.tech-list {
    list-style-type: square;
    padding-left: 20px;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.highlight-block {
    border-left: 4px solid #8AE234;
    padding-left: 20px;
    font-style: italic;
}

.divider {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 50px 0;
}

/* Botões de Contato */
.contact-links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap; /* CORREÇÃO: evita overflow em telas muito estreitas */
}

.contact-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: transparent;
    color: #fff;
    text-decoration: none;
    border: 1px solid #729FCF;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s;
}

.contact-btn:hover {
    background-color: #729FCF;
    color: #000;
}

/* CORREÇÃO: Foco visível para navegação por teclado (acessibilidade) */
.contact-btn:focus-visible,
.lang-btn:focus-visible,
.agent-option-btn:focus-visible,
#ai-agent-toggle:focus-visible {
    outline: 2px solid #8AE234;
    outline-offset: 3px;
}

footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: #666;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Responsividade para Celular */
@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .hero-section h1 {
        font-size: 2.5rem;
    }
}

/* Estilização para a lista de serviços com ícones */
.service-icon-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.service-icon-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.service-icon-list li:hover {
    background: rgba(114, 159, 207, 0.1);
    border-color: rgba(114, 159, 207, 0.4);
}

.service-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.service-icon-list span {
    font-weight: 500;
    color: #fff;
    font-size: 1rem;
}

/* Botão flutuante */
#ai-agent-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #729FCF, #8AE234);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,255,0,0.3);
    z-index: 100;
    transition: transform 0.3s;
    /* CORREÇÃO: Permite ativação por teclado (acessibilidade) */
    outline: none;
}

#ai-agent-toggle:hover { transform: scale(1.1); }

#agent-icon {
    width: 35px;
    height: 35px;
    /* CORREÇÃO: pointer-events: none evita que o img intercepte cliques do div pai */
    pointer-events: none;
}

/* Janela de Chat */
#ai-agent-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 320px;
    height: 400px;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5);
    font-family: 'Segoe UI', sans-serif;
}

/* CORREÇÃO: Em telas pequenas, a janela de chat não deve sair da viewport */
@media (max-width: 400px) {
    #ai-agent-window {
        width: calc(100vw - 20px);
        right: 10px;
    }
}

.hidden-agent { display: none !important; }

#agent-header {
    background-color: #161b22;
    padding: 10px 15px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #8AE234;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* CORREÇÃO: Estilo explícito para o botão de fechar o chat */
#agent-header button {
    background: transparent;
    border: 1px solid #30363d;
    color: #8b949e;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

#agent-header button:hover {
    background: #30363d;
    color: #fff;
}

#agent-chat {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    font-size: 0.9rem;
    color: #c9d1d9;
    display: flex;
    flex-direction: column;
}

.bot-msg, .user-msg {
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 85%;
    /* CORREÇÃO: word-break evita que textos longos sem espaço quebrem o layout */
    word-break: break-word;
}

.bot-msg  { background-color: #21262d; align-self: flex-start; }
.user-msg { background-color: #238636; align-self: flex-end; color: white; margin-left: auto; }

#agent-options-area {
    padding: 10px;
    border-top: 1px solid #30363d;
    background-color: #161b22;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    /* CORREÇÃO: max-height + overflow evita que muitos botões estiquem a janela */
    max-height: 160px;
    overflow-y: auto;
}

.agent-option-btn {
    background: rgba(114, 159, 207, 0.05);
    border: 1px solid rgba(114, 159, 207, 0.2);
    color: #c9d1d9;
    padding: 8px 12px;
    border-radius: 6px;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    font-family: 'Segoe UI', sans-serif;
    /* CORREÇÃO: flex-shrink: 0 evita que botões fiquem espremidos */
    flex-shrink: 0;
}

.agent-option-btn:hover {
    background: rgba(114, 159, 207, 0.2);
    border-color: #729FCF;
    color: #fff;
    transform: translateX(5px);
}

/* Estilo para simular logs de cloud no chat */
.cloud-log {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 5px;
}

/* === Estilos do Quadro Kanban === */
.jira-board {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
    scrollbar-color: #30363d transparent;
}

.jira-board::-webkit-scrollbar       { height: 8px; }
.jira-board::-webkit-scrollbar-thumb { background: #30363d; border-radius: 4px; }

.jira-column {
    background-color: #161b22;
    border-radius: 8px;
    min-width: 220px;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    border: 1px solid #30363d;
}

.jira-column-header {
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b949e;
    margin-bottom: 15px;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.issue-count {
    background-color: #30363d;
    color: #c9d1d9;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
}

.jira-card {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #c9d1d9;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, border-color 0.2s;
    cursor: default;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.jira-card:hover {
    transform: translateY(-2px);
    border-color: #729FCF;
}

.jira-icon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
    flex-shrink: 0;
}

.icon-blue   { background-color: #4C9AFF; }
.icon-green  { background-color: #36B37E; }
.icon-orange { background-color: #FF991F; }
.icon-purple { background-color: #998DD9; }
.icon-red    { background-color: #FF5630; }
.icon-black  { background-color: #555;    } /* CORREÇÃO: #000 era invisível no card escuro */

.tech-name {
    flex-grow: 1;
    font-weight: 500;
}

.tech-time {
    font-size: 0.75rem;
    color: #8b949e;
    background-color: rgba(48, 54, 61, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* === Seletor de Idioma === */
#language-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 5px;
    background-color: rgba(22, 27, 34, 0.8);
    padding: 5px;
    border-radius: 8px;
    border: 1px solid #30363d;
    z-index: 100;
}

.lang-btn {
    background: transparent;
    color: #8b949e;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #fff;
    background-color: rgba(114, 159, 207, 0.2);
}

.lang-btn.active {
    background-color: #729FCF;
    color: #000;
}