:root {
  /* Theme tokens */
  --c1: #22d3ee;
  --c2: #3b82f6;
  --c3: #4f46e5;
  --g-main: linear-gradient(90deg, var(--c1), var(--c2), var(--c3));

  --radius: 14px;
  --shadow-sm: 0 2px 6px rgba(17, 24, 39, 0.08);
  --shadow-md: 0 8px 22px rgba(79, 70, 229, 0.18);
  --ring: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

/* Base */
html {
  scroll-behavior: smooth;
}
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

/* Generic links inside themed areas */
.link {
  position: relative;
  padding: 2px 0;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.link:hover {
  opacity: 0.9;
}
.link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  border-radius: 8px;
}

/* Hero */
.hero {
  margin-top: 0; /* offset for fixed navbar */
  padding: 96px 1rem 56px;
  color: #fff;
  background: var(--g-main);
  text-align: center;
}

/* Sections */
.section {
  padding: 64px 0;
}
.section-lead {
  color: #475569;
}
.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 20px;
  background: var(--g-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subheading {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  color: #fff;
  background: var(--g-main);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.28);
}
.btn:active {
  transform: translateY(0);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}
.btn.btn--ghost {
  background: transparent;
  border: 2px solid rgba(226, 232, 240, 0.6);
  color: #fff;
  box-shadow: none;
}
.btn.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Gradient text helper */
.gradient-text {
  background: var(--g-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.skill-card {
  background: linear-gradient(160deg, #3ef1fa, #006aff);
  color: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.45),
    0 0 20px rgba(59, 130, 246, 0.4), 0 0 28px rgba(79, 70, 229, 0.35);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px; /* đảm bảo đều nhau */
}

.skill-card strong {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.skill-card p {
  font-size: 14px;
  line-height: 1.4;
  opacity: 0.95;
}

.skill-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.65),
    0 0 26px rgba(59, 130, 246, 0.55), 0 0 36px rgba(79, 70, 229, 0.5);
}
.sub-title {
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(90deg, #156ee2, #027ca4); /* cyan gradient */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
}
/* Project cards */
.project-card {
  display: block;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-align: center;
  color: #4d4d4d;
  background: linear-gradient(
    170deg,
    #bbf4ff,
    #9ff2ff
  ); /* nền trầm (xanh xám) */
  border: 1px solid rgba(37, 169, 251, 0.25);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.15);
  transition: transform 0.15s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Hover với viền sáng gradient */
.project-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.5),
    0 0 20px rgba(118, 167, 247, 0.4), 0 0 28px rgba(155, 150, 249, 0.35);
  background: linear-gradient(170deg, #bbf4ff, #9ff2ff); /* hơi shift xanh */
}

/* Focus state */
.project-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.6);
}

/* Tags container */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

/* Tag item */
.tags {
  display: flex;
  justify-content: center; /* căn giữa ngang */
  flex-wrap: wrap; /* cho phép xuống hàng */
  gap: 0.5rem; /* khoảng cách giữa các tag */
  margin: 1rem 0; /* thêm khoảng cách trên dưới */
}
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #1a1a1a;
  background: linear-gradient(160deg, #6af1f1, #3fffe2); /* cyan-blue nổi */
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

/* Button wrapper */
.project-actions {
  text-align: center; /* căn giữa */
}

/* Button */
.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-weight: 600;
  background: linear-gradient(135deg, #22d3ee, #3b82f6, #4f46e5);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid rgba(79, 70, 229, 0.18);
  padding: 16px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.info-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.16);
}
.info-card i {
  font-size: 20px;
  color: var(--c2);
  width: 24px;
  text-align: center;
}
.info-card h3 {
  margin: 0 0 2px;
  font-weight: 700;
  color: #0f172a;
}
.muted-link {
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.muted-link:hover {
  color: #0f172a;
}

/* Form */
.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
  background: #fff;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #94a3b8;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.55);
  box-shadow: var(--ring);
}

/* Footer */
.footer {
  background: var(--g-main);
  color: white;
  text-align: center;
  padding: 16px;
  margin-top: 24px;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: 1fr;
  }
}
