* {
    font-family: Inter, sans-serif;
    font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */
    text-shadow: 0px 2px 0px #00000056;
    color: #e6e6e6;
    margin: 0;
    padding: 0;
    scrollbar-color: #545454 #303030;
}

@supports (font-variation-settings: normal) {
  * { font-family: InterVariable, sans-serif; }
}

::selection {
    background-color: #67c2ff;
    color: #000000;
    text-shadow: none;
}

::-moz-selection {
    background-color: #67c2ff;
    color: #000000;
    text-shadow: none;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: auto;
    scroll-behavior: smooth;
}

/* FUNDO */
.main-bg {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow-y: visible;
    overflow-x: auto;
    background-color: #1a1a1a;
}

.main-bg::before {
    content: "";
    position: fixed;  /* fica fixo na viewport */
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    
    background-image: radial-gradient(rgba(45,45,45,1) 2px, transparent 0);
    background-size: 30px 30px;

    animation: bg-drift 2s linear infinite;
    will-change: transform;
    z-index: -1;
    pointer-events: none; /* ignora interação do mouse */
}

/* ANIMACAO FUNDO */

@keyframes bg-drift {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(-30px, -30px);
    }
}

/* NODE BASE */
.node {
    background-color: #303030;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: visible;
    position: relative;
}

.node-content {
    background-color: #545454;
    border: 2px solid rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden;
}

#vid-showreel {
    display: flex;
}

.node-content iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9; /* mantém proporção correta */
    overflow: hidden;
}

.node-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

@media (max-width: 600px) {
    .node-content-grid {
        grid-template-columns: 1fr; /* 1 coluna por vez */
    }
}

.node-content-grid iframe {
    width: 100%;
    aspect-ratio: 16 / 9; /* mantém proporção correta */
    overflow: hidden;
}

.node-content-grid > * {
    width: 100%;
    height: auto;
    border-radius: 4px;
    overflow: hidden;
}

.node-inner {
    border-radius: 8px;
    overflow: hidden; /* corta só o painel */
}

/* TITULO */
.node-title {
    position: relative;
    padding: 6px 12px;
    padding-left: 28px;
    font-size: 1rem;
    background-color: #3a3a3a;
    border-bottom: 1px solid rgba(0,0,0,0.4);
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
}

.title-h1 {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    margin: inherit;
}

.title-h2 {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    margin: inherit;
}

/* SETA TÍTULO */

.node-title::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 55%;
    transform: translateY(-50%);

    width: 15px;
    height: 15px;

    background-image: url("../icons/downarrow_hlt.svg");
    background-size: contain;
    background-repeat: no-repeat;
}

/* VARIAÇÕES DE TÍTULO */
.node-title.shader {
    background-color: #2b652b;
}

.node-title.color {
    background-color: #6e6e23;
}

.node-title.displacement {
    background-color: #3c3c83;
}

.node-title.image {
    background-color: #79461d;
}

.node-title.input {
    background-color: #82354c;
}

.node-title.math {
    background-color: #246283;
}

.node-title.group {
    background-color: #374725;
}

.node-title.blender {
    background-color: #7A4206;
    color: #ffffff;
}

/* CORPO */
.node-body {
    padding: 12px;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* NODE PRINCIPAL */
.node-main {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    overflow: hidden;
}

/* GRID INTERNO (sub-nodes) */
.node-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    background-color: #2a2a2a;
}

/* IMAGEM */
.node-image {
    width: 100%;
    display: block;
    border-radius: 4px;
}



/* SOCKETS */
.socket {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    margin: 6px 0;
    padding: 0 12px;
}

.socket.input {
    flex-direction: row;
}

.socket.output {
    flex-direction: row-reverse;
}

.socket::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #666;
    box-shadow: 0 0 0 2px #222;
}

.socket.input::before {
    left: -18px;
}

.socket.output::before {
    right: -18px;
}

.socket.color::before { background-color: #c7c729; }
.socket.vector::before { background-color: #6363c7; }
.socket.float::before  { background-color: #a1a1a1; }
.socket.bsky::before  { background-color: #006afe; }
.socket.yt::before  { background-color: #ff0033; }
.socket.artst::before  { background-color: #13aff0; }
.socket.discord::before  { background-color: #5865f2; }
.socket.email::before  { background-color: #ea4335; }
.socket.blender::before  { background-color: #e87d0d; }

/* FIM SOCKETS*/ 



/* BOARD */
.board {
    position: relative;
}

/* SVG DAS CONEXÕES */
.connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}


/* BOTOES */

.node-button {
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 8px 12px;
    background-color: #4a4a4a;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.1s ease;
    user-select: none;
    white-space: nowrap;
    box-sizing: border-box;
    text-decoration: none;
}

.node-button:hover {
    background-color: #5c5c5c;
}

.node-button:active {
    background-color: #4772b3;
}

.node-button .icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.node-button .icon img {
    width: 100%;
    height: 100%;
}

/* ABOUT ME */

.about-me {
    text-align: center;
    width: 95%;
    height: auto;
    margin: 0 auto;
    padding: 10px;
    position: relative;
    background-image: url(../img/avatar.webp);
    background-clip: padding-box;
    background-origin: padding-box;
    background-repeat: no-repeat;
    background-position: center;
    border-color: #ffffff4f;
}

.about-me * {
    text-shadow: 0px 0px 10px #000000d7;
    color: #e6e6e6;
}

.about-me h2 {
    font-size: 40px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.about-me p {
    font-size: 20px;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 600px) {
    .about-me h2 {
        font-size: 30px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .about-me p {
        font-size: 16px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

.about-me .node-button{
    color: #ffffff;
    background-color: #222222;
}

.about-me .node-button:hover {
    background-color: #353535;
}

.about-me .node-button:active {
    background-color: #4772b3;
}

/* NODE TEXT */

.node-text {
    text-align: center;
    width: 95%;
    height: auto;
    margin: 0 auto;
    padding: 10px;
    position: relative;
}

.node-text * {
    text-shadow: 0px 0px 10px #000000d7;
    color: #e6e6e6;
    overflow: hidden;
}

.node-text h2 {
    font-size: 40px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.node-text p {
    font-size: 20px;
    padding-left: 10px;
    padding-right: 10px;
}

.node-text img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.6));
}

@media (max-width: 600px) {
    .node-text h2 {
        font-size: 30px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
    
    .node-text p {
        font-size: 16px;
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* MENU TITULO */

.node-main-title {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* menu no título */
.node-menu {
    display: flex;
    gap: 8px;
}

/* ajustes para botão caber no título */
.node-menu .node-button {
    width: auto;
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* PAGINA ATUAL */

.node-menu .current-page {
    background-color: #31507e;
}

.node-menu .current-page:hover {
    background-color: #18273d;
}

.node-menu .current-page:active {
    background-color: #4772b3;
}


/* NODES FILHAS */

.node-children {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* centraliza cada linha */
    gap: 20px;
    padding: 20px 0;
}

.node-child {
    width: 220px;
    flex: 0 0 auto;
    z-index: 5;
}

.node-child img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.6));
}

.node-child .node-content {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

/* FIX Z-INDEX PARA LINHAS */
#zindex-fix {
    z-index: 5;
}

/* TOGGLE MENU */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #e6e6e6;
}

@media (max-width: 700px) {

    .menu-toggle {
        display: block;
    }

    .node-menu {
        position: absolute;
        top: 100%;
        right: 8px;

        width: 220px;
        padding: 8px;

        display: none;
        flex-direction: column;
        gap: 6px;

        background-color: #2a2a2a;
        border: 2px solid rgba(255,255,255,0.1);
        border-radius: 8px;

        z-index: 999; /* por cima de tudo */
        box-shadow: 0 8px 20px rgba(0,0,0,0.6);
    }

    .node-menu.open {
        display: flex;
    }

    .node-menu .node-button {
        width: 100%;
        justify-content: center;
    }
}