/* -------------------------------------------------------------
   HOME / DASHBOARD SPECIFIC STYLES (Tharun R Portfolio)
   Fulfills the modern premium visual dashboard look
   ------------------------------------------------------------- */

/* Hero Grid Layout */
.hero-section {
  position: relative;
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 580px;
}

/* Dynamic Background Grid and Neon Orbs */
.hero-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(68, 82, 254, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 82, 254, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 1;
}

.hero-bg-orbs {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  -webkit-filter: blur(100px);
  opacity: 0.15;
  mix-blend-mode: multiply;
  animation: orbFloat 12s infinite alternate ease-in-out;
}

.orb-1 {
  top: -10%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: var(--primary);
  animation-duration: 10s;
}

.orb-2 {
  bottom: 10%;
  right: 10%;
  width: 350px;
  height: 350px;
  background: var(--secondary);
  animation-delay: 2s;
  animation-duration: 14s;
}

.orb-3 {
  top: 40%;
  left: 60%;
  width: 250px;
  height: 250px;
  background: var(--accent-purple);
  animation-delay: 5s;
  animation-duration: 12s;
}

@keyframes orbFloat {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(30px) scale(1.1); }
}

.hero-left {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Badge style */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--primary-glow);
  border: 1px solid rgba(68, 82, 254, 0.15);
  color: var(--primary);
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.badge-icon {
  width: 14px;
  height: 14px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Title & Dynamic Roles */
.hero-title {
  font-size: 3.6rem;
  color: var(--text-main);
  line-height: 1.1;
}

.name-highlight {
  color: var(--primary);
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-roles {
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  gap: 8px;
  height: 38px;
  overflow: hidden;
  align-items: center;
}

.role-static {
  color: var(--text-muted);
  line-height: 38px;
}

.role-carousel {
  display: inline-flex;
  align-items: center;
  position: relative;
  height: 38px;
  min-width: 320px;
  margin: 0;
  padding: 0;
}

.role-item {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  height: 38px;
  line-height: 38px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.4s ease-in-out, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.4s;
}

.role-item.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
}

.role-item:not(.active) {
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(8px) !important;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 580px;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

/* Stat Section */
.hero-stats {
  display: flex;
  gap: 24px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-num::after {
  content: '+';
  color: var(--primary);
  font-size: 1.5rem;
  margin-left: 2px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
  align-self: center;
}

/* Card Mockup Cluster (Right side visual dashboard feel) */
.hero-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.hero-card-cluster {
  position: relative;
  width: 360px;
  height: 380px;
}

/* 1. Main Profile Card */
.profile-card {
  position: absolute;
  top: 60px;
  left: 50px;
  width: 260px;
  background: var(--surface-base);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  z-index: 10; /* Put in front by default */
  transition: transform var(--transition-normal), z-index var(--transition-normal);
}

.profile-avatar {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
}

.avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px dashed var(--primary);
  animation: rotateClockwise 20s infinite linear;
}

.avatar-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent-purple));
  color: #FFFFFF;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
}

@keyframes rotateClockwise {
  to { transform: rotate(360deg); }
}

.profile-info {
  text-align: center;
}

.profile-info h3 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.profile-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-light);
  font-size: 0.8rem;
  font-weight: 500;
}

.profile-location svg {
  width: 14px;
  height: 14px;
}

/* 2. Floating Tech Bubble Card */
.tech-float-card {
  position: absolute;
  top: 0px;
  right: -10px;
  width: 170px;
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-md);
  z-index: 2; /* Put behind main card by default */
  animation: floatCardY 6s infinite alternate ease-in-out;
  transition: transform var(--transition-normal), z-index var(--transition-normal);
}
.tech-float-card:hover {
  z-index: 11; /* Elevate on hover */
  transform: scale(1.05);
}

.card-header-mini {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-bubbles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-bubble {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--bg-app);
  color: var(--text-muted);
  border-radius: 6px;
}

.tech-bubble.accent {
  background: var(--primary-glow);
  color: var(--primary);
}

/* 3. Floating Activity Card */
.activity-float-card {
  position: absolute;
  bottom: -15px;
  left: -20px;
  width: 190px;
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-md);
  z-index: 2; /* Put behind main card by default */
  animation: floatCardY 6s infinite alternate-reverse ease-in-out;
  animation-delay: 1.5s;
  transition: transform var(--transition-normal), z-index var(--transition-normal);
}
.activity-float-card:hover {
  z-index: 11; /* Elevate on hover */
  transform: scale(1.05);
}

.activity-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.activity-dot.green { background-color: var(--accent-green); }
.activity-dot.blue { background-color: var(--primary); }
.activity-dot.purple { background-color: var(--accent-purple); }

/* 4. CGPA Badge */
.cgpa-badge {
  position: absolute;
  bottom: 45px;
  right: -5px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-glow);
  text-align: center;
  z-index: 2; /* Put behind main card by default */
  animation: floatCardX 5s infinite alternate ease-in-out;
  transition: transform var(--transition-normal), z-index var(--transition-normal);
}
.cgpa-badge:hover {
  z-index: 11; /* Elevate on hover */
  transform: scale(1.05);
}

.cgpa-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.cgpa-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

@keyframes floatCardY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

@keyframes floatCardX {
  0% { transform: translateX(0); }
  100% { transform: translateX(-8px); }
}

.profile-card:hover {
  transform: scale(1.03) translateY(-4px);
  z-index: 12; /* Keep main card most prominent on hover */
}

/* Highlights Section */
.highlights-section {
  padding: 10px 0;
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.highlight-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
}

.hl-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-glow);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hl-icon svg {
  width: 22px;
  height: 22px;
}

.hl-icon.accent { background: rgba(6, 182, 212, 0.08); color: var(--secondary); }
.hl-icon.purple { background: rgba(139, 92, 246, 0.08); color: var(--accent-purple); }
.hl-icon.orange { background: rgba(255, 122, 0, 0.08); color: var(--accent-orange); }

.hl-content {
  flex-grow: 1;
  padding: 0 16px;
}

.hl-content h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}

.hl-content p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
}

.hl-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-light);
  transition: transform var(--transition-fast);
}

.highlight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(68, 82, 254, 0.1);
}

.highlight-card:hover .hl-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* Featured Projects Section */
.featured-section {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-tag {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-title {
  font-size: 2.2rem;
  color: var(--text-main);
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
}

.featured-projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.feat-project-card {
  background: var(--surface-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
  transition: var(--transition-normal);
}

.feat-project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(68, 82, 254, 0.1);
}

.feat-project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.feat-project-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
}

.feat-project-icon.indigo { background: linear-gradient(135deg, var(--primary), var(--accent-purple)); }
.feat-project-icon.cyan { background: linear-gradient(135deg, var(--secondary), #0ea5e9); }
.feat-project-icon.pink { background: linear-gradient(135deg, var(--accent-pink), var(--accent-purple)); }

.feat-project-icon svg {
  width: 20px;
  height: 20px;
}

.feat-project-meta {
  display: flex;
  gap: 6px;
}

.feat-project-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 8px;
  background: var(--bg-app);
  color: var(--text-muted);
  border-radius: 4px;
}

.feat-project-card h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.feat-project-card p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.feat-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.feat-tech-row span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 3px 8px;
  background: var(--bg-app);
  color: var(--primary);
  border-radius: 4px;
  font-weight: 500;
}

.feat-link {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  transition: transform var(--transition-fast);
}

.feat-link:hover {
  transform: translateX(4px);
  color: var(--primary-hover);
}

.view-all-row {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

/* Hackathon Banner */
.hackathon-section {
  padding-bottom: 40px;
}

.hackathon-banner {
  background: linear-gradient(135deg, #1E1B4B, #0F172A);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.hackathon-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hackathon-icon {
  font-size: 2.2rem;
}

.hackathon-text h3 {
  font-size: 1.35rem;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #FCD34D, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hackathon-text p {
  color: #94A3B8;
  font-size: 0.9rem;
}

.hackathon-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hbadge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 30px;
  color: #E2E8F0;
}

/* Responsive Overrides */
@media (max-width: 1024px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 48px 30px;
    gap: 50px;
  }
  
  .hero-left {
    align-items: center;
    text-align: center;
  }
  
  .hero-badge, .hero-roles {
    align-self: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .hero-card-cluster {
    width: 280px;
    height: 320px;
  }
}

@media (max-width: 580px) {
  .hero-title {
    font-size: 2.6rem;
  }
  
  .hero-roles {
    font-size: 1.3rem;
  }
  
  .hero-stats {
    gap: 16px;
  }
  
  .stat-divider {
    display: none;
  }
  
  .hero-card-cluster {
    display: none; /* Hide cluster on very small devices for readability */
  }
}

/* Mobile-specific home page fixes */
@media (max-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 36px 20px;
    gap: 32px;
    min-height: unset;
  }

  .hero-left {
    align-items: center;
    text-align: center;
  }

  .hero-badge, .hero-roles {
    align-self: center;
  }

  .hero-stats {
    justify-content: center;
    gap: 16px;
  }

  .hero-title {
    font-size: 2.4rem;
  }

  .hero-roles {
    font-size: 1.3rem;
    height: 32px;
  }

  .role-carousel {
    min-width: 240px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .hero-card-cluster {
    width: 280px;
    height: 280px;
  }

  .featured-projects {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .feat-project-card {
    min-height: unset;
    padding: 22px;
  }

  .highlights-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hackathon-banner {
    padding: 22px 20px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .hackathon-text h3 {
    font-size: 1.1rem;
  }

  .hbadge {
    font-size: 0.7rem;
    padding: 5px 10px;
  }
}
