/*
Caso você seja uma pessoa que não seja eu (que frase) e esteja lendo esse código CSS, sinto lhe informar que o estado
atual dele não é dos melhores. Dei uma organizada bem, porém ainda tem muito o que ser refatorado/melhorado.
Coisa que >TALVEZ< eu faça com o passar do tempo, porém tenho muito o que estudar e não quero perder muito tempo mexendo no que
já funciona minimamente da forma como planejei.


TODO (apenas o essencial):
    - Adaptar o menu secundário para dispositivos móveis (alta prioridade)
    - Melhorar a apresentação da página de habilidades (baixa prioridade)
*/
@font-face {
  font-family: 'Friza';
  src:  url('./assets/font/friz.woff2') format('woff2');
  font-weight:normal;
  font-style: normal;
  font-display: swap;
}

:root {
    --bg-color: #141414;
    --card-bg: #1f1f1f;
    --card-border: 2px solid #333;
    --card-box: inset 0 0 0 3px rgb(20, 20, 20);
    --key-text: #f9c350;
    --regular-text: #c5c5c5;
    --fancy-font: "Lora", serif;
    --regular-font: "Nunito Sans", sans-serif;

    --container-width: 700px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--regular-font);
    cursor: url('./assets/cursor.png'), auto;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background: var(--bg-color);
    position: relative;
}

body, a {
    font-optical-sizing: auto;
    color: var(--regular-text);
}

a {
    text-decoration: underline;
    color: goldenrod;
}

svg {
    display: flex;
    height: 24px;
    width: 24px;
    fill: var(--regular-text);
}

header h1 {
    color: #c7c7c7;
}

a, p {
    color: var(--regular-text);
}

p {
    font-size: 1.125rem;
    letter-spacing: 0.425px;
}

header, nav {
    z-index: 1;
}

nav a, footer a {
    text-decoration: none;
}

/*-------------------
ELEMENTOS GENÉRICOS
-------------------*/
.container {
    width: var(--container-width);
    
    margin: 0 auto;
    
    display: flex;
    align-items: center;
    flex-direction: column;
}

.framed {
    background-color: var(--card-bg);
    border: var(--card-border);
    box-shadow: var(--card-box);
    border-radius: 4px;
}

.framed-image {
    flex-grow: 1;
    height: 100%;
    position: relative;
}

.framed-text {
    flex-grow: 0.7;
    display: block;
    transition: flex-grow ease-in-out 600ms;
}

.grid {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr 1fr;
}

/*-------------------
FUNDO ANIMADO 
-------------------*/
.animated-bg {
    top: 0;
    left: 0;
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 600px;
    filter: blur(3px);
    z-index: -1;
}

.top-panel {
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 40px 0;
}

.top-panel .buttons {
    position: absolute;
    right: 40px;
    display: flex;
    gap: 12px;
}

.top-panel button {
    background-color: var(--bg-color);
    border: none;
    box-shadow: inset 0 0 0 3px goldenrod;
    padding: 12px;
    border-radius: 100%;
    height: fit-content;
    fill: red !important;
}

.mute-button svg {
    display: none;
}

.mute-button svg.active {
    display: block;
}

.mute-button:hover {
    background-color: #4b4b4b;
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 600px;
    /* background-image: linear-gradient(to top, var(--bg-color), rgb(20, 20, 20), rgba(0,0,0,0)); */
    background-color: rgba(0,0,0,0.4);
    background-image: url('./assets/shadow.png');
    background-size: auto 100%;
    background-position: bottom;
    background-repeat: repeat-x;
    bottom: 0;
}

/*-------------------
HEADER
-------------------*/
header {
    width: 100%;
    margin-bottom: 64px;
    font-size: 1.5rem;
}

.personal-info {
    margin-bottom: 24px;
}

h1 {
    font-size: 1.805rem;
}

.personal-info span{
    font-size: 1.125rem;
}

span.localization {
    display: flex;
    gap: 8px;
    margin: 4px 0;
}

span.localization svg {
    fill: goldenrod;
}

.personal-info span.dashes {
    border-bottom: 2px dashed rgba(255,255,255,0.5);
}

/*-------------------
NAV PRIMÁRIA
-------------------*/
nav.main {
    width: 100%;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    row-gap: 64px;
    margin-bottom: 24px;
}

/*-------------------
NAV SECUNDÁRIA
-------------------*/
nav.secondary {
    pointer-events: none;
    opacity: 0;
    width: 100%;
}

nav.secondary.showing {
    opacity: 1;
    pointer-events: auto;
}

nav.secondary ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

nav.secondary ul li {
    flex-grow: 1;
    transition: flex-grow ease-in-out 300ms;
}

nav.secondary li a {
    display: inline-block;
    width: 100%;
    background-color: var(--bg-color);
    border: var(--card-border);
    border-radius: 4px;
    text-align: center;
    padding: 8px;
}

nav.secondary ul li.selected {
    flex-grow: 3;
}

nav.secondary ul li.selected a {
    border-color: darkgoldenrod;
    background-color: var(--card-bg);
}

.nav-item .framed-image {
    flex-grow: 0;
    width: 0;
    opacity: 0;
    top: -50px;
    /* transition: top ease-in-out 300ms, opacity ease-in-out 600ms; */
}

.nav-item.selected .framed-image {
    top: 0;
    opacity: 1;
    width: 100%;
}

.framed-image::before {
    content: '';
    display: block;
    
    width: 100%;
    height: 80px;

    position: absolute;
    bottom: 0;

    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: center;
}

a.selected > span::before, li.selected a {
    border-color: goldenrod;
}

.card {
    position: relative;
    font-weight: bold;
    color: var(--regular-text);
    letter-spacing: 0.825px;
    filter: grayscale(0.5);
    text-decoration: none;
    text-align: center;
}

.card::before {
    content: ' ';
    display: block;
    width: 100%;
    height: 130px;

    background-position: center;
    background-size: auto 100%;
    background-repeat: no-repeat;

    position: absolute;
    bottom: 24.20px;
    pointer-events: none;

}

.card>span::before {
    z-index: 1;
    content: ' ';
    display: block;

    min-width: 100%;
    height: 100px;

    background: var(--card-bg);
    box-shadow: var(--card-box);
    border: var(--card-border);
    border-radius: 4px;

    transition: ease-in-out 0.5s;
    box-sizing: border-box;
}

.card>span:hover::before, nav.secondary li:hover a {
    background-color: var(--card-bg);
    border-color: darkgoldenrod;
    transition: ease-in-out 0.3s;
}

.card>span:hover::before, a, .nav-image:hover, .nav-item .framed-text:hover {
    cursor: url(./assets/cursor_active.png), auto;
}

.card>span {
    user-select: none;
}

/* .card.selected span::before {
            border-color: #b8860b;
        } */

.card:hover {
    filter: none;
}

/*-------------------
RODAPÉ / FOOTER
-------------------*/
footer {
    position: relative;
    top: 0px;
    width: 100%;
    transition: top ease-in-out 250ms;
}

.socials {
    width: 100%;
    display: flex;
    gap: 8px;
    padding: 3px;
    height: 42px;

    background-color: var(--bg-color);

    border: 2px solid #333;
    border-radius: 4px;
}

.socials>a {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: center;

    height: 100%;
    font-weight: bold;
    color: var(--regular-text);

    border-radius: 2px;

    transition: ease-in-out 0.2s;
}

.socials > a:hover {
    background-color: var(--card-bg);
}

.socials a {
    font-size: 14px;
}

.socials a > svg {
    fill: goldenrod;
    margin-right: 12px;
}


#content-display {
    position: relative;
    transition: min-height ease-in-out 340ms;
}

/*-------------------
CONTEÚDOS 
-------------------*/
.content {
    padding: 0 0 24px 0;
    opacity: 0;
    position: absolute;
    pointer-events: none;
    transition: opacity ease-in 300ms, opacity ease-out 100ms;
}

.content-info {
    margin-bottom: 54px;
}

.content-info h4 {
    font-weight: 400;
}

.content p {
    padding: 8px 0;
    font-size: 1rem;
}

.content.showing {
    position: relative;
    pointer-events: auto;
}

/*-------------------
HABILIDADES
-------------------*/

.skills {
    width: 100%;
}

.skills .skill {
    height: 40px;
    display: flex;
    justify-content: space-between;
}

.skill.framed {
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.skill * {
    flex-grow: 1;
    text-align: center;
}

/*-------------------
PROJETOS
-------------------*/

.project.framed {
    padding: 16px;
}

.projects {
    grid-template-columns: 1fr 1fr !important;
}

.project.soon {
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.project p {
    margin: 8px 0;
    font-size: 0.925rem;
}

.project h4 {
    font-weight: 400;
}

.project-links {
    margin: 16px 0;
}

.badge {
    background-color: var(--bg-color);
    border: var(--card-border);
    border-radius: 3px;
}

.projects ul {
    list-style-type: none;
    display: flex;
    gap: 4px;
}

.projects ul li {
    flex-grow: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    align-items: center;
}

.projects ul li span{
    text-align: center;
    font-size: 0.825rem;
}

.stack li::before {
    content: '';
    display: inline-block;

    height: 24px;
    width: 24px;

    background-repeat: no-repeat;
    background-size: cover;
    background-position: auto 100%;
    margin-right: 4px;
}

.project-links {
    display: flex;
}

.project-links a {
    flex-grow: 1;
    padding: 4px;
}

.project-links a:hover {
    background-color: var(--card-bg);
}

/*-------------------
JORNADA
-------------------*/
.objectives {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.objectives ul {
    list-style: none;
    display: grid;
    gap: 8px;
}

.objectives li {
    position: relative;
    overflow: hidden;
    height: 50px;
    display: flex;
    align-items: center;

    padding: 0 16px;
}

.objectives h3 {
    padding-bottom: 8px;
}

.objectives li::after{
    content: '';
    position: absolute;
    height:80px;
    width: 80px;
    background-size: 100% auto;
    background-repeat: no-repeat;

    margin: 0 8px;
    
    background-position: bottom right;
    right: 0;
}

/* .objectives li::after {
    height:min-content;
    color: rgb(95, 95, 95);
    font-style: italic;
    padding: 0;
    margin: 0;
    content: 'HTML';
    font-weight: bold;
    font-size: 3rem;
    position: absolute;
    right: 0;
    bottom: 0;
} */

/*-------------------
IMAGENS
-------------------*/
.card.meeting-stone::before {
    background-image: url('./assets/meeting_stone.png');
}

.card.toolbox::before {
    background-image: url('./assets/habilidades.png');
}

.card.forging-gnome::before {
    background-image: url('./assets/forging_gnome.png');
}

.card.mountain::before {
    background-image: url('./assets/mountain.png');
}

.habilidades .framed-image::before {
    background-image: url('./assets/secondary-nav/habilidades.png');
}

.projetos .framed-image::before {
    background-image: url('./assets/secondary-nav/projetos.png');
}

.jornada .framed-image::before {
    background-image: url('./assets/secondary-nav/jornada.png');
}

.java::after, .skill.java .framed-image::before {
    background-image: url('./assets/tech-stacks/java.png');
}

.git::after, .skill.git .framed-image::before  {
    background-image: url('./assets/tech-stacks/git.png');
}

.sql::after, .skill.sql .framed-image::before  {
    background-image: url('./assets/tech-stacks/sql.png');
}

.dsa::after, .skill.dsa .framed-image::before  {
    background-image: url('./assets/tech-stacks/dsa.png');
}

.spring::after, .skill.spring .framed-image::before  {
    background-image: url('./assets/tech-stacks/spring.png');
}

.html::after, .skill.html .framed-image::before  {
    background-image: url('./assets/tech-stacks/html.png');
}

.css::after, .skill.css .framed-image::before  {
    background-image: url('./assets/tech-stacks/css.png');
}

/* .stack li.html::before {
    background-image: url('./assets/tech-stacks/html.png');
}

.stack li.css::before {
    background-image: url('./assets/tech-stacks/css.png');
}

.stack li.js::before {
    background-image: url('./assets/tech-stacks/js.png');
} */

body {
    position: relative;
    height: 100dvh;
}

.tooltip {
    opacity: 0;
    pointer-events: none;

    position: absolute;
    right: 12px;
    bottom: 12px;

    display: flex;
    gap: 4px;
    
    color: #fff;
    transition: opacity ease-out 400ms;
}

.tooltip * {
    font-family: 'Friza' !important;
}

.tooltip::before {
    content: '';
    display: block;
    
    width: 36px;
    height: 36px;

    background-origin: border-box;
    background-image: url('./assets/me.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 4px;
    
    border: 7px solid black;
    border-image: url('./assets/border.png');
    border-width:3px;
    border-image-slice: 7 7;
    background-color: var(--bg-color);
}

.tooltip.showing {
    opacity: 1;
}

.tooltip .body {
    padding: 4px;
    margin-bottom: 4px;
}

.tooltip .life {
  height: 8px;
  width: 100%;
  background: green;
  background-image: linear-gradient(to bottom, #004400, #00cd00, #003f00);
}

.bordered {
    border: 7px solid black;
    border-image: url('./assets/border.png');
    border-width: 3px;
    border-image-slice: 7 7;
    background-color: var(--bg-color);
}
/*-------------------
    BREAKPOINTS
-------------------*/
@media only screen and (max-width: 740px) {
    .container {
        width: 100%;
        padding: 0 24px;
    }

    .top-panel .buttons {
        display: none;
    }

    .content .projects {
        grid-template-columns: 1fr !important;
    }
}