/* ---------------- LAYOUT ---------------- */

.portfolio-wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

/* ---------------- HEADER ---------------- */

.portfolio-header {
  margin-bottom: 4rem;
}

.portfolio-header h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.portfolio-header p {
  max-width: 650px;
  margin: 0 auto;
  opacity: 0.85;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ---------------- PROJECT CARD ---------------- */

.project-card {
  margin: 2.5rem auto;
  padding: 2.5rem 2.5rem;
  border-radius: 20px;
  max-width: 850px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.08);
  transition: all 0.3s ease;
}

/* TRUE GLASS EFFECT */

body.dark-theme .project-card {
  background: rgba(0, 0, 0, 0.35); /* more transparent */
  box-shadow: 0 25px 60px rgba(0,0,0,0.6);
  color: #f5f5f5;
}

body.light-theme .project-card {
  background: rgba(255, 255, 255, 0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  color: #111;
}

/* Hover lift */

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 35px 80px rgba(0,0,0,0.7);
}

/* ---------------- LAYOUT FLEX ---------------- */

.project-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 2rem;
  text-align: left;
}

.project-info {
  flex: 1;
}

/* ---------------- TYPOGRAPHY ---------------- */

.project-card h2 {
  font-size: 1.75rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.project-desc {
  margin: 1.8rem 0;
  line-height: 1.75;
  font-size: 1.05rem;
  opacity: 0.95;
}

.project-card ul {
  text-align: left;
  max-width: none;
  margin: 0 0 1.5rem 0;
  padding-left: 1.2rem;
}

.project-card li {
  margin-bottom: 0.75rem;
  opacity: 0.95;
}

/* ---------------- GALLERY ---------------- */

.portfolio-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  justify-content: flex-start;
}

.thumb-container {
  position: relative;
  cursor: pointer;
}

.portfolio-gallery img.thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

body.light-theme .portfolio-gallery img.thumb {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.portfolio-gallery img.thumb:hover {
  transform: scale(1.05);
  border-color: #06b6d4;
}

.magnified-img {
  position: absolute;
  top: 50%;
  right: 120%;
  transform: translateY(-50%);
  width: 600px;
  max-width: 85vw;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #020617;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 100;
  pointer-events: none;
}

body.light-theme .magnified-img {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
}

.thumb-container:hover .magnified-img {
  opacity: 1;
  visibility: visible;
}

/* ---------------- LINKS ---------------- */

.project-links {
  display: flex;
  justify-content: flex-start;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.project-links a {
  font-weight: 600;
  text-decoration: none;
  position: relative;
  transition: all 0.25s ease;
}

body.dark-theme .project-links a {
  color: #6ec1ff;
}

body.light-theme .project-links a {
  color: #0056b3;
}

/* Smooth underline animation */

.project-links a::after {
  content: "";
  position: absolute;
  width: 0%;
  height: 2px;
  left: 0;
  bottom: -4px;
  background: currentColor;
  transition: width 0.3s ease;
}

.project-links a:hover::after {
  width: 100%;
}

/* ---------------- RESPONSIVE ---------------- */

@media (max-width: 768px) {
  .portfolio-wrapper {
    padding: 4rem 1.5rem;
  }

  .project-layout {
    flex-direction: column;
  }

  .portfolio-gallery {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
  }

  .magnified-img {
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    top: auto;
  }

  .project-card {
    padding: 2.5rem 2rem;
  }

  .portfolio-header h1 {
    font-size: 2.2rem;
  }
}