:root {
  --bg: #fafafa;
  --bg-alt: #ffffff;
  --text: #1a1a1a;
  --text-muted: #6b6b6b;
  --accent: #4f46e5;
  --accent-light: #eef1ff;
  --border: #eaeaea;
  --radius: 14px;
  --max-width: 960px;
}

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

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img, iframe { max-width: 100%; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky;
  top: 0;
  background: rgba(250,250,250,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

nav {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 0.95rem; color: var(--text-muted); transition: color 0.15s; }
.nav-links a:hover { color: var(--text); }

/* Mobile nav toggle */
.nav-toggle-checkbox { display: none; }
.nav-toggle-label {
  display: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
  user-select: none;
}

/* Hero */
.hero {
  padding: 90px 0 70px;
  text-align: center;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

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

.hero p {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 12px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.88; }

.btn-outline {
  display: inline-block;
  border: 1px solid var(--border);
  padding: 11px 25px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-left: 12px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* Sections */
section { padding: 70px 0; }
section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--text-muted);
  margin-bottom: 40px;
}

/* About */
.about-grid { display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.about-photo {
  width: 160px; height: 160px; border-radius: 50%;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; font-weight: 800; color: var(--accent);
  flex-shrink: 0;
  margin: 0 auto;
}
.about-text { flex: 1; min-width: 260px; }

/* About — alternating image/text rows */
.about-row {
  display: flex;
  align-items: center;
  gap: 44px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.about-row:last-child { margin-bottom: 0; }
.about-row.reverse { flex-direction: row-reverse; }
.about-row-media { flex: 0 0 260px; }
.about-row-text { flex: 1; min-width: 260px; }
.about-row-text h3 { font-size: 1.2rem; margin-bottom: 12px; }
.about-photo-rect {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: var(--accent-light);
  border: 2px dashed var(--accent);
  color: var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.9rem; font-weight: 600;
  text-align: center;
  line-height: 1.5;
  overflow: hidden;
}
.about-photo-rect.filled {
  border: none;
  background: none;
  padding: 0;
}
.about-photo-rect.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}
.about-closing {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.98rem;
}
@media (max-width: 640px) {
  .about-row, .about-row.reverse { flex-direction: column; }
  .about-row-media { flex: 0 0 auto; width: 100%; max-width: 320px; }
}
.about-text h3 { font-size: 1.2rem; margin-bottom: 10px; }
.skills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.skill-tag {
  background: var(--accent-light); color: var(--accent);
  padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,0.06); }

.card .tag { color: var(--accent); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.card h3 { font-size: 1.15rem; margin: 10px 0 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 14px; }
.card .read-more { font-weight: 600; color: var(--accent); font-size: 0.9rem; }

/* Horizontal scrolling row (Portfolio) */
.scroll-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 24px;
  padding-bottom: 16px;
  scroll-snap-type: x proximity;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.scroll-row.dragging { cursor: grabbing; scroll-snap-type: none; }
.scroll-row .card {
  flex: 0 0 300px;
  scroll-snap-align: start;
}
.scroll-row::-webkit-scrollbar { height: 8px; }
.scroll-row::-webkit-scrollbar-track { background: var(--border); border-radius: 999px; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 999px; }
.scroll-row { scrollbar-width: thin; scrollbar-color: var(--accent) var(--border); }

/* Portfolio */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  margin-bottom: 14px;
}
.video-embed iframe,
.video-embed video {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
  background: #000;
  object-fit: contain;
}

/* Pricing */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.price-card {
  position: relative;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
}
.price-card.featured {
  border: 2px solid var(--accent);
  transform: scale(1.03);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.price-name { font-weight: 800; font-size: 1.1rem; }
.price-desc { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0 16px; min-height: 40px; }
.price-amount { font-size: 1.7rem; font-weight: 800; margin-bottom: 20px; }
.price-amount span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.price-features { list-style: none; margin: 0 0 24px; flex: 1; }
.price-features li {
  padding: 8px 0;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: #333;
}
.price-features li:first-child { border-top: none; }
.price-cta { text-align: center; width: 100%; }

/* Zalo button */
.zalo-btn {
  background: #0068ff;
  font-size: 1rem;
  padding: 14px 32px;
}

/* Contact */
.contact-list { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
.contact-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-item .icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.contact-item a, .contact-item span.value { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
footer {
  padding: 32px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* Blog post page */
.post-header { padding: 60px 0 30px; text-align: center; }
.post-header .tag { color: var(--accent); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }
.post-header h1 { font-size: 2.1rem; margin: 12px 0; letter-spacing: -0.02em; }
.post-header .meta { color: var(--text-muted); font-size: 0.9rem; }
.post-body { max-width: 720px; margin: 0 auto; padding: 0 24px 60px; }
.post-body h2 { font-size: 1.35rem; margin: 34px 0 12px; }
.post-body p { margin-bottom: 16px; color: #2a2a2a; }
.post-body ul, .post-body ol { margin: 0 0 16px 22px; }
.post-body li { margin-bottom: 8px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--accent); font-weight: 600; font-size: 0.9rem; }

@media (max-width: 700px) {
  .container { padding: 0 20px; }
  nav { padding: 14px 20px; }

  .nav-toggle-label { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 20px rgba(0,0,0,0.06);
    padding: 4px 20px 12px;
  }
  .nav-links a {
    padding: 12px 0;
    border-top: 1px solid var(--border);
    font-size: 1rem;
  }
  .nav-links a:first-child { border-top: none; }
  .nav-toggle-checkbox:checked ~ .nav-links { display: flex; }

  .hero { padding: 60px 0 48px; }
  .hero h1 { font-size: 1.7rem; }
  .hero p { font-size: 1rem; }
  .hero .btn, .hero .btn-outline {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 12px;
  }
  .hero .btn-outline { margin-left: auto; }

  .section-title { font-size: 1.5rem; }
  section { padding: 48px 0; }

  .price-card.featured { transform: none; }

  .about-photo { width: 130px; height: 130px; font-size: 2rem; }
}
