/* ==========================================================================
   Madhub Portfolio - Estilos Principais (main.css)
   Aesthetics: Premium Dark Mode, Glassmorphism, Smooth Animations
   ========================================================================== */

/* Definição de Variáveis de Cores (Design System) */
:root {
    --bg-main: #000000; /* Cor de fundo principal  */
    --bg-surface: #000000; /* Cor de fundo da superfície (cards e etc) */
    --bg-surface-hover: rgba(67, 37, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 17, 0, 0.4);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --accent: #e50233; /* vermelho sei lá */
    --accent-gradient: linear-gradient(135deg, #cc0000 0%, #ff0000 100%);
    --accent-glow: rgba(249, 27, 27, 0.15);
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* Reset básico e configurações gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
    color: var(--text-primary);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Scrollbar Personalizada */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================================================
   Layout Centralizado (Requisito: Centralize todo conteudo)
   ========================================================================== */

.main-content {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 80px auto 0 auto; /* Compensar a navbar fixa */
    padding: 2.5rem 1.5rem;
    position: relative;
}

/* Animações de Transição de Página (Requisito: fade in, fade out) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.fade-out {
    animation: fadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   Navbar (Glassmorphism)
   ========================================================================== */

.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(11, 15, 25, 0.75);
    border-bottom: 1px solid var(--border-color);
}

.navbar {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar .brand {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--accent-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.navbar .brand:hover {
    opacity: 0.9;
}

.nav-links {
    display: flex;
    gap: 1.8rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Linha ativa sob a navegação */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition-smooth);
}

.nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* ==========================================================================
   Loading Spinner
   ========================================================================== */

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: 1rem;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Seção SOBRE (Placeholder vazio e customizável)
   ========================================================================== */

.sobre-header {
    text-align: center;
    margin-bottom: 3rem;
}

.profile-avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem auto;
    background: var(--bg-surface);
    border: 2px dashed var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
}

.sobre-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.sobre-subtitle {
    font-size: 1.1rem;
    color: var(--accent);
    font-weight: 500;
}

.sobre-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.sobre-bio-placeholder {
    border: 2px dashed var(--border-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-style: italic;
}

.skills-title, .contact-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Grade de Habilidades Vazia (Placeholder) */
.skills-grid-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.skill-slot-empty {
    border: 1.5px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

/* Links de Contato Vazios */
.contacts-placeholder {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.contact-badge-empty {
    border: 1.5px dashed var(--border-color);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   Seção PROJETOS
   ========================================================================== */

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.page-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1rem;
}

.projetos-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.projeto-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.projeto-item:hover {
    border-color: var(--border-hover);
    box-shadow: 0 4px 30px var(--accent-glow);
}

.projeto-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

@media(min-width: 768px) {
    .projeto-header {
        grid-template-columns: 280px 1fr;
    }
}

.projeto-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.projeto-info-main {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.projeto-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.projeto-intro {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.98rem;
}

/* Especificações Customizáveis */
.projeto-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.spec-badge {
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.spec-badge strong {
    color: var(--text-primary);
    margin-right: 0.25rem;
}

/* ==========================================================================
   Logs de Projeto (Estilo GitHub Timeline)
   ========================================================================== */

.projeto-logs-section {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

.logs-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
    margin-left: 0.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Bolinha da Linha do Tempo */
.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-2rem - 6px - 1px);
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--bg-main);
    border: 2px solid var(--accent);
    transition: var(--transition-smooth);
}

.timeline-item:hover::before {
    background-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.timeline-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
    font-family: monospace;
}

.timeline-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.timeline-content {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline-media {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.timeline-media img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Componente Video Card (Requisito: use de video-card para exibir a thumbmail de videos)
   ========================================================================== */

.video-card {
    position: relative;
    cursor: pointer;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-height: 350px;
    aspect-ratio: 16 / 9;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.video-card:hover .video-thumbnail {
    transform: scale(1.03);
    opacity: 0.6;
}

.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(11, 15, 25, 0.8);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.5rem;
    transition: var(--transition-smooth);
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.video-card:hover .video-play-overlay {
    background: var(--accent-gradient);
    color: var(--text-primary);
    border-color: transparent;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 20px rgba(248, 56, 56, 0.4);
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   Seção BLOG (Cards Grid e Página Individual Dedicada)
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media(min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.blog-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.blog-card-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.25rem;
}

.blog-card-footer i {
    transition: var(--transition-smooth);
}

.blog-card:hover .blog-card-footer i {
    transform: translateX(4px);
}

/* Visualização Detalhada do Post de Blog */
.post-detail {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

@media(min-width: 768px) {
    .post-detail {
        padding: 3.5rem;
    }
}

.post-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
}

.post-back-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
}

.post-meta {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.post-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 2rem;
}

.post-hero-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
}

.post-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body h2, .post-body h3 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    margin: 2.5rem 0 1rem 0;
}

.post-body h2 { font-size: 1.6rem; }
.post-body h3 { font-size: 1.3rem; }

.post-body code {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #f43f5e;
}

.post-body pre {
    background: #060913;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-body pre code {
    background: transparent;
    padding: 0;
    color: #f83838;
    font-size: 0.9rem;
}

/* ==========================================================================
   Rodapé (Footer)
   ========================================================================== */

.footer-container {
    border-top: 1px solid var(--border-color);
    background: var(--bg-main);
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}
