/* =====================================================
   Custom Stylesheet
   Portfolio – Trần Vũ Đức | UET-VNU Hà Nội
   ===================================================== */

/* ===== BASE ===== */
* { box-sizing: border-box; }
html { font-family: 'Inter', sans-serif; }
body { background: #0a0f1e; color: #e2e8f0; overflow-x: hidden; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #0a0f1e; }
::-webkit-scrollbar-thumb { background: linear-gradient(#22d3ee, #a855f7); border-radius: 3px; }

/* ===== GRADIENT TEXT ===== */
.gradient-text {
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-warm {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: rgba(13, 27, 42, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(34, 211, 238, 0.15);
}
.glass-card {
  background: rgba(17, 34, 64, 0.6);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(34, 211, 238, 0.1);
  transition: all 0.3s ease;
}
.glass-card:hover {
  border-color: rgba(34, 211, 238, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.15);
}

/* ===== NEON BUTTON ===== */
.btn-neon {
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  color: #0a0f1e;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 9999px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.btn-neon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #a855f7, #22d3ee);
  opacity: 0;
  transition: opacity 0.3s;
}
.btn-neon:hover::before { opacity: 1; }
.btn-neon span { position: relative; z-index: 1; }

.btn-outline {
  border: 2px solid #22d3ee;
  color: #22d3ee;
  padding: 10px 30px;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
  background: transparent;
}
.btn-outline:hover {
  background: rgba(34, 211, 238, 0.1);
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.3);
  transform: translateY(-2px);
}

/* ===== NAVBAR ===== */
#navbar {
  transition: all 0.3s ease;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
}
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(34, 211, 238, 0.1);
}
.nav-link {
  position: relative;
  color: #94a3b8;
  transition: color 0.3s;
  font-weight: 500;
  font-size: 0.9rem;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  transition: width 0.3s ease;
}
.nav-link:hover { color: #22d3ee; }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: #22d3ee; }

/* ===== PARTICLES ===== */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ===== FLOATING SHAPES ===== */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 6s ease-in-out infinite;
  pointer-events: none;
}

/* ===== TYPING CURSOR ===== */
#typed-text::after {
  content: '|';
  animation: blink 0.75s step-end infinite;
  color: #22d3ee;
  margin-left: 2px;
}

/* ===== SECTION REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== SKILL BARS ===== */
.skill-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  width: 0;
  transition: width 1.5s ease;
}

/* ===== TIMELINE ===== */
.timeline-dot::before {
  content: '';
  position: absolute;
  left: -37px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #a855f7);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.6);
}

/* ===== CODE BLOCK ===== */
.code-block {
  background: #0d1117;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}
.code-block .keyword  { color: #ff79c6; }
.code-block .string   { color: #f1fa8c; }
.code-block .comment  { color: #6272a4; }
.code-block .operator { color: #22d3ee; }
.code-block .value    { color: #bd93f9; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid;
}
.badge-cyan   { background: rgba(34,211,238,0.1);  border-color: rgba(34,211,238,0.4);  color: #22d3ee; }
.badge-purple { background: rgba(168,85,247,0.1);  border-color: rgba(168,85,247,0.4);  color: #c084fc; }
.badge-green  { background: rgba(52,211,153,0.1);  border-color: rgba(52,211,153,0.4);  color: #34d399; }
.badge-yellow { background: rgba(251,191,36,0.1);  border-color: rgba(251,191,36,0.4);  color: #fbbf24; }
.badge-red    { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.4);   color: #f87171; }

/* ===== SECTION TITLE ===== */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
}
.section-line {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  border-radius: 9999px;
  margin-bottom: 2rem;
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 1rem;
  background: rgba(10,15,30,0.98);
  border-top: 1px solid rgba(34,211,238,0.15);
}
#mobile-menu.open { display: flex; }
#mobile-menu a { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* ===== PROGRESS LOADER ===== */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #0a0f1e;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.5s ease;
}
.loader-bar {
  width: 200px; height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.loader-fill {
  height: 100%;
  background: linear-gradient(90deg, #22d3ee, #a855f7);
  animation: load 1.5s ease forwards;
}

/* ===== KEYFRAMES ===== */
@keyframes load  { from { width: 0 } to { width: 100% } }
@keyframes blink { from,to { opacity: 1 } 50% { opacity: 0 } }
@keyframes float {
  0%,100% { transform: translateY(0px); }
  50%     { transform: translateY(-20px); }
}

/* ===== TOOLTIP ===== */
.tooltip { position: relative; }
.tooltip-text {
  visibility: hidden; opacity: 0;
  position: absolute; bottom: 110%; left: 50%; transform: translateX(-50%);
  background: rgba(17,34,64,0.95); border: 1px solid rgba(34,211,238,0.3);
  color: #e2e8f0; padding: 6px 12px; border-radius: 8px;
  font-size: 0.8rem; white-space: nowrap;
  transition: all 0.2s ease;
}
.tooltip:hover .tooltip-text { visibility: visible; opacity: 1; }

/* ===== RESPONSIVE IMAGES ===== */
img { max-width: 100%; height: auto; }

/* ===== TABLE ===== */
table { border-collapse: collapse; width: 100%; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(34,211,238,0.1); }
th { color: #22d3ee; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
tr:hover td { background: rgba(34,211,238,0.03); }

/* ===== PRINT ===== */
@media print { #navbar, #page-loader, #back-to-top { display: none !important; } }
