@import "template.css";

/* Mirror background pattern for achievements page in light mode */
body {
  background-image: none !important;
  background-color: transparent !important;
}

body::before, body::after {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background-image: url("../images/bg.jpg") !important;
  background-size: cover !important;
  background-position: center !important;
  z-index: -10 !important;
  pointer-events: none !important;
}

/* Left side normal */
body::before {
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%) !important;
}

/* Right side mirrored */
body::after {
  transform: scaleX(-1) !important;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%) !important;
}

body.dark-mode::before, body.dark-mode::after {
  display: none !important;
}

/* Force completely solid black ambient background for achievements page in dark mode */
body.dark-mode {
  background-color: #000000 !important;
}

/* Header Section */
.achievements-header {
  text-align: center;
  margin: 60px auto 30px;
  padding: 0 20px;
}

.achievements-header h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #4da6ff, #00d2ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  font-family: 'Poppins', sans-serif;
}

.achievements-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

body.dark-mode .achievements-header p {
  color: #b3b3b3;
}

/* Bento Gallery Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 60px;
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Light Mode (Default) Gradient */
.bento-item {
  background: linear-gradient(135deg, #ffffff 0%, #f2f2f2 100%);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, background 0.3s ease, border 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 180px;
  overflow: hidden;
}

/* Light Mode Hover Gradient Flip */
.bento-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1), inset 0 0 25px rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #e6e6e6 0%, #ffffff 100%);
  z-index: 10;
}

/* Dark Mode Overrides */
body.dark-mode .bento-item {
  background: #111418;
  border: 1px solid rgba(0, 210, 255, 0.3);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.15), inset 0 0 15px rgba(0, 210, 255, 0.1);
}

body.dark-mode .bento-item:hover {
  background: #111418; /* Solid deep color to match reference image */
  box-shadow: 0 12px 30px rgba(0, 210, 255, 0.3), inset 0 0 25px rgba(0, 210, 255, 0.15);
  border: 1px solid rgba(0, 210, 255, 0.7);
}

/* Click to view badge */
.bento-item::after {
  content: "Click to View";
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 210, 255, 0.2);
  color: #008cc9; /* slightly darker text in light mode */
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

body.dark-mode .bento-item::after {
  color: #00d2ff;
}

.bento-item:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.bento-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

/* Generalized Icon Colors */
.fa-aws { color: #FF9900; }
.fa-python { color: #3776AB; }
.fa-html5 { color: #E34F26; }
.fa-css3-alt { color: #1572B6; }
.fa-js { color: #F7DF1E; }
.fa-java { color: #f89820; }

.icon-blue { color: #4da6ff; }
.icon-dark-blue { color: #00599C; }
.icon-orange { color: #EE4C2C; }
.icon-orange-light { color: #F7931E; }
.icon-yellow { color: #F2C811; }
.icon-green { color: #47A248; }
.icon-purple { color: #6929c4; }
.icon-dark { color: #333333; }
.icon-teal { color: #00758F; }
body.dark-mode .icon-dark { color: #dddddd; }

.bento-content h3 {
  font-size: 1.3rem;
  color: #111111;
  font-weight: 600;
  margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

body.dark-mode .bento-content h3 {
  color: #ffffff;
}

.bento-content p {
  font-size: 0.95rem;
  color: #555555;
  margin: 0;
  font-family: 'Poppins', sans-serif;
  transition: color 0.3s ease;
}

body.dark-mode .bento-content p {
  color: #a0a0a0;
}

/* Grid Spans */
@media (min-width: 768px) {
  .bento-col-2 {
    grid-column: span 2;
  }
}

/* Lightbox Styling */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(255, 255, 255, 0.9); /* light mode default */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

body.dark-mode .lightbox {
  background-color: rgba(0, 0, 0, 0.85);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0,0,0,0.2);
  animation-name: zoomIn;
  animation-duration: 0.3s;
}

body.dark-mode .lightbox-content {
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
}

#lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #111;
  padding: 15px 0;
  height: 50px;
  font-size: 1.2rem;
  letter-spacing: 1px;
}

body.dark-mode #lightbox-caption {
  color: #fff;
}

@keyframes zoomIn {
  from {transform: scale(0.95); opacity: 0}
  to {transform: scale(1); opacity: 1}
}

.close-lightbox {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #333;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

body.dark-mode .close-lightbox {
  color: #f1f1f1;
}

.close-lightbox:hover,
.close-lightbox:focus {
  color: #4da6ff;
  text-decoration: none;
}