/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap');
@import url("../../css/typography.297ff8161de6.css");

/* Style for mobile devices */
@media screen and (max-width: 900px) {
  .container {
    flex-wrap: wrap; /* Allow flex items to wrap */
  }
}

:root {
  /* Fresh Geeky Colors */
  --geek-blue: #0891b2;
  --geek-indigo: #4f46e5;
  --geek-orange: #f97316;
  --geek-green: #10b981;
  --geek-yellow: #f59e0b;
  --bg-grid-color: rgba(0, 0, 0, 0.05);
}

body {
  /* Subtle Dot Grid Background for that "Engineering Paper" or "Schematic" feel */
  background-color: #f8fafc;
  background-image: radial-gradient(var(--bg-grid-color) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Heading */ 

main{
  margin-bottom: 100px;
}

/* Geeky Background Effects */
.geek-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Cover hero area */
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.decor-item {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #cbd5e1; /* Very light slate */
    opacity: 0.15; /* Subtle */
    user-select: none;
    z-index: 0;
}

/* Floating Items Positions */
.item-1 { top: 15%; left: 5%; font-size: 4rem; transform: rotate(-15deg); }
.item-2 { top: 60%; left: 10%; font-size: 3rem; opacity: 0.1; }
.item-3 { top: 20%; right: 10%; font-size: 5rem; color: var(--geek-blue); opacity: 0.05; }
.item-4 { bottom: 20%; right: 20%; font-size: 2.5rem; }
.item-5 { top: 40%; right: 5%; font-size: 1.5rem; transform: rotate(10deg); }
.item-6 { bottom: 10%; left: 30%; font-size: 4rem; opacity: 0.05; }


main .home-part{
  min-height: 60vh; 
  width: 100%;
  padding: 40px 20px;
  position: relative;
  overflow: visible; /* Allow decor to be seen if needed, but usually strictly bounded */
  display: block; /* changed to block to let container handle flex */
}

/* New Wrapper for Centered Content */
.hero-container {
    max-width: 1200px;
    margin: 0 auto; /* CENTER IT */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: relative;
    z-index: 10; /* Above background */
}

/* Geeky Hero Typography */
main .main-heading{
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Align left roughly */
  flex-direction: column; 
  font-family: var(--font-family-base); 
  width: 50%;
  text-align: left;
  z-index: 10;
  padding-right: 20px;
  padding-left: 20px; /* Reduced from 80px for better balance */
}

main .main-heading h1 {
  font-size: var(--font-size-hero);
  font-weight: var(--font-weight-bold);
  background: linear-gradient(135deg, var(--geek-blue) 0%, var(--geek-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  letter-spacing: -2px;
}

main .main-heading h2 {
  font-size: var(--font-size-h3);
  color: #475569;
  font-weight: var(--font-weight-normal);
}

/* Typing cursor effect (simulated with border) */
main .main-heading h2::after {
  content: '_';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

main .image-part{
  width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

/* Add a technological glow behind the image */
main .image-part::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.2) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  z-index: -1;
}

main .image-part img{
  height: 500px;
  width: 500px;
  object-fit: contain;
  /* subtle float animation */
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
  100% { transform: translateY(0px); }
}

@media screen and (max-width: 650px) {
  main .home-part{
    height: auto;
    flex-direction: column-reverse; /* Text on top usually better, but let's stick to layout */
  }
  main .main-heading{
    width: 100%;
    height: auto;
    padding: 20px;
    text-align: center;
    align-items: center;
  }
  main .main-heading h1 {
      font-size: var(--font-size-hero);
  }
  main .image-part{
    height: auto;
    width: 100%;
    margin-bottom: 2rem;
  }
  main .image-part img{
      height: 300px;
      width: 300px;
  }
}

/* Category Scroller Area */
main .category-detail{
  margin-top: 50px;
  max-width: 1200px; /* Constrain to match hero section */
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px; /* Add padding for edge spacing */
  /* height: 100px; */ /* Let content define height */
}

/* Infinite scroller */
.scroller1 {
  max-width: 100%;
}

.scroller1__inner {
  padding-block: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.scroller1[data-animated="true"] {
  overflow: hidden;
  -webkit-mask: linear-gradient(
    90deg,
    transparent,
    white 20%,
    white 80%,
    transparent
  );
  mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

.scroller1[data-animated="true"] .scroller1__inner {
  width: max-content;
  flex-wrap: nowrap;
  animation: scroll var(--_animation-duration, 40s)
    var(--_animation-direction, forwards) linear infinite;
}

.scroller1[data-speed="fast"] {
  --_animation-duration: 30s;
}

@keyframes scroll {
  to {
    transform: translate(calc(50% + 0.75rem));
  }
}

.tag-list {
  margin: 0;
  padding-inline: 0;
  list-style: none;
}

.tag-list li {
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px; /* Slightly squarer for tech look */
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 4px 4px 0px #cbd5e1; /* Retro shadow */
}

.tag-list li:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px var(--geek-blue);
    border-color: var(--geek-blue);
}


/* Feature Content (Cards) */

main .feature-content{
  height: auto;
  margin-top: 80px;
}

main .feature-content .blog-heading{
  text-align: center;
  margin-top: 100px;
  margin-bottom: 50px;
}

main .feature-content .blog-heading h2 {
    font-family: var(--font-family-base);
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    position: relative;
    display: inline-block;
}

/* Underline effect */
main .feature-content .blog-heading h2::after {
    content: '';
    display: block;
    width: 50%;
    height: 4px;
    background: var(--geek-blue);
    margin: 10px auto 0;
}


.feature-content .cards {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center; /* Center cards */
  gap: 2rem;
  margin: 0 auto 5vh auto;
  padding: 0 20px;
  max-width: 1150px; /* Constrain to allow comfortably 3 cards (320*3 + gaps) */
}

.feature-content .card {
  min-height: 360px; 
  width: 320px; 
  flex: 0 0 auto; 
  background-color: #f0f9ff; /* Light Blue Tint - Fresh Look */
  border: 2px solid #e2e8f0; /* Softer border to let bg shine */
  border-radius: 8px; 
  box-shadow: 6px 6px 0px rgba(8, 145, 178, 0.1); /* Blue-ish shadow */
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-content .card:hover {
  transform: translateY(-5px);
  box-shadow: 10px 10px 0px rgba(8, 145, 178, 0.25); 
  border-color: var(--geek-blue); 
}

.feature-content .card a{
  color: #1e293b;
  text-decoration: none;
}

.feature-content .information {
  padding: 1.25rem; /* Compact padding */
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.feature-content .information .tag {
  display: inline-block;
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-xs);
  padding: 0.2em 0.6em;
  border-radius: 4px;
  color: white;
  background-color: #334155; /* Neutral Geeky Tag Background */
  text-transform: uppercase;
  width: fit-content;
  margin-bottom: 0.75rem;
}

.feature-content .information .title {
  font-family: var(--font-family-base);
  font-size: var(--font-size-xl); /* Smaller Title */
  color: #1e293b;
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0.75rem;
}

.feature-content .information .info {
  font-family: var(--font-family-base); 
  font-size: var(--font-size-sm); /* Smaller Text */
  color: #64748b;
  line-height: var(--line-height-normal);
  flex-grow: 1;
  margin-bottom: 1.5rem;
}

.feature-content .information .button {
  width: fit-content; 
  align-self: flex-start; 
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--geek-blue); 
  background: var(--geek-blue); /* Solid Color */
  color: white; /* White Text */
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  margin-top: auto;
  text-transform: uppercase;
  font-size: var(--font-size-sm);
  letter-spacing: 0.5px;
}

.feature-content .information .button:hover {
    background-color: #0e7490; /* Darker Cyan on Hover */
    border-color: #0e7490;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.4);
}

/* Remove Color Variations - Uniform Geeky Look */
.feature-content .card:nth-child(n) {
    border-color: #334155;
}
.feature-content .card:nth-child(n):hover {
    border-color: var(--geek-blue);
}
.feature-content .card:nth-child(n) .information .tag {
    background-color: #334155;
}
.feature-content .card:nth-child(n) .information .button {
    color: var(--geek-blue);
    border-color: var(--geek-blue);
}
.feature-content .card:nth-child(n) .information .button:hover {
    background-color: var(--geek-blue);
    color: white;
}
/* Card Infographics (Geeky Icons) */
.feature-content .card .card-icon {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  opacity: 0.15; /* Subtle geeky watermark feel */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transition: all 0.3s ease;
  z-index: 0;
}

.feature-content .card:hover .card-icon {
  opacity: 0.4; /* Pop on hover */
  transform: scale(1.1) rotate(5deg);
}

/* Default Icon (Generic Code) */
.card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='16 18 22 12 16 6'/%3E%3Cpolyline points='8 6 2 12 8 18'/%3E%3C/svg%3E");
}

/* Specific Topics */
.icon-dynamic-programming-dp {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' /%3E%3Crect x='14' y='3' width='7' height='7' /%3E%3Crect x='14' y='14' width='7' height='7' /%3E%3Crect x='3' y='14' width='7' height='7' /%3E%3C/svg%3E");
}

.icon-string {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8h10M7 12h8M7 16h6'/%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3C/svg%3E");
}

.icon-trie, .icon-tree {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3' /%3E%3Ccircle cx='5' cy='19' r='3' /%3E%3Ccircle cx='19' cy='19' r='3' /%3E%3Cpath d='M12 8v11'/%3E%3Cpath d='M9 19h6'/%3E%3Cpath d='M12 8L5 19'/%3E%3Cpath d='M12 8l7 11'/%3E%3C/svg%3E");
}

.icon-stack {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='19 22 5 22 5 2 19 2 19 22'/%3E%3Cpath d='M5 8h14'/%3E%3Cpath d='M5 14h14'/%3E%3C/svg%3E");
}

.icon-queue {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='6' width='20' height='12' rx='2'/%3E%3Cpath d='M8 6v12'/%3E%3Cpath d='M16 6v12'/%3E%3C/svg%3E");
}

.icon-recursion {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8' /%3E%3Cpath d='M3 3v5h5' /%3E%3Cpath d='M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16' /%3E%3Cpath d='M16 16l5-5l-5-5'/%3E%3Cpath d='M21 21v-5h-5' /%3E%3C/svg%3E");
}

/* Scroll down animations - kept but adjusted */
.scroll-down1, .scroll-down2 {
    display: none; /* Hide for now as they might look old fashioned with the new design */
}