/* ============ RESET CƠ BẢN ============ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  color: #e5e7eb;
  background: transparent;
  /* nền chính để .sky lo */
  min-height: 100vh;
}

/* ============ NỀN BẦU TRỜI + SAO BĂNG ============ */
.sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  background: radial-gradient(circle at bottom, #020617 0%, #000 70%);
}

/* sao tĩnh */
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  opacity: 0.8;
  border-radius: 50%;
  animation: twinkle 2s infinite ease-in-out alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.2;
  }

  to {
    opacity: 1;
  }
}

/* sao băng */
.shooting-star {
  position: absolute;
  width: 3px;
  height: 80px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), transparent);
  opacity: 0.8;
  border-radius: 50%;
  transform: rotate(45deg);
  animation: shoot 1.2s ease-in-out forwards;
  filter: drop-shadow(0 0 6px #38bdf8);
}

@keyframes shoot {
  0% {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(45deg) scale(0.6);
  }

  20% {
    opacity: 1;
  }

  100% {
    transform: translateX(-500px) translateY(300px) rotate(45deg) scale(1);
    opacity: 0;
  }
}

/* Tất cả nội dung đặt lên trên bầu trời */
.header,
.hero,
.section,
.footer {
  position: relative;
  z-index: 1;
}

/* ============ LAYOUT CHUNG ============ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: transparent;
}

.section h2 {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e5e7eb;
  position: relative;
}

.section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  width: 70px;
  height: 2px;
  background: linear-gradient(to right, #22d3ee, #6366f1, transparent);
  opacity: 0.8;
}

.section-intro {
  margin-top: 0.5rem;
  margin-bottom: 2.2rem;
  color: #9ca3af;
  max-width: 650px;
}

/* ============ HEADER / NAV ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to bottom,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.7),
      transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e5e7eb;
}

.logo span {
  color: #22d3ee;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  color: #9ca3af;
  font-size: 0.9rem;
  position: relative;
  padding-bottom: 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #22d3ee, #6366f1);
  transition: width 0.2s ease;
}

nav a:hover {
  color: #e5e7eb;
}

nav a:hover::after {
  width: 100%;
}

/* ============ HERO ============ */
.hero {
  padding: 5rem 0 3.5rem;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.2fr);
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: #38bdf8;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(to right, #e5e7eb, #a5b4fc);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  color: #9ca3af;
  margin-bottom: 1.7rem;
  font-size: 0.98rem;
}

.hero-subtitle strong {
  color: #e5e7eb;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.86rem;
  color: #9ca3af;
}

/* ============ AVATAR ============ */
.hero-avatar {
  display: flex;
  justify-content: center;
}

.avatar-jpg {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow:
    0 0 35px rgba(56, 189, 248, 0.35),
    0 0 55px rgba(129, 140, 248, 0.25);
}


.avatar-circle {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 0%, rgba(56, 189, 248, 0.6), transparent 55%),
    radial-gradient(circle at 70% 90%, rgba(129, 140, 248, 0.7), transparent 55%),
    radial-gradient(circle at 0% 50%, rgba(52, 211, 153, 0.5), transparent 55%);
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 0 35px rgba(56, 189, 248, 0.35),
    0 0 55px rgba(129, 140, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #f9fafb;
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Nếu sau này dùng ảnh thật:
.avatar-img {
  width: 200px;
  height: 200px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow:
    0 0 35px rgba(56, 189, 248, 0.35),
    0 0 55px rgba(129, 140, 248, 0.25);
}
*/

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.btn.primary {
  background: radial-gradient(circle at 20% 0, #22d3ee, #6366f1);
  color: #f9fafb;
  box-shadow:
    0 14px 30px rgba(37, 99, 235, 0.5),
    0 0 25px rgba(56, 189, 248, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow:
    0 18px 38px rgba(37, 99, 235, 0.65),
    0 0 35px rgba(56, 189, 248, 0.55);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6);
}

.btn.ghost:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #22d3ee;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.btn.full-width {
  width: 100%;
}

/* ============ GRID HELPERS ============ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

/* ============ CARD / GLASSMORPHISM ============ */
.card {
  background: linear-gradient(135deg,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.7));
  border-radius: 1.1rem;
  padding: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.8),
    0 0 30px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left,
      rgba(56, 189, 248, 0.18),
      transparent 55%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
  color: #e5e7eb;
}

.card p {
  font-size: 0.92rem;
  color: #9ca3af;
  margin-bottom: 0.8rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-link {
  font-size: 0.9rem;
  text-decoration: none;
  color: #38bdf8;
  display: inline-flex;
  align-items: center; 
  gap: 0.25rem;
  flex-wrap: wrap; /* cho link dài xuống dòng nếu cần*/
}

.card-link::after {
  content: "↗";
  font-size: 0.85rem;
  flex-wrap: wrap; /* cho link dài xuống dòng nếu cần*/
}

.card-link:hover {
  color: #a5b4fc;
}

/* ============ INFO LIST ============ */
.info-list {
  list-style: none;
  font-size: 0.9rem;
}

.info-list li {
  margin-bottom: 0.55rem;
  color: #9ca3af;
}

.info-list span {
  font-weight: 500;
  color: #e5e7eb;
}

/* ============ TAG LIST ============ */
.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.tag-list li {
  background: radial-gradient(circle at 0 0, #22d3ee, #0f172a);
  color: #e0f2fe;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
}

/* ============ CONTACT FORM ============ */
.contact-form {
  background: linear-gradient(135deg,
      rgba(15, 23, 42, 0.95),
      rgba(15, 23, 42, 0.8));
  border-radius: 1.1rem;
  padding: 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.85),
    0 0 25px rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
}

.form-group {
  margin-bottom: 0.95rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
  color: #cbd5f5;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(148, 163, 184, 0.6);
  outline: none;
  font-size: 0.88rem;
  font-family: inherit;
  background: rgba(15, 23, 42, 0.85);
  color: #e5e7eb;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #6b7280;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #22d3ee;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.6),
    0 0 20px rgba(56, 189, 248, 0.35);
}

/* ============ FOOTER ============ */
.footer {
  padding: 1.6rem 0 2.2rem;
  border-top: 1px solid rgba(31, 41, 55, 0.9);
  background: radial-gradient(circle at bottom, #020617 0, #000 55%);
  font-size: 0.88rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  color: #6b7280;
}

.footer a {
  text-decoration: none;
  color: #64748b;
}

.footer a:hover {
  color: #e5e7eb;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-avatar {
    order: -1;
    margin-bottom: 1.8rem;
  }
}

@media (max-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  nav a {
    margin-left: 1rem;
    font-size: 0.78rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section {
    padding: 3.5rem 0;
  }
}

/* ===== POPUP THÔNG BÁO ===== */

.popup {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(3px);
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.popup.hidden {
  display: none;
}

.popup-inner {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.9));
  padding: 1.8rem 2rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(56, 189, 248, 0.6);
  max-width: 360px;
  text-align: center;
  animation: popupFade 0.25s ease-out;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(56, 189, 248, 0.5);
}

@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.popup-message {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.popup-inner.success {
  border-color: #22c55e;
  box-shadow: 0 0 25px rgba(34, 197, 94, 0.6);
}

.popup-inner.error {
  border-color: #ef4444;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.popup-message.success::before {
  content: "✔ ";
  color: #22c55e;
  font-weight: 700;
}

.popup-message.error::before {
  content: "✖ ";
  color: #ef4444;
  font-weight: 700;
}


/* animation hiện popup */
@keyframes popupFade {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* text */
.popup-message {
  margin-bottom: 1.2rem;
  color: #e5e7eb;
  font-size: 0.95rem;
}

/* popup khi gửi thành công */
.popup-inner.success {
  border-color: #22c55e;
  box-shadow:
    0 18px 40px rgba(21, 128, 61, 0.7),
    0 0 25px rgba(74, 222, 128, 0.7);
}

.popup-message.success::before {
  content: "✔ ";
  color: #4ade80;
  font-size: 1.1rem;
  margin-right: 0.25rem;
}

/* popup khi lỗi */
.popup-inner.error {
  border-color: #ef4444;
  box-shadow:
    0 18px 40px rgba(185, 28, 28, 0.8),
    0 0 25px rgba(248, 113, 113, 0.8);
}

.popup-message.error::before {
  content: "✖ ";
  color: #ef4444;
  font-size: 1.1rem;
  margin-right: 0.25rem;
}

/* ============ KẾT THÚC STYLE.CSS ============ */