/* ================================================================
   VAN LE PORTFOLIO — Custom Theme CSS
   Augments Tailwind with bespoke animations & components
   ================================================================ */

/* ── CSS Variables ──────────────────────────────────────────────── */
:root {
  --navy:        #2B2BD4;
  --navy-dark:   #1e1ea0;
  --navy-light:  #4B4BDC;
  --pastel:      #EAF0FB;
  --accent:      #F05A28;
  --accent-lt:   #FF7B50;
  --white:       #ffffff;
  --section-gray: #F3F1F8;
  --text-dark:   #0D0D2B;
  --text-mid:    #3D3D5C;
  --text-muted:  #8892A4;
  --radius-lg:   1.25rem;
  --radius-xl:   1.75rem;
  --shadow-card: 0 4px 32px rgba(43,43,212,0.10);
  --shadow-hover: 0 12px 48px rgba(43,43,212,0.18);
}

/* ── Base Typography ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: 'DM Serif Display', serif; }

/* ── Navbar ─────────────────────────────────────────────────────── */
#navbar {
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  backdrop-filter: blur(0px);
}
#navbar.scrolled {
  background: rgba(255,255,255,0.95) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 24px rgba(43,43,212,0.08);
}
.home
{
  overflow-x: hidden;
}
.nav-link {
  position: relative;
  color: var(--text-mid);
  font-weight: 500;
  font-size: 0.875rem;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 2px;
  background: var(--navy);
  transition: width 0.25s ease;
  border-radius: 2px;
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--navy); }

/* CTA Button */
.btn-primary {
  background: var(--navy);
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: all 0.25s;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--navy-dark);
  box-shadow: 0 6px 24px rgba(43,43,212,0.3);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.25s;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
}
.btn-outline:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-1px);
}

/* ── Hero Section — arc pills layout ────────────────────────────── */

/* Root */
.hero-root {
  background: linear-gradient(160deg, #dce8fc 0%, #EAF0FB 55%, #e0eaff 100%);
  display: flex;
  flex-direction: column;
  min-height: 480px;
  position: relative;
  overflow: hidden;
}

/* Inner: position container cho photo + title + arc */
.hero-inner {
  flex: 1;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: stretch;
  padding-top: 72px; /* navbar */
}

/* ── TITLE: góc trên trái ── */
.hero-title-wrap {
  position: absolute;
  top: 88px;   /* dưới navbar */
  left: 48px;
  z-index: 10;
}
.hero-big-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 900;
  font-style: normal;
  color: var(--text-dark);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}
.hero-greeting {
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.5;
  margin: 0;
}
.hero-greeting strong { font-weight: 800; color: var(--text-dark); }
.hero-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.125rem);
  font-weight: 400;
  color: var(--text-dark);
  font-style: italic;
  margin: 0;
}

/* ── PHOTO: giữa, tự nhiên trên nền ── */
.hero-photo-wrap {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.hero-photo-img {
  width: 480px;
  object-fit: contain;
  object-position: bottom center;
  display: block;
  filter: drop-shadow(0 8px 32px rgba(43,43,212,0.10));
}
/* Placeholder while no photo */
.hero-photo-placeholder {
  height: 360px;
  width: 260px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 1.5rem;
  background: linear-gradient(175deg, rgba(43,43,212,0.07) 0%, rgba(43,43,212,0.15) 100%);
  border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}
.hero-photo-avatar {
  width: 120px; height: 120px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 3.5rem;
  color: white;
  box-shadow: 0 12px 40px rgba(43,43,212,0.25);
  border: 4px solid white;
}

/* ── ARC PILLS: bên phải, xếp vòng cung ── */
.hero-arc-nav {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
  z-index: 10;
}

/* Mỗi pill slide từ phải vào khi load */
.hero-arc-pill {
  width: 200px;
  text-align: center;
  display: inline-block;
  background: rgba(255,255,255,0.88);
  color: var(--text-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.65rem 1.75rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.95);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 16px rgba(43,43,212,0.10);
  /* Arc: translateX âm = thụt vào trái, 0 = sát phải nhất */
  transform: translateX(var(--arc-offset, 0px));
  /* Entrance animation từ phải vào */
  opacity: 0;
  animation: pillSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.2s + var(--arc-index, 0) * 0.09s);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.25s;
}
.hero-arc-pill:hover {
  transform: translateX(calc(var(--arc-offset, 0px) + 18px)) !important;
}

@keyframes pillSlideIn {
  from {
    opacity: 0;
    transform: translateX(calc(var(--arc-offset, 0px) + 80px));
  }
  to {
    opacity: 1;
    transform: translateX(var(--arc-offset, 0px));
  }
}

/* Stats bar đen */
.hero-stats-bar {
  background: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 2rem;
  position: relative;
  z-index: 2;
}
.hero-stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
  padding: 0.2rem 0.5rem;
}
.hero-stat-number {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  color: var(--white);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: rgba(255,255,255,0.42);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  line-height: 1.3;
}
.hero-stat-divider {
  width: 1px;
  height: 2.5rem;
  background: rgba(255,255,255,0.11);
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .hero-inner { min-height: 360px; }
  .hero-title-wrap { top: 82px; left: 24px; }
  .hero-big-title { font-size: 2.5rem; }
  .hero-photo-img { height: 320px; }
  .hero-photo-placeholder { height: 280px; width: 200px; }
  .hero-arc-nav { right: 16px; gap: 0.45rem; }
  .hero-arc-pill { font-size: 0.68rem; padding: 0.55rem 1.25rem; }
}
@media (max-width: 560px) {
  .hero-inner { min-height: 300px; }
  .hero-title-wrap { top: 80px; left: 16px; }
  .hero-big-title { font-size: 2rem; }
  .hero-photo-wrap { left: 40%; }
  .hero-photo-placeholder { height: 220px; width: 150px; }
  .hero-arc-nav { right: 8px; gap: 0.35rem; }
  .hero-arc-pill { font-size: 0.6rem; padding: 0.45rem 0.9rem; letter-spacing: 0.08em; }
  .hero-stat-item { padding: 0.2rem 0.25rem; }
  .hero-stat-divider { display: none; }
}

/* ── Section Titles ──────────────────────────────────────────────── */
.section-tag {
  display: inline-block;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  color: var(--text-dark);
  line-height: 1.18;
}
.section-lead {
  color: var(--text-muted);
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 580px;
}

/* ── About Section ───────────────────────────────────────────────── */
#about { background: var(--white); }

.skill-bar-wrapper { margin-bottom: 1rem; }
.skill-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 0.35rem;
}
.skill-bar-track {
  height: 8px;
  background: var(--section-gray);
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.skill-bar-fill.accent-bar {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-lt) 100%);
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--pastel);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(43,43,212,0.12);
  margin: 0.2rem;
  transition: all 0.2s;
}
.tool-chip:hover {
  background: var(--navy);
  color: var(--white);
  transform: translateY(-1px);
}

/* Education card */
.edu-card {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.edu-card::before {
  content: '';
  position: absolute;
  top: -30%; right: -20%;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

/* ── Services Section ─────────────────────────────────────────────── */
#services { background: var(--section-gray); }

.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  border: 1px solid rgba(43,43,212,0.07);
  box-shadow: var(--shadow-card);
  transition: all 0.3s cubic-bezier(.4,0,.2,1);
  position: relative;
  overflow: hidden;
  cursor: default;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 0;
  background: linear-gradient(180deg, var(--navy), var(--accent));
  transition: height 0.35s ease;
  border-radius: 0 0 4px 4px;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(43,43,212,0.15);
}
.service-card:hover::before { height: 100%; }
.service-icon {
  width: 56px; height: 56px;
  background: var(--pastel);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: background 0.25s;
}
.service-card:hover .service-icon {
  background: var(--navy);
}
.service-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: var(--pastel);
  color: var(--navy);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin: 0.15rem 0.1rem;
}

/* ── Portfolio Section ────────────────────────────────────────────── */
#portfolio { background: var(--white); }

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.filter-btn {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid rgba(43,43,212,0.15);
  background: var(--white);
  color: var(--text-mid);
  transition: all 0.2s;
}
.filter-btn:hover {
  border-color: var(--navy);
  color: var(--navy);
}
.filter-btn.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(43,43,212,0.25);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 1024px) { .portfolio-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px)  { .portfolio-grid { grid-template-columns: 1fr; } }

.portfolio-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--section-gray);
  box-shadow: var(--shadow-card);
  transition: all 0.35s cubic-bezier(.4,0,.2,1);
  cursor: pointer;
  position: relative;
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.portfolio-card .card-thumb {
  height: 200px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.4s;
}
.portfolio-card:hover .card-thumb { transform: scale(1.04); }
.portfolio-card .card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(13,13,43,0.85) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.portfolio-card:hover .card-overlay { opacity: 1; }
.portfolio-card .card-meta { padding: 1.25rem; }
.portfolio-card .card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.portfolio-card .card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
  color: var(--text-dark);
  margin-top: 0.2rem;
}
.portfolio-card .card-result {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}
.portfolio-card.hidden {
  display: none;
}
.portfolio-card.fade-in {
  animation: cardFadeIn 0.4s ease forwards;
}
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Thumb placeholder gradients */
.thumb-seo    { background: linear-gradient(135deg, #4B4BDC 0%, #2B2BD4 100%); }
.thumb-social { background: linear-gradient(135deg, #F05A28 0%, #FF7B50 100%); }
.thumb-ux     { background: linear-gradient(135deg, #0D0D2B 0%, #3D3D5C 100%); }
.thumb-brand  { background: linear-gradient(135deg, #2B2BD4 0%, #F05A28 100%); }
.thumb-email  { background: linear-gradient(135deg, #1e1ea0 0%, #4B4BDC 100%); }
.thumb-ads    { background: linear-gradient(135deg, #FF7B50 0%, #2B2BD4 100%); }

/* ── Experience Timeline ─────────────────────────────────────────── */
#experience { background: var(--section-gray); }
.timeline-item {
  position: relative;
  padding-left: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0.5rem;
  width: 12px; height: 12px;
  background: var(--navy);
  border-radius: 50%;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px rgba(43,43,212,0.2);
}
.timeline-item::after {
  content: '';
  position: absolute;
  left: 5px; top: 1.5rem;
  width: 2px;
  bottom: -1rem;
  background: rgba(43,43,212,0.12);
}
.timeline-item:last-child::after { display: none; }

/* ── Achievements Counter ────────────────────────────────────────── */
#achievements {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  position: relative;
  overflow: hidden;
}
#achievements::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 500px; height: 500px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}
.counter-card {
  text-align: center;
  position: relative;
}
.counter-number {
  font-size: 3.5rem;
  color: var(--white);
  line-height: 1;
}
.counter-suffix {hero-big-title
  font-size: 2.5rem;
}
.counter-label {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Contact Section ─────────────────────────────────────────────── */
#contact { background: var(--white); }
.contact-card {
  background: var(--pastel);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid rgba(43,43,212,0.08);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: all 0.25s;
}
.contact-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.contact-icon {
  width: 52px; height: 52px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* Contact form */
.form-input {
  width: 100%;
  background: var(--pastel);
  border: 1.5px solid rgba(43,43,212,0.12);
  border-radius: 0.75rem;
  padding: 0.9rem 1.1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--text-dark);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(43,43,212,0.1);
  background: var(--white);
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 0.4rem;
  letter-spacing: 0.04em;
}

/* ── Footer ──────────────────────────────────────────────────────── */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
}
footer a { color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
footer a:hover { color: var(--white); }

/* ── Mobile Nav ──────────────────────────────────────────────────── */
#mobile-nav {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--white);
  display: flex;
  flex-direction: column;
  padding: 2rem;
}
#mobile-nav.open { transform: translateX(0); }
.mobile-nav-link {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem;
  color: var(--text-dark);
  display: block;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(43,43,212,0.08);
  text-decoration: none;
  transition: color 0.2s, padding-left 0.2s;
}
.mobile-nav-link:hover {
  color: var(--navy);
  padding-left: 0.5rem;
}

/* ── Scroll To Top ───────────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(43,43,212,0.35);
  opacity: 0;
  transform: translateY(16px);
  transition: all 0.3s;
  z-index: 100;
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#scroll-top:hover {
  background: var(--navy-dark);
  transform: translateY(-2px) scale(1.05);
}

/* ── Responsive Helpers ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero-headline { font-size: 2.4rem; }
  .floating-badge.badge-traffic { left: -10px; }
  .floating-badge.badge-review  { right: -10px; }
  .hero-photo-img { max-width: 300px; }
}
