:root {
    --bg: #0a0b0f;
    --surface: #13141c;
    --surface2: #1a1c27;
    --border: #262838;
    --border-soft: #1d1f2c;
    --text: #edecf4;
    --text-dim: #8c8da1;
    --text-faint: #5d5e70;
    --violet: #7c5cff;
    --violet-soft: #7c5cff33;
    --mint: #00e6b8;
    --coral: #ff5c8a;
    --amber: #ffb547;
    --radius: 16px;
    --gren: #09ff00;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 0%, rgba(124, 92, 255, 0.08), transparent 40%),
        radial-gradient(circle at 85% 20%, rgba(0, 230, 184, 0.06), transparent 35%);
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.display {
    font-family: 'Space Grotesk', sans-serif;
}

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

::selection {
    background: var(--violet);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--mint);
    outline-offset: 2px;
    border-radius: 4px;
}

button {
    font-family: inherit;
}

.app {
    max-width: 680px;
    margin: 0 auto;
    min-height: 100vh;
    border-left: 1px solid var(--border-soft);
    border-right: 1px solid var(--border-soft);
    background: rgba(10, 11, 15, 0.4);
}

/* ---------- COVER + HEADER ---------- */
.cover {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(120deg, #2a1f5e 0%, #3a1b4d 35%, #103a3a 75%, #0a0b0f 100%);
}

.cover img.cover-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cover canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.55;
    display: none;
}

.cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, var(--bg) 100%);
    pointer-events: none;
}

.profile-block {
    padding: 0 20px 16px;
}

.avatar-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: -52px;
    position: relative;
    z-index: 2;
}

.avatar {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 4px solid var(--bg);
    background: linear-gradient(145deg, var(--violet), #2a1f5e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 34px;
    color: #fff;
    box-shadow: 0 0 0 1px var(--border-soft), 0 12px 30px -8px rgba(124, 92, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar .avatar-fallback {
    display: none;
    position: relative;
    z-index: 1;
}

.avatar.no-photo .avatar-fallback {
    display: block;
}

.follow-btn {
    margin-bottom: 10px;
    padding: 9px 22px;
    border-radius: 999px;
    border: 1px solid var(--violet);
    background: var(--violet);
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all .18s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.follow-btn:hover {
    background: #6a4ce8;
    box-shadow: 0 6px 18px -6px var(--violet-soft);
}

.follow-btn.following {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.follow-btn.following:hover {
    border-color: var(--coral);
    color: var(--coral);
    background: rgba(255, 92, 138, 0.08);
}

.follow-btn.following .label-default {
    display: none;
}

.follow-btn.following .label-hover {
    display: inline;
}

.follow-btn .label-hover {
    display: none;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
}

.name-row h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 21px;
    font-weight: 700;
}

.verified {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.handle {
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    margin-top: 2px;
}

.bio-sub {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.55;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
    font-size: 13.5px;
    color: var(--text-dim);
}

.meta-row span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-row svg {
    width: 15px;
    height: 15px;
    opacity: 0.75;
}

.meta-row .link-val {
    color: var(--gren);
}

.meta-row .links-trigger {
    display: flex;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-dim);
    font: inherit;
    padding: 0;
}

.meta-row .links-trigger:hover .link-val {
    text-decoration: underline;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-top: 14px;
    font-size: 13.5px;
}

.stats-row b {
    color: var(--text);
    font-weight: 600;
}

.stats-row .dim {
    color: var(--text-dim);
}

/* ---------- TABS ---------- */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(10, 11, 15, 0.85);
    backdrop-filter: blur(10px);
}

.tab {
    flex: 1;
    text-align: center;
    padding: 15px 0;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-dim);
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    transition: color .15s ease;
}

.tab:hover {
    color: var(--text);
    background: rgba(124, 92, 255, 0.05);
}

.tab.active {
    color: var(--text);
}

.tab.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--violet), var(--mint));
}

.panel {
    display: none;
    animation: fadeIn .35s ease;
}

.panel.active {
    display: block;
}

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

/* ---------- FEED ---------- */
.post {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    gap: 12px;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--violet), #2a1f5e);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Fallback caso a imagem não carregue */
.post-avatar img:not([src]) {
    display: none;
}

.post-avatar .avatar-fallback {
    display: none;
    position: absolute;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
}

.post-avatar.no-photo .avatar-fallback {
    display: block;
}

.post-body {
    flex: 1;
    min-width: 0;
}

.post-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    flex-wrap: wrap;
}

.post-head b {
    font-weight: 700;
}

.post-head .verified {
    width: 15px;
    height: 15px;
}

.post-head .dim {
    color: var(--text-faint);
    font-family: 'JetBrains Mono', monospace;
    font-size: 12.5px;
}

.pinned-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-faint);
    font-size: 12.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.pinned-tag svg {
    width: 13px;
    height: 13px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--gren);
    margin: 8px 0;
    font-family: 'JetBrains Mono', monospace;
}

.post-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin: 6px 0 4px;
}

.post-text {
    font-size: 14.5px;
    color: var(--text);
    line-height: 1.6;
}

.post-text code {
    background: var(--surface2);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--mint);
}

.post-card {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}

.post-card-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
}

.post-card-body {
    padding: 12px 14px;
}

.post-card-body .t {
    font-weight: 600;
    font-size: 14px;
}

.post-card-body .d {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 3px;
    font-family: 'JetBrains Mono', monospace;
}

.post-actions {
    display: flex;
    margin-top: 12px;
}

.post-actions button {
    background: none;
    border: none;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: color .15s ease;
}

.post-actions button svg {
    width: 17px;
    height: 17px;
}

.post-actions button:hover {
    color: var(--coral);
}

.post-actions button.liked {
    color: var(--coral);
}

.post-actions button.liked svg {
    fill: var(--coral);
}

/* ---------- POST IMAGE ---------- */
.post-image {
    margin-top: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.post-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}

.post-image-caption {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text-dim);
    background: var(--surface);
    border-top: 1px solid var(--border-soft);
    font-family: 'Inter', sans-serif;
    line-height: 1.4;
}

/* ---------- SOBRE / TIMELINE ---------- */
.about-wrap {
    padding: 22px 20px 40px;
    max-width: 100%;
}

.about-text {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text);
    max-width: 100%;
    text-align: left;
}

.about-text br {
    display: block;
    margin-bottom: 0.5em;
}

.about-text strong {
    color: var(--gren);
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5em;
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.skill-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 6px 13px;
    border-radius: 8px;
    font-size: 12.5px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--violet);
    text-transform: uppercase;
    margin: 34px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-label::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-soft);
}

.timeline {
    position: relative;
    padding-left: 26px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 1px;
    background: linear-gradient(180deg, var(--violet), var(--mint) 60%, transparent);
}

.t-item {
    position: relative;
    padding-bottom: 26px;
}

.t-item:last-child {
    padding-bottom: 0;
}

.t-dot {
    position: absolute;
    left: -26px;
    top: 3px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--gren);
}

.t-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
}

.t-title {
    font-weight: 600;
    font-size: 14.5px;
    margin-top: 4px;
}

.t-desc {
    font-size: 13.5px;
    color: var(--text-dim);
    margin-top: 4px;
    line-height: 1.55;
}

/* ---------- CONTEUDO / 3D NAV ---------- */
.content-wrap {
    padding: 20px 0 0;
}

.content-intro {
    padding: 0 20px;
    font-size: 13.5px;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.content-intro b {
    color: var(--text);
}

.scene-wrap {
    position: relative;
    height: 340px;
    margin: 6px 0;
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
    background: radial-gradient(circle at 50% 45%, rgba(124, 92, 255, 0.08), transparent 65%);
    touch-action: none;
    cursor: grab;
}

.scene-wrap:active {
    cursor: grabbing;
}

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

.scene-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-faint);
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.node-label {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(19, 20, 28, 0.75);
    border: 1px solid var(--border);
    transition: opacity .2s ease, color .2s ease, border-color .2s ease;
}

.node-label.active-node {
    color: var(--bg);
    background: var(--mint);
    border-color: var(--mint);
    font-weight: 600;
}

.content-list {
    padding: 18px 20px 0;
}

.content-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-soft);
    animation: fadeIn .3s ease;
    cursor: pointer;
    background: none;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
}

.content-item:hover .ci-title {
    color: var(--gren);
}

.content-item .ci-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.content-item .ci-title {
         color: var(--gren);
    font-weight: 600;
    font-size: 14.5px;
    transition: color .15s ease;
}

.content-item .ci-meta {
    font-size: 12px;
    color: var(--text-faint);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 3px;
}

.content-item .ci-desc {
    font-size: 13.5px;
    color: var(--text-dim);
    margin-top: 5px;
    line-height: 1.5;
}

.content-footer {
    margin-top: 26px;
    padding: 30px 20px 38px;
    border-top: 1px solid var(--border-soft);
    text-align: center;
}

.content-footer .cf-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 16px;
}

.cf-socials {
    display: flex;
    justify-content: center;
    gap: 14px;
}

.cf-socials a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: all .18s ease;
}

.cf-socials a:hover {
    color: var(--bg);
    background: var(--mint);
    border-color: var(--mint);
    transform: translateY(-2px);
}

.cf-socials svg {
    width: 19px;
    height: 19px;
}

/* ---------- PROJETOS ---------- */
.projects-grid {
    padding: 18px 20px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.project-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    transition: transform .2s ease, border-color .2s ease;
    cursor: pointer;
    text-align: left;
    width: 100%;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--violet);
}

.project-cover {
    height: 120px;
    position: relative;
    overflow: hidden;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.project-card:hover .project-cover img {
    transform: scale(1.07);
}

.project-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 11, 15, 0) 45%, rgba(10, 11, 15, 0.6) 100%);
}

.pc-1 {
    background: linear-gradient(135deg, #7c5cff, #2a1f5e);
}
.pc-2 {
    background: linear-gradient(135deg, #00e6b8, #0c3b35);
}
.pc-3 {
    background: linear-gradient(135deg, #ff5c8a, #3a1530);
}
.pc-4 {
    background: linear-gradient(135deg, #ffb547, #3a2a0c);
}
.pc-5 {
    background: linear-gradient(135deg, #4ea1ff, #0c1f3a);
}
.pc-6 {
    background: linear-gradient(135deg, #9a5cff, #1f0c3a);
}

.project-body {
    padding: 13px 14px 15px;
}

.project-body .pt {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 14.5px;
}

.project-body .pd {
    font-size: 12.5px;
    color: var(--text-dim);
    margin-top: 5px;
    line-height: 1.5;
}

.project-tags {
    display: flex;
    gap: 6px;
    margin-top: 9px;
    flex-wrap: wrap;
}

.project-tags span {
    font-size: 10.5px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 6px;
}

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 10, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    max-width: 440px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(14px) scale(0.97);
    transition: transform .22s ease;
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
    position: relative;
}

.modal-overlay.open .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 11, 15, 0.6);
    border: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
}

.modal-close:hover {
    border-color: var(--coral);
    color: var(--coral);
}

.modal-cover {
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
    background: var(--surface2);
}

.modal-body {
    padding: 20px 22px 26px;
}

.modal-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--mint);
    margin-bottom: 8px;
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-dim);
    line-height: 1.7;
}

.modal-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.modal-tags span {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-faint);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 6px;
}

.modal-link {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--violet);
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
}

.modal-link:hover {
    background: #6a4ce8;
}

.links-modal-list {
    padding: 8px 10px 14px;
}

.link-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 12px;
    border-radius: 12px;
    transition: background .15s ease;
}

.link-row:hover {
    background: var(--surface2);
}

.link-row img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface2);
    border: 1px solid var(--border);
}

.link-row .lt {
    font-weight: 600;
    font-size: 14px;
}

.link-row .lu {
    font-size: 12.5px;
    color: var(--mint);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.modal-video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.modal-video-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .avatar {
        width: 88px;
        height: 88px;
        font-size: 28px;
    }
    .avatar-row {
        margin-top: -44px;
    }
    .name-row h1 {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .panel {
        animation: none;
    }
}