/* ===================================================
   MAIN.CSS — HOME PAGE STYLES & INTERACTIVE EFFECTS
   MD Saib Hossain Portfolio
   =================================================== */

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 3.5rem 0;
}

/* Ambient dynamic background */
.spinning-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 25%, rgba(99, 102, 241, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 75% 75%, rgba(6, 182, 212, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.06) 0%, transparent 60%);
  animation: spinSlow 40s linear infinite;
  z-index: 0;
  pointer-events: none;
}

[data-theme="light"] .spinning-bg {
  background:
    radial-gradient(circle at 25% 25%, rgba(79, 70, 229, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 75% 75%, rgba(8, 145, 178, 0.07) 0%, transparent 45%);
}

@keyframes spinSlow {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

/* Letter-by-letter animated hero name */
.hero-name {
  font-size: clamp(2.5rem, 6.5vw, 4.75rem);
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.letter {
  display: inline-block;
  opacity: 0;
  color: var(--text);
}

/* Dynamic typing title */
.hero-title {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  color: var(--text-muted);
  margin: 1rem 0 2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Profile Frame */
.hero-image-wrapper {
  margin: 1.5rem auto 2rem;
  display: flex;
  justify-content: center;
}

.profile-glow {
  position: relative;
  padding: 6px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(6, 182, 212, 0.4));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.profile-glow::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 30px;
  background: var(--gradient-main);
  z-index: -1;
  animation: glowPulse 4s ease-in-out infinite;
  filter: blur(8px);
}

.profile-pic {
  width: clamp(200px, 35vw, 270px);
  height: auto;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  border: 3px solid var(--bg);
  display: block;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* Citation Quote */
.hero-tagline {
  margin: 2rem auto 0;
  max-width: 640px;
  font-style: italic;
  color: var(--text-secondary);
  border-left: 3.5px solid var(--accent);
  padding-left: 1.5rem;
  text-align: left;
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: var(--shadow-sm);
}

.hero-tagline p {
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}

.hero-tagline cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.9rem;
}

/* Scroll hint indicator */
.scroll-hint {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.scroll-arrow {
  width: 20px;
  height: 20px;
  border-right: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(45deg);
  animation: arrowBounce 2s infinite;
}

@keyframes arrowBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
  40% { transform: translateY(8px) rotate(45deg); }
  60% { transform: translateY(4px) rotate(45deg); }
}

/* ===== FUNNY COLUMN & POST-ABOUT HUMOR ===== */
.funny-column {
  max-width: 800px;
  margin: 2rem auto 0;
}

.funny-item {
  padding: 1.25rem 1.75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border-left: 3.5px solid var(--primary);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-sm);
}

.funny-line-post-about {
  margin-top: 2rem;
  padding: 1.25rem 1.75rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.65;
}

/* ===== ABOUT ME SECTION ===== */
.about-content {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  padding: 3rem;
}

.quote-mark {
  position: absolute;
  font-size: 6rem;
  color: var(--primary-glow);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
  opacity: 0.4;
}

.quote-mark:first-of-type {
  top: -1rem;
  left: 0.5rem;
}

.quote-end {
  bottom: -2.5rem;
  right: 0.5rem;
  transform: rotate(180deg);
}

.about-text {
  margin: 1.25rem 0;
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.about-text strong {
  color: var(--text);
  font-weight: 600;
}

/* ===== ONGOING RESEARCH CARDS ===== */
.research-grid-single {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
}

.research-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.research-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.research-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  flex-grow: 1;
}

.research-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  transition: all var(--transition-fast);
}

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

.research-cta {
  grid-column: 1 / -1;
  text-align: center;
  margin-top: 1.5rem;
}

/* ===== ONGOING PROJECTS CARDS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.project-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

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

.projects-cta {
  text-align: center;
  margin-top: 3rem;
}

/* ===== STARTUP VENTURE SECTION ===== */
.startup-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2.5rem;
}

.startup-logo {
  margin-bottom: 1.75rem;
}

.logo-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.75rem;
  background: var(--badge-bg);
  border: 1px solid var(--badge-border);
  border-radius: var(--radius-full);
}

.startup-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.startup-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== COLLABORATION SECTION ===== */
.collab-content {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
  padding: 3.5rem 2.5rem;
}

.collab-text {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin: 1.5rem 0 2.5rem;
  line-height: 1.75;
}

.collab-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: 3rem 0 2rem;
  }
  .about-content {
    padding: 2rem 1.5rem;
  }
  .startup-content, .collab-content {
    padding: 2.5rem 1.5rem;
  }
  .collab-actions .btn {
    width: 100%;
    max-width: 320px;
  }
  .quote-mark {
    font-size: 4rem;
  }
}