﻿/* ===================================================
   Bùi Anh Quân - Portfolio Landing Page
   Style: Gentle, Minimalist, Modern, Warm & Friendly
   =================================================== */

:root {
  --font-main: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', system-ui, sans-serif;

  /* Palette: Gentle sage, warm amber, soft slate & cloud cream */
  --bg-primary: #faf9f6;
  --bg-secondary: #f3f1ec;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(140, 160, 150, 0.18);
  --border-hover: rgba(16, 185, 129, 0.4);

  --text-main: #24292e;
  --text-muted: #57606a;
  --text-soft: #8c959f;

  --accent-teal: #10b981;
  --accent-teal-soft: rgba(16, 185, 129, 0.12);
  --accent-blue: #0ea5e9;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;

  --gradient-brand: linear-gradient(135deg, #059669 0%, #0284c7 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 25px 60px -15px rgba(0, 0, 0, 0.25);

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* Background Ambient Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: -1;
  opacity: 0.5;
  animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.25), transparent 70%);
  top: -80px;
  left: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 70%);
  top: 35%;
  right: -150px;
  animation-duration: 22s;
}

.glow-3 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 70%);
  bottom: 50px;
  left: 10%;
  animation-duration: 16s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, 30px) scale(1.08); }
  100% { transform: translate(-30px, 50px) scale(0.95); }
}

/* Utilities */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  position: relative;
}

.bg-soft {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3.5rem auto;
}

.section-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-teal);
  background: var(--accent-teal-soft);
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Header & Nav */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(250, 249, 246, 0.88);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 1.15rem;
  font-family: var(--font-display);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--gradient-brand);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-teal);
}

.btn-cv-header {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent-teal-soft);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-cv-header:hover {
  background: var(--accent-teal);
  color: #fff;
  transform: translateY(-1px);
}

.nav-btn {
  text-decoration: none;
  color: #fff;
  background: #1f2937;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition-smooth);
}

.nav-btn:hover {
  background: #0f172a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 4rem 0;
  min-height: calc(100vh - 4.5rem);
  display: flex;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-teal);
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseAnimation 2s infinite;
}

@keyframes pulseAnimation {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 580px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.tag:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-smooth);
}

.btn-cv-highlight {
  background: #111827;
  color: #fff;
  box-shadow: 0 4px 18px rgba(17, 24, 39, 0.25);
}

.btn-cv-highlight:hover {
  background: #030712;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.35);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: #fff;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #fdfdfd;
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
}

/* Avatar Visual */
.avatar-card-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-backdrop {
  position: absolute;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(14, 165, 233, 0.2));
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  animation: morphShape 10s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes morphShape {
  0% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; }
  100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
}

.avatar-card {
  position: relative;
  z-index: 2;
  width: 330px;
  height: 330px;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 4px solid #fff;
  transition: transform var(--transition-smooth);
}

.avatar-card:hover .avatar-img {
  transform: scale(1.02);
}

.avatar-float-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.95rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 3;
  animation: gentleBounce 5s ease-in-out infinite;
}

.avatar-float-badge i {
  font-size: 1.25rem;
  color: var(--accent-teal);
}

.avatar-float-badge small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-soft);
  text-transform: uppercase;
  font-weight: 700;
}

.avatar-float-badge strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
}

.float-top-right {
  top: -15px;
  right: -25px;
  animation-delay: 0s;
}

.float-bottom-left {
  bottom: -20px;
  left: -25px;
  animation-delay: 2.5s;
}

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

/* About / Cards Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.profile-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  text-align: center;
}

.profile-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.card-icon {
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto 1.2rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-teal-soft);
  color: var(--accent-teal);
  border-radius: 50%;
  font-size: 1.2rem;
}

.profile-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.card-highlight {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-display);
  margin-bottom: 0.25rem;
}

.card-sub {
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* Skills Grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.skill-item {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.skill-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.skill-item h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.skill-item span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Timeline / Journey */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 15px;
  bottom: 25px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-teal), rgba(16, 185, 129, 0.2));
}

.timeline-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  position: relative;
}

.step-marker {
  width: 50px;
  height: 50px;
  background: #fff;
  border: 2px solid var(--accent-teal);
  color: var(--accent-teal);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-display);
  font-size: 1.1rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
  z-index: 2;
}

.step-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  flex-grow: 1;
  transition: all var(--transition-smooth);
}

.step-card:hover {
  border-color: var(--border-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.step-time {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.step-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Contact Card */
.contact-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-brand);
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.contact-content p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

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

/* ===================================================
   CV MODAL POPUP STYLING
   =================================================== */
.cv-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cv-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cv-modal-container {
  position: relative;
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cv-modal-backdrop.active .cv-modal-container {
  transform: translateY(0) scale(1);
}

.cv-modal-close {
  position: absolute;
  top: 15px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-fast);
}

.cv-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.cv-paper {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2.75rem 2.5rem;
  box-shadow: var(--shadow-modal);
  border: 1px solid var(--border-subtle);
}

.cv-header {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #eef2f6;
  margin-bottom: 2rem;
}

.cv-avatar-mini {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-teal);
  box-shadow: var(--shadow-sm);
}

.cv-badge {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 800;
  color: var(--accent-teal);
  background: var(--accent-teal-soft);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.4rem;
}

.cv-name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
}

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

.cv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.cv-block {
  margin-bottom: 1.75rem;
}

.cv-block-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #f1f5f9;
}

.cv-block-title i {
  color: var(--accent-teal);
  font-size: 0.95rem;
}

.cv-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cv-list li {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cv-list strong {
  color: var(--text-main);
  min-width: 110px;
  display: inline-block;
}

.cv-highlight-tag {
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
  font-family: var(--font-display);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.cv-sub-item h5 {
  font-size: 0.98rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.2rem;
}

.cv-meta {
  font-size: 0.85rem;
  color: var(--accent-teal);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.cv-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.cv-tags-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cv-skill-pill {
  font-size: 0.82rem;
  font-weight: 600;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
}

.cv-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  padding-top: 1.75rem;
  border-top: 1px solid #eef2f6;
  margin-top: 1rem;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.social-links a {
  color: var(--text-muted);
  font-size: 1.25rem;
  transition: color var(--transition-fast);
}

.social-links a:hover {
  color: var(--accent-teal);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .hero-subtitle {
    margin: 0 auto 1.5rem auto;
  }
  .hero-tags {
    justify-content: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .cv-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .cv-paper {
    padding: 2rem 1.5rem;
  }
  .cv-header {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .nav-links .nav-link {
    display: none;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .avatar-card {
    width: 270px;
    height: 270px;
  }
  .float-top-right {
    right: -10px;
  }
  .float-bottom-left {
    left: -10px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
  .timeline::before {
    left: 20px;
  }
  .step-marker {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
