/* --- CSS VARIABLES & RESET --- */
:root {
  --bg-main: #0a0a0c;
  --bg-card: #121216;
  --accent-cyan: #00f2fe;
  --accent-purple: #4facfe;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border-glow: rgba(0, 242, 254, 0.2);
  --gradient-tech: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

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

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: "Space Grotesk", sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: #222;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* --- GLOBAL LAYOUT --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 8rem 0 4rem 0;
  position: relative;
}

.section-title {
  font-family: "Syne", sans-serif;
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 3rem;
  text-transform: uppercase;
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1px;
}

/* --- NAVIGATION --- */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 12, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
}

.logo span {
  color: var(--accent-cyan);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

/* --- HERO SECTION --- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(79, 172, 254, 0.05) 0%,
    transparent 50%
  );
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: center;
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.2);
  color: var(--accent-cyan);
  border-radius: 50px;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-title {
  font-family: "Syne", sans-serif;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: var(--gradient-tech);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.cta-group {
  display: flex;
  gap: 1.5rem;
}

.btn {
  padding: 0.8rem 2rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--gradient-tech);
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 242, 254, 0.3);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* Contact Minimal Widget */
.hero-contact-info {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-item i {
  color: var(--accent-cyan);
}

.info-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: 0.3s;
}

.info-item a:hover {
  color: var(--accent-cyan);
}

/* Code Terminal Mockup (Right Side Hero) */
.terminal-box {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  font-family: monospace;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  position: relative;
}

.terminal-header {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot-r {
  background: #ff5f56;
}

.dot-y {
  background: #ffbd2e;
}

.dot-g {
  background: #27c93f;
}

.terminal-row {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.t-purple {
  color: #c792ea;
}

.t-cyan {
  color: #89ddff;
}

.t-yellow {
  color: #f7ebc6;
}

.t-green {
  color: #c3e88d;
}

/* --- SKILLS SECTION --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 2rem;
  transition: 0.3s;
}

.skill-category:hover {
  border-color: var(--border-glow);
  transform: translateY(-5px);
}

.category-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.category-title i {
  color: var(--accent-cyan);
}

.skill-item {
  margin-bottom: 1.25rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.skill-bar-bg {
  background: rgba(255, 255, 255, 0.05);
  height: 6px;
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient-tech);
  width: 0;
  /* Animated via JS */
  transition: width 1.5s ease-out;
  border-radius: 10px;
}

.soft-skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.soft-tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
}

/* --- EXPERIENCE (TIMELINE) --- */
.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 2px;
  background: rgba(255, 255, 255, 0.05);
  top: 0;
  bottom: 0;
  left: 30px;
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-left: 80px;
}

.timeline-dot {
  position: absolute;
  left: 21px;
  top: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 4px solid var(--accent-cyan);
  z-index: 2;
}

.timeline-date {
  font-size: 0.85rem;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timeline-content {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.timeline-role {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.timeline-company {
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-block;
}

.timeline-bullets {
  list-style: none;
}

.timeline-bullets li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.timeline-bullets li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* --- PROJECTS SECTION --- */
.project-filter {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.5rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.02);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition:
    transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    border-color 0.3s;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 242, 254, 0.3);
}

.project-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-tech);
  opacity: 0;
  transition: 0.3s;
}

.project-card:hover::before {
  opacity: 1;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.project-role-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 242, 254, 0.1);
}

.project-link {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: 0.3s;
}

.project-link:hover {
  color: var(--accent-cyan);
}

.project-title {
  font-size: 1.5rem;
  font-family: "Syne", sans-serif;
  margin-bottom: 0.5rem;
}

.project-company {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-highlights {
  margin-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  border-radius: 8px;
  border-left: 2px solid var(--accent-cyan);
}

.project-highlights p {
  font-size: 0.85rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.project-highlights p:last-child {
  margin-bottom: 0;
}

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  font-size: 0.75rem;
  background: #1a1a22;
  color: #fff;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* --- FOOTER --- */
footer {
  padding: 4rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* song ngu */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: #888;
  font-family: "Space Grotesk", sans-serif;
  font-weight: bold;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lang-btn.active,
.lang-btn:hover {
  color: #00ffcc; /* Đổi màu phù hợp với theme accent của bạn */
}

.lang-switch span {
  color: #555;
  font-size: 0.8rem;
}

/* --- RESPONSIVENESS --- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .hero-title {
    font-size: 3.5rem;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    padding-left: 50px;
  }

  .timeline-dot {
    left: 11px;
  }
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .cta-group {
    flex-direction: column;
  }

  .hero-contact-info {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }
}
