/*
 * Code & Powered by: Octávio Filipe Pereira Gonçalves / CT7BFV
 * © 2026 Octávio Filipe Pereira Gonçalves — Todos os direitos reservados
 * Licença GPL v3 (https://www.gnu.org/licenses/gpl-3.0.pt-br.html | https://www.gnu.org/licenses/gpl-3.0.html.en)
 */

/* ── Variables ───────────────────────────────────────────────────────────────*/
:root {
    --bg:           #07080f;
    --bg2:          #0d1117;
    --bg3:          #131920;
    --card-bg:      rgba(255,255,255,.04);
    --card-border:  rgba(255,255,255,.08);
    --accent:       #3b82f6;
    --accent-glow:  rgba(59,130,246,.35);
    --accent2:      #06b6d4;
    --text:         #f1f5f9;
    --text-muted:   #64748b;
    --text-sub:     #94a3b8;
    --mono:         'JetBrains Mono', monospace;
    --radius:       12px;
    --radius-lg:    20px;
    --transition:   .25s ease;
}

/* ── Base ────────────────────────────────────────────────────────────────────*/
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1,h2,h3,h4,h5,h6 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

.mono { font-family: var(--mono); }

.py-6 { padding-top: 6rem; padding-bottom: 6rem; }

/* ── Navbar ──────────────────────────────────────────────────────────────────*/
#mainNav {
    background: transparent;
    padding: .9rem 0;
    transition: background var(--transition), box-shadow var(--transition);
    border-bottom: 1px solid transparent;
}
#mainNav.scrolled {
    background: rgba(7,8,15,.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--card-border);
    box-shadow: 0 4px 30px rgba(0,0,0,.4);
}
.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text) !important;
    gap: .4rem;
    display: flex;
    align-items: center;
}
.brand-icon { font-size: 1.5rem; }
.nav-link {
    color: var(--text-sub) !important;
    font-size: .9rem;
    font-weight: 500;
    padding: .4rem .75rem !important;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
    color: var(--text) !important;
    background: rgba(255,255,255,.06);
}
.btn-outline-accent {
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    font-size: .85rem;
    font-weight: 500;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
}
.btn-outline-accent:hover {
    background: var(--accent) !important;
    color: #fff !important;
}
.lang-menu {
    background: var(--bg3);
    border: 1px solid var(--card-border);
    min-width: 10rem;
}
.lang-menu .dropdown-item {
    color: var(--text-sub);
    font-size: .85rem;
}
.lang-menu .dropdown-item:hover,
.lang-menu .dropdown-item:focus {
    background: rgba(255,255,255,.06);
    color: var(--text);
}
.lang-menu .dropdown-item.active {
    background: var(--accent);
    color: #fff;
}
@media (max-width: 991.98px) {
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        background: rgba(7,8,15,.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        margin-top: .75rem;
        padding: 1rem 1.25rem;
        border-radius: 12px;
        border: 1px solid var(--card-border);
        box-shadow: 0 20px 40px rgba(0,0,0,.5);
    }
    .navbar-nav .nav-item {
        margin-bottom: .15rem;
    }
}

/* ── Hero ────────────────────────────────────────────────────────────────────*/
.hero {
    min-height: 60dvh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59,130,246,.18) 0%, transparent 70%),
                var(--bg);
}
#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .5;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 120px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(59,130,246,.12);
    border: 1px solid rgba(59,130,246,.3);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--accent2);
    font-family: var(--mono);
    letter-spacing: .04em;
}
.badge-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .4; }
}
.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    font-weight: 700;
    letter-spacing: -.03em;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: .3rem 0;
}
.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    color: var(--text-sub);
    font-weight: 400;
    margin-bottom: .5rem;
}
.hero-tagline {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--accent2);
    font-family: var(--mono);
    min-height: 2rem;
}
.cursor {
    animation: blink .8s step-end infinite;
    color: var(--accent);
}
@keyframes blink { 50% { opacity: 0; } }
.btn-accent {
    background: linear-gradient(135deg, var(--accent), #2563eb);
    border: none;
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    padding: .65rem 1.5rem;
    transition: all var(--transition);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}
.hero-scroll {
    font-size: .8rem;
    color: var(--text-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.anim-bounce {
    animation: bounce 1.8s ease-in-out infinite;
}
@keyframes bounce {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(6px); }
}

/* ── Section Headers ─────────────────────────────────────────────────────────*/
.section-label {
    display: inline-block;
    font-family: var(--mono);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(59,130,246,.1);
    border: 1px solid rgba(59,130,246,.25);
    border-radius: 999px;
    padding: .25rem .85rem;
    margin-bottom: .75rem;
}
.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: .5rem;
}
.section-sub {
    color: var(--text-sub);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1rem;
}

/* ── Project Cards ───────────────────────────────────────────────────────────*/
/* Card height === thumbnail height (16:9). Text overlays the image.
   The image sits in normal flow and defines the card height — the card
   itself has NO aspect-ratio, so it always fits its grid column width. */
.project-card {
    display: block;
    position: relative;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    color: var(--text);
    background: var(--bg3);
    line-height: 0;
}
.project-card:hover {
    border-color: rgba(59,130,246,.4);
    box-shadow: 0 0 0 1px rgba(59,130,246,.15), 0 20px 40px rgba(0,0,0,.4);
    transform: translateY(-4px);
    color: var(--text);
}
.project-card-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform .4s ease;
}
.project-card:hover .project-card-img {
    transform: scale(1.05);
}
.project-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    font-size: 3.5rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--bg3), var(--bg2));
}
.project-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(7,8,15,.92) 0%, rgba(7,8,15,.35) 45%, transparent 75%);
    opacity: 0;
    transition: opacity var(--transition);
}
.project-card:hover .project-card-overlay {
    opacity: 1;
}
.project-card-body {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1rem 1.25rem;
    z-index: 2;
    line-height: 1.3;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transition), transform var(--transition);
}
.project-card:hover .project-card-body {
    opacity: 1;
    transform: none;
}
.project-card.no-thumb .project-card-overlay,
.project-card.no-thumb .project-card-body {
    opacity: 1;
    transform: none;
}
.project-card.no-thumb .project-card-icon {
    font-size: 2.75rem;
}
.project-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .5rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.project-card-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: .35rem;
    overflow: hidden;
}
.project-card-link {
    font-size: .82rem;
    font-weight: 600;
    color: var(--accent);
}
.project-github-link {
    color: rgba(255,255,255,.6) !important;
    font-size: 1rem;
    transition: color var(--transition);
}
.project-github-link:hover { color: var(--text) !important; }

/* ── Tech Badges ─────────────────────────────────────────────────────────────*/
.tech-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    font-family: var(--mono);
    padding: .18rem .6rem;
    border-radius: 4px;
    background: rgba(59,130,246,.12);
    color: var(--accent2);
    border: 1px solid rgba(6,182,212,.2);
}
.tech-badge-lg {
    font-size: .8rem;
    padding: .25rem .8rem;
}
.tag-badge {
    display: inline-block;
    font-size: .72rem;
    font-weight: 500;
    padding: .18rem .65rem;
    border-radius: 4px;
    background: rgba(255,255,255,.05);
    color: var(--text-sub);
    border: 1px solid var(--card-border);
}

/* ── Filter Bar ──────────────────────────────────────────────────────────────*/
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    color: var(--text-sub);
    border-radius: 999px;
    padding: .35rem 1rem;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 16px var(--accent-glow);
}

/* ── Stats Strip ─────────────────────────────────────────────────────────────*/
.stats-strip {
    background: var(--bg2);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    padding: 3rem 0;
}
.stat-item { display: flex; flex-direction: column; gap: .3rem; }
.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}
.stat-label { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }

/* ── CTA Section ─────────────────────────────────────────────────────────────*/
.cta-section {
    background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(59,130,246,.08), transparent);
}
.cta-title { font-size: clamp(1.6rem,3.5vw,2.4rem); }
.cta-sub { color: var(--text-sub); max-width: 500px; margin: 0 auto; }

/* ── Page Hero ───────────────────────────────────────────────────────────────*/
.page-hero {
    padding: 140px 0 30px;
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(59,130,246,.12), transparent);
    text-align: center;
}
.page-hero-title { font-size: clamp(2.2rem,5vw,3.5rem); }
.page-hero-sub { color: var(--text-sub); max-width: 520px; margin: .5rem auto 0; }

/* ── Breadcrumb ──────────────────────────────────────────────────────────────*/
.breadcrumb-bar {
    padding: 100px 0 0;
    background: transparent;
}
.breadcrumb { font-size: .82rem; }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item.active { color: var(--text-sub); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ── Project Hero ────────────────────────────────────────────────────────────*/
.project-hero { padding-bottom: 3rem; }
.project-title { font-size: clamp(1.8rem,4vw,2.8rem); margin: .5rem 0 1rem; }
.project-lead { font-size: 1.1rem; color: var(--text-sub); line-height: 1.7; }
.project-no-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    border-radius: var(--radius-lg);
    background: var(--bg3);
    border: 1px solid var(--card-border);
    font-size: 5rem;
}
.carousel img { max-height: 380px; object-fit: cover; }

/* ── Project Content ─────────────────────────────────────────────────────────*/
.project-content { color: var(--text-sub); line-height: 1.8; }
.project-content h4 { color: var(--text); font-size: 1.1rem; margin: 1.75rem 0 .75rem; }
.project-content ul { padding-left: 1.25rem; }
.project-content li { margin-bottom: .35rem; }
.project-content pre {
    background: var(--bg3);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--accent2);
    overflow-x: auto;
}
.project-content code {
    font-family: var(--mono);
    font-size: .85em;
    background: rgba(59,130,246,.1);
    color: var(--accent2);
    padding: .1em .35em;
    border-radius: 4px;
}
.project-content pre code { background: none; padding: 0; color: inherit; }
.project-content strong { color: var(--text); }

/* ── Project Sidebar ─────────────────────────────────────────────────────────*/
.project-sidebar { position: sticky; top: 100px; }
.sidebar-block {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1rem;
}
.sidebar-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: .75rem;
}
.sidebar-link {
    display: flex;
    align-items: center;
    color: var(--accent);
    font-size: .88rem;
    font-weight: 500;
    padding: .4rem 0;
    transition: color var(--transition);
}
.sidebar-link:hover { color: var(--accent2); }
.btn-back { color: var(--text-muted); font-size: .9rem; font-weight: 500; transition: color var(--transition); }
.btn-back:hover { color: var(--text); }

/* ── About ───────────────────────────────────────────────────────────────────*/
.callsign-badge {
    display: inline-block;
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 700;
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.35);
    color: var(--accent);
    padding: .3rem 1rem;
    border-radius: 6px;
    letter-spacing: .1em;
}
.about-name { font-size: clamp(1.6rem,3.5vw,2.4rem); }
.about-role { color: var(--accent2); font-size: 1.05rem; }
.about-bio { color: var(--text-sub); line-height: 1.85; font-size: 1.02rem; }
.about-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.about-card-header {
    background: linear-gradient(135deg, rgba(59,130,246,.15), rgba(6,182,212,.08));
    padding: 2.5rem;
    text-align: center;
    border-bottom: 1px solid var(--card-border);
}
.about-avatar { font-size: 4rem; }
.about-avatar-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center bottom;
    display: block;
}
.about-card-body { padding: 1rem 0; }
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .8rem 1.4rem;
    border-bottom: 1px solid var(--card-border);
    gap: 1rem;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; }
.info-value { font-size: .88rem; color: var(--text); font-weight: 500; text-align: right; }
.info-value a { color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────────────────────*/
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--card-border);
    padding: 2rem 0;
}
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text);
}
.footer-brand:hover { color: var(--accent); }
.footer-copy { font-size: .82rem; color: var(--text-muted); }
.footer-links { display: flex; gap: 1.2rem; justify-content: flex-end; }
.footer-links a { font-size: 1.2rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); }

/* ── Error Page ──────────────────────────────────────────────────────────────*/
.error-code {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

/* ── Fade-in Animation ───────────────────────────────────────────────────────*/
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ── Responsive ──────────────────────────────────────────────────────────────*/
@media (max-width: 767px) {
    .py-6 { padding-top: 4rem; padding-bottom: 4rem; }
    .hero-title { font-size: 3.5rem; }
    .project-sidebar { position: static; }
    .footer-links { justify-content: center; }
}
