/* ==========================================================================
   Home Page — Hero, Featured Project, Recent Posts
   ========================================================================== */

/* Hero Section */
.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
}

/* Hero 2-column grid */
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-inner {
  position: relative;
}

/* Profile row */
.hero-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: heroIn 0.6s ease 0.1s forwards;
}

.hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background-clip: padding-box;
  flex-shrink: 0;
  position: relative;
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  transition: outline-color 0.3s ease;
}

.hero-avatar:hover {
  outline-color: var(--color-purple);
}

.hero-profile-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.2;
}

.hero-profile-role {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.3;
}

.hero-profile-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hero-profile-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.hero-profile-status {
  display: none;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-success);
  background: rgba(152, 195, 121, 0.1);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
}

.hero-profile-status.visible {
  display: inline-flex;
}

.hero-profile-location {
  display: none;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--color-text-faint);
}

.hero-profile-location.visible {
  display: inline-flex;
}

.hero-profile-location svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.hero-meta-sep {
  color: var(--color-text-faint);
  font-size: 0.7rem;
}

[data-theme="light"] .hero-profile-status {
  color: var(--color-success);
  background: rgba(34, 136, 85, 0.12);
}

/* Headline */
.hero-headline {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  opacity: 0;
  animation: heroIn 0.6s ease 0.2s forwards;
}

.hero-accent {
  color: var(--color-purple);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  opacity: 0;
  animation: heroIn 0.6s ease 0.3s forwards;
}

/* CTA */
.hero-cta .btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.95rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  opacity: 0;
  animation: heroIn 0.6s ease 0.4s forwards;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Featured Project Card */
.featured-project {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  opacity: 0;
  animation: heroIn 0.6s ease 0.35s forwards;
  color: var(--color-text);
  text-decoration: none;
  background: var(--color-bg-raised);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-purple);
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.featured-project:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.featured-project-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-faint);
}

.featured-project-name {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
}

.featured-project-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.featured-project-desc:empty {
  display: none;
}

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

.featured-project-tech:empty {
  display: none;
}

.featured-project-tech .tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.55rem;
}

.featured-project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
  margin-top: auto;
  padding-top: 0.5rem;
  transition: color var(--transition);
}

.featured-project-link:hover {
  color: var(--color-primary-hover);
}

/* Section spacing */
.hero + .section {
  padding-top: 1.5rem;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-header .section-title {
  margin-bottom: 0;
}

/* Post cards row */
.home-posts-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* Responsive */
@media (max-width: 960px) {
  .hero { padding: 3rem 0 2.5rem; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .featured-project {
    max-width: 400px;
  }
}

@media (max-width: 768px) {
  .hero-cta {
    flex-direction: column;
  }
  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }
  .home-posts-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 1.5rem; }
  .featured-project {
    max-width: 100%;
  }
  .home-posts-row {
    grid-template-columns: 1fr;
  }
}
