/* ===== HOME PAGE ===== */

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 380px;
  align-items: center;
  gap: 50px;
  padding: 80px 80px 60px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* dot grid bg */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* accent blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  animation: blob-float 10s ease-in-out infinite;
  z-index: 0;
}
.hero-blob-1 { width: 480px; height: 480px; background: rgba(109,40,217,0.06); top: -160px; right: -80px; }
.hero-blob-2 { width: 320px; height: 320px; background: rgba(8,145,178,0.06); bottom: -80px; left: 160px; animation-delay: 4s; }

@keyframes blob-float {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(16px,-24px) scale(1.04); }
}

/* ---- HERO CONTENT ---- */
.hero-content {
  position: relative;
  z-index: 2;
  min-width: 0; /* prevent overflow */
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 8px;
  animation: fade-up 0.6s 0.1s ease forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-badge-dot {
  width: 7px; height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 1.6s ease-in-out infinite;
  box-shadow: 0 0 6px var(--accent-green);
  flex-shrink: 0;
}

@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

.hero-badge span {
  font-size: 0.78rem;
  color: var(--gray-dark);
  font-weight: 500;
  white-space: nowrap;
}

.hero-title {
  font-size: clamp(2.2rem, 3.8vw, 4rem);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -2px;
  color: var(--black);
  margin-bottom: 12px;
  animation: fade-up 0.7s 0.2s ease forwards;
}

.hero-title .name-gradient {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.3rem);
  font-weight: 400;
  color: var(--gray);
  margin-bottom: 18px;
  animation: fade-up 0.7s 0.35s ease forwards;
}

.typed-wrap {
  color: var(--accent);
  font-weight: 600;
  border-right: 2px solid var(--accent);
  padding-right: 3px;
  animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
  0%,100% { border-color: var(--accent); }
  50%      { border-color: transparent; }
}

.hero-desc {
  color: var(--gray);
  font-size: 0.93rem;
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 480px;
  animation: fade-up 0.7s 0.5s ease forwards;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 36px;
  animation: fade-up 0.7s 0.65s ease forwards;
}

.hero-stats {
  display: flex;
  gap: 28px;
  animation: fade-up 0.7s 0.8s ease forwards;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 3px;
}

.stat-number span {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.73rem;
  color: var(--gray-light);
}

.stat-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
}

/* ---- HERO VISUAL ---- */
.hero-visual {
  position: relative;
  z-index: 2;
  animation: fade-in-right 0.8s 0.3s ease forwards;
}

@keyframes fade-in-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.hero-card-main {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-card-main::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
}

.hero-avatar-wrap {
  position: relative;
  width: 140px; height: 140px;
  margin: 0 auto 16px;
}

.hero-avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #6d28d9, #0891b2, #db2777, #6d28d9);
  animation: ring-spin 5s linear infinite;
}

@keyframes ring-spin { to { transform: rotate(360deg); } }

.hero-avatar-ring-inner {
  position: absolute;
  inset: 3px;
  background: var(--white);
  border-radius: 50%;
}

/* Real photo */
.hero-avatar-img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  z-index: 1;
}

.hero-card-name {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 3px;
}

.hero-card-role {
  text-align: center;
  font-size: 0.68rem;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-bottom: 14px;
}

.hero-tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--gray-dark);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.hero-tag:hover,
.hero-tag.accent {
  background: rgba(109,40,217,0.08);
  border-color: rgba(109,40,217,0.22);
  color: var(--accent);
}

.hero-card-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px;
  background: rgba(5,150,105,0.06);
  border: 1px solid rgba(5,150,105,0.14);
  border-radius: 10px;
  font-size: 0.76rem;
  color: var(--accent-green);
  font-weight: 500;
}

.status-dot {
  width: 6px; height: 6px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

/* Floating mini cards */
.float-card {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-md);
  animation: float-card 4s ease-in-out infinite;
  white-space: nowrap;
  z-index: 3;
}

.float-card-1 { top: -16px; left: -50px; animation-delay: 0s; }
.float-card-2 { bottom: 32px; right: -44px; animation-delay: 2s; }

@keyframes float-card {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.float-card-icon {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.float-card-text p:first-child { font-size: 0.7rem; font-weight: 600; color: var(--black); }
.float-card-text p:last-child  { font-size: 0.62rem; color: var(--gray-light); }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: fade-up 0.7s 1s ease forwards;
  z-index: 2;
}

.scroll-mouse {
  width: 20px; height: 32px;
  border: 1.5px solid var(--border-dark);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.scroll-wheel {
  width: 2px; height: 6px;
  background: var(--accent);
  border-radius: 2px;
  animation: scroll-wheel 2s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(9px); opacity: 0; }
}

.scroll-text {
  font-size: 0.62rem;
  color: var(--gray-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ---- SERVICES PREVIEW ---- */
.home-services { background: var(--bg-secondary); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 24px 50px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
  transform: scaleX(0);
  transition: transform 0.35s ease;
  transform-origin: left;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-dark);
  transform: translateY(-6px);
}

.service-card:hover::after { transform: scaleX(1); }

.service-icon {
  width: 50px; height: 50px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.service-card:hover .service-icon { transform: scale(1.1) rotate(5deg); }

.service-card h3 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 9px;
}

.service-card p {
  color: var(--gray);
  font-size: 0.83rem;
  line-height: 1.7;
}

.service-arrow {
  position: absolute;
  bottom: 18px; right: 18px;
  width: 30px; height: 30px;
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray);
  font-size: 0.8rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-arrow {
  background: var(--black);
  color: var(--white);
  transform: rotate(45deg);
}

/* ---- SKILLS MARQUEE ---- */
.home-skills {
  background: var(--bg-primary);
  padding: 80px 0;
}

.home-skills .container { padding: 0 80px; }

.skills-marquee-wrap {
  margin-top: 44px;
  overflow: hidden;
  position: relative;
}

.skills-marquee-wrap::before,
.skills-marquee-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}

.skills-marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-primary), transparent);
}

.skills-marquee-wrap::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-primary), transparent);
}

.skills-marquee {
  display: flex;
  gap: 12px;
  animation: marquee 28s linear infinite;
  width: max-content;
  padding: 4px 0;
}

.skills-marquee-2 {
  animation-direction: reverse;
  animation-duration: 32s;
  margin-top: 12px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.skill-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  padding: 9px 16px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  cursor: default;
}

.skill-pill:hover {
  border-color: var(--accent);
  transform: scale(1.04);
}

.skill-pill-icon { font-size: 1rem; }

.skill-pill-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray-dark);
}

/* ---- CTA ---- */
.home-cta { background: var(--bg-secondary); }

.cta-box {
  background: var(--black);
  border-radius: 24px;
  padding: 72px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 820px;
  margin: 0 auto;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--grad-main);
}

.cta-box::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.cta-box p {
  color: rgba(255,255,255,0.48);
  font-size: 0.95rem;
  margin-bottom: 32px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-box .btn-primary { background: var(--white); color: var(--black); }
.cta-box .btn-primary:hover { background: var(--accent); color: var(--white); }
.cta-box .btn-outline { border-color: rgba(255,255,255,0.2); color: var(--white); }
.cta-box .btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.07); }

/* ===== RESPONSIVE ===== */

/* Large tablet — keep 2 col but smaller */
@media (max-width: 1200px) and (min-width: 1101px) {
  .hero {
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding: 80px 60px 60px;
  }
}

/* Tablet — single column, card shows below */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 100px 50px 60px;
    text-align: center;
    gap: 40px;
  }
  .hero-content  { max-width: 580px; margin: 0 auto; }
  .hero-desc     { margin: 0 auto 28px; }
  .hero-btns     { justify-content: center; }
  .hero-stats    { justify-content: center; }
  .hero-visual   { max-width: 340px; margin: 0 auto; }
  .float-card    { display: none; }
  .scroll-indicator { display: none; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .home-skills .container { padding: 0 50px; }
}

@media (max-width: 768px) {
  .hero { padding: 90px 24px 50px; gap: 36px; }
  .hero-title { letter-spacing: -1px; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }
  .cta-box { padding: 40px 20px; }
  .home-skills .container { padding: 0 24px; }
}

@media (max-width: 480px) {
  .hero { padding: 80px 18px 44px; }
  .hero-stats { flex-wrap: wrap; gap: 14px; }
  .stat-divider { display: none; }
  .hero-visual { max-width: 280px; }
}

/* ---- PROJECTS PREVIEW (Home) ---- */
.home-projects { background: var(--bg-primary); }

.home-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.home-project-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.home-project-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-dark);
  transform: translateY(-6px);
}

.home-project-img {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.home-project-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.home-project-card:hover .home-project-img img {
  transform: scale(1.05);
}

.home-project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.home-project-card:hover .home-project-overlay { opacity: 1; }

.home-project-overlay a {
  background: var(--white);
  color: var(--black);
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(8px);
  transition: transform 0.3s ease, background 0.25s ease;
}

.home-project-card:hover .home-project-overlay a { transform: translateY(0); }

.home-project-overlay a:hover {
  background: var(--accent);
  color: var(--white);
}

.home-project-info {
  padding: 20px 22px 22px;
}

.home-project-type {
  display: inline-block;
  background: rgba(109,40,217,0.08);
  border: 1px solid rgba(109,40,217,0.15);
  color: var(--accent);
  padding: 3px 11px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.home-project-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.home-project-info p {
  font-size: 0.82rem;
  color: var(--gray);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .home-projects-grid { grid-template-columns: 1fr; }
  .home-project-img { height: 180px; }
}
