/* ═══════════════════════════════════════════════════════════
   Truong Trung Nghia Portfolio — Design System
   Theme: Premium Dark · Electric Blue/Teal · Glassmorphism
   ═══════════════════════════════════════════════════════════ */

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg-primary:       #070d1a;
  --bg-secondary:     #0d1629;
  --bg-card:          rgba(255, 255, 255, 0.03);
  --bg-card-hover:    rgba(255, 255, 255, 0.06);
  --border-glass:     rgba(255, 255, 255, 0.07);
  --border-hover:     rgba(var(--accent-rgb), 0.35);

  --accent:           #0ea5e9;
  --accent-rgb:       14, 165, 233;
  --bg-rgb:           7, 13, 26;
  --accent-2:         #6366f1;
  --accent-3:         #8b5cf6;
  --accent-teal:      #14b8a6;
  --accent-glow:      rgba(var(--accent-rgb), 0.25);
  --accent-hover:     #38bdf8;

  --text-primary:     #f1f5f9;
  --text-secondary:   #94a3b8;
  --text-muted:       #475569;

  --gradient-brand:   linear-gradient(135deg, #0ea5e9 0%, #6366f1 55%, #8b5cf6 100%);
  --gradient-subtle:  linear-gradient(135deg, rgba(var(--accent-rgb),0.08) 0%, rgba(139,92,246,0.08) 100%);
  --gradient-card:    linear-gradient(145deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);

  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        20px;
  --radius-xl:        28px;
  --radius-pill:      999px;

  --shadow-glow:      0 0 40px rgba(var(--accent-rgb), 0.15);
  --shadow-card:      0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lift:      0 20px 48px rgba(var(--accent-rgb), 0.18);

  --transition:       all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:  all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  --nav-height:       72px;
  --section-pad:      120px;
  --container:        1200px;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }

/* ─── Utility ────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 2rem;
}

.glass-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.hover-lift {
  transition: var(--transition);
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
}

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

/* Section */
.section { padding: var(--section-pad) 0; }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-hover);
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}
.chip:hover {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.2);
}
.chip-sm { font-size: 0.75rem; padding: 4px 10px; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.4);
  filter: brightness(1.1);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border: 1px solid var(--border-hover);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  transition: var(--transition);
}
.btn-ghost:hover {
  background: rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

/* Reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* Placeholder */
.placeholder-icon { font-size: 2.5rem; margin-bottom: 12px; }
.placeholder-text { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 16px; }
.placeholder-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

/* ─── Navigation ─────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 2rem;
  background-color: var(--bg-primary);
  pointer-events: none;
}
#navbar {
  pointer-events: all;
  max-width: var(--container);
  margin: 0 auto;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  background: rgba(var(--bg-rgb), 0.85);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}
.nav-inner.scrolled {
  background: rgba(var(--bg-rgb), 0.95);
  border-color: rgba(var(--accent-rgb), 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(var(--accent-rgb), 0.08);
}
.nav-logo {
  font-size: 1.1rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}
.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(var(--accent-rgb), 0.1);
}
.nav-link.active { color: var(--accent); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ─── Hero Section ───────────────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Animated mesh background */
.hero-bg-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--accent-rgb), 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 10% 80%, rgba(20, 184, 166, 0.06) 0%, transparent 60%);
  pointer-events: none;
}
.hero-bg-mesh::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(var(--accent-rgb), 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  animation: meshFloat 12s ease-in-out infinite alternate;
}
@keyframes meshFloat {
  from { transform: translateY(0px); }
  to   { transform: translateY(-20px); }
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}
.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

.hero-name {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 10px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 20px;
  letter-spacing: 0.02em;
}

.hero-summary {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 520px;
}
.hero-summary strong { color: var(--text-primary); font-weight: 600; }

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}
.hero-link:hover {
  color: var(--accent);
  border-color: rgba(var(--accent-rgb), 0.3);
  background: rgba(var(--accent-rgb), 0.06);
  transform: translateY(-2px);
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ─── Hero Visual / Avatar ───────────────────────────────── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-avatar-wrapper {
  position: relative;
  width: 320px;
  height: 320px;
}
.hero-avatar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient-brand);
  box-shadow: 0 0 60px rgba(var(--accent-rgb), 0.35);
}
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.avatar-initials {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

/* Orbit rings */
.avatar-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  transform: translate(-50%, -50%);
  animation: orbit 12s linear infinite;
}
.ring-1 { width: 220px; height: 220px; animation-duration: 10s; border-color: rgba(var(--accent-rgb),0.2); }
.ring-2 { width: 280px; height: 280px; animation-duration: 15s; animation-direction: reverse; border-color: rgba(99,102,241,0.15); }
.ring-3 { width: 320px; height: 320px; animation-duration: 20s; border-color: rgba(139,92,246,0.1); }
@keyframes orbit {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Floating stats */
.hero-stat {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px;
  min-width: 80px;
  animation: float 4s ease-in-out infinite;
}
.stat-1 { top: 5%;  right: 0;   animation-delay: 0s; }
.stat-2 { bottom: 10%; right: 5%; animation-delay: 1.3s; }
.stat-3 { top: 40%; left: -5%;  animation-delay: 0.7s; }
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollBounce 2.4s ease-in-out infinite;
  box-shadow: 0 0 8px var(--accent);
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50%       { transform: translateY(12px); opacity: 0.3; }
}

/* ─── About Grid ─────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.about-card {
  padding: 28px 22px;
  text-align: center;
  background: var(--gradient-card);
  transition: var(--transition);
}
.about-card:hover {
  transform: translateY(-6px);
}
.about-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}
.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.about-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── Timeline Placeholder ───────────────────────────────── */
.timeline { display: flex; justify-content: center; }
.timeline-placeholder {
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
}

/* ─── Projects Placeholder ───────────────────────────────── */
.projects-grid { display: flex; justify-content: center; }
.project-placeholder {
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  width: 100%;
}

/* ─── Skills Placeholder ─────────────────────────────────── */
.skills-placeholder {
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Education Placeholder ──────────────────────────────── */
.edu-placeholder {
  padding: 48px 40px;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer#contact {
  border-top: 1px solid var(--border-glass);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-name {
  font-size: 1rem;
  font-weight: 600;
}
.footer-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-email:hover { color: var(--accent); }
.footer-links {
  display: flex;
  gap: 16px;
}
.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}
.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-info { display: flex; flex-direction: column; gap: 4px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 80px; }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }
  .hero-links { justify-content: center; }
  .hero-chips { justify-content: center; }
  .hero-cta   { justify-content: center; }
  .hero-summary { margin-left: auto; margin-right: auto; }
  .hero-visual { display: none; }

  .nav-links { display: none; position: absolute; top: calc(100% + 12px); left: 0; right: 0;
    background: var(--bg-secondary); border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg); padding: 16px; flex-direction: column; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .nav-inner { position: relative; border-radius: var(--radius-lg); }

  .about-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
  .hero-name { font-size: 2rem; }
  .hero-links { flex-direction: column; align-items: center; }
  .hero-link { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 2: Experience & Projects
   ═══════════════════════════════════════════════════════════ */

/* ─── Timeline ───────────────────────────────────────────── */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-3), transparent);
  opacity: 0.3;
}
.timeline-item {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.timeline-dot {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  border: 3px solid var(--bg-primary);
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
  z-index: 1;
}
.timeline-card {
  flex: 1;
  padding: 28px 28px 24px;
}
.exp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.exp-company {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.exp-role {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}
.exp-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.exp-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.exp-current {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}
.exp-bullets {
  list-style: none;
  padding: 0;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.exp-bullets li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.exp-bullets li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.75rem;
  top: 3px;
}
.exp-bullets strong { color: var(--text-primary); font-weight: 600; }
.exp-tech { display: flex; flex-wrap: wrap; gap: 8px; }

/* ─── Projects Grid ──────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 26px 24px;
}
.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.project-tag {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.project-period {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.project-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.project-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.68;
}
.project-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
}
.highlight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--gradient-subtle);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}
.highlight-num {
  font-size: 1.35rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.highlight-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.3;
}
.project-features { display: flex; flex-direction: column; gap: 8px; }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.feature-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  box-shadow: 0 0 6px var(--accent-glow);
}
.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border-glass);
  margin-top: auto;
}
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.project-team {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ─── Phase 2 Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .projects-grid { grid-template-columns: 1fr; }
  .timeline::before { left: 16px; }
  .timeline-dot { width: 34px; height: 34px; }
  .exp-header { flex-direction: column; gap: 8px; }
  .project-footer { flex-direction: column; align-items: flex-start; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 3: Skills, Education & Certifications
   ═══════════════════════════════════════════════════════════ */

/* ─── Skills Grid ────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.skill-group {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: var(--transition);
}
.skill-group:hover { transform: translateY(-4px); }
.skill-group-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.skill-group-icon { font-size: 1rem; }
.skill-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skill-chips .chip { font-size: 0.78rem; padding: 4px 10px; }

/* ─── Education & Certs ──────────────────────────────────── */
.edu-certs-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
.edu-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 32px 28px;
}
.edu-icon { font-size: 2.5rem; flex-shrink: 0; margin-top: 2px; }
.edu-degree {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
}
.edu-school {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 4px;
}
.edu-location { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 4px; }
.edu-period { font-size: 0.82rem; color: var(--text-muted); }
.certs-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.certs-list { display: flex; flex-direction: column; gap: 12px; }
.cert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  transition: var(--transition);
}
.cert-card:hover { transform: translateX(4px); }
.cert-icon { font-size: 1.4rem; flex-shrink: 0; }
.cert-name { font-size: 0.9rem; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.cert-issuer { font-size: 0.78rem; color: var(--accent); font-weight: 500; }
.cert-date { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Phase 3 Responsive ─────────────────────────────────── */
@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .skills-grid { grid-template-columns: 1fr; }
  .edu-certs-grid { grid-template-columns: 1fr; }
  .cert-card:hover { transform: none; }
}

/* ═══════════════════════════════════════════════════════════
   Phase 4: Final Polish
   ═══════════════════════════════════════════════════════════ */

/* ─── Custom Scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ─── Selection ──────────────────────────────────────────── */
::selection { background: rgba(var(--accent-rgb), 0.3); color: var(--text-primary); }

/* ─── Footer Gradient Border ─────────────────────────────── */
footer#contact { position: relative; }
footer#contact::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--gradient-brand);
  opacity: 0.3;
}

/* ─── Focus Visible ──────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ─── Mobile Safe Area ───────────────────────────────────── */
@supports (padding: max(0px)) { body { padding-bottom: env(safe-area-inset-bottom); } }

/* ─── Print ──────────────────────────────────────────────── */
@media print {
  header, .hero-bg-mesh, .scroll-indicator, .hero-visual { display: none !important; }
  body { background: white; color: black; animation: none; }
  .glass-card { border: 1px solid #ccc; background: transparent; backdrop-filter: none; }
  .hero-section { min-height: auto; padding: 2rem 0; }
  a { color: inherit; }
}

/* ─── Page load fade-in ──────────────────────────────────── */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
body { animation: pageIn 0.4s ease forwards; }
