/* Custom Styles for Portfolio */

/* Make grid 2 columns explicitly on larger screens if auto-fit is too aggressive */
@media (min-width: 992px) {
  .references-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Services Section Styles */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.service-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  border-color: rgba(225, 78, 202, 0.5);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.service-icon {
  font-size: 2.5rem;
  color: #e14eca; /* Primary pink/purple brand color */
  margin-bottom: 20px;
  height: 60px;
  width: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(225, 78, 202, 0.1);
  border-radius: 50%;
}

.service-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.service-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

/* References Card Grid */
.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.reference-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.reference-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(225, 78, 202, 0.5); /* Primary color accent */
}

.reference-img-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.reference-img-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: rgba(
    0,
    0,
    0,
    0.2
  ); /* Slight dark background for better contrast if image doesn't fill */
  transition: transform 0.5s ease;
}

.reference-card:hover .reference-img-container img {
  transform: scale(1.05);
}

.reference-body {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.reference-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 15px;
}

.reference-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 20px;
}

.reference-footer {
  text-align: center;
  margin-top: auto;
}

/* Skills Section */
.skills-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  max-width: 800px; /* Constrain width to prevent awkward stretching on very wide screens */
  margin-left: auto;
  margin-right: auto;
}

.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(255,255,255,0.6);
  transition: all 0.3s ease;
}

.skill-item:hover {
  color: #e14eca;
  transform: translateY(-3px);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.skill-name {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.skill-item:hover .skill-name {
  opacity: 1;
  transform: translateY(0);
}

/* Ambient Background Settings */
.main {
  position: relative;
  background: transparent; /* Transparent to let body/wrapper background show through */
  overflow: hidden;
}

/* Override section backgrounds to let animation show through */
.section[data-background-color="black"] {
  background: transparent !important;
  position: relative;
  z-index: 2; /* Content sits above the animation */
}

/* Ensure images/paths don't block it too much */
.path {
  opacity: 0.1; 
}

/* Floating Squares Animation */
.bg-squares {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  margin: 0;
  padding: 0;
  z-index: 1; /* Below content but above background */
  pointer-events: none;
}

.bg-squares li {
  position: absolute;
  display: block;
  list-style: none;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1); /* Subtle transparent white */
  animation: animateSquares 50s linear infinite; /* Increased duration for longer travel */
  bottom: -150px;
}

.bg-squares li:nth-child(1) { left: 25%; width: 80px; height: 80px; animation-delay: 0s; }
.bg-squares li:nth-child(2) { left: 10%; width: 20px; height: 20px; animation-delay: 2s; animation-duration: 25s; }
.bg-squares li:nth-child(3) { left: 70%; width: 20px; height: 20px; animation-delay: 4s; }
.bg-squares li:nth-child(4) { left: 40%; width: 60px; height: 60px; animation-delay: 0s; animation-duration: 35s; }
.bg-squares li:nth-child(5) { left: 65%; width: 20px; height: 20px; animation-delay: 0s; }
.bg-squares li:nth-child(6) { left: 75%; width: 110px; height: 110px; animation-delay: 3s; }
.bg-squares li:nth-child(7) { left: 35%; width: 150px; height: 150px; animation-delay: 7s; }
.bg-squares li:nth-child(8) { left: 50%; width: 25px; height: 25px; animation-delay: 15s; animation-duration: 90s; }
.bg-squares li:nth-child(9) { left: 20%; width: 15px; height: 15px; animation-delay: 2s; animation-duration: 70s; }
.bg-squares li:nth-child(10) { left: 85%; width: 150px; height: 150px; animation-delay: 0s; animation-duration: 22s; }

@keyframes animateSquares {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
    border-radius: 0;
  }
  100% {
    transform: translateY(-2500px) rotate(720deg); /* Increased distance */
    opacity: 0;
    border-radius: 0;
  }
}

/* Ensure footer covers the animation */
.footer {
  position: relative;
  z-index: 10;
}

/* JSON Icon Custom Style */
.icon-json {
    font-family: monospace !important;
    font-style: normal !important;
    font-weight: bold !important;
    display: inline-block;
    font-size: 1.8rem; 
    line-height: 1;
    transform: translateY(4px); /* User defined offset */
}
.icon-json::before {
    content: "{ }";
}

/* 
 * Scroll Down Arrow Styles
 * Extracted from assets/demo/demo.css
 */
.ca3-scroll-down-arrow {
	background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQ2hldnJvbl90aGluX2Rvd24iIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjAgMjAiIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDIwIDIwIiBmaWxsPSJ3aGl0ZSIgeG1sbnM6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMTcuNDE4LDYuMTA5YzAuMjcyLTAuMjY4LDAuNzA5LTAuMjY4LDAuOTc5LDBjMC4yNywwLjI2OCwwLjI3MSwwLjcwMSwwLDAuOTY5bC03LjkwOCw3LjgzYy0wLjI3LDAuMjY4LTAuNzA3LDAuMjY4LTAuOTc5LDBsLTcuOTA4LTcuODNjLTAuMjctMC4yNjgtMC4yNy0wLjcwMSwwLTAuOTY5YzAuMjcxLTAuMjY4LDAuNzA5LTAuMjY4LDAuOTc5LDBMMTAsMTMuMjVMMTcuNDE4LDYuMTA5eiIvPjwvc3ZnPg==);
	background-size: contain;
	background-repeat: no-repeat;
}

.ca3-scroll-down-link {
    cursor: default!important;
	height: 60px;
	width: 80px;
	margin: 0px 0 0 -40px;
	line-height: 60px;
	position: absolute;
	left: 50%;
	bottom: 20px;
	color: #FFF;
	text-align: center;
	font-size: 70px;
	z-index: 100;
	text-decoration: none;
	text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.4);

	-webkit-animation: ca3_fade_move_down 2s ease-in-out infinite;
	-moz-animation:    ca3_fade_move_down 2s ease-in-out infinite;
	animation:         ca3_fade_move_down 2s ease-in-out infinite;
}

/*animated scroll arrow animation*/
@-webkit-keyframes ca3_fade_move_down {
  0%   { -webkit-transform:translate(0,-20px); opacity: 0;  }
  50%  { opacity: 1;  }
  100% { -webkit-transform:translate(0,20px); opacity: 0; }
}
@-moz-keyframes ca3_fade_move_down {
  0%   { -moz-transform:translate(0,-20px); opacity: 0;  }
  50%  { opacity: 1;  }
  100% { -moz-transform:translate(0,20px); opacity: 0; }
}
@keyframes ca3_fade_move_down {
  0%   { transform:translate(0,-20px); opacity: 0;  }
  50%  { opacity: 1;  }
  100% { transform:translate(0,20px); opacity: 0; }
}
