/*
Theme Name: Yuri Portfolio Theme
Description: Tema personalizado baseado no portfólio de Yuri Augusto, com design escuro e layout responsivo.
Version: 1.0
Author: Yuri Augusto
Text Domain: yuri-portfolio
*/

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial !important;
    background: #0F172A;
    color: #F1F5F9;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Spotlight effect */
#spotlight-bg {
    position: fixed;
    inset: 0;
    z-index: 0; /* above body background, behind content */
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    mix-blend-mode: screen; /* blend with page background for stronger effect */
    opacity: 0.9;
}

/* default subtle spotlight so page isn't flat on load */
#spotlight-bg {
    background: radial-gradient(circle at 50% 50%, rgba(6,182,212,0.04) 0%, rgba(2,6,23,0.45) 40%, #0F172A 70%);
}

/* Tipografia */
.font-inherit {
    font-family: inherit;
}

/* Layout principal */
.main-content {
    margin: 0 auto;
    padding: 1rem 1rem 1rem 1rem;
    min-height: 100vh;
    margin-left: 0;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem 2rem 2rem 2rem;
        margin-left: 260px;
    }
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 350px;
    }
}

/* Sidebar fixa (só aparece em md+) */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    padding: 2rem 1.5rem 2rem 1.5rem;
    border-right: 1px solid #374151;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 20;
}

@media (min-width: 1024px) {
    .sidebar {
        width: 350px;
        padding: 3rem 2rem 3rem 2rem;
    }
}

@media (max-width: 767px) {
    .sidebar {
        display: none;
    }
}

/* Navegação */
.nav-link {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: #94A3AF; /* default slate-300 like index.html */
    border-left: 2px solid transparent;
    padding-left: 12px;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: #F1F5F9; /* white on hover/active */
    padding-left: 20px;
    border-left-color: #F1F5F9;
}

/* Força remoção de estilos de link padrão dentro da sidebar (evita azul/underline) */
.sidebar a {
    text-decoration: none;
    color: inherit;
}

/* Remove bullets from lists in the sidebar and mobile menu */
.sidebar ul,
.sidebar li,
.sidebar nav ul,
.mobile-header nav ul,
#mobile-menu ul,
.sidebar .menu,
.sidebar .menu li {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Espaçamento entre a tagline (descrição) e o menu na sidebar */
.sidebar p {
    margin-bottom: 1.75rem; /* aumenta ou diminui conforme necessário */
}

.sidebar nav {
    margin-top: 0.75rem; /* garante espaçamento consistente entre a tagline e os links */
}

/* Espaçamento equivalente para o menu móvel */
.mobile-header nav {
    margin-top: 0.75rem;
}

/* Ajustes tipográficos da sidebar */
.sidebar h1 {
    margin-bottom: 0.25rem;
    line-height: 1;
}
.sidebar h2 {
    margin-bottom: 0.75rem;
    color: #94A3B8;
    font-weight: 600;
}
.sidebar p {
    color: #94A3B8;
}

/* Typing cursor */
.typing-cursor {
    display: inline-block;
    margin-left: 2px;
    animation: blink 1s steps(2, start) infinite;
    color: #06B6D4;
}

@keyframes blink {
    to { visibility: hidden; }
}

/* Sidebar typography spacing adjustments to match portfolio index.html */
.sidebar { padding-top: 3.75rem; }
.sidebar h1 { font-size: 2.25rem; font-family: 'sweet-peach', cursive; }
.sidebar h2 { color: #9CA3AF; margin-bottom: .5rem; }

/* Admin bar fix (quando usuário está logado no WP) */
.admin-bar .sidebar { top: 32px; height: calc(100vh - 32px); }

/* Posts layout improvements: featured + side 2x2 + 3-col grid */
.home-posts { margin-bottom: 1.5rem; }

/* Desktop layout: featured left, side 2x2 right */
.home-posts-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .home-posts-inner {
        grid-template-columns: 2fr 1fr;
        gap: 1.5rem;
        align-items: start;
    }
    .sidebar h1 { font-size: 3rem; }
}

.featured-post {
    background: rgba(17, 24, 39, 0.6);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid #263146;
    position: relative;
    overflow: hidden;
}
.featured-post .post-image { width:100%; height:320px; object-fit:cover; border-radius:10px; display:block; }
.featured-post .post-title { font-size: 1.6rem; }
.featured-post::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(180deg, rgba(17,24,39,0) 0%, rgba(2,6,23,0.6) 100%); pointer-events:none; }
.featured-post .post-title, .featured-post .post-excerpt, .featured-post .read-more { position: relative; z-index: 2; }

.side-grid { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.small-post { background: rgba(17,24,39,0.55); padding:0.75rem; border-radius:10px; border:1px solid #263146; }
.small-post .post-image { width:100%; height:96px; object-fit:cover; border-radius:8px; }
.small-post .post-title { font-size:1rem; margin-top:0.5rem; }

/* Posts below in 3 columns (responsive) */
.posts-row { display:grid; gap:1rem; grid-template-columns:1fr; }
@media (min-width: 768px) { .posts-row { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .posts-row { grid-template-columns: repeat(3,1fr); } }

/* Generic card adjustments to match visual style */
.post-card { background: rgba(30,41,59,0.6); border-radius:10px; padding:0.75rem; border:1px solid #263146; box-shadow: 0 10px 20px rgba(2,6,23,0.35); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(2,6,23,0.55); }
.post-card .post-image { width:100%; height:160px; object-fit:cover; border-radius:8px; }
.post-card .post-title { font-size:1.05rem; margin-top:0.5rem; }
.post-card .post-excerpt { color:#C9D4E6; font-size:0.95rem; }

/* Section Title */
.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::before {
    content: "//";
    color: #94A3B8;
    margin-right: 6px;
}

/* Improve card shadow for grid */
.post-card { box-shadow: 0 10px 20px rgba(2,6,23,0.35); }

/* Make post title link color consistent */
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: #06B6D4; }

/* Improve read-more link */
.post-card .read-more { color: #06B6D4; text-decoration: none; font-weight: 600; }
.post-card .read-more:hover { color: #0891B2; }

/* Social links */
.social-links {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

/* Post navigation buttons (single post) */
.post-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: #06B6D4;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
}
.post-nav-link:hover {
    background: rgba(6,182,212,0.06);
    color: #0891B2;
    border-color: rgba(6,182,212,0.15);
}
.post-nav-prev .fa-arrow-left, .post-nav-next .fa-arrow-right { color: #06B6D4; }
.post-nav-prev:hover .fa-arrow-left, .post-nav-next:hover .fa-arrow-right { color: #0891B2; }
.post-nav-link i {
    display: inline-flex;
    width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.social-links a {
    color: #9CA3AF;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #F1F5F9;
}

/* Cards de posts */
.post-card {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #374151;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.post-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.01);
    border-color: #4B5563;
}

.post-image {
    border-radius: 8px;
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 1px solid #374151;
    transition: border-color 0.3s;
}

.post-card:hover .post-image {
    border-color: #4B5563;
}

.post-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #F1F5F9;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.post-card:hover .post-title {
    color: #06B6D4;
}

.post-excerpt {
    color: #CBD5E1;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Botão voltar ao topo */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #06B6D4;
    color: white;
    padding: 12px;
    border-radius: 50%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0891B2;
}

/* Responsividade */
@media (max-width: 639px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 0;
    }
}

/* Header mobile */
.mobile-header {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
}

/* Emular utilitário Tailwind `md:hidden`: esconder header móvel em telas médias para cima */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }
}

/* Mobile menu */
#mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
}

#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: flex;
}

/* Prose styles for post content */
.prose {
    color: #CBD5E1;
    line-height: 1.75;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: #F1F5F9;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h1 { font-size: 2.25rem; }
.prose h2 { font-size: 1.875rem; }
.prose h3 { font-size: 1.5rem; }

.prose p {
    margin-bottom: 1rem;
}

.prose a {
    color: #06B6D4;
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid #06B6D4;
    padding-left: 1rem;
    margin: 2rem 0;
    font-style: italic;
    color: #94A3B8;
}

.prose code {
    background: #1E293B;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875em;
}

.prose pre {
    background: #1E293B;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
}

/* Comments */
.comments-area {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #374151;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    border: 1px solid #374151;
}

.comment-author {
    font-weight: 600;
    color: #F1F5F9;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.875rem;
    color: #94A3B8;
    margin-bottom: 1rem;
}

.comment-content {
    color: #CBD5E1;
    line-height: 1.6;
}

/* Search form */
.search-form {
    display: flex;
    max-width: 400px;
    margin: 2rem 0;
}

.search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #1E293B;
    border: 1px solid #374151;
    color: #F1F5F9;
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-field:focus {
    outline: none;
    border-color: #06B6D4;
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.search-submit {
    padding: 0.75rem 1rem;
    background: #06B6D4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-submit:hover {
    background: #0891B2;
}

/* Skip link accessibility: hidden by default, visible on focus */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus, .skip-link:active {
    left: 1rem;
    top: 1rem;
    width: auto;
    height: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #06B6D4;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    z-index: 9999;
}