/* section */
.projects {
    max-width: 1200px;
    margin: 0 auto;
}

.projects h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: .3rem;
    letter-spacing: 1px;
}

.projects h3 {
    text-align: center;
    font-weight: normal;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/*grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}


/* card */
.translation-card {
    position: relative;
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
    transition: transform .3s ease, box-shadow .3s ease;
}

.translation-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 5px 20px rgba(124, 92, 255, 0.25),
        0 0 10px rgba(95, 156, 255, 0.15);
}

/* image */
.translation-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease, filter .4s ease;
    
    filter: brightness(.3) blur(1px);
}

.translation-card:hover .translation-image {
    transform: scale(1.08);
    filter: brightness(.5) blur(0px);
}

/* overlay */
.overlay {
    position: absolute;
    inset: 0;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(
        to top,
        rgba(10, 10, 25, 0.95),
        rgba(10, 10, 25, 0.5),
        transparent
    );
}

/* text */
.overlay h2 {
    margin: 0;
    font-size: 1.4rem;
}

.overlay h3 {
    margin: 0 0 .6rem;
    font-size: .9rem;
    color: var(--accent);
    letter-spacing: 1px;
    font-weight: bolder;

}

.overlay p {
    font-size: .85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.overlay h4 {
    font-size: .75rem;
    margin-bottom: 1rem;
    color: #9aa4ff;
}

.overlay h4 a {
    color: var(--accent-soft);
    text-decoration: none;
}

.overlay h4 a:hover {
    text-decoration: underline;
}

.overlay h2, .overlay h3, .overlay p {
    text-shadow: 0 0 5px black;
}

/* button */
.btn {
    align-self: flex-start;
    padding: .5rem 1.2rem;
    font-size: .75rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 999px; /*JW reference because im retarded*/
    background: linear-gradient(135deg, var(--accent), var(--accent-soft));
    color: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(124, 92, 255, 0.4);
}

/* ------ Mobile */
@media (max-width: 768px) {
  #port-menu ul {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
  }

  .project-grid {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .localization-card {
    margin-bottom: 20px;
  }

  .localization-card .overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    padding: 20px;
  }

  .btn {
    padding: 5px;
  }

  .translation-image-wrapper h2 {
    font-size: 1rem;
  }

  .translation-image-wrapper h3 {
    font-size: 0.8rem;
  }

  .translation-image-wrapper h4 {
    font-size: 0.6rem;
  }

  .translation-image-wrapper p {
    font-size: 0.7rem;
  }
}