/* Base (desktop) */
body {
  background-color: rgba(255, 255, 255, 0.9);
  background-image: url('../assets/noise.png');
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: lighten;
  font-family: Inter, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

/* Disable background on touch/coarse pointers (most mobiles & many tablets) */
@media (hover: none) and (pointer: coarse) {
  body {
    background-image: none !important;
    background-blend-mode: normal;
  }
}

/* Extra safety: disable on narrower viewports (portrait tablets/phones) */
@media (max-width: 1024px) {
  body {
    background-image: none !important;
    background-blend-mode: normal;
  }
}

header {
    margin-top: 30px;
    margin-bottom: 80px;
}

.card-bg-effect {
    background-color: rgba(140, 140, 140, 0.5);
    min-height: 22rem;
    height: auto;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2;
    border: none !important;
}

.card-bg-effect .image-container {
  flex: 0 0 auto;
}

.card-caption {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  min-height: 3.25rem;
  margin-top: auto;
  padding-bottom: 1rem;
}

.card-caption-title {
  flex: 1 1 auto;
  min-width: 0;
}

/* Clamp the visible language span so ellipsis works */
.card-caption-title > .lang-en,
.card-caption-title > .lang-pt {
  white-space: normal;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-bg-effect-small {
    background-color: rgba(140, 140, 140, 0.5);
    height: 9.5rem;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2;
    border: none !important;
}

.resume-card-credentials {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
  line-height: 1.35;
  padding: 0 0.75rem 1.5rem;
  pointer-events: none;
}

.card-bg-effect-stack {
    background-color: rgba(140, 140, 140, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 3;
    border: none !important;
    width: 5rem;
}

.behind-text {
  position: absolute;
  top: -40px;
  left: 40%;
  font-size: 4rem;
  color: rgba(0, 0, 0, 1);
  z-index: 1;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* Photo card: keep a fixed frame and fill it with the image */
.card-bg-effect:has(> .uniform-image-big) {
  height: 22rem;
  min-height: 22rem;
  overflow: hidden;
  padding: 0;
}

/* images */
.uniform-image-big {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  display: block;
}

.stack {
  height: 3rem;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.scrolling-wrapper {
  display: flex;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
  
  /* fade effect at edges */
  -webkit-mask-image: linear-gradient(to right, 
    transparent 0%, 
    black 10%, 
    black 90%, 
    transparent 100%);
  mask-image: linear-gradient(to right, 
    transparent 0%, 
    black 10%, 
    black 90%, 
    transparent 100%);
}

.scrolling-content {
  display: inline-flex;
  white-space: nowrap;
}

/* Cor de fundo quando o switch está ativo */
.form-check-input:checked {
  background-color: rgba(140, 140, 140, 0.5); /* ou uma cor como #28a745 */
  border-color: rgba(140, 140, 140, 0.5);
}

/* Cor do botão (o círculo) */
.form-check-input {
  background-color: #ccc;
  border-color: #ccc;
}

/* Mudar o botão quando estiver ativo */
.form-check-input:checked::before {
  background-color: #fff; /* cor do círculo */
}


/* Animate the words on top */

.andi-title span {
  display: inline-block;
  transition: transform 0.4s ease, opacity 0.4s ease;
  transform: translateY(0);
  opacity: 1;
}

.andi-title span.animate-out {
  transform: translateY(-10px);
  opacity: 0;
}

.andi-title span.animate-in {
  transform: translateY(10px);
  opacity: 0;
  animation: riseUp 0.4s forwards;
}

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

/* Position text below */
.bottom-text {
  font-weight: 600;
  position: absolute; 
  bottom: 1rem; 
  left: 1rem;
}

.bottom-icon {
  position: absolute; 
  bottom: 1rem; 
  right: 1rem;
}

/* The animation code for word inside the card */

.letter {
  display: inline-block;
  transition: transform 0.3s, opacity 0.3s;
}

.animate-out {
  transform: translateY(-50%);
  opacity: 0;
}

.animate-in {
  transform: translateY(20%);
  opacity: 0;
  animation: riseIn 0.3s forwards;
}

@keyframes riseIn {
  from {
    transform: translateY(20%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


@media (max-width: 767.98px) {
  .disappear {
    display: none !important;
  }
}

#animated-text span {
  color: grey;
  opacity: 0.4;
  transition: color 0.3s ease, opacity 0.3s ease;
}

#animated-text span.visible {
  color: black;
  opacity: 1;
}

#animated-text-pt span {
  color: grey;
  opacity: 0.4;
  transition: color 0.3s ease, opacity 0.3s ease;
}

#animated-text-pt span.visible {
  color: black;
  opacity: 1;
}

.fade-line {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.image-container {
  padding: 1rem; /* equivalent to p-3 */
}

.image-zoom-wrapper {
  overflow: hidden;
  width: 100%;
  height: 250px; /* fixed height for consistent card layout */
  border-radius: 0.5rem; /* optional: match card radius */
}

.image-zoom-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

/* Second blog card (UPA): fill the frame, keep the top of the image visible */
.blog-card-upa .image-zoom-wrapper {
  height: 250px;
}

.blog-card-upa .image-zoom-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.card:hover .image-zoom-wrapper img {
  transform: scale(1.1);
}

.filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding-left: 0;
  }

  .filter-item button {
    background-color: #343a40;
    color: #f8f9fa;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .filter-item button.active,
  .filter-item button:hover {
    background-color: #ffc107;
    color: #212529;
  }

  .project-item {
    display: none;
  }

  .project-item.active {
    display: block !important;
  }



  html {
  scroll-behavior: smooth;
}

nav ul li a {
  color: #343a40;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #007bff;
}

table.solver-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
    margin-bottom: 2rem;
  }

  table.solver-table th {
    background-color: #ffc107; /* yellow */
    color: #000;
    padding: 10px;
    border-bottom: 2px solid #000;
    border-right: 1px solid #ccc;
    text-align: left;
  }

  table.solver-table td {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    border-right: 1px solid #ccc;
    vertical-align: top;
  }

  table.solver-table tr:last-child td {
    border-bottom: none;
  }

  table.solver-table th:last-child,
  table.solver-table td:last-child {
    border-right: none;
  }

  .language-python {
  background-color: #f5f5f5;      /* Light gray background */
  color: #2b2b2b;                 /* Dark text for contrast */
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  padding: 1rem;
  border: 1px solid #ddd;
  border-left: 5px solid #ffc107; /* Accent color (yellow) */
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-x: auto;
  line-height: 1.5;
}

/* Optional: Make code lines not wrap horizontally */
.language-python code {
  display: block;
  white-space: pre;
}

h2 {
  color: #ffc107;
}

/* Site footer */
.site-footer-row {
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
}

.site-footer-email a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.site-footer-privacy {
  font-size: 0.75em;
  font-weight: 500;
  opacity: 0.75;
}

.site-footer-privacy:hover {
  opacity: 1;
}

.index-privacy-link {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.55;
  letter-spacing: 0.02em;
}

.index-privacy-link:hover {
  opacity: 0.9;
}

@media (max-width: 767.98px) {
  .site-footer-row {
    font-size: 1rem;
  }

  .site-footer-email {
    text-align: center;
  }

  .site-footer-social {
    text-align: left;
  }
}

.privacy-content h2 {
  color: inherit;
  font-weight: 700;
}

/* Cookie consent banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  display: none;
  padding: 1rem;
  pointer-events: none;
}

#cookie-banner.is-visible {
  display: block;
}

.cookie-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background-color: rgba(140, 140, 140, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  font-family: Inter, Haettenschweiler, "Arial Narrow Bold", sans-serif;
}

.cookie-banner-text {
  margin: 0;
  flex: 1 1 16rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #212529;
  text-align: left;
}

.cookie-banner-link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.cookie-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cookie-btn {
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.cookie-btn-accept {
  background-color: #343a40;
  color: #f8f9fa;
}

.cookie-btn-accept:hover {
  background-color: #ffc107;
  color: #212529;
}

.cookie-btn-reject {
  background-color: transparent;
  color: #212529;
  border: 1px solid rgba(33, 37, 41, 0.35);
}

.cookie-btn-reject:hover {
  background-color: rgba(33, 37, 41, 0.08);
}

@media (max-width: 575.98px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .cookie-banner-text {
    text-align: center;
  }

  .cookie-banner-actions {
    justify-content: center;
  }
}