:root {
  --brand: #1e40af;
  --brand-2: #475569;
  --brand-gradient: linear-gradient(135deg, #1e3a8a 0%, #475569 100%);
  --success: #15803d;
  --error: #b91c1c;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f4f4f5;
  --text: #18181b;
  --text-muted: #71717a;
  --border: #e4e4e7;
  --shadow-sm: 0 2px 8px rgba(24, 24, 27, 0.05);
  --shadow: 0 12px 32px rgba(24, 24, 27, 0.08);
  --shadow-lg: 0 24px 60px rgba(24, 24, 27, 0.12);
  --radius: 10px;
  --radius-sm: 8px;
  --nav-h: 74px;
}

[data-bs-theme="dark"] {
  --brand: #93c5fd;
  --brand-2: #94a3b8;
  --brand-gradient: linear-gradient(135deg, #1e40af 0%, #334155 100%);
  --success: #4ade80;
  --error: #f87171;
  --bg: #09090b;
  --surface: #18181b;
  --surface-alt: #0f0f11;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --border: #27272a;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

* { scroll-behavior: smooth; }

body {
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .navbar-brand, .stat-num, .impact-num, .preloader-mark {
  font-family: "Inter Tight", sans-serif;
}

::selection { background: var(--brand); color: #fff; }

.section { padding: 96px 0; position: relative; }
.section-alt { background-color: var(--surface-alt); }
.section-head { margin-bottom: 56px; }

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}

.kicker-num {
  font-family: "Inter Tight", sans-serif;
  color: var(--text-muted);
  opacity: 0.6;
}

.section-title {
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.section-sub { color: var(--text-muted); max-width: 640px; margin: 14px auto 0; }

.subsection-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.subsection-title i { color: var(--brand); }

/* ---------- Scroll progress + preloader ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 2000;
  background: transparent;
  pointer-events: none;
}

.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-gradient);
  transition: width 0.12s linear;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: var(--bg);
  display: grid;
  place-items: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide { opacity: 0; visibility: hidden; }

.preloader-inner { text-align: center; }

.preloader-mark {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
  animation: pulseScale 1.4s ease-in-out infinite;
}

@keyframes pulseScale {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
  50% { transform: scale(1.06); box-shadow: 0 0 0 16px color-mix(in srgb, var(--brand) 0%, transparent); }
}

.preloader-bar {
  width: 160px;
  height: 4px;
  border-radius: 8px;
  background: var(--surface-alt);
  overflow: hidden;
  margin: 0 auto;
}

.preloader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--brand-gradient);
  border-radius: 8px;
  animation: slideBar 1.1s ease-in-out infinite;
}

@keyframes slideBar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ---------- Navbar ---------- */
.navbar-custom {
  background-color: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  min-height: var(--nav-h);
}

.navbar-custom.scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-right: 10px;
}

.brand-text { font-size: 1rem; letter-spacing: -0.01em; }
.navbar-custom .navbar-brand { display: flex; align-items: center; color: var(--text); }

.navbar-custom .nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  position: relative;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar-custom .nav-link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active { color: var(--brand); }

.navbar-custom .nav-link.active::after { transform: scaleX(1); }

.navbar-toggler { border: 1px solid var(--border); padding: 0.35rem 0.6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent); }

.btn-theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-grid;
  place-items: center;
  transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn-theme-toggle:hover { color: var(--brand); border-color: var(--brand); transform: rotate(20deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 15% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 60%),
    radial-gradient(800px 500px at 95% 20%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 60%);
}

.hero-glow {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 8%, transparent) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  margin-bottom: 22px;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 55%, transparent);
  animation: pulseRing 1.8s infinite;
}

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent); }
  70% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--success) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 0%, transparent); }
}

.hero-name {
  font-size: clamp(2.3rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-role {
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  font-weight: 600;
  color: var(--brand);
  min-height: 2.2rem;
  margin-bottom: 18px;
}

.typed-cursor { color: var(--brand); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-lead { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; margin-bottom: 30px; }

.hero-socials { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-socials a,
.hero-socials .social-btn,
.footer-socials a {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-socials a:hover,
.hero-socials .social-btn:hover,
.footer-socials a:hover {
  color: #fff;
  background: var(--brand-gradient);
  border-color: transparent;
  transform: translateY(-4px);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 34px 28px;
  box-shadow: var(--shadow);
}

.hero-avatar {
  width: 142px;
  height: 142px;
  margin: 0 auto 18px;
  padding: 5px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 40%, transparent);
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 28%;
  display: block;
  background: var(--surface-alt);
}

.hero-card-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.hero-card-role { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 22px; }

.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }

.stat {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }

.stat-num, .stat-suffix { font-size: 1.7rem; font-weight: 800; color: var(--brand); }
.stat-suffix { font-size: 1.2rem; }
.stat-label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--brand);
  border: 1px solid var(--border);
  background: var(--surface);
  animation: bob 1.8s ease-in-out infinite;
  z-index: 2;
}

@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- About ---------- */
.lead-custom { font-size: 1.15rem; font-weight: 500; color: var(--text); }

.skill-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.93rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.skill-chip:hover { transform: translateY(-3px); border-color: var(--brand); }
.skill-chip i { color: var(--brand); }

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  height: 100%;
}

.info-card-wide { height: auto; }

.portrait-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.portrait-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 50% 22%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portrait-card:hover img { transform: scale(1.05); }

.portrait-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 48px 22px 18px;
  background: linear-gradient(transparent, rgba(9, 9, 11, 0.85));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.portrait-caption strong { font-size: 1.05rem; font-weight: 700; }
.portrait-caption span { font-size: 0.8rem; opacity: 0.85; }

.info-card-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.info-card-title i { color: var(--brand); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.info-item { background: var(--surface); padding: 16px 18px; }

.info-item span {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 5px;
}

.info-item strong { font-size: 0.95rem; font-weight: 600; color: var(--text); }

.info-item-value { display: flex; align-items: center; gap: 8px; }

.info-item-value a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  word-break: break-word;
  flex: 1;
}

.info-item-value a:hover { text-decoration: underline; }

.copy-btn {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }

.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 18px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mini-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.mini-card i { color: var(--brand); font-size: 1.2rem; margin-bottom: 8px; }
.mini-card p { margin: 0; font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }
.mini-card strong { color: var(--text); }

/* ---------- Services ---------- */
.service-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  height: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--brand-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.service-card > * { position: relative; z-index: 1; }

.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }

.service-num {
  position: absolute;
  top: 22px;
  right: 24px;
  font-family: "Inter Tight", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--brand) 22%, transparent);
  transition: color 0.3s ease;
}

.service-icon {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font-size: 1.5rem;
  margin-bottom: 18px;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-icon { transform: scale(1.08) rotate(-4deg); background: var(--brand-gradient); color: #fff; }

.service-card h4 { font-size: 1.08rem; font-weight: 700; margin-bottom: 10px; }

.service-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.65; margin: 0; }

/* ---------- Impact band ---------- */
.impact-band {
  padding: 64px 0;
  background:
    radial-gradient(800px 400px at 20% 50%, color-mix(in srgb, var(--brand) 20%, transparent), transparent 60%),
    radial-gradient(800px 400px at 80% 50%, color-mix(in srgb, var(--brand-2) 20%, transparent), transparent 60%),
    var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.impact-num, .impact-suffix {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--brand);
}

.impact p { margin: 6px 0 0; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

/* ---------- Education ---------- */
.edu-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.edu-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 4px;
  width: 100%;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.edu-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.edu-card:hover::after { transform: scaleX(1); }

.edu-icon {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand);
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.edu-year {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-2);
  background: color-mix(in srgb, var(--brand-2) 12%, transparent);
  border-radius: 8px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.edu-card h4 { font-size: 1.02rem; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.edu-inst { font-size: 0.86rem; color: var(--text-muted); margin-bottom: 0; }

/* ---------- Filter tabs ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.filter-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s ease;
}

.filter-btn:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }

.filter-btn.active {
  color: #fff;
  background: var(--brand-gradient);
  border-color: transparent;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 32%, transparent);
}

.filter-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 26px;
}

.filter-empty i { color: var(--brand); margin-right: 6px; }

#experience, #certifications { position: relative; overflow: hidden; }

#experience::before,
#certifications::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/bg.jpg") repeat;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

[data-bs-theme="dark"] #experience::before,
[data-bs-theme="dark"] #certifications::before { opacity: 0.06; }

#experience > .container,
#certifications > .container { position: relative; z-index: 1; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 900px; margin: 0 auto; padding-left: 34px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--brand), var(--brand-2));
  opacity: 0.35;
}

.timeline-item { position: relative; margin-bottom: 30px; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-item[hidden] { display: none; }

.timeline-marker {
  position: absolute;
  left: -34px;
  top: 22px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}

.timeline-item.show .timeline-marker {
  animation: markerPulse 1.6s ease-in-out infinite;
}

@keyframes markerPulse {
  0%, 100% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
  50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--brand) 6%, transparent); }
}

.timeline-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.timeline-content:hover { transform: translateX(6px); box-shadow: var(--shadow); }

.timeline-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.timeline-head h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }

.timeline-org { font-size: 0.9rem; color: var(--text-muted); margin: 0; display: flex; align-items: center; gap: 8px; }
.timeline-org i { color: var(--brand); }

.timeline-date {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 8px;
  padding: 6px 14px;
  white-space: nowrap;
}

.timeline-date.current { color: #ffffff; background: var(--brand-gradient); }

.timeline-list { margin: 0; padding-left: 18px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.65; }
.timeline-list li { margin-bottom: 6px; }

.timeline-list li.extra { display: none; }
.timeline-content.expanded .timeline-list li.extra { display: list-item; }

.read-more {
  margin-top: 14px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.read-more i { transition: transform 0.25s ease; }
.read-more.open i { transform: rotate(180deg); }

/* ---------- Skill cards ---------- */
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }

.skill-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.skill-card-head i {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.skill-card-head h4 { font-size: 1rem; font-weight: 700; margin: 0; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.tag-cloud span {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tag-cloud span:hover { transform: translateY(-2px); }
.skill-card:hover .tag-cloud span { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }

.prof-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.prof-item { margin-bottom: 18px; }
.prof-item:last-child { margin-bottom: 0; }
.prof-head { display: flex; justify-content: space-between; font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; }
.prof-head span:last-child { color: var(--brand); }

.progress { height: 9px; border-radius: 6px; background: var(--surface-alt); overflow: hidden; }

.progress-bar {
  width: 0;
  background: var(--brand-gradient);
  border-radius: 8px;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Certifications ---------- */
.cert-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}

.cert-search { position: relative; flex: 1; max-width: 340px; min-width: 220px; }

.cert-search i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.cert-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

.cert-search input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent);
}

.cert-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cert-table { min-width: 720px; background: var(--surface); --bs-table-bg: transparent; --bs-table-color: var(--text); }

.cert-table thead th {
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.cert-table tbody td { padding: 14px 18px; font-size: 0.9rem; border-bottom: 1px solid var(--border); color: var(--text-muted); }
.cert-table tbody td:first-child { color: var(--text); font-weight: 600; }
.cert-table tbody tr:last-child td { border-bottom: none; }
.cert-table tbody tr { transition: background-color 0.2s ease; }
.cert-table tbody tr:hover { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.cert-row-hidden { display: none !important; }

.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 6px; }
.pill-bteb { color: #ffffff; background: #1e40af; }
.pill-nsda { color: #ffffff; background: #64748b; }

.training-list { list-style: none; padding: 0; margin: 0; }

.training-list li {
  position: relative;
  padding: 11px 0 11px 30px;
  border-bottom: 1px dashed var(--border);
  font-size: 0.92rem;
  color: var(--text-muted);
}

.training-list li::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 11px;
  color: var(--brand);
  font-size: 0.85rem;
}

.lang-item { margin-bottom: 20px; }
.lang-head { display: flex; justify-content: space-between; font-size: 0.92rem; font-weight: 600; margin-bottom: 8px; }
.lang-head span:last-child { color: var(--brand); }
.lang-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.86rem; color: var(--text-muted); }
.lang-meta i { color: var(--brand); margin-right: 4px; }

.countries-title { font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.countries-title i { color: var(--brand); }

.country-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}

.country-badge i { color: var(--brand); }

/* ---------- Contact ---------- */
#contact { position: relative; overflow: hidden; }

#contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../image/footer_menu.png") no-repeat left bottom;
  background-size: cover;
  opacity: 0.65;
  pointer-events: none;
  z-index: 0;
}

[data-bs-theme="dark"] #contact::before { opacity: 0.08; }

#contact > .container { position: relative; z-index: 1; }

.contact-info { display: flex; flex-direction: column; gap: 14px; height: 100%; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 17px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-row:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }

.contact-ic {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 1.05rem;
}

.contact-row span {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
}

.contact-row strong { font-size: 0.9rem; font-weight: 600; word-break: break-word; }

/* ---------- Buttons ---------- */
.btn-primary {
  background: var(--brand-gradient);
  border: none;
  font-weight: 600;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--brand-gradient);
  filter: brightness(1.07);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 35%, transparent);
}

.btn-outline-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-outline-secondary:hover { background: var(--text); color: var(--bg); border-color: var(--text); transform: translateY(-2px); }

/* ---------- Footer ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 28px 0; color: var(--text-muted); font-size: 0.9rem; }
.footer-socials { display: inline-flex; gap: 10px; }
.footer-socials a { width: 40px; height: 40px; border-radius: 8px; }

/* ---------- Toasts ---------- */
.toast-stack {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast-msg {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  box-shadow: var(--shadow-lg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-msg.show { opacity: 1; transform: translateX(0); }
.toast-msg i { font-size: 1.05rem; color: var(--brand); }
.toast-msg.success { border-left-color: var(--success); }
.toast-msg.success i { color: var(--success); }
.toast-msg.error { border-left-color: var(--error); }
.toast-msg.error i { color: var(--error); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--brand);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all 0.3s ease;
  z-index: 1500;
}

.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-4px); }

.back-to-top .ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.back-to-top .ring circle { fill: none; stroke-width: 3; }
.back-to-top .ring-bg { stroke: var(--border); }
.back-to-top .ring-fg { stroke: var(--brand); stroke-linecap: round; stroke-dasharray: 132; stroke-dashoffset: 132; transition: stroke-dashoffset 0.15s linear; }

/* ---------- Reveal animation ---------- */
[data-animate] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-animate="fade-in"] { transform: none; }
[data-animate].in-view { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .navbar-custom .navbar-collapse {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    margin-top: 12px;
    box-shadow: var(--shadow);
  }

  .navbar-custom .nav-link { padding: 0.65rem 0.85rem; }
  .navbar-custom .nav-link::after { display: none; }
  .brand-text { display: none; }
  .hero { min-height: auto; padding: calc(var(--nav-h) + 40px) 0 90px; }
  .hero-card { max-width: 440px; margin: 0 auto; }
  .scroll-hint { display: none; }
  .cert-search { max-width: none; }
}

@media (max-width: 575.98px) {
  .section { padding: 68px 0; }
  .timeline { padding-left: 26px; }
  .timeline-marker { left: -26px; }
  .timeline-content { padding: 20px; }
  .timeline-content:hover { transform: none; }
  .toast-stack { right: 12px; left: 12px; bottom: 80px; max-width: none; }
  .filter-tabs { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-animate] { opacity: 1; transform: none; }
  .progress-bar { transition: none; }
}
