/* ============================================================
   HOME PAGE STYLES
   ============================================================ */

/* ── Hero ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 80px;
}

/* Background layers */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.mesh-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(124,58,237,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 20% 70%, rgba(6,182,212,0.15) 0%, transparent 50%),
    radial-gradient(ellipse 40% 50% at 80% 90%, rgba(232,121,249,0.12) 0%, transparent 50%);
}
.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}
[data-theme="light"] .grid-lines {
  background-image:
    linear-gradient(rgba(0,0,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,0.04) 1px, transparent 1px);
}
.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 8s ease-in-out infinite;
}
.orb1 { width: 300px; height: 300px; background: var(--primary); top: 10%; right: 5%; animation-delay: 0s; }
.orb2 { width: 200px; height: 200px; background: var(--accent); bottom: 20%; left: 5%; animation-delay: -3s; }
.orb3 { width: 150px; height: 150px; background: var(--accent2); top: 60%; right: 30%; animation-delay: -6s; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -20px) scale(1.05); }
  66% { transform: translate(-10px, 15px) scale(0.95); }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp8);
  align-items: center;
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Hero Text */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.25);
  font-size: 0.8rem;
  font-weight: 600;
  color: #10b981;
  margin-bottom: var(--sp3);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-green 2s infinite;
}

.hero-name {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--sp2);
  letter-spacing: -0.02em;
}

.hero-role {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 600;
  margin-bottom: var(--sp3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}
.role-static { color: var(--text-muted); }
.role-dynamic {
  color: var(--accent);
  font-family: var(--font-mono);
  border-right: 2px solid var(--accent);
  padding-right: 4px;
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  50% { border-color: transparent; }
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: var(--sp5);
  max-width: 500px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp2);
  margin-bottom: var(--sp5);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: var(--sp3);
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.stat-num {
  font-size: 2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-faint);
  font-weight: 500;
  margin-top: 2px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border2);
}

/* Hero Image */
.hero-image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp4);
}
.hero-image-container {
  position: relative;
  width: 340px;
  height: 340px;
}
.image-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px dashed;
  animation: rotate 12s linear infinite;
}
.ring1 {
  inset: -20px;
  border-color: rgba(124,58,237,0.3);
}
.ring2 {
  inset: -40px;
  border-color: rgba(6,182,212,0.2);
  animation-direction: reverse;
  animation-duration: 20s;
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.image-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,58,237,0.4) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 0;
}
.hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  border: 3px solid rgba(124,58,237,0.4);
  box-shadow: 0 0 60px rgba(124,58,237,0.3);
}
.image-badge {
  position: absolute;
  bottom: 10px;
  right: -10px;
  z-index: 2;
  background: var(--gradient);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(124,58,237,0.4);
}

/* GitHub Card */
.github-card {
  width: 100%;
  max-width: 380px;
  padding: var(--sp3);
}
.github-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp2);
}
.contribution-grid {
  display: grid;
  grid-template-columns: repeat(26, 1fr);
  gap: 2px;
  margin-bottom: var(--sp2);
}
.contrib-cell {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--bg3);
}
.contrib-cell.l1 { background: rgba(124,58,237,0.25); }
.contrib-cell.l2 { background: rgba(124,58,237,0.5); }
.contrib-cell.l3 { background: rgba(124,58,237,0.75); }
.contrib-cell.l4 { background: var(--primary); }

.github-stats-row {
  display: flex;
  gap: var(--sp3);
  font-size: 0.78rem;
  color: var(--text-faint);
}
.github-stats-row i { margin-right: 4px; color: var(--primary-light); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  z-index: 1;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), transparent);
  animation: scrollAnim 2s ease-in-out infinite;
}
@keyframes scrollAnim {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── Marquee ── */
.quick-intro { padding: 0; overflow: hidden; border-top: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.intro-marquee { padding: 18px 0; overflow: hidden; }
.marquee-track {
  display: flex;
  gap: var(--sp3);
  white-space: nowrap;
  animation: marquee 25s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}
.marquee-track .dot { color: var(--primary); }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Featured Projects ── */
.featured-projects { background: var(--bg); }
.projects-grid-home {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp4);
}
.project-card-home {
  overflow: hidden;
}
.project-img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.project-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.project-card-home:hover .project-img-wrap img {
  transform: scale(1.06);
}
.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--t-med);
}
.project-card-home:hover .project-overlay { opacity: 1; }
.overlay-btn {
  padding: 10px 24px;
  border-radius: 50px;
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  transform: translateY(10px);
  transition: transform var(--t-med);
}
.project-card-home:hover .overlay-btn { transform: translateY(0); }

.project-info { padding: var(--sp3); }
.project-info .project-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp2); }
.project-info h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}
.project-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: var(--sp2);
}
.project-links { display: flex; gap: var(--sp2); }
.project-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color var(--t-fast);
}
.project-link:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-container { grid-template-columns: 1fr; text-align: center; }
  .hero-text { display: flex; flex-direction: column; align-items: center; }
  .hero-tagline { text-align: center; }
  .hero-image-wrapper { order: -1; }
  .hero-image-container { width: 260px; height: 260px; }
  .github-card { max-width: 340px; }
  .projects-grid-home { grid-template-columns: 1fr; }
  .hero-stats { justify-content: center; }
  .scroll-indicator { display: none; }
}
@media (max-width: 600px) {
  .hero-cta { justify-content: center; }
  .projects-grid-home { grid-template-columns: 1fr; }
}
