@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #0b0e14;
    --bg-soft: #101522;
    --surface: #151b28;
    --surface-strong: #1e2638;
    --line: #2b3648;
    --line-subtle: rgba(255, 255, 255, 0.08);
    --text: #f0f4f9;
    --heading: #ffffff;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --accent: #ff6b57;
    --accent-strong: #ff8573;
    --accent-glow: rgba(255, 107, 87, 0.24);
    --mint: #38d9a9;
    --sky: #60a5fa;
    --amber: #fbbf24;
    --card-bg: rgba(21, 27, 40, 0.84);
    --card-border: rgba(255, 255, 255, 0.09);
    --header-bg: rgba(11, 14, 20, 0.82);
    --nav-dock-bg: rgba(21, 27, 40, 0.94);
    --btn-secondary-bg: rgba(255, 255, 255, 0.05);
    --btn-secondary-color: #ffffff;
    --preview-bg: rgba(13, 17, 24, 0.82);
    --preview-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 16px 44px -10px rgba(0, 0, 0, 0.48);
    --header-height: 78px;
    --mobile-dock-height: 72px;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --bg-soft: #f1f5f9;
    --surface: #ffffff;
    --surface-strong: #e2e8f0;
    --line: #cbd5e1;
    --line-subtle: rgba(0, 0, 0, 0.07);
    --text: #0f172a;
    --heading: #0f172a;
    --muted: #475569;
    --muted-strong: #1e293b;
    --accent: #e04836;
    --accent-strong: #c83827;
    --accent-glow: rgba(224, 72, 54, 0.16);
    --mint: #0d9488;
    --sky: #0284c7;
    --amber: #b45309;
    --card-bg: rgba(255, 255, 255, 0.94);
    --card-border: rgba(15, 23, 42, 0.1);
    --header-bg: rgba(248, 250, 252, 0.86);
    --nav-dock-bg: rgba(255, 255, 255, 0.96);
    --btn-secondary-bg: #f1f5f9;
    --btn-secondary-color: #0f172a;
    --preview-bg: #ffffff;
    --preview-border: rgba(15, 23, 42, 0.1);
    --shadow: 0 14px 34px -8px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    background:
        linear-gradient(135deg, rgba(255, 107, 87, 0.08), rgba(77, 223, 179, 0.06) 34%, rgba(120, 199, 255, 0.08) 68%),
        linear-gradient(180deg, rgba(11, 14, 20, 0.94), rgba(11, 14, 20, 1) 46%),
        url('images/background.png') center top / cover fixed;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background:
        radial-gradient(ellipse at 15% 0%, rgba(224, 72, 54, 0.07), transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(13, 148, 136, 0.06), transparent 45%),
        radial-gradient(ellipse at 50% 85%, rgba(2, 132, 199, 0.06), transparent 55%),
        #f8fafc;
}

body::selection {
    background: var(--accent);
    color: #101216;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

h1,
h2,
h3 {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--heading);
    font-weight: 800;
    line-height: 1.08;
    overflow-wrap: anywhere;
    letter-spacing: -0.02em;
}

p {
    color: var(--muted);
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}

/* ==========================================================================
   HEADER & NAVEGAÇÃO
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: var(--header-bg);
    border-bottom: 1px solid var(--line-subtle);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.nav-shell {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--heading);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.logo:hover {
    color: var(--heading);
}

.logo-image {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.25s ease;
}

.logo:hover .logo-image {
    transform: scale(1.06) rotate(-2deg);
}

.logo span {
    font-size: 1.08rem;
    font-weight: 800;
}

.nav-menu ul {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-menu a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 15px;
    border-radius: 8px;
    color: var(--muted-strong);
    font-weight: 700;
    font-size: 0.94rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(249, 115, 79, 0.12);
    color: var(--accent);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(120, 199, 255, 0.65);
    outline-offset: 3px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(20deg) scale(1.05);
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.lang-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.hamburger-menu {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    cursor: pointer;
}

/* ==========================================================================
   STATUS BADGE (ABERTO A PESQUISA / DOCÊNCIA)
   ========================================================================== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 6px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 700;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: fit-content;
}

.status-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mint);
}

.status-dot::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: var(--mint);
    opacity: 0.6;
    animation: statusPulse 2s infinite ease-out;
}

@keyframes statusPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    70% { transform: scale(2.4); opacity: 0; }
    100% { transform: scale(2.4); opacity: 0; }
}

/* ==========================================================================
   HERO SECTION COM CANVAS DE MULTIGRAFOS
   ========================================================================== */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    padding: 72px 0;
    overflow: hidden;
}

#hero-multigraph-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
    z-index: 0;
    opacity: 0.72;
    transition: opacity 0.3s ease;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.7fr);
    align-items: center;
    gap: 48px;
}

.hero-copy,
.hero-panel,
.project-detail-copy,
.project-content,
.about-story,
.timeline-card,
.research-card,
.detail-card,
.info-card,
.credential-card,
.timeline-content,
.highlight-content > *,
.project-detail-hero > *,
.project-card > * {
    min-width: 0;
}

.hero-copy h1,
.page-hero h1,
.project-detail-copy h1 {
    margin: 8px 0 20px;
    font-size: 4.4rem;
    max-width: 960px;
}

.hero-lead,
.page-hero p,
.project-detail-copy p {
    max-width: 720px;
    color: var(--muted-strong);
    font-size: 1.16rem;
    line-height: 1.65;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--mint);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eyebrow::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--mint);
    border-radius: 999px;
}

.hero-actions,
.project-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.94rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--accent);
    color: #111318;
    box-shadow: 0 4px 18px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-strong);
    box-shadow: 0 6px 24px var(--accent-glow);
}

.btn-secondary,
.btn-ghost {
    border-color: var(--line);
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
}

.btn-secondary:hover,
.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ==========================================================================
   CARDS & CONTAINERS DE VIDRO (GLASSMORPHISM MODERNO)
   ========================================================================== */
.hero-panel,
.project-card,
.detail-card,
.timeline-card,
.info-card,
.about-story,
.credential-card,
.research-card,
.timeline-entry,
.publication-list article {
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}

.credential-card:hover,
.research-card:hover,
.info-card:hover,
.hero-panel:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 87, 0.35);
    box-shadow: var(--shadow), 0 0 20px var(--accent-glow);
}

.hero-panel {
    position: relative;
    display: grid;
    gap: 20px;
    padding: 24px;
}

.profile-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--card-border);
}

.panel-kicker {
    margin-bottom: 4px;
    color: var(--amber);
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.hero-panel h2 {
    font-size: 1.55rem;
    line-height: 1.25;
}

.quick-stats,
.skills-grid,
.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-stats span,
.skills-grid span,
.project-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 700;
}

.section-block,
.project-showcase,
.about-layout,
.experience-grid,
.detail-grid,
.credential-grid,
.research-grid {
    padding: 76px 0;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 30px;
}

.section-heading h2,
.highlight-content h2,
.about-story h2,
.timeline-card h2,
.info-card h2,
.detail-card h2 {
    margin-top: 10px;
    font-size: 2.35rem;
    line-height: 1.15;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.skills-grid span {
    min-height: 64px;
    justify-content: flex-start;
    padding: 0 18px;
    background: var(--surface);
    border-radius: 10px;
    transition: transform 0.2s, border-color 0.2s;
}

.skills-grid span:hover {
    transform: translateY(-2px);
    border-color: var(--sky);
}

.skills-grid i {
    color: var(--sky);
    font-size: 1.15rem;
}

.credential-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-top: 20px;
}

.credential-card {
    padding: 24px;
}

.credential-card span,
.publication-list span {
    display: block;
    margin-bottom: 8px;
    color: var(--mint);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.credential-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--heading);
    font-size: 1.2rem;
}

.credential-card p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.research-split {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
}

.research-card {
    padding: 28px;
}

.research-card h3,
.timeline-content h3,
.publication-list h3 {
    margin-bottom: 12px;
    font-size: 1.35rem;
}

.research-card p {
    color: var(--muted-strong);
    line-height: 1.6;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.link-grid a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-color);
    font-weight: 800;
    transition: all 0.2s ease;
}

.link-grid a:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.highlight-band {
    padding: 70px 0;
    border-top: 1px solid var(--line-subtle);
    border-bottom: 1px solid var(--line-subtle);
    background: linear-gradient(90deg, rgba(249, 115, 79, 0.12), rgba(110, 231, 183, 0.08), rgba(125, 211, 252, 0.09));
}

.highlight-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.highlight-content h2 {
    max-width: 720px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-strong);
    font-weight: 800;
    white-space: nowrap;
    transition: transform 0.2s ease;
}

.text-link:hover {
    transform: translateX(4px);
}

.page-hero {
    padding: 82px 0 24px;
}

.page-hero h1 {
    max-width: 820px;
}

/* ==========================================================================
   FILTROS DE PROJETOS (PROJECTS.HTML)
   ========================================================================== */
.project-filters-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 32px 0 28px;
}

.project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-filter-btn:hover {
    border-color: var(--accent);
    color: var(--heading);
    transform: translateY(-1px);
}

.project-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #111318;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.filter-count-badge {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

/* ==========================================================================
   VITRINE DE PROJETOS & CARDS
   ========================================================================== */
.project-showcase {
    display: grid;
    gap: 28px;
    padding-top: 10px;
}

.project-card {
    display: grid;
    grid-template-columns: minmax(280px, 0.74fr) minmax(0, 1fr);
    overflow: hidden;
    border-radius: 12px;
}

.project-card:hover {
    border-color: rgba(255, 107, 87, 0.45);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
}

.project-card.filter-hidden {
    display: none !important;
}

.project-media {
    min-height: 320px;
    background: var(--surface-strong);
    overflow: hidden;
    position: relative;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-media img {
    transform: scale(1.04);
}

.project-badge-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(11, 14, 20, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--mint);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    z-index: 2;
}

.project-media-word,
.word-detail,
.project-media-ai,
.ai-detail,
.project-media-proof,
.proof-detail {
    display: grid;
    place-items: center;
    min-height: 320px;
}

.project-media-word,
.word-detail {
    background:
        linear-gradient(135deg, rgba(110, 231, 183, 0.2), rgba(125, 211, 252, 0.12)),
        var(--surface-strong);
}

.project-media-ai,
.ai-detail {
    background:
        linear-gradient(135deg, rgba(120, 199, 255, 0.22), rgba(255, 107, 87, 0.12)),
        var(--surface-strong);
}

.project-media-proof,
.proof-detail {
    background:
        linear-gradient(135deg, rgba(248, 199, 78, 0.2), rgba(120, 199, 255, 0.12)),
        var(--surface-strong);
}

.ai-tutor-preview {
    width: min(86%, 430px);
}

.ai-window {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--preview-border);
    border-radius: 10px;
    background: var(--preview-bg);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.ai-window-bar {
    display: flex;
    gap: 7px;
}

.ai-window-bar span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.24);
}

.ai-window-bar span:nth-child(1) { background: rgba(255, 107, 87, 0.86); }
.ai-window-bar span:nth-child(2) { background: rgba(248, 199, 78, 0.86); }
.ai-window-bar span:nth-child(3) { background: rgba(77, 223, 179, 0.86); }

.ai-message {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 8px;
    color: var(--heading);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ai-message strong {
    display: block;
    margin-bottom: 3px;
    color: var(--mint);
}

.ai-message-user {
    justify-self: end;
    background: rgba(120, 199, 255, 0.18);
    border: 1px solid rgba(120, 199, 255, 0.34);
}

.ai-message-bot {
    justify-self: start;
    background: var(--surface);
    border: 1px solid var(--line);
}

.equation-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.equation-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid rgba(77, 223, 179, 0.38);
    border-radius: 8px;
    background: rgba(77, 223, 179, 0.12);
    color: var(--heading);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

.proof-preview {
    width: min(88%, 460px);
}

.proof-sheet {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--preview-border);
    border-radius: 10px;
    background: var(--preview-bg);
    box-shadow: 0 22px 54px rgba(0, 0, 0, 0.28);
}

.proof-line {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.proof-line span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(248, 199, 78, 0.17);
    color: var(--amber);
    font-size: 0.82rem;
    font-weight: 800;
}

.proof-line code {
    overflow: hidden;
    color: var(--heading);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.proof-line em {
    color: var(--muted-strong);
    font-size: 0.78rem;
    font-style: normal;
    font-weight: 700;
}

.proof-line-result {
    border-color: rgba(77, 223, 179, 0.34);
    background: rgba(77, 223, 179, 0.12);
}

.proof-rule {
    min-height: 48px;
    padding: 13px 14px;
    border: 1px solid rgba(120, 199, 255, 0.28);
    border-radius: 8px;
    background: rgba(120, 199, 255, 0.1);
    color: var(--heading);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.word-preview {
    display: grid;
    grid-template-columns: repeat(5, 58px);
    gap: 10px;
}

.word-preview span {
    width: 58px;
    height: 58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    font-size: 1.65rem;
    font-weight: 800;
}

.word-preview span:nth-child(1),
.word-preview span:nth-child(4) {
    background: rgba(110, 231, 183, 0.32);
    border-color: rgba(110, 231, 183, 0.7);
}

.word-preview span:nth-child(2) {
    background: rgba(248, 199, 78, 0.3);
    border-color: rgba(248, 199, 78, 0.72);
}

.project-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 34px;
}

.project-content h2 {
    margin: 16px 0 12px;
    font-size: 2.1rem;
}

.project-content p {
    max-width: 660px;
    color: var(--muted-strong);
    line-height: 1.6;
}

.project-meta span {
    color: var(--muted-strong);
    font-size: 0.8rem;
}

/* ==========================================================================
   PÁGINAS INTERNAS DE PROJETO (PROJECT-DETAIL)
   ========================================================================== */
.project-detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    align-items: center;
    gap: 44px;
    padding: 72px 0 42px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--muted-strong);
    font-weight: 800;
    transition: color 0.2s, transform 0.2s;
}

.back-link:hover {
    color: var(--accent);
    transform: translateX(-3px);
}

.detail-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    background: var(--surface-strong);
    box-shadow: var(--shadow);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.85fr;
    gap: 20px;
    padding-top: 30px;
}

.detail-card {
    padding: 28px;
}

.detail-card h2,
.timeline-card h2,
.info-card h2,
.about-story h2 {
    margin-bottom: 16px;
    font-size: 1.45rem;
}

.check-list {
    display: grid;
    gap: 12px;
}

.check-list li {
    position: relative;
    padding-left: 28px;
    color: var(--muted-strong);
    line-height: 1.5;
}

.check-list li::before {
    content: '\f00c';
    position: absolute;
    left: 0;
    top: 2px;
    color: var(--mint);
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.detail-tags {
    align-content: start;
}

/* ==========================================================================
   PÁGINA SOBRE (ABOUT.HTML) & LINHA DO TEMPO
   ========================================================================== */
.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 24px;
    padding-top: 34px;
}

.compact-actions {
    margin-top: 24px;
}

.about-story,
.timeline-card {
    padding: 32px;
}

.about-story p + p {
    margin-top: 16px;
}

.social-strip {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-strip a {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--muted-strong);
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.social-strip a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.timeline-list {
    display: grid;
    gap: 18px;
}

.timeline-list li {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
}

.timeline-list span {
    display: block;
    margin-bottom: 4px;
    color: var(--mint);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.timeline-list strong {
    display: block;
    color: var(--heading);
    line-height: 1.25;
}

.timeline-list p {
    margin-top: 5px;
    font-size: 0.94rem;
}

.experience-grid,
.research-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding-top: 0;
}

.timeline-modern {
    position: relative;
    display: grid;
    gap: 16px;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 148px;
    width: 1px;
    background: var(--line);
}

.timeline-entry {
    position: relative;
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 34px;
    padding: 22px;
}

.timeline-entry::before {
    content: '';
    position: absolute;
    left: 144px;
    top: 31px;
    width: 10px;
    height: 10px;
    border: 3px solid var(--bg);
    border-radius: 50%;
    background: var(--accent);
    z-index: 1;
}

.timeline-date {
    color: var(--mint);
    font-weight: 800;
}

.timeline-content p {
    color: var(--muted-strong);
    line-height: 1.55;
}

.publication-list {
    display: grid;
    gap: 16px;
}

.publication-list article {
    padding: 24px;
}

.info-card {
    padding: 28px;
}

.info-card i {
    color: var(--amber);
    font-size: 1.65rem;
}

.info-card h2 {
    margin-top: 16px;
}

/* ==========================================================================
   TOAST & VOLTAR AO TOPO
   ========================================================================== */
.site-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card-bg);
    color: var(--heading);
    font-weight: 700;
    font-size: 0.92rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    transform: translateY(30px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.site-toast i {
    color: var(--mint);
    font-size: 1.1rem;
}

.site-toast.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--surface);
    color: var(--heading);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s, color 0.2s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.back-to-top:hover {
    background: var(--accent);
    color: #111318;
}

.back-to-top .progress-ring {
    position: absolute;
    inset: 1px;
    transform: rotate(-90deg);
}

.back-to-top .progress-ring__circle {
    transition: stroke-dashoffset 0.1s;
    color: var(--accent);
}

/* ==========================================================================
   RODAPÉ
   ========================================================================== */
footer {
    border-top: 1px solid var(--line-subtle);
    background: var(--header-bg);
    margin-top: auto;
}

footer .container {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

footer p {
    color: var(--muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ==========================================================================
   MODAL DE CONTATO RÁPIDO
   ========================================================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 13, 20, 0.78);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    width: min(560px, 100%);
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 32px;
    position: relative;
    transform: scale(0.92) translateY(20px);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-dialog {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--muted-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(90deg);
}

.modal-header h2 {
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.modal-header p {
    color: var(--muted-strong);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.contact-form {
    display: grid;
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted-strong);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--heading);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

/* ==========================================================================
   BLOG & NOTAS TÉCNICAS (BLOG.HTML E POSTS)
   ========================================================================== */
.blog-container {
    width: min(840px, calc(100% - 40px));
    margin: 0 auto;
}

.blog-showcase {
    display: grid;
    gap: 24px;
    padding-bottom: 70px;
}

.post-card {
    display: grid;
    gap: 14px;
    padding: 32px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 87, 0.45);
    box-shadow: var(--shadow), 0 0 24px var(--accent-glow);
}

.post-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--muted);
}

.post-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.post-card-meta .post-tag {
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--mint);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-card h2 {
    font-size: 1.65rem;
    line-height: 1.25;
}

.post-card h2 a {
    color: var(--heading);
    transition: color 0.2s ease;
}

.post-card:hover h2 a,
.post-card h2 a:hover {
    color: var(--accent);
}

.post-card p {
    color: var(--muted-strong);
    line-height: 1.65;
    font-size: 1.05rem;
}

/* PÁGINA DE ARTIGO INDIVIDUAL */
.article-container {
    width: min(840px, calc(100% - 40px));
    margin: 0 auto;
    padding: 60px 0 80px;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.article-header h1 {
    font-size: 2.85rem;
    margin: 16px 0 20px;
    line-height: 1.15;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.article-content {
    font-size: 1.12rem;
    line-height: 1.8;
    color: var(--text);
}

.article-content p {
    margin-bottom: 22px;
    color: var(--muted-strong);
}

.article-content h2 {
    font-size: 1.95rem;
    margin: 44px 0 18px;
    line-height: 1.2;
}

.article-content h3 {
    font-size: 1.45rem;
    margin: 32px 0 14px;
}

.article-content ul,
.article-content ol {
    margin: 0 0 24px 24px;
    color: var(--muted-strong);
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 10px;
}

.callout-box {
    padding: 20px 24px;
    margin: 28px 0;
    border-left: 4px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: var(--surface);
    color: var(--muted-strong);
}

.callout-box strong {
    color: var(--heading);
}

.code-block {
    margin: 24px 0;
    padding: 20px;
    border-radius: 10px;
    background: var(--surface-strong);
    border: 1px solid var(--line);
    overflow-x: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--heading);
}

/* ==========================================================================
   MATERIAIS DIDÁTICOS & ENSINO (TEACHING HUB)
   ========================================================================== */
.teaching-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.teaching-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    padding: 28px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s, box-shadow 0.25s;
}

.teaching-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 107, 87, 0.45);
    box-shadow: var(--shadow), 0 0 20px var(--accent-glow);
}

.teaching-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mint);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.teaching-card h3 {
    font-size: 1.3rem;
    line-height: 1.28;
    margin-bottom: 8px;
}

.teaching-card p {
    color: var(--muted-strong);
    font-size: 0.98rem;
    line-height: 1.6;
}

/* ==========================================================================
   PÁGINA 404 (NOT FOUND HERO)
   ========================================================================== */
.notfound-hero {
    min-height: calc(75vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 0;
}

.notfound-content {
    max-width: 680px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
    justify-items: center;
}

.notfound-badge {
    font-size: 6rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.04em;
    text-shadow: 0 0 35px var(--accent-glow);
}

.notfound-math {
    padding: 14px 22px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--heading);
    margin: 8px 0;
}

/* ==========================================================================
   ESTILOS DE IMPRESSÃO (CURRÍCULO EM PDF / IMPRESSÃO LIMPA)
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #0f172a !important;
    }

    .site-header,
    .hamburger-menu,
    .theme-toggle,
    .back-to-top,
    .site-toast,
    .modal-backdrop,
    .hero-actions,
    .highlight-band,
    footer,
    #hero-multigraph-canvas {
        display: none !important;
    }

    .container,
    .article-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hero-section {
        min-height: auto !important;
        padding: 0 !important;
    }

    .hero-panel,
    .credential-card,
    .research-card,
    .timeline-card,
    .info-card,
    .about-story {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        page-break-inside: avoid;
    }

    h1, h2, h3, strong {
        color: #0f172a !important;
    }

    p, span {
        color: #334155 !important;
    }

    a {
        text-decoration: underline;
        color: #0f172a !important;
    }
}

/* ==========================================================================
   RESPONSIVIDADE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 960px) {
    :root {
        --header-height: 70px;
    }

    .hero-content,
    .project-detail-hero,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .page-hero h1,
    .project-detail-copy h1 {
        font-size: 3.5rem;
    }

    .hero-panel {
        max-width: 520px;
    }

    .hero-section {
        min-height: auto;
        padding: 56px 0;
    }

    .skills-grid,
    .detail-grid,
    .experience-grid,
    .credential-grid,
    .research-grid,
    .teaching-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .research-split {
        grid-template-columns: 1fr;
    }

    .project-card {
        grid-template-columns: 1fr;
    }

    .project-media {
        min-height: 260px;
    }
}

@media (max-width: 720px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .site-wrapper {
        padding-bottom: calc(var(--mobile-dock-height) + 18px);
    }

    .container {
        width: min(100% - 30px, 1120px);
    }

    .nav-shell {
        min-height: var(--header-height);
    }

    .hamburger-menu {
        display: none;
    }

    .nav-menu {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: max(12px, env(safe-area-inset-bottom));
        transform: none;
        opacity: 1;
        pointer-events: auto;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--nav-dock-bg);
        box-shadow: var(--shadow);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        z-index: 40;
    }

    .nav-menu ul {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 4px;
        padding: 6px;
    }

    .nav-menu a {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        padding: 0 4px;
        font-size: 0.84rem;
    }

    .hero-section,
    .page-hero,
    .project-detail-hero {
        padding-top: 48px;
    }

    .hero-section {
        padding-bottom: 44px;
    }

    .hero-copy h1,
    .page-hero h1,
    .project-detail-copy h1 {
        font-size: 2.55rem;
        line-height: 1.08;
    }

    .hero-lead,
    .page-hero p,
    .project-detail-copy p {
        font-size: 1.03rem;
    }

    .hero-actions,
    .project-actions {
        gap: 10px;
    }

    .hero-panel {
        padding: 18px;
    }

    .profile-photo {
        max-height: 360px;
    }

    .section-block,
    .project-showcase,
    .about-layout,
    .experience-grid,
    .detail-grid,
    .credential-grid,
    .research-grid {
        padding: 50px 0;
    }

    .section-heading h2,
    .highlight-content h2 {
        font-size: 1.85rem;
        line-height: 1.14;
    }

    .page-hero {
        padding: 50px 0 18px;
    }

    .highlight-content {
        display: grid;
        align-items: start;
    }

    .text-link {
        white-space: normal;
    }

    .skills-grid,
    .detail-grid,
    .experience-grid,
    .credential-grid,
    .research-grid,
    .link-grid,
    .teaching-grid {
        grid-template-columns: 1fr;
    }

    .project-content,
    .about-story,
    .timeline-card,
    .detail-card,
    .info-card,
    .credential-card,
    .research-card,
    .publication-list article {
        padding: 22px;
    }

    .project-content h2 {
        font-size: 1.62rem;
        line-height: 1.14;
    }

    .project-media,
    .project-media-word {
        min-height: 220px;
    }

    .project-detail-hero {
        gap: 24px;
        padding-bottom: 26px;
    }

    .detail-grid {
        padding-top: 18px;
    }

    .timeline-modern::before {
        left: 18px;
    }

    .timeline-entry {
        grid-template-columns: 1fr;
        gap: 8px;
        padding-left: 44px;
    }

    .timeline-entry::before {
        left: 14px;
    }

    .timeline-content h3,
    .publication-list h3,
    .research-card h3 {
        font-size: 1.18rem;
        line-height: 1.2;
    }

    .word-preview {
        grid-template-columns: repeat(5, 44px);
        gap: 7px;
    }

    .word-preview span {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .site-toast {
        bottom: calc(var(--mobile-dock-height) + 24px);
        right: 16px;
        left: 16px;
        justify-content: center;
    }

    .back-to-top {
        bottom: calc(var(--mobile-dock-height) + 16px);
        right: 16px;
        width: 42px;
        height: 42px;
    }
    .back-to-top .progress-ring {
        display: none;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
        padding: 16px 0;
    }
}

@media (max-width: 460px) {
    .container {
        width: min(100% - 24px, 1120px);
    }

    .logo span {
        font-size: 0.94rem;
    }

    .logo-image {
        width: 40px;
        height: 40px;
    }

    .hero-copy h1,
    .page-hero h1,
    .project-detail-copy h1 {
        font-size: 2.1rem;
    }

    .hero-actions,
    .project-actions {
        display: grid;
    }

    .btn {
        width: 100%;
        min-height: 46px;
        padding: 0 14px;
    }

    .project-media {
        min-height: 210px;
    }

    .eyebrow {
        align-items: flex-start;
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .eyebrow::before {
        width: 22px;
        margin-top: 8px;
        flex: 0 0 22px;
    }

    .quick-stats span,
    .skills-grid span,
    .project-meta span {
        font-size: 0.84rem;
    }

    .word-preview {
        grid-template-columns: repeat(5, 38px);
        gap: 6px;
    }

    .word-preview span {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

    .project-filters-wrap {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 360px) {
    .logo span {
        display: none;
    }

    .hero-copy h1,
    .page-hero h1,
    .project-detail-copy h1 {
        font-size: 1.85rem;
    }

    .nav-menu a {
        font-size: 0.82rem;
    }
}

/* ==========================================================================
   MODERNIZAÇÃO 2026: COMMAND PALETTE (⌘K), BENTO GRID, LABS INTERATIVOS & CITATION
   ========================================================================== */

/* 1. Barra de Progresso de Leitura no Topo */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--mint), var(--sky));
    z-index: 9999;
    transition: width 0.08s linear;
    pointer-events: none;
}

/* 2. Grade de Coordenadas Matemáticas Sutil (Engenharia / Papel Milimetrado) */
.site-wrapper {
    position: relative;
}

.site-wrapper::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.11) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 35%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 25%, #000 35%, transparent 100%);
}

[data-theme="light"] .site-wrapper::before {
    background-image: radial-gradient(rgba(15, 23, 42, 0.08) 1px, transparent 1px);
}

.site-header,
main,
footer {
    position: relative;
    z-index: 1;
}

/* 3. Botão Command Palette (⌘K) no Header */
.cmd-trigger {
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted-strong);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.cmd-trigger:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--heading);
    background: var(--surface-strong);
}

.cmd-trigger i {
    color: var(--sky);
    font-size: 0.85rem;
}

.cmd-kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
    color: var(--muted);
    letter-spacing: 0.02em;
}

[data-theme="light"] .cmd-kbd {
    background: rgba(15, 23, 42, 0.05);
}

/* Modal Command Palette */
.cmd-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(6, 9, 15, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 16px 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cmd-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.cmd-dialog {
    width: 100%;
    max-width: 620px;
    background: var(--bg-soft);
    border: 1px solid var(--card-border-hover);
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
    overflow: hidden;
    transform: translateY(-12px) scale(0.98);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cmd-backdrop.active .cmd-dialog {
    transform: translateY(0) scale(1);
}

.cmd-search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.cmd-search-bar i {
    color: var(--accent);
    font-size: 1.05rem;
}

.cmd-input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--heading);
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    outline: none;
}

.cmd-input::placeholder {
    color: var(--muted);
}

.cmd-esc-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid var(--line);
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.cmd-list {
    max-height: 360px;
    overflow-y: auto;
    padding: 10px;
}

.cmd-group-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    padding: 8px 12px 4px;
}

.cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 11px;
    border: none;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer;
    font-family: 'Manrope', sans-serif;
    font-size: 0.94rem;
    transition: background 0.14s ease, color 0.14s ease;
}

.cmd-item:hover,
.cmd-item.selected {
    background: var(--surface-hover);
    color: var(--heading);
}

.cmd-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cmd-item-left i {
    width: 20px;
    text-align: center;
    color: var(--mint);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.cmd-item-title {
    font-weight: 600;
    color: var(--heading);
}

.cmd-item-sub {
    font-size: 0.8rem;
    color: var(--muted);
    margin-left: 6px;
}

.cmd-item-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--muted-strong);
    flex-shrink: 0;
}

.cmd-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-top: 1px solid var(--line);
    background: var(--surface);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    color: var(--muted);
}

.cmd-footer span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* 4. HUD Interativo do Multigrafo na Hero */
.canvas-hud {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding: 6px 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--muted-strong);
}

.hud-stat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-right: 8px;
    border-right: 1px solid var(--line);
}

.hud-stat i {
    color: var(--mint);
}

.hud-btn {
    border: none;
    background: rgba(120, 199, 255, 0.12);
    color: var(--sky);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hud-btn:hover {
    background: rgba(120, 199, 255, 0.24);
    transform: translateY(-1px);
}

/* 5. Bento Grid de Projetos e Pesquisa na Home */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.bento-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.bento-card:hover {
    transform: translateY(-4px);
    border-color: var(--card-border-hover);
    box-shadow: var(--shadow-hover);
}

.bento-span-2 {
    grid-column: span 2;
}

.bento-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bento-mono-badge {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(77, 223, 179, 0.12);
    border: 1px solid rgba(77, 223, 179, 0.28);
    color: var(--mint);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.bento-mono-badge.badge-accent {
    background: rgba(255, 107, 87, 0.12);
    border-color: rgba(255, 107, 87, 0.28);
    color: var(--accent);
}

.bento-mono-badge.badge-sky {
    background: rgba(120, 199, 255, 0.12);
    border-color: rgba(120, 199, 255, 0.28);
    color: var(--sky);
}

.bento-card h3 {
    font-size: 1.38rem;
    margin: 10px 0 8px;
}

.bento-card p {
    color: var(--muted-strong);
    font-size: 0.96rem;
    line-height: 1.6;
}

.bento-formula {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--sky);
    overflow-x: auto;
}

.bento-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

/* 6. Laboratórios Matemáticos Interativos (Fourier Synth & Proof Stepper) */
.interactive-lab {
    margin: 32px 0;
    padding: 26px;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--card-border-hover);
    box-shadow: var(--shadow);
}

.lab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.lab-title-group h3 {
    font-size: 1.25rem;
    margin: 4px 0 0;
}

.lab-canvas-wrap {
    width: 100%;
    height: 190px;
    border-radius: 12px;
    background: rgba(7, 10, 16, 0.75);
    border: 1px solid var(--line);
    overflow: hidden;
    position: relative;
    margin-bottom: 18px;
}

[data-theme="light"] .lab-canvas-wrap {
    background: #0f172a;
}

.lab-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.lab-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.lab-slider-card {
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.lab-slider-card label {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--heading);
    margin-bottom: 8px;
}

.lab-slider-card input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
    cursor: pointer;
}

.lab-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Proof Stepper Interativo */
.proof-stepper-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.proof-step-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    opacity: 0.35;
    transform: translateX(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.proof-step-item.active-step {
    opacity: 1;
    transform: translateX(0);
    border-color: var(--mint);
    background: rgba(77, 223, 179, 0.08);
}

.proof-step-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--mint);
}

.proof-step-expr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.92rem;
    color: var(--heading);
}

.proof-step-rule {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sky);
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(120, 199, 255, 0.1);
}

/* 7. Cabeçalho de Bloco de Código & Botão Copiar */
.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    color: var(--muted-strong);
    margin-top: 18px;
}

.code-block-header + pre.code-block {
    margin-top: 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.copy-code-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--heading);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.73rem;
    padding: 4px 10px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.copy-code-btn:hover {
    border-color: var(--mint);
    background: var(--surface-hover);
}

/* 8. Botão BibTeX em Publicações */
.pub-citation-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.bibtex-btn {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--sky);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.bibtex-btn:hover {
    border-color: var(--sky);
    background: var(--surface-hover);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .bento-span-2 {
        grid-column: span 1;
    }
    .cmd-kbd {
        display: none;
    }
}

