@import url(https://fonts.googleapis.com/css?family=Work+Sans:400,300,700|Open+Sans:400italic,300italic);

html {
    height: 100%;
}

body {
    background-color: #fff;
    height: 100%;
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.home {
    width: 100%;
    height: 100vh;
    position: relative;
    background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
    background-size: cover;
    background-position: center center;
}

.page-title {
    font-family: "Work Sans", sans-serif;
    color: #fff;
    font-weight: 700;
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 40px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.page-title .page-subtitle-text {
    display: block;
    font-family: "Open Sans", sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    text-transform: none;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* Move titles to the top-left corner on home and about pages */
.home.about .page-title,
.home.skills .page-title, /* Added skills */
.home.works .page-title, /* Added works */
.home.contact .page-title,
section[class="home"] .page-title{ /* Changed to section[class="home"] to be more specific */
    position: absolute;
    top: 3.2rem;
    left: 5rem;
    margin: 0;
    text-align: left;
}

/* Center content on pages */
.home.about,
.home.skills,
.home.contact,
.home.works { /* Adicionado .home.works aqui */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    box-sizing: border-box;
}

.about-card {
    position: relative;
  padding: 2rem;
    max-width: 800px;
    font-family: 'Open Sans', sans-serif;
    background: rgba(0, 0, 0, 1);
  border-radius: 0;
  box-shadow: none;
  transition: transform 80ms linear, background-color 80ms linear, color 80ms linear, border-color 80ms linear;
}

.lang-toggle {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  scale: 150%
}

/* 1) Esconder o checkbox sem removê‑lo do fluxo de cliques */
.lang-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* 2) Estilo do “trilho” do toggle */
.lang-toggle label {
  cursor: pointer;
  display: inline-block;
  width: 72px;
  height: 36px;
  background: #feffff67;               /* cor do estado “off” */
  border-radius: 36px;            /* metade da altura */
  position: relative;
  transition: background 0.3s;
}

/* 3) Estilo do “knob” do toggle */
.lang-toggle label::after {
  content: 'ON';
  content-color: #0d0d0d67;
  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.3s, width 0.3s;
}

/* 1) Knob padrão mostra "PT" */
.lang-toggle label::after {
  content: 'PT';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  color: rgba(13,13,13,0.8);

  position: absolute;
  top: 2px;
  left: 2px;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  transition: left 0.3s;
}

/* 2) Quando o checkbox está marcado, além de mover o knob,
      trocamos o texto pra "ENG" */
.lang-toggle input[type="checkbox"]:checked + label::after {
  content: 'ENG';
}


/* 4) Estado checked — muda a cor do trilho */
.lang-toggle input[type="checkbox"]:checked + label {
  background:  #feffff67;            /* cor do estado “on” */
}

/* 5) Estado checked — move o knob para a direita */
.lang-toggle input[type="checkbox"]:checked + label::after {
  left: calc(100% - 2px - 32px);
}

.lang-toggle input {
  background-color:#ffffff;
}
.lang-toggle label {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  color: #fff;
}

.about-item {
    display: flex;
    align-items: flex-start;
    text-align: left;
    margin-bottom: 2rem;
    margin-top: 2rem;
    color: #fff
}

.about-item:last-child {
    margin-bottom: 0;
}

.about-item svg {
    flex-shrink: 0;
    margin-right: 1.5rem;
    margin-top: 4px;
    width: 28px;
    height: 28px;
    stroke-width: 1.5;
}

.about-item p {
    margin: 0;
    line-height: 1.7;
    font-size: 1.1rem;
    font-weight: 300;
}
 

.toggle-button-container {
  position: relative;
  width: 200px;
  height: 140px;
  box-sizing: border-box;
}

.toggle-button {
  position: relative;
  height: 100px;
  margin: 20px;
  background-color: #c5d6d6;
  box-shadow: 0 10px 20px -8px #c5d6d6;
  border-radius: 4px;
}

.toggle-button:before {
  counter-increment: button-counter;
  content: counter(button-counter);
  position: absolute;
  right: 0;
  bottom: 0;
  color: #c5d6d6;
  font-size: 12px;
  line-height: 1;
  padding: 5px;
}

.knob,
.btn-bg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.btn {
  position: relative;
  top: 50%;
  width: 74px;
  height: 36px;
  margin: -20px auto 0 auto;
  overflow: hidden;
}

.btn.btn-pill,
.btn.btn-pill > .btn-bg {
  border-radius: 100px;
}

.btn.btn-rect {
  border-radius: 2px;
}

.checkbox {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.knob {
  z-index: 2;
}

.btn-bg {
  width: 100%;
  background-color: #c5d6d6;
  transition: 0.3s ease all;
  z-index: 1;
}


#button-1 .checkbox:checked ~ .btn-bg {
  background-color: #fcebeb;
}

#button-1 .knob,
#button-1 .knob:before,
#button-1 .btn-bg {
  transition: 0.3s ease all;
}


/* ====================================
Navigation
==================================== */

.overlay-navigation {
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(0, 0%, 0%, 0.8);
    transform: translateY(-100%);
}

.overlay-slide-down {
    transition: all .4s ease-in-out;
    transform: translateY(0)
}

.overlay-slide-up {
    transition: all .8s ease-in-out;
    transform: translateY(-100%)
}

nav,
nav ul {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    flex-basis: 20%;
    justify-content: center;
    align-items: center;
    height: 100%;
    overflow: hidden;
    transform: translateY(-100%);
}

nav li a {
    position: relative;
    top: 46%;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Work sans', sans-serif;
    font-weight: 300;
    letter-spacing: 4px;
    text-decoration: none;
    display: block;
    text-align: center;
    font-size: 0.9rem;
}

nav li a:before {
    content: '';
    width: 70px;
    height: 2px;
    background-color: #fff;
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 100;
    transform: translateX(-100%);
    opacity: 0;
    transition: all .2s linear;
}

nav li a:after {
    content: attr(data-content);
    font-size: 0.85rem;
    transition: all .2s linear;
    opacity: 0;
    position: absolute;
    z-index: 100;
    color: #fff;
    display: block;
    margin-right: auto;
    margin-left: auto;
    left: 0;
    right: 0;
    bottom: -50px;
    text-transform: none;
    font-family: 'Open sans', serif;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0;
}

nav li a:hover:before {
    transform: translateX(0);
    opacity: 1;
}

nav li a:hover:after {
    transform: translateY(15px);
    opacity: 1;
}

nav li:nth-of-type(1) {
    background-color: #6b74a4
}

nav li:nth-of-type(2) {
    background-color: #a31f1f
}

nav li:nth-of-type(3) {
    background-color: #9f577a
}

nav li:nth-of-type(4) {
    background-color: #d9964f
}

nav li:nth-of-type(5) {
    background-color: #3a746b
}

.slide-in-nav-item {
    animation: slide-in-nav-item 0.4s linear 1 .2s both;
}

.slide-in-nav-item-delay-1 {
    animation: slide-in-nav-item 0.4s linear 1 .4s both;
}

.slide-in-nav-item-delay-2 {
    animation: slide-in-nav-item 0.4s linear 1 .6s both;
}

.slide-in-nav-item-delay-3 {
    animation: slide-in-nav-item 0.4s linear 1 .8s both;
}

.slide-in-nav-item-delay-4 {
    animation: slide-in-nav-item 0.4s linear 1 1s both;
}

.slide-in-nav-item-reverse {
    animation: slide-in-nav-item-reverse .3s linear 1 .5s both;
}

.slide-in-nav-item-delay-1-reverse {
    animation: slide-in-nav-item-reverse .3s linear 1 .4s both;
}

.slide-in-nav-item-delay-2-reverse {
    animation: slide-in-nav-item-reverse .3s linear 1 .3s both;
}

.slide-in-nav-item-delay-3-reverse {
    animation: slide-in-nav-item-reverse .3s linear 1 .2s both;
}

.slide-in-nav-item-delay-4-reverse {
    animation: slide-in-nav-item-reverse .3s linear 1 both;
}


/* ====================================
Burger king
==================================== */

.open-overlay {
    
    scale: 200%;
    position: absolute;
    right: 5rem;
    top: 3.2rem;
    z-index: 300;
    width: 50px;
  
    display: block;
    cursor: pointer;
}

.open-overlay span {
    display: block;
    height: 1px;
    background-color: #ffffff;
    cursor: pointer;
    margin-top: 8px;
}

.animate-top-bar {
    animation: animate-top-bar .6s linear 1 both
}

.animate-bottom-bar {
    animation: animate-bottom-bar .6s linear 1 both
}

.animate-middle-bar {
    animation: animate-middle-bar .6s linear 1 both
}

.animate-out-top-bar {
    animation: animate-out-top-bar .6s linear 1 both
}

.animate-out-bottom-bar {
    animation: animate-out-bottom-bar .6s linear 1 both
}

.animate-out-middle-bar {
    animation: animate-out-middle-bar .6s linear 1 both
}


/* ====================================
Animation keyframes
==================================== */

@keyframes slide-in-nav-item {
    from {
        -webkit-transform: translateY(-100%);
        transform: translateY(-100%)
    }
    to {
        -webkit-transform: translateY(0);
        transform: translateY(0)
    }
}

@keyframes slide-in-nav-item-reverse {
    from {
        -webkit-transform: translateY(0);
        transform: translateY(0)
    }
    to {
        -webkit-transform: translateY(-100%);
        transform: translateY(-100%)
    }
}

@keyframes animate-top-bar {
    0% {
        background-color: #fff;
    }
    50% {
        -webkit-transform: translateY(9px);
        transform: translateY(9px)
    }
    80% {
        -webkit-transform: translateY(5px);
        transform: translateY(5px);
        background-color: #fff
    }

    
}

@keyframes animate-bottom-bar {
    0% {
        background-color: #fff;
    }
    50% {
        -webkit-transform: translateY(-9px);
        transform: translateY(-9px)
    }
    80% {
        -webkit-transform: translateY(-5px);
        transform: translateY(-5px);
        background-color: #fff;
    }

}

@keyframes animate-middle-bar {
    0% {
        background-color: #fff;
    }
    80% {
        background-color: #fff;

    }
}

@keyframes animate-out-top-bar {
 
    
    50% {
        -webkit-transform: translateY(9px);
        transform: translateY(9px)
    }
 
    
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        background-color: #FFF;
    }
}

@keyframes animate-out-bottom-bar {
    0% {
       
    }
    50% {
        -webkit-transform: translateY(-9px);
        transform: translateY(-9px)
    }
    80% {
        -webkit-transform: translateY(-5px);
        transform: translateY(-5px);
        
    }
    100% {
        -webkit-transform: translateY(0);
        transform: translateY(0);
        background-color: #FFF;
    }
}

@keyframes animate-out-middle-bar {


    100% {
        background-color: #fff;
    }
}

.home > a {
    font-family: "Work Sans", sans-serif;
    color: #fff;
    font-weight: 300;
    font-size: 12px;
    text-transform: uppercase;
    text-decoration: none;
    position: absolute;
    z-index: 10;
    top: 50px;
    left: 50px;
    padding-bottom: 3px;
    border-bottom: 1px solid #fff;
}

@media (max-width: 640px) {
    nav ul li a {
        font-size: 11px;
    }

    nav li a:after {
        font-size: 0.75rem;
    }

    .open-overlay {
        right: 1rem;
    }

    nav li a:before {
        width: 15px;
    }
}

/* ====================================
Skills Grid Layout
==================================== */

.skills-grid-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    height: 70%;
    box-sizing: border-box;
    padding: 4rem 2rem;
    margin-top: 6rem;
    scale: 100%;

}


.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* DUAS colunas fixas */
    gap: 2rem;
    width: 100%;
}


/* Estilo para cada card de habilidade individual */
.skill-card {
    background: rgba(0, 0, 0, 0.86); /* Mantém o estilo glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    color: white;
    padding: 2.5rem; /* Adicionado padding para consistência */

    display: flex; /* Adicionado display flex para alinhar ícone e texto */
    flex-direction: column;
    /* Ícone em cima, texto embaixo */
    align-items: center;
    /* Centraliza horizontalmente */
    justify-content: center;
    /* Centraliza verticalmente */
    text-align: center;
    transition: transform 0.2s ease-in-out;
    /* Para um efeito suave no hover */
}


.skill-card:hover {
    transform: translateY(-5px); /* Efeito de elevação no hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* Sombra mais intensa no hover */
    /* Aumenta um pouco o card ao passar o mouse */
}

/* Espaçamento entre o ícone e o título */
.skill-card svg {
    margin-bottom: 1rem;
}

/* Estilo para o título da habilidade */
.skill-card h4 {
    margin: 0;
    /* Remove a margem padrão do h4 */
    font-family: "Work Sans", sans-serif;
    font-weight: 400;
    font-size: 1.1rem;
    color: white;
}

/*
  Posiciona o título especificamente na página de Skills
*/
.home.skills .page-title {
    position: absolute;
    top: 3.2rem;
    /* Distância do topo */
    left: 5rem;
    /* Distância da esquerda */
    margin: 0;
    /* Remove margens extras */
    text-align: left;
    /* Alinha o texto à esquerda */
}

/*
  Ajuste fino para centralizar o texto do card do Docker,
  compensando o alinhamento do ícone SVG.
*/
.skills-grid .skill-card:nth-child(4) h4 {
    position: relative;
    left: 6px;
    /* Experimente ajustar este valor, pode ser 2px ou 4px */
}

/* ====================================
Works Grid Layout
==================================== */

/* Ajuste do título da página WORKS */
.home.works .page-title {
    position: absolute;
    top: 3.2rem;
    left: 5rem;
    margin: 0;
    text-align: left;
}
.works-grid-container {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* ou center, se quiser bem centralizado vertical */
    width: 100%;
    max-width: 1200px;
    padding: 6rem 2rem 4rem; /* mais espaçamento do topo */
    box-sizing: border-box;
}


.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 4 colunas responsivas, mínimo 200px */
    gap: 2.5rem; /* Espaçamento entre os cards */
    width: 100%;
}

.work-card {
    background: rgba(0, 0, 0, 1); /* Mantém o estilo glassmorphism */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 1);
    color: white;
    padding: 1.5rem; /* Ajustado padding para o conteúdo do card de projeto */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 300px; /* Altura mínima para o card para manter consistência */
}

.work-card:hover {
    transform: translateY(-5px); /* Efeito de elevação no hover */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5); /* Sombra mais intensa no hover */
}

.work-card img {
    max-width: 100%;
    height: auto;
    border-radius: 10px; /* Bordas arredondadas para a imagem */
    margin-bottom: 1rem;
    object-fit: cover; /* Garante que a imagem cubra o espaço sem distorção */
    max-height: 150px; /* Altura máxima para as imagens dos projetos */
    width: 100%; /* Garante que a imagem ocupe a largura total disponível */
}

.work-card h3 {
    font-family: "Work Sans", sans-serif;
    font-size: 1.3em;
    color: #ffffff;
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 700; /* Mais destaque para o título do projeto */
}

.work-card p {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95em;
    color: #cccccc;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    flex-grow: 1; /* Permite que o parágrafo ocupe o espaço disponível */
    font-weight: 300;
}

.work-card .project-stack {
    color: #fff;
    font-family: "Work Sans", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.45;
    margin-top: auto;
}

.project-status {
    align-self: center;
    background: #3a746b;
    color: #fff;
    font-family: "Work Sans", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    margin-bottom: 1rem;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
}

.project-status--private {
    background: #6b74a4;
    margin-bottom: 0;
    margin-top: 1rem;
}

.work-card a {
    display: inline-block;
    background-color: #38544530; /* Cor de destaque similar à navegação */
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border-radius: 0px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-family: "Work Sans", sans-serif;
    font-size: 0.9em;
    text-transform: uppercase;
}




/* Media Queries para Responsividade da seção WORKS */
@media (max-width: 1200px) {
    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Mantém 4 ou 3 dependendo do minmax */
    }
}

@media (max-width: 992px) { /* Tablets maiores para 3 colunas */
    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        /* Ajuste para 3 colunas com mais espaço */
    }
    .works-grid-container {
        max-width: 900px;
    }
}

@media (max-width: 768px) { /* Tablets para 2 colunas */
    .works-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        /* Ajuste para 2 colunas */
        gap: 2rem;
    }
    .works-grid-container {
        max-width: 600px;
        padding: 0 1.5rem;
        margin-top: 4rem;
    }
    .page-title { /* Ajuste para títulos em telas menores */
        font-size: 2.5rem;
        top: 2.5rem;
        left: 3rem;
    }
    .home.about .page-title,
    section[class="home"] .page-title {
        top: 2.5rem;
        left: 3rem;
    }
}

@media (max-width: 576px) { /* Celulares para 1 coluna */
    .works-grid {
        grid-template-columns: 1fr;
        /* 1 coluna */
        gap: 1.5rem;
    }
    .works-grid-container {
        max-width: 350px;
        padding: 0 1rem;
        margin-top: 3rem;
    }
    .work-card {
        padding: 1.2rem;
    }
    .work-card img {
        max-height: 120px;
    }
    .work-card h3 {
        font-size: 1.2em;
    }
    .work-card p {
        font-size: 0.9em;
    }
    .work-card a {
        padding: 0.7rem 1.2rem;
        font-size: 0.8em;
    }
    .page-title {
        font-size: 2rem;
        top: 2rem;
        left: 1rem;
    }
    .home.about .page-title,
    section[class="home"] .page-title {
        top: 2rem;
        left: 1rem;
    }
    .open-overlay {
        right: 1rem;
        top: 2rem;
    }
}

.pulse-container{
    position: absolute;
    left: 0;

    bottom: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items:center;
    gap:8px;
    padding: 1rem

}

.pulse-container > p{
    font-family: 'Open Sans', sans-serif;
    color: #FFF;
    scale: 120%;
    font-weight: bold;


}

/* Establish demo area */
html{
	display: flex;
	align-items: center;
  justify-content: center;
	height: 100%;
}
body {
	background-color: #222222;
	align-self: center;
	text-align: center;
}


/* Initiate Auto-Pulse animations */
button.pulse-button {
	animation: borderPulse 1000ms infinite ease-out, colorShift 10000ms infinite ease-in;
    scale: 50%;
    margin: 15px auto;
	font-family: "Montserrat";
	font-size: 20px;
	background-color: #2bff2b;
	cursor: pointer;
	border-radius: 100px;
	padding: 15px 20px;
	border: 0px solid #000;		
	color: #2bff2b
}

/* Initiate color change for pulse-on-hover */
button.pulse-button-hover {
	animation: colorShift 10000ms infinite ease-in;
}

/* Continue animation and add shine on hover */
button.pulse-button:hover,
button.pulse-button:focus {
	animation: borderPulse 1000ms infinite ease-out, colorShift 10000ms infinite ease-in, hoverShine 200ms;
}


/* Declare border pulse animation */
@keyframes borderPulse {
  0% {
    box-shadow: inset 0px 0px 0px 5px rgba(255, 255, 255,.4), 0px 0px 0px 0px rgba(255,255,255,1);
  }
  100% {
    box-shadow: inset 0px 0px 0px 3px rgba(117, 117, 255,.2), 0px 0px 0px 10px rgba(255,255,255,0);
  }
}

background

/* ====================================
Contact Page Specific Styles (Added/Modified)
==================================== */

/* Position the contact page title consistently with other pages */
.home.contact .page-title {
    position: absolute;
    top: 3.2rem;
    left: 5rem;
    margin: 0;
    text-align: left;
}

/* Style for the glassmorphism contact card */
.glassmorphism--contact {
    max-width: 600px; /* Adjust max-width for the contact form card */
    background-color: #000; /* ALTERAÇÃO AQUI: background-color para #000 */    
    border: 2px solid rgba(255, 255, 255, 0.18);
    width: 90%; /* Responsive width */
    padding: 3rem; /* Adjusted padding for the form */
    box-sizing: border-box; /* Include padding in width calculation */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center form elements */
    margin-top: 80px; /* Push down from the page title */
    text-align: center; /* Center text within the card */
}

.contact-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* Space between form groups */
    margin-bottom: 2rem; /* Space before social links */
}

.form-group {
    width: 100%;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Lighter border */
    border-radius: 10px; /* Slightly rounded corners */
    background-color: rgba(255, 255, 255, 0.1); /* Slightly transparent background */
    color: #fff; /* White text */
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    outline: none; /* Remove outline on focus */
    box-sizing: border-box;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6); /* Lighter placeholder text */
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.2); /* Slightly more opaque */
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 120px; /* Minimum height for textarea */
}

.submit-btn {
    display: inline-block;
    background-color: #a31f1f; /* Accent color */
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-family: "Work Sans", sans-serif;
    font-size: 1.1em;
    text-transform: uppercase;
    border: none; /* Remove default button border */
    cursor: pointer;
    align-self: center; /* Center the button within the flex container */
    max-width: 250px; /* Limit button width */
}

.submit-btn:hover {
    background-color: #a31f1f; /* Darker shade on hover */
}

.social-links{
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  color: #ffffff;

}
.social-links a{
  color: #ffffff;
  transition: color 0.3s ease, transform 0.3s ease;

}

.social-links a:hover {
    color: #931f1f; /* Accent color on hover */
    transform: translateY(-3px); /* Slight lift on hover */
}

.social-links svg {
    width: 32px; /* Slightly larger icons for contact */
    height: 32px;
    stroke-width: 1.8; /* Slightly thicker stroke */
}

/* Media Queries for Contact Page (adjusting existing ones as needed) */
@media (max-width: 768px) {
    .glassmorphism--contact {
        padding: 2rem;
        margin-top: 60px;
    }
    .contact-form {
        gap: 1rem;
    }
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    .submit-btn {
        padding: 0.9rem 1.8rem;
        font-size: 1em;
    }
    .social-links {
        gap: 1rem;
    }
    .social-links svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 576px) {
    .glassmorphism--contact {
        padding: 1.5rem;
        margin-top: 40px;
    }
    .contact-form {
        gap: 0.8rem;
    }
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
    .submit-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9em;
    }
    .social-links {
        gap: 0.8rem;
    }
    .social-links svg {
        width: 24px;
        height: 24px;
    }
}
/* Permite rolagem vertical quando o conteúdo cresce */
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* A seção de Skills pode ser maior que a viewport se precisar */
.home.skills {
  height: auto;        /* substitui o 100vh herdado de .home */
  min-height: 100vh;   /* ainda garante no mínimo a altura da tela */
}

/* O “quadrado” deve acompanhar o conteúdo; remova a altura fixa */
.skills-grid-container {
  height: auto;       
  align-items: stretch;
  margin-top: 6rem;    
}

/* Grade realmente responsiva (colunas variam conforme a largura) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* era repeat(3, 1fr) */
  gap: 2rem;
  width: 100%;
}
/* 1) permitir que a página cresça e role */
body { overflow-x: hidden; overflow-y: auto; }

/* 2) skills com altura fluida, mantendo no mínimo 100vh */
.home.skills { height: auto; min-height: 100vh; }

/* 3) container sem altura fixa e com largura responsiva */
.skills-grid-container {
  height: auto;                /* antes: 70% */
  width: min(1120px, 92vw);    /* brutalismo = largura definida e generosa */
  padding: clamp(16px, 4vw, 48px);
  align-items: stretch;
}

/* 4) grid realmente dinâmico (sem travar em 3 colunas) */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

/* 5) brutalizar os cards: sem blur, sem sombra, cantos retos, borda grossa */
.home.skills .glassmorphism {  /* só na página de skills */
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 8px;          /* pode usar 0 se quiser ainda mais duro */
  box-shadow: none;
}

/* 6) cards com estética crua */
.skill-card {
  background: #000000ff;
  border: 2px solid #6d6767ff;
  border-radius: 0;
  box-shadow: none;
  padding: 24px;
  transition: transform 80ms linear, background-color 80ms linear, color 80ms linear, border-color 80ms linear;
}

/* 7) tipografia brutalista */
.skill-card h4 {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* 8) usar as mesmas cores do menu como acentos por card (coerência visual) */
:root {
  --nav-1:#6b74a4; --nav-2:#a31f1f; --nav-3:#9f577a; --nav-4:#d9964f; --nav-5:#3a746b;
}
.skill-card:nth-child(5n+1){ --accent: var(--nav-1); }
.skill-card:nth-child(5n+2){ --accent: var(--nav-2); }
.skill-card:nth-child(5n+3){ --accent: var(--nav-3); }
.skill-card:nth-child(5n+4){ --accent: var(--nav-4); }
.skill-card:nth-child(5n+5){ --accent: var(--nav-5); }

/* 9) interação “seca” de brutalismo (sem glow): leve shift e inversão de cor */
.skill-card:hover {
  transform: translateY(-2px);
  background: var(--accent, #fff);
  color: #111;
  border-color: var(--accent, #fff);
}

/* ====================================
   Responsive baseline
   ==================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  display: block;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

img,
svg {
  max-width: 100%;
}

.home {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: transparent;
  background-image: none;
}

body.home {
  min-height: 100vh;
  min-height: 100dvh;
  background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
}

.home.about,
.home.skills,
.home.contact,
body.home.works {
  height: auto;
  padding: clamp(5.5rem, 11vw, 8rem) clamp(1rem, 5vw, 5rem) clamp(2rem, 6vw, 5rem);
}

.home.about,
.home.skills,
.home.contact {
  justify-content: center;
}

.home.about .page-title,
.home.skills .page-title,
.home.works .page-title,
.home.contact .page-title,
body.home.works .page-title {
  top: clamp(1.5rem, 4vw, 3.2rem);
  left: clamp(1rem, 6vw, 5rem);
  max-width: calc(100% - 7rem);
}

.open-overlay {
  position: fixed;
  top: clamp(1.5rem, 4vw, 3.2rem);
  right: clamp(1rem, 6vw, 5rem);
  width: 4.5rem;
  padding: .7rem;
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 255, 255, .65);
  scale: 1;
}

.open-overlay span {
  height: 2px;
  margin-top: 10px;
}

.open-overlay.menu-open {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.about-card {
  width: min(800px, 100%);
  padding: clamp(1.5rem, 5vw, 2rem);
}

.lang-toggle {
  scale: 1;
}

.skills-grid-container,
.works-grid-container {
  width: min(1200px, 100%);
  max-width: none;
  margin: 0;
}

.skills-grid-container {
  margin-top: 0;
}

.works-grid-container {
  padding: 0;
}

.skills-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.works-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.work-card {
  min-width: 0;
}

.glassmorphism--contact {
  width: min(600px, 100%);
  margin-top: 0;
  padding: clamp(1.25rem, 5vw, 3rem);
}

@media (max-width: 640px) {
  .page-title {
    font-size: clamp(1.9rem, 10vw, 2.5rem);
    letter-spacing: 1px;
  }

  .page-title .page-subtitle-text {
    font-size: clamp(.9rem, 4vw, 1.1rem);
    line-height: 1.45;
  }

  .home.about,
  .home.skills,
  .home.contact,
  body.home.works {
    padding-top: 6.5rem;
  }

  .about-item {
    gap: .9rem;
    margin-block: 1.5rem;
  }

  .about-item svg {
    width: 24px;
    height: 24px;
    margin-right: 0;
  }

  .about-item p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .skills-grid,
  .works-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .skill-card {
    min-height: 100px;
    padding: 1.5rem;
  }

  .work-card {
    min-height: 0;
    padding: 1.25rem;
  }

  .pulse-container {
    position: static;
    justify-content: center;
    margin-top: 1rem;
  }

  .overlay-navigation nav ul {
    flex-direction: column;
  }

  .overlay-navigation nav ul li {
    flex-basis: 20%;
    width: 100%;
  }

  .overlay-navigation nav li a {
    top: 38%;
    font-size: .85rem;
  }

  .overlay-navigation nav li a::before,
  .overlay-navigation nav li a::after {
    display: none;
  }
}

@media (max-width: 360px) {
  .open-overlay {
    width: 3.75rem;
    padding: .6rem;
  }

  .open-overlay span {
    margin-top: 8px;
  }

  .social-links {
    gap: .7rem;
  }
}

/* Mantém todos os projetos visíveis na primeira dobra em desktop. */
@media (min-width: 769px) and (min-height: 700px) {
  body.home.works {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  body.home.works .works-grid-container {
    height: calc(100dvh - clamp(7.5rem, 14vw, 10rem));
  }

  body.home.works .works-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
    height: 100%;
  }

  body.home.works .work-card {
    min-height: 0;
    padding: clamp(1rem, 1.8vw, 1.5rem);
  }

  body.home.works .work-card h3 {
    font-size: clamp(1rem, 1.25vw, 1.3rem);
    margin: 0 0 .55rem;
  }

  body.home.works .work-card p {
    font-size: clamp(.78rem, .95vw, .95rem);
    line-height: 1.4;
    margin: 0 0 .7rem;
  }

  body.home.works .work-card .project-stack {
    font-size: clamp(.68rem, .75vw, .78rem);
  }
}

/* ====================================
   BRUTALIST PORTFOLIO OVERRIDES
   ==================================== */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Black&family=DM+Mono:wght@400;500&display=swap');

:root {
  --ink: #000;
  --paper: #fff;
  --acid: #ed4760;
  --pink: #f78680;
  --blue: #a4c39e;
  --orange: #fff;
  --java-purple: #f78680;
  --cloud-mauve: #ed4760;
  --card-sky: #fff;
  --card-forest: #a4c39e;
  --card-sand: #fff;
  --menu-letter-spacing: 4px;
  --line: 4px solid var(--ink);
}

html { background: var(--paper); }

body,
body.home,
.home {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  background-image: none;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .16;
  pointer-events: none;
  background-image: radial-gradient(var(--ink) .65px, transparent .7px);
  background-size: 5px 5px;
}

.home { background-color: transparent; }

.page-title,
.work-card h3,
.skill-card h4 {
  font-family: 'Archivo Black', Impact, sans-serif;
  font-weight: 900;
  letter-spacing: -.055em;
  text-transform: uppercase;
  text-shadow: none;
}

.page-title {
  z-index: 12;
  color: var(--ink);
  font-size: clamp(2.5rem, 7vw, 6.5rem);
  line-height: .88;
}

.page-title .page-subtitle-text {
  max-width: 37rem;
  color: var(--ink);
  font-family: 'DM Mono', monospace;
  font-size: clamp(.72rem, 1.2vw, 1rem);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.45;
  text-transform: uppercase;
}

/* Home */
section.home:not(.about):not(.skills):not(.contact) {
  display: flex;
  align-items: flex-end;
  padding: clamp(2rem, 6vw, 5rem);
  background: var(--acid);
  border-bottom: var(--line);
}

section.home:not(.about):not(.skills):not(.contact)::after {
  content: 'PORTFOLIO // 2026';
  position: absolute;
  top: 1.8rem;
  right: 8rem;
  border: var(--line);
  background: var(--paper);
  padding: .45rem .65rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
}

section.home:not(.about):not(.skills):not(.contact) .page-title {
  position: static;
  max-width: 12ch;
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 9rem);
}

/* Navigation */
.open-overlay {
  z-index: 300;
  width: 4.25rem;
  padding: .7rem;
  background: var(--ink);
  border: var(--line);
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--pink);
  cursor: pointer;
}

.open-overlay:hover { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--pink); }
.open-overlay span { height: 3px; margin-top: 8px; background: var(--paper); }
.open-overlay.menu-open { background: var(--ink); border-color: var(--ink); }

.overlay-navigation { background: rgba(0, 0, 0, .84); }
nav ul li { border: 0; }
nav li:nth-of-type(1) { background: #29363b; }
nav li:nth-of-type(2) { background: #ea495f; }
nav li:nth-of-type(3) { background: #f4837d; }
nav li:nth-of-type(4) { background: #fdcea9; }
nav li:nth-of-type(5) { background: #99b998; }
nav li a {
  color: #fff;
  font-family: 'Archivo Black', sans-serif;
  font-weight: 900;
  font-size: clamp(.9rem, 1.5vw, 1.3rem);
  letter-spacing: var(--menu-letter-spacing);
}
nav li a::after { color: #fff; }
nav li a::before { background: #fff; }
nav li a::after { color: #fff; font-family: 'DM Mono', monospace; }

/* Inner-page frames */
.home.about,
.home.skills,
.home.contact,
body.home.works {
  background: var(--paper);
  padding: clamp(7rem, 13vw, 10rem) clamp(1rem, 5vw, 5rem) clamp(2rem, 6vw, 5rem);
}

.home.about .page-title,
.home.skills .page-title,
.home.works .page-title,
.home.contact .page-title,
body.home.works .page-title { color: var(--ink); }

.about-card,
.home.skills .glassmorphism,
.glassmorphism--contact {
  background: var(--ink);
  border: var(--line);
  box-shadow: 10px 10px 0 var(--blue);
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.about-card {
  background: rgba(0, 0, 0, .84);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: 14px 14px 0 #000;
  color: #fff;
}
.about-item { color: #fff; border-bottom: 2px solid rgba(247,242,232,.4); padding-bottom: 1rem; }
.about-item svg { color: #e8e8e8; }
.about-item svg { display: none; }
.about-item { gap: 0; }
.lang-toggle { top: .85rem; left: auto; right: 1rem; }
.lang-toggle label { border-radius: 0; background: #3f3f3f; }
.lang-toggle label::after { border-radius: 0; background: #fff; }
.lang-toggle label::after { font-weight: 700; }
.lang-toggle input[type="checkbox"]:checked + label { background: #6a6a6a; }

/* Skills */
.home.skills .glassmorphism {
  background: #000;
  border-color: #000;
  padding: clamp(1rem, 3vw, 2rem);
  box-shadow: none;
}
.skills-grid { gap: 0; }
.skill-card {
  min-height: 130px;
  padding: 1.5rem;
  background: #fff;
  border: 3px solid #000;
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .65);
  color: #000;
  transition: transform .12s ease, background .12s ease;
}
.skill-card:nth-child(n) { background: #fff; }
.skill-card h4 {
  color: #000;
  font-size: clamp(1rem, 1.6vw, 1.35rem);
  letter-spacing: var(--menu-letter-spacing);
}
.skill-card:hover {
  border-color: #000;
  transform: translate(-5px, -5px);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .65);
}
.skill-card:nth-child(5n+1):hover { background: var(--java-purple); }
.skill-card:nth-child(5n+2):hover { background: var(--card-sky); }
.skill-card:nth-child(5n+3):hover { background: var(--cloud-mauve); }
.skill-card:nth-child(5n+4):hover { background: var(--orange); }
.skill-card:nth-child(5n):hover { background: var(--card-forest); }
.skill-card:nth-child(n):hover { background: var(--acid); }
.skill-card:nth-child(n):hover h4 { color: #000; }

/* Projects */
.works-grid { gap: 0; border: var(--line); background: var(--ink); }
.work-card {
  min-height: 290px;
  align-items: flex-start;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  transition: transform .14s ease, background .14s ease;
}
.work-card:nth-child(3n+2),
.work-card:nth-child(3n) { background: var(--paper); }
.work-card:hover { transform: translate(-5px, -5px); box-shadow: 7px 7px 0 var(--ink); }
.work-card:nth-child(1):hover { background: var(--card-forest); }
.work-card:nth-child(2):hover { background: var(--card-sky); }
.work-card:nth-child(3):hover { background: var(--java-purple); }
.work-card:nth-child(4):hover { background: var(--orange); }
.work-card:nth-child(5):hover { background: var(--cloud-mauve); }
.work-card:nth-child(6):hover { background: var(--card-sand); }
.work-card:nth-child(n):hover { background: #9fbd9b; color: var(--ink); }
.work-card:nth-child(n):hover h3,
.work-card:nth-child(n):hover p,
.work-card:nth-child(n):hover .project-stack { color: var(--ink); }

/* Touch devices do not have a persistent hover state, so keep the project
   palette visible there. */
@media (hover: none) {
  .skill-card:nth-child(n) { background: #fff; }
  .skill-card.is-touch-active {
    background: var(--acid);
    border-color: #000;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, .65);
    transform: translate(-5px, -5px);
  }
  .work-card:nth-child(1) { background: var(--card-forest); }
  .work-card:nth-child(2) { background: var(--card-sky); }
  .work-card:nth-child(3) { background: var(--java-purple); }
  .work-card:nth-child(4) { background: var(--orange); }
  .work-card:nth-child(5) { background: var(--cloud-mauve); }
  .work-card:nth-child(6) { background: var(--card-sand); }
}
.work-card h3 {
  color: var(--ink);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  letter-spacing: var(--menu-letter-spacing);
  line-height: 1.08;
  overflow-wrap: anywhere;
  text-align: left;
}
.work-card p, .work-card .project-stack { color: var(--ink); font-family: 'DM Mono', monospace; text-align: left; }
.project-status { border: 2px solid var(--ink); background: var(--ink); color: var(--paper); border-radius: 0; }
.project-status--private { background: var(--ink); }
.work-card a, .submit-btn {
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Archivo Black', sans-serif;
  letter-spacing: .04em;
}
.work-card a:hover, .submit-btn:hover { background: var(--paper); color: var(--ink); }
.pulse-container { display: none; }

/* Contact */
.glassmorphism--contact { background: var(--orange); box-shadow: 10px 10px 0 var(--ink); }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  border: 3px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Mono', monospace;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus { outline: 3px solid var(--blue); box-shadow: none; }
.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
  color: #333;
  opacity: 1;
}
.social-links a { color: var(--ink); }

@media (max-width: 640px) {
  section.home:not(.about):not(.skills):not(.contact)::after { top: 1.4rem; right: 5.75rem; font-size: .55rem; }
  .open-overlay { width: 3.7rem; padding: .55rem; box-shadow: 4px 4px 0 var(--pink); }
  .open-overlay span { margin-top: 7px; }
  nav ul li { border: 0; }
  .home.skills .glassmorphism, .glassmorphism--contact { box-shadow: 6px 6px 0 var(--blue); }
}

/* Background restoration: these targets use the original Unsplash image. */
section.home:not(.about):not(.skills):not(.contact),
body.home.works,
body.home.contact {
  background: #111 url('https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d') center center / cover fixed !important;
}

/* Language control for the projects page, placed directly below the grid. */
.works-language-toggle {
  position: fixed;
  z-index: 20;
  top: clamp(4.5rem, 7vw, 6rem);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
}

.works-language-toggle .lang-toggle {
  position: static;
  scale: 1;
  padding: .35rem .7rem;
  background: rgba(0, 0, 0, .75);
  border: 1px solid rgba(255, 255, 255, .65);
}

.works-language-toggle .lang-toggle label {
  margin: 0;
}

.works-language-toggle .lang-toggle label::after {
  font-weight: 800;
  font-size: .8rem;
}

/* Softer project headings, while retaining enough visual emphasis. */
.work-card h3 {
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
}

/* Skills: a complete, balanced 6 × 6 matrix that remains inside the viewport. */
body.skills-page {
  overflow: hidden;
}

.home.skills {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  box-sizing: border-box;
  padding: clamp(7rem, 14vh, 9.5rem) clamp(1rem, 6vw, 5rem) clamp(1rem, 3vh, 2rem);
}

.home.skills .skills-grid-container {
  width: min(1200px, 100%);
  height: 100%;
  margin: 0;
  padding: clamp(.35rem, 1vw, .75rem);
  box-sizing: border-box;
}

.home.skills .skills-grid {
  height: 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(6, minmax(0, 1fr));
  gap: clamp(4px, .8vw, 10px);
}

.home.skills .skill-card {
  min-height: 0;
  padding: clamp(.25rem, 1vw, .85rem);
  display: grid;
  place-items: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .65);
}

.home.skills .skill-card h4 {
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  letter-spacing: .04em;
  font-size: clamp(.66rem, 1.05vw, 1rem);
  line-height: 1.1;
  overflow-wrap: normal;
  word-break: keep-all;
  position: static;
  left: auto;
}

.work-card h3 {
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  letter-spacing: .06em;
}

@media (max-width: 640px) {
  .home.skills {
    padding: 5.5rem .55rem .55rem;
  }

  .home.skills .skills-grid-container {
    padding: 3px;
  }

  .home.skills .skills-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(9, minmax(0, 1fr));
    gap: 3px;
  }

  .home.skills .skill-card {
    border-width: 1px;
    padding: 2px;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, .65);
  }

  .home.skills .skill-card h4 {
    font-size: clamp(.52rem, 2.3vw, .72rem);
    letter-spacing: 0;
  }
}

/* Keep page headings within the dark portion of the background on phones. */
@media (max-width: 640px) {
  .page-title,
  section.home:not(.about):not(.skills):not(.contact) .page-title {
    font-size: clamp(1.7rem, 7.7vw, 2rem);
    line-height: 1.02;
  }

  .page-title .page-subtitle-text {
    font-size: .72rem;
    line-height: 1.4;
    margin-top: .45rem;
  }
}

/* The title backdrop belongs only to the Home page. */
@media (max-width: 1487px) {
  section.home:not(.about):not(.skills):not(.contact) .page-title {
    background: rgba(0, 0, 0, .55);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .55);
    margin-left: -.55rem;
    margin-top: -.45rem;
    padding: .45rem .55rem;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .78);
  }

  section.home:not(.about):not(.skills):not(.contact) .page-subtitle-text {
    text-shadow: 0 2px 8px rgba(0, 0, 0, .78);
  }
}

/* Faster overlay navigation motion. */
.overlay-slide-down { transition-duration: .38s; }
.overlay-slide-up { transition-duration: .5s; }
.slide-in-nav-item,
.slide-in-nav-item-delay-1,
.slide-in-nav-item-delay-2,
.slide-in-nav-item-delay-3,
.slide-in-nav-item-delay-4,
.slide-in-nav-item-reverse,
.slide-in-nav-item-delay-1-reverse,
.slide-in-nav-item-delay-2-reverse,
.slide-in-nav-item-delay-3-reverse,
.slide-in-nav-item-delay-4-reverse { animation-duration: .38s; }
.slide-in-nav-item { animation-delay: .1s; }
.slide-in-nav-item-delay-1 { animation-delay: .22s; }
.slide-in-nav-item-delay-2 { animation-delay: .34s; }
.slide-in-nav-item-delay-3 { animation-delay: .46s; }
.slide-in-nav-item-delay-4 { animation-delay: .58s; }
.slide-in-nav-item-reverse { animation-delay: .48s; }
.slide-in-nav-item-delay-1-reverse { animation-delay: .36s; }
.slide-in-nav-item-delay-2-reverse { animation-delay: .24s; }
.slide-in-nav-item-delay-3-reverse { animation-delay: .12s; }
.slide-in-nav-item-delay-4-reverse { animation-delay: 0s; }

/* Keep the original atmospheric pages. Brutalism is intentionally limited to
   the navigation overlay and the content cards below. */
body,
body.home,
.home {
  background-color: #fff;
  background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  color: #fff;
  font-family: "Work Sans", sans-serif;
}

body::before { display: none; }

.page-title {
  color: #fff;
  font-family: "Work Sans", sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: normal;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

.page-title .page-subtitle-text {
  color: #fff;
  font-family: "Open Sans", sans-serif;
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 300;
  letter-spacing: 1px;
  text-transform: none;
}

section.home:not(.about):not(.skills):not(.contact) {
  display: block;
  padding: 0;
  background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
  border: 0;
}

section.home:not(.about):not(.skills):not(.contact)::after { content: none; }

section.home:not(.about):not(.skills):not(.contact) .page-title {
  position: absolute;
  top: 3.2rem;
  left: 5rem;
  max-width: none;
  margin: 0 0 40px;
  font-size: 3.5rem;
}

/* Whenever the Home title receives its shaded backdrop, center that complete
   title-and-subtitle block in the viewport rather than at the upper edge. */
@media (max-width: 1487px) {
  section.home:not(.about):not(.skills):not(.contact) .page-title {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.home.about,
.home.skills,
.home.contact,
body.home.works {
  background-color: transparent;
  background-image: none;
}

body.home.contact,
body.home.works {
  background-image: url(https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d);
}

.home.about .page-title,
.home.skills .page-title,
.home.works .page-title,
.home.contact .page-title,
body.home.works .page-title { color: #fff; }

/* Restore the original menu button; only the opened navigation is brutalist. */
.open-overlay {
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: none;
}
.open-overlay:hover { transform: none; box-shadow: none; }
.open-overlay span { height: 2px; margin-top: 10px; background: #fff; }
.open-overlay.menu-open { background: transparent; border-color: transparent; }

/* Component-only brutalist treatments */
.about-card { font-family: 'Open Sans', sans-serif; }
.about-item p { font-family: 'Open Sans', sans-serif; }
.skill-card h4,
.work-card h3 { font-family: 'Archivo Black', Impact, sans-serif; }
.work-card p,
.work-card .project-stack { font-family: 'DM Mono', monospace; }

@media (max-width: 640px) {
  .page-title { font-size: clamp(1.9rem, 10vw, 2.5rem); }
  .page-title .page-subtitle-text { font-size: clamp(.9rem, 4vw, 1.1rem); }
  section.home:not(.about):not(.skills):not(.contact) .page-title {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: fit-content;
    max-width: calc(100% - 2rem);
    margin-left: 0;
    text-align: center;
    font-size: clamp(1.9rem, 10vw, 2.5rem);
  }
}

/* Final background restoration: must remain after all legacy page styles. */
section.home:not(.about):not(.skills):not(.contact),
body.home.works,
body.home.contact {
  background: #111 url('https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d') center center / cover fixed !important;
}

/* Keep project titles lighter than the global Archivo Black treatment. */
.work-card h3 {
  font-family: "Work Sans", sans-serif;
  font-weight: 700;
  letter-spacing: .06em;
}

/* Use one consistent black divider width inside and around the project grid. */
body.home.works .works-grid {
  gap: 3px;
  border-width: 3px;
}

body.home.works .work-card h3 {
  font-size: clamp(.95rem, 1.1vw, 1.15rem);
}

/* Match the 3 px project-grid dividers in the skills matrix. */
.home.skills .skills-grid-container {
  padding: 3px;
  border-width: 3px;
}

.home.skills .skills-grid {
  gap: 3px;
}

.home.skills .skill-card {
  border: 0;
  box-shadow: none;
}

.about-card {
  background: #000;
}

/* Match the project link's compact footprint to the status tags. */
.work-card a {
  align-self: center;
  padding: .5rem .8rem;
  border-width: 2px;
  font-family: "Work Sans", sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: normal;
}

.project-status {
  padding: .5rem .8rem;
  font-size: .8rem;
}

.work-card[data-project-url] {
  cursor: pointer;
  position: relative;
}

.work-card[data-project-url]::after {
  /* Draw the arrow in CSS so phones cannot substitute it with an emoji glyph. */
  content: "";
  position: absolute;
  right: 1rem;
  bottom: .8rem;
  color: var(--ink);
  width: 1rem;
  height: 1rem;
  box-sizing: border-box;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  background: linear-gradient(45deg, transparent 44%, currentColor 45% 55%, transparent 56%);
  opacity: 0;
  transform: translate(-.25rem, .25rem);
  transition: opacity .15s ease, transform .15s ease;
}

.work-card[data-project-url]:hover::after,
.work-card[data-project-url]:focus-visible::after {
  opacity: 1;
  transform: translate(0, 0);
}

.work-card[data-project-url]:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: -6px;
}

/* On mobile, use a fixed viewport layer: background-attachment: fixed is
   unreliable on scrolling elements in iOS Safari and similar browsers. */
@media (max-width: 768px) {
  html { background: #111; }

  body {
    position: relative;
    z-index: 0;
    isolation: isolate;
    background: transparent !important;
  }

  body::before {
    content: "";
    display: block;
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: #111 url('https://images.unsplash.com/photo-1446771326090-d910bfaf00f6?ixlib=rb-0.3.5&q=80&fm=jpg&crop=entropy&s=9216e1a8598a8530ce329b41a8f3725d') center center / cover no-repeat;
  }

  /* These elements previously carried their own moving image. */
  section.home:not(.about):not(.skills):not(.contact),
  body.home.works,
  body.home.contact {
    background: transparent !important;
  }
}

@media (hover: none) {
  .work-card:nth-child(n) {
    background: #9fbd9b;
  }
}

/* Solid black language controls in both states. */
.lang-toggle label,
.lang-toggle input[type="checkbox"]:checked + label,
.works-language-toggle .lang-toggle {
  background: #000;
}

@media (max-width: 768px) {
  .works-language-toggle {
    top: clamp(1.5rem, 4vw, 3.2rem);
    right: calc(clamp(1rem, 6vw, 5rem) + 3.75rem);
    left: auto;
    transform: none;
  }

  body.home.works .works-grid-container {
    margin-top: 0;
  }

  .works-language-toggle .lang-toggle {
    padding: .15rem .25rem;
  }

  .works-language-toggle .lang-toggle label {
    width: clamp(36px, 10vw, 42px);
    height: 24px;
  }

  .works-language-toggle .lang-toggle label::after {
    width: 20px;
    height: 20px;
    font-size: .5rem;
  }

  .works-language-toggle .lang-toggle input[type="checkbox"]:checked + label::after {
    left: calc(100% - 2px - 20px);
  }
}

