*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f5f5;
  --text: #121211;
  --muted: #575754;
  --faint: #b0ada5;
  --surface: #ffffff;
  --highlight: #72ff00;
  --underline: #b7b7b7;
  --border: rgba(0,0,0,0.12);
  --max-width: 560px;
}
.dark {
  --bg: #111110;
  --text: #e8e4dc;
  --muted: #888880;
  --faint: #55554f;
  --surface: #1c1c1a;
  --underline: #484848;
  --border: rgba(255,255,255,0.1);
}
html { 
  background: var(--bg); color: var(--text); 
  cursor: url('/img/cursor.png') 0 0, auto;}
body {
  font-family: 'Courier Prime', monospace;
  font-size: 14px;
  line-height: 1.7;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}
a {
  color: var(--text);
  text-underline-offset: 5px;  
  text-decoration-color: var(--underline);
  cursor: url('/img/cursor-pointer.png') 0 0, pointer;
}
a:hover { 
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--highlight);
}
header {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h1 { font-weight: 600; line-height: 2.5rem; }
h1 a { text-decoration: none; }
h1 a:hover { text-decoration: none; text-transform: uppercase; }
h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text);
}
h3 { 
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text);
}
nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.2rem;
  font-size: 0.9rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
}
nav a { text-decoration: none; letter-spacing: 0.05em; }
nav a:hover {
  text-decoration: underline; 
  text-decoration-style: wavy;
  text-decoration-color: var(--highlight); }
nav a.active { text-decoration: underline; }
#theme-toggle {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--faint);
  padding: 0;
  line-height: 1;
}
#theme-toggle:hover { color: var(--text); }
/* POINTER */
#theme-toggle,
figure img,
#lightbox-fechar,
#lightbox-anterior,
#lightbox-proximo,
#guestbook-form button[type="submit"],
.newsletter button[type="submit"] {
  cursor: url('/img/cursor-pointer.png') 0 0, pointer;
}
/* __ HOME __ */
.intro, .about {
  text-align: center;
  font-size: 1.8rem;
  font-family: "Oooh Baby", cursive;
  font-weight: 400;
}
.intro {
  margin-top: 2.5rem;
  line-height: 1.25;
  margin-bottom: 0.9rem;
}
.about {
  line-height: 1;
  padding-bottom: 1rem;
}
.about a:hover {
  color: var(--highlight);
}
#updated {
  text-align: center;
  font-size: 0.6rem;
  color: var(--faint);
}

/* ── Home - Preview galeria ── */
.galeria-preview {
  display: block;
  position: relative;
  height: 280px;
  margin: 3rem auto 4rem;
  max-width: 320px;
  text-decoration: none;
}
.foto {
  position: absolute;
  width: 200px;
  aspect-ratio: 3/4;
  object-fit: cover;
  box-shadow: 2px 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.3s ease;
}
.foto-1 {
  top: 10px;
  left: 0px;
  transform: rotate(-6deg);
  z-index: 1;
}
.foto-2 {
  top: 20px;
  left: 60px;
  transform: rotate(2deg);
  z-index: 3;
}
.foto-3 {
  top: 5px;
  left: 120px;
  transform: rotate(10deg);
  z-index: 2;
}
.galeria-preview:hover .foto-1 { transform: rotate(-9deg) translate(-8px, -4px); }
.galeria-preview:hover .foto-2 { transform: rotate(1deg) translateY(-6px); }
.galeria-preview:hover .foto-3 { transform: rotate(11deg) translate(6px, -4px); }
.galeria-label {
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 80px;
  border-radius: 60%;
  border: 1.5px solid var(--text);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Poppins", sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.3;
  z-index: 10;
  padding: 0.5rem;
}
.galeria-label:hover {
  background: var(--text);
  color: var(--bg);
  border-color: var(--bg);
}
/* ── Hover com imagem ── */
.hover-img {
  position: relative;
}
.hover-img img {
  display: none;
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  width: 220px;
  border-radius: 4px;
  box-shadow: 2px 4px 16px rgba(0,0,0,0.2);
  z-index: 10;
  pointer-events: none;
}
@media (hover: hover) {
  .hover-img:hover img {
    display: block;
  }
  .hover-img:hover {
    opacity: 1;
  }
}
/* ── Newsletter ── */
.newsletter {
  margin-top: 3rem;
  border-top: 0.5px solid var(--border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1rem;
  gap: 0.75rem;
}
.newsletter p {
  width: 100%;
  max-width: 400px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.05em;
}
.newsletter p.subtitle {
  text-transform: uppercase;
  font-size: 0.95rem;
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}
.newsletter form {
  width: 100%;
  max-width: 400px;
  display: flex;
  align-items: center;
  border: 1px solid var(--text);
  border-radius: 999px;
  padding: 0.3rem 0.3rem 0.3rem 1.1rem;
}
.newsletter form:hover {
  background-color: var(--highlight);
}
.newsletter input[type="email"] {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: 'Courier Prime', monospace;
  font-size: 0.85rem;
  outline: none;
  min-width: 0;
}
.newsletter input[type="email"]::placeholder { color: var(--faint); }
.newsletter button[type="submit"] {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.newsletter button[type="submit"]:hover {  
  background: var(--bg);
  color: var(--text); }

/* ── Footer ── */
footer {
  margin-top: 3rem;
  border-top: 0.5px solid var(--border);
  padding-top: 1.5rem;
  font-size: 0.7rem;
  color: var(--faint);
}
footer nav {
  width: 100%;
  font-size: 0.85rem;
}
footer .footer-bottom {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cursor::after {
  content: '_';
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Conteúdo de página ── */
.page-content p {
  margin-bottom:0.8rem;
}
.page-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.page-content li {
  font-size: 0.9rem;
  color: var(--muted);
}
.page-content li a {
  color: var(--text);
}
.page-content hr {
  margin: 1.5rem 0;
  border:0;
  border-bottom: 1px solid var(--border);
}
/* ── Guestbook ── */
#page-guestbook h2 {
  font-family: "Poppins", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
#page-guestbook > p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
#guestbook-form {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
  background-color: var(--surface);
  padding: 2rem 2rem 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.field label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.field .opcional {
  text-transform: none;
  letter-spacing: 0;
  color: var(--faint);
  font-size: 0.7rem;
}

.field-row {
  display: flex;
  gap: 1.5rem;
}
.field-row .field {
  min-width: 0;
}
.field-row .field:first-child {
  flex: 3;
}
.field-row .field:last-child {
  flex: 2;
}
.field input,
.field textarea {
  background: none;
  border: none;
  border-bottom: 0.5px solid var(--border);
  color: var(--text);
  font-family: 'Courier Prime', monospace;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  outline: none;
  resize: none;
}
.field input:focus,
.field textarea:focus {
  border-bottom-color: var(--text);
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--faint);
}
#guestbook-form button[type="submit"] {
  align-self: flex-end;
  background: none;
  border: none;
  font-family: 'Courier Prime', monospace;
  font-size: 0.9rem;
  color: var(--muted);
  padding: 0;
  font-weight:bold;
  padding:0.5rem;
}
#guestbook-form button[type="submit"]:hover {
  color: var(--text);
  background-color: var(--highlight);
}
#mensagens {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.mensagem {
  position: relative;
  padding: 1.25rem;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  min-height: 160px;
}
.mensagem::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background-image: inherit;
  background-size: auto;
  background-repeat: repeat;
  z-index: 0;
}
.dark .mensagem::before {
  filter: brightness(0.35) contrast(1.1);
}
.mensagem p,
.mensagem-footer {
  position: relative;
  z-index: 1;
}
.mensagem p {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
}
.mensagem-footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.mensagem-footer a,
.mensagem-footer span:first-child {
  font-family: "Poppins", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mensagem-footer a:hover {
  opacity: 0.6;
}
.mensagem-data {
  font-size: 0.7rem;
  color: var(--faint);
}

@media (max-width: 600px) {
  #mensagens {
    grid-template-columns: 1fr;
  }
}
/* ── Galeria ── */
.page-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
figure {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
figure img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: opacity 0.2s;
}
figure img:hover { opacity: 0.85; }
figcaption {
  font-size: 0.75rem;
  color: var(--faint);
  letter-spacing: 0.04em;
  text-align:center;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 100;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
#lightbox.ativo {
  display: flex;
}
#lightbox img {
  max-width: 80vw;
  max-height: 90vh;
  object-fit: contain;
}
#lightbox-fechar {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0.7;
}
#lightbox-fechar:hover { opacity: 1; }
#lightbox-anterior,
#lightbox-proximo {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  opacity: 0.5;
  padding: 1rem;
  font-family: 'Courier Prime', monospace;
}
#lightbox-anterior:hover,
#lightbox-proximo:hover { opacity: 1; }
/* __ Página Projetos __*/
#page-projetos p {
  margin-bottom:0;
}
#page-projetos ul {
  gap: 0;
  margin-top: 2rem;
}
#page-projetos ul li:first-child { 
  border-top: 0.5px solid var(--text);
}
#page-projetos ul li { 
  border-bottom: 0.5px solid var(--text);
  padding: 1rem;
  margin:0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#page-projetos ul li:hover { 
  background-color: var(--surface);
}
#page-projetos ul li h3 { 
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  font-size:1.1rem;
  margin-bottom:0;
}
#page-projetos ul li h3 a { 
  text-decoration: none;
}
#page-projetos ul li h3 a:hover { 
  background-color: var(--highlight);
  opacity: 1;
}
.projeto-ano {
  font-size: 0.8rem;
  color: var(--faint);
  white-space: nowrap;
}
#page-projetos li {
  position: relative;
}
#page-projetos li h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
}
.externo {
  font-size: 1em;
  opacity: 0.5;
}
/* __ Página Sobre __ */
.sobre-redes {
  display: flex;
  justify-content: center;
  margin-top:1rem;
  gap: 1.6rem;
  align-items: center;
  margin-bottom: 0.8rem;
}
.sobre-redes .rede-icone {
  width: 2rem;
  height: 2rem;
}
.sobre-redes a:hover .rede-icone {
  opacity: 0.6;
}
.dark .sobre-redes .rede-icone {
  filter: invert(1);
}
/* __ PÁGINA - LINKS __ */
#page-links ul {
  margin: 1rem 0 2rem;
}
#page-links h3 {
  margin-top: 2rem;
}
#page-links #links-categorias li { 
  border:1px solid var(--faint);
  border-left: 15px solid var(--faint);
  padding: 0.5rem;
  font-size:0.8rem;
  background-color: var(--surface);
  position: relative;
}
#page-links #links-categorias li a::after {
  content: '';
  position: absolute;
  inset: 0;
}
#page-links #links-categorias li:first-child {
  font-weight: bold;
}
#page-links #links-categorias li:first-child:hover {
  border-left: 15px solid var(--faint);
}
#page-links #links-categorias li:hover { 
  border:1px solid var(--faint);
  border-left: 5px solid var(--faint);
  padding: 0.5rem;
}
#page-links #links-categorias li:hover a { 
  font-weight: bold;
}
#page-links #links-categorias li a {
  text-decoration: none;
  font-weight:100;
}