/* =====================================================
   personal.css — Personal Showcase Overrides
   Extends style.css with portfolio-specific components
   ===================================================== */

/* ---- HERO: Personal layout ---- */
.personal-hero {
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

/* Greeting + name composition */
.personal-intro {
  margin-bottom: 24px;
}

.intro-greeting {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.personal-headline {
  font-size: clamp(3rem, 6vw, 5rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -0.05em !important;
  margin-bottom: 12px !important;
}

.name-suffix {
  color: var(--text-secondary);
  font-weight: 300;
}

/* Role chips row */
.hero-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.role-chip {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  padding: 4px 12px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  transition: all 0.2s;
}

.role-chip:hover {
  border-color: rgba(255, 107, 53, 0.3);
  color: var(--text-primary);
}

.role-sep {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ---- AVATAR CARD ---- */
.personal-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 520px;
}

.avatar-card {
  position: relative;
  width: 340px;
  flex-shrink: 0;
}

.avatar-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse 4s ease-in-out infinite alternate;
}

@keyframes glowPulse {
  0%   { opacity: 0.7; transform: scale(0.97); }
  100% { opacity: 1;   transform: scale(1.03); }
}

.avatar-frame {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  background: var(--bg-elevated);
  margin: 0 auto;
  position: relative;
  box-shadow:
    0 0 0 6px rgba(255,107,53,0.06),
    0 0 0 12px rgba(255,107,53,0.03),
    var(--shadow-xl);
}

/* Rotating accent ring */
.avatar-frame::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    transparent 0%,
    rgba(255,107,53,0.6) 20%,
    rgba(255,107,107,0.4) 40%,
    transparent 60%,
    rgba(167,139,250,0.3) 80%,
    transparent 100%
  );
  animation: ringRotate 8s linear infinite;
  z-index: -1;
}

@keyframes ringRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.5s var(--ease-out);
}

.avatar-frame:hover .avatar-img {
  transform: scale(1.04);
}

.avatar-badge-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-right: 20px;
}

.avatar-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(163, 230, 53, 0.08);
  border: 1px solid rgba(163, 230, 53, 0.2);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent-lime);
}

.status-dot {
  width: 7px;
  height: 7px;
  background: var(--accent-lime);
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

/* Floating cards on avatar side */
.personal-visual .float-card-1 {
  position: absolute;
  top: 40px;
  right: 0px;
  left: auto;
}

.personal-visual .float-card-3 {
  position: absolute;
  bottom: 150px;
  right: -20px;
  left: auto;
}

/* Personal terminal (smaller, bottom-left of visual) */
.personal-terminal {
  position: absolute;
  bottom: 10px;
  left: 0px;
  width: 240px;
  animation: floatCard 5s ease-in-out infinite alternate;
}

@keyframes floatCard {
  0%   { transform: translateY(0px); }
  100% { transform: translateY(-8px); }
}


.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* ---- WORK CARD enhancements ---- */
.work-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.work-card-tags span {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.work-card-links {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.work-link-gh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.work-link-gh:hover {
  color: var(--text-primary);
}


/* =====================================================
   MASCOT frame (rounded square, not circle)
   ===================================================== */
.mascot-frame {
  width: 300px;
  height: 300px;
  border-radius: 28px;
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-elevated);
  margin: 0 auto;
  position: relative;
  box-shadow:
    0 0 0 6px rgba(255,107,53,0.05),
    0 0 0 14px rgba(255,107,53,0.02),
    var(--shadow-xl);
}
.mascot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease-out);
}
.mascot-frame:hover .mascot-img { transform: scale(1.04); }
.mascot-frame::before { border-radius: 28px; }

/* =====================================================
   IMPACT METRICS SECTION
   ===================================================== */
.impact-section {
  padding: 80px 0;
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 28px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  cursor: default;
}
.metric-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,107,53,0.3), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.metric-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}
.metric-card:hover::before { opacity: 1; }

.metric-card-featured {
  background: linear-gradient(135deg, rgba(255,107,53,0.06), rgba(255,107,107,0.04));
  border-color: rgba(255,107,53,0.2);
}
.metric-card-featured::before { opacity: 1; background: linear-gradient(90deg, transparent, rgba(255,107,53,0.5), transparent); }

.metric-icon {
  width: 40px; height: 40px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-orange);
  margin-bottom: 16px;
}
.metric-value {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--text-primary) 0%, rgba(255,107,53,0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.metric-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.metric-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}



/* =====================================================
   RESPONSIVE adjustments (placed at bottom to prevent overriding)
   ===================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

@media (max-width: 1024px) {
  .personal-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-role {
    justify-content: center;
  }

  .personal-visual {
    order: -1;
    height: 380px;
  }

  .avatar-frame,
  .mascot-frame {
    width: 240px;
    height: 240px;
  }

  .avatar-card {
    width: 100%;
    max-width: 240px;
    flex-shrink: 1;
  }

  .personal-terminal {
    display: none;
  }

  .personal-visual .float-card-1,
  .personal-visual .float-card-3 {
    display: none;
  }

  .about-links {
    justify-content: center;
  }

  .intro-greeting {
    text-align: center;
  }

  .avatar-badge-row {
    justify-content: center;
    padding-right: 0;
  }

  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .personal-headline {
    font-size: clamp(2rem, 8vw, 2.75rem) !important;
  }

  .avatar-frame,
  .mascot-frame {
    width: 200px;
    height: 200px;
  }

  .avatar-card {
    max-width: 200px;
  }

  /* Prevent hero badge text from overflowing */
  .hero-badge {
    font-size: 0.75rem !important;
    padding: 4px 10px !important;
  }

  /* Prevent chips from having separators when wrapping */
  .role-sep {
    display: none !important;
  }

  .hero-role {
    justify-content: center;
    gap: 8px 6px !important;
  }

  /* Optimize paddings for mobile screens to maximize space and prevent overflow */
  .service-card,
  .work-card-content,
  .work-visual-inner,
  .why-card,
  .step-content {
    padding: var(--space-lg) !important;
  }

  .cta-inner {
    padding: var(--space-3xl) var(--space-lg) !important;
  }

  .faq-question {
    font-size: 0.95rem !important;
  }

  /* Scale down stack-category padding to prevent text squishing on mobile */
  .stack-category {
    padding: var(--space-lg) !important;
  }

  /* Increase FAQ active answer max-height on mobile to accommodate wrapped text */
  .faq-item.open .faq-answer {
    max-height: 500px !important;
  }

  /* Ensure code snippets don't stretch layout horizontally */
  .code-snippet {
    overflow-x: auto !important;
  }
  .code-line {
    white-space: nowrap !important;
  }
}

@media (max-width: 640px) {
  .metrics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  /* Give container elements 16px horizontal margins on small devices to prevent wrapping constraints */
  .container, .nav-container {
    padding: 0 var(--space-md) !important;
  }
  .hero {
    padding-left: var(--space-md) !important;
    padding-right: var(--space-md) !important;
  }
}

.hero,
.impact-section,
.why-us,
.services,
.work,
.stack,
.process,
.faq,
.cta-section {
  overflow-x: clip;
}


