/* =======================================================
 * Portfolio — Ahmadou Bamba Diagne
 * Redesign 2026 — Clean Blue / White Theme
 * Pure CSS — No frameworks
 *
 * TABLE OF CONTENTS
 * -----------------
 * 1. Custom Properties (Variables)
 * 2. Reset & Base
 * 3. Utility / Layout
 * 4. Navigation
 * 5. Hero
 * 6. Section Headings
 * 7. About
 * 8. Resume / Timeline
 * 9. Projects
 * 10. Articles
 * 11. Skills
 * 12. Contact
 * 13. Footer
 * 14. Back-to-top Button
 * 15. Scroll Reveal Animations
 * 16. Responsive (Tablet)
 * 17. Responsive (Mobile)
 * ======================================================= */


/* =======================================================
   1. CUSTOM PROPERTIES
   ======================================================= */
:root {
  /* Brand palette */
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-500: #3b82f6;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;

  /* Neutrals */
  --gray-900: #0f172a;
  --gray-800: #1e293b;
  --gray-700: #334155;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --gray-50:  #f8fafc;
  --white:    #ffffff;

  /* Semantic tokens */
  --color-primary:   var(--blue-600);
  --color-primary-h: var(--blue-700);
  --color-primary-l: var(--blue-500);
  --color-bg:        var(--white);
  --color-bg-alt:    var(--gray-50);
  --color-bg-dark:   var(--gray-900);
  --color-text:      var(--gray-900);
  --color-text-muted:var(--gray-500);
  --color-text-light:var(--gray-400);
  --color-border:    var(--gray-200);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.1), 0 1px 2px rgba(15,23,42,.06);
  --shadow-md: 0 4px 6px -1px rgba(15,23,42,.1), 0 2px 4px -2px rgba(15,23,42,.1);
  --shadow-lg: 0 10px 15px -3px rgba(15,23,42,.1), 0 4px 6px -4px rgba(15,23,42,.1);
  --shadow-xl: 0 20px 25px -5px rgba(15,23,42,.1), 0 8px 10px -6px rgba(15,23,42,.1);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Timing */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: .3s;

  /* Layout */
  --nav-h: 72px;
  --container: 1140px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-full: 9999px;
}


/* =======================================================
   2. RESET & BASE
   ======================================================= */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--color-primary-h); }

ul, ol { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
}


/* =======================================================
   3. UTILITY / LAYOUT
   ======================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: var(--white);
  border-color: var(--color-primary);
}
.btn--primary:hover {
  background: var(--color-primary-h);
  border-color: var(--color-primary-h);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn--outline:hover {
  background: var(--color-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn--full { width: 100%; justify-content: center; }


/* =======================================================
   4. NAVIGATION
   ======================================================= */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  transition: box-shadow var(--duration) var(--ease);
}
.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

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

/* Logo */
.logo {
  display: flex;
  align-items: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--color-text);
}
.logo:hover { color: var(--color-text); }
.logo-accent { color: var(--color-primary); }

/* Nav menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
  background: var(--blue-50);
}

/* Language toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--white);
  transition: all var(--duration) var(--ease);
}
.lang-toggle:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.lang-toggle i { font-size: 15px; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger-line {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
  transform-origin: center;
}
.hamburger.active .hamburger-line:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}
.hamburger.active .hamburger-line:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}


/* =======================================================
   5. HERO
   ======================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
  background: var(--color-bg);
}

/* Decorative shapes */
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: .08;
  background: var(--color-primary);
}
.hero-shape--1 { width: 600px; height: 600px; top: -200px; right: -150px; }
.hero-shape--2 { width: 400px; height: 400px; bottom: -100px; left: -100px; }
.hero-shape--3 { width: 200px; height: 200px; top: 40%; left: 50%; background: var(--blue-500); opacity: .05; }

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  padding-top: 60px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

/* Hero text */
.hero-text {
  max-width: 560px;
}

.hero-greeting {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: 12px;
  letter-spacing: .5px;
}

.hero-name {
  font-size: clamp(40px, 5vw, 62px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--color-text);
  margin-bottom: 20px;
}

.hero-role {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  font-weight: 400;
}

.hero-location {
  font-size: 15px;
  color: var(--color-text-light);
  margin-bottom: 32px;
}
.hero-location i {
  color: var(--color-primary);
  margin-right: 4px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  gap: 12px;
}
.hero-socials a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 18px;
  transition: all var(--duration) var(--ease);
}
.hero-socials a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Hero image */
.hero-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  position: relative;
  width: 380px;
  height: 380px;
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  animation: morph 8s ease-in-out infinite;
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@keyframes morph {
  0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
  25%      { border-radius: 58% 42% 56% 44% / 60% 54% 46% 40%; }
  50%      { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
  75%      { border-radius: 42% 58% 64% 36% / 48% 32% 68% 52%; }
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-indicator__mouse {
  display: block;
  width: 26px;
  height: 42px;
  border: 2px solid var(--color-primary);
  border-radius: 14px;
  position: relative;
}
.scroll-indicator__dot {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--color-primary);
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { opacity: 1; top: 8px; }
  100% { opacity: 0; top: 28px; }
}


/* =======================================================
   6. SECTION HEADINGS
   ======================================================= */
.section {
  padding: 100px 0;
}
.section--alt {
  background: var(--color-bg-alt);
}
.section--dark {
  background: var(--color-bg-dark);
  color: var(--white);
}

.section-heading {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--color-text);
  margin-bottom: 16px;
}
.section--dark .section-title,
.section--dark .section-label { color: var(--white); }
.section--dark .section-desc { color: var(--color-text-light); }

.section-desc {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.section-cta {
  text-align: center;
  margin-top: 48px;
}


/* =======================================================
   7. ABOUT
   ======================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 60px;
  align-items: start;
}

.about-headline {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 20px;
  line-height: 1.35;
}

.about-bio p {
  color: var(--color-text-muted);
  margin-bottom: 16px;
  font-size: 16px;
}

/* Quick stats */
.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.stat {
  display: flex;
  flex-direction: column;
}
.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Info card */
.info-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.info-row:last-child { margin-bottom: 0; }

.info-row i {
  width: 20px;
  text-align: center;
  color: var(--color-primary);
  font-size: 16px;
  margin-top: 3px;
  flex-shrink: 0;
}
.info-row strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}
.info-row span {
  font-size: 15px;
  color: var(--color-text);
  font-weight: 500;
}

/* Profile link chips */
.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}
.profile-chip:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}


/* =======================================================
   8. RESUME / TIMELINE
   ======================================================= */
/* Tabs */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
}

.tab {
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all var(--duration) var(--ease);
}
.tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.tab.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--white);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 32px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline-entry {
  position: relative;
  margin-bottom: 32px;
}
.timeline-entry:last-child { margin-bottom: 0; }

.timeline-dot {
  position: absolute;
  left: -28px;
  top: 28px;
  width: 16px;
  height: 16px;
  background: var(--color-primary);
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.timeline-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px;
  transition: all var(--duration) var(--ease);
}
.timeline-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.timeline-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.timeline-company {
  font-size: 15px;
  color: var(--color-primary);
  font-weight: 600;
}

.timeline-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--gray-100);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}

.timeline-list {
  margin: 0;
  padding: 0;
}
.timeline-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 15px;
}
.timeline-list li:last-child { margin-bottom: 0; }
.timeline-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}
.timeline-list li a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.timeline-desc {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* Tech tags on timeline entries */
.timeline-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.timeline-tags span {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--blue-50);
  border-radius: var(--radius-full);
}


/* =======================================================
   9. PROJECTS
   ======================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.project-icon {
  height: 140px;
  background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 44px;
}

.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
}
.project-body p {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  flex: 1;
}

/* Tags */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--blue-50);
  border-radius: var(--radius-full);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  margin-top: auto;
  transition: gap var(--duration) var(--ease);
}
.project-link:hover { gap: 10px; color: var(--color-primary-h); }


/* =======================================================
   10. ARTICLES
   ======================================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: all var(--duration) var(--ease);
  overflow: hidden;
}
.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

/* — Thumbnail image — */
.article-card__img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--gray-100);
}
.article-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-card:hover .article-card__img img {
  transform: scale(1.05);
}

/* — Card body — */
.article-card__body {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.article-date {
  font-size: 13px;
  color: var(--color-text-light);
  font-weight: 500;
}
.article-date i { margin-right: 4px; }

.article-tags {
  display: flex;
  gap: 6px;
}
.article-tags span {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--blue-50);
  border-radius: var(--radius-full);
}

.article-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.4;
}
.article-card p {
  font-size: 15px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.article-read {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  transition: color var(--duration) var(--ease);
  text-decoration: none;
}
.article-card:hover .article-read { color: var(--color-primary-h); }

/* — Skeleton loaders for articles — */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.article-skeleton {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skeleton-img {
  width: 100%;
  height: 160px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--gray-100) 25%, #e8edf5 50%, var(--gray-100) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
}
.skeleton-line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gray-100) 25%, #e8edf5 50%, var(--gray-100) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s ease infinite;
  width: 100%;
}
.skeleton-line--title { height: 20px; width: 80%; }
.skeleton-line--short { width: 50%; }

/* — Error state — */
.articles-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}
.articles-error i {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: block;
}
.articles-error a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}


/* =======================================================
   11. SKILLS
   ======================================================= */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-bottom: 64px;
}

.skills-group {
  background: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--duration) var(--ease);
}
.skills-group:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.skills-group h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.skills-group h3 i {
  color: var(--color-primary);
  font-size: 18px;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-tag {
  display: inline-block;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--gray-100);
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease);
}
.skill-tag:hover {
  background: var(--color-primary);
  color: var(--white);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* Certificates sub-section */
.certificates-section {
  margin-top: 0;
}

.sub-heading {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
  text-align: center;
  margin-bottom: 32px;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.cert-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease);
}
.cert-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.cert-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.cert-overlay {
  position: absolute;
  inset: 0;
  background: rgba(37,99,235,.85);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration) var(--ease);
}
.cert-card:hover .cert-overlay { opacity: 1; }
.cert-card { cursor: pointer; }
.cert-overlay i {
  font-size: 32px;
  color: var(--white);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  transform: scale(.92);
  transition: transform .3s ease;
}
.lightbox.active .lightbox-img {
  transform: scale(1);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background .2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,.15);
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev  { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 20px; top: 50%; transform: translateY(-50%); }


/* =======================================================
   12. CONTACT
   ======================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}
.contact-card i {
  font-size: 24px;
  color: var(--color-primary-l);
  margin-bottom: 10px;
}
.contact-card h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-light);
  margin-bottom: 6px;
  font-weight: 600;
}
.contact-card a,
.contact-card p {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
}
.contact-card a:hover { color: var(--color-primary-l); }

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-field {
  position: relative;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 16px 18px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--white);
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease);
  outline: none;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary-l);
  background: rgba(255,255,255,.1);
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: transparent; }

.form-field label {
  position: absolute;
  left: 18px;
  top: 16px;
  font-size: 15px;
  color: rgba(255,255,255,.5);
  pointer-events: none;
  transition: all var(--duration) var(--ease);
}
.form-field input:focus + label,
.form-field input:not(:placeholder-shown) + label,
.form-field textarea:focus + label,
.form-field textarea:not(:placeholder-shown) + label {
  top: -9px;
  left: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary-l);
  background: var(--color-bg-dark);
  padding: 0 6px;
}

.form-field textarea {
  resize: vertical;
  min-height: 130px;
}

.section--dark .btn--primary {
  background: var(--color-primary-l);
  border-color: var(--color-primary-l);
}
.section--dark .btn--primary:hover {
  background: var(--white);
  color: var(--color-primary);
  border-color: var(--white);
}


/* =======================================================
   13. FOOTER
   ======================================================= */
.footer {
  background: var(--gray-800);
  padding: 32px 0;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
}
.footer-logo span { color: var(--color-primary-l); }
.footer-logo:hover { color: var(--white); }

.footer p {
  color: var(--color-text-light);
  font-size: 14px;
}

.footer-socials {
  display: flex;
  gap: 10px;
}
.footer-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--color-text-light);
  font-size: 16px;
  transition: all var(--duration) var(--ease);
}
.footer-socials a:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--white);
  transform: translateY(-2px);
}


/* =======================================================
   14. BACK-TO-TOP BUTTON
   ======================================================= */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--duration) var(--ease);
  z-index: 999;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--color-primary-h);
  transform: translateY(-3px);
}


/* =======================================================
   15. SCROLL REVEAL ANIMATIONS
   ======================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.projects-grid .project-card,
.articles-grid .article-card,
.skills-grid .skills-group,
.timeline-entry {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.projects-grid.revealed .project-card,
.articles-grid.revealed .article-card,
.skills-grid.revealed .skills-group,
.tab-panel.active .timeline-entry {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays (up to 6 items) */
.projects-grid.revealed .project-card:nth-child(1),
.articles-grid.revealed .article-card:nth-child(1),
.skills-grid.revealed .skills-group:nth-child(1),
.tab-panel.active .timeline-entry:nth-child(1) { transition-delay: .05s; }
.projects-grid.revealed .project-card:nth-child(2),
.articles-grid.revealed .article-card:nth-child(2),
.skills-grid.revealed .skills-group:nth-child(2),
.tab-panel.active .timeline-entry:nth-child(2) { transition-delay: .1s; }
.projects-grid.revealed .project-card:nth-child(3),
.articles-grid.revealed .article-card:nth-child(3),
.skills-grid.revealed .skills-group:nth-child(3),
.tab-panel.active .timeline-entry:nth-child(3) { transition-delay: .15s; }
.projects-grid.revealed .project-card:nth-child(4),
.articles-grid.revealed .article-card:nth-child(4),
.skills-grid.revealed .skills-group:nth-child(4),
.tab-panel.active .timeline-entry:nth-child(4) { transition-delay: .2s; }
.projects-grid.revealed .project-card:nth-child(5) { transition-delay: .25s; }
.projects-grid.revealed .project-card:nth-child(6) { transition-delay: .3s; }
.projects-grid.revealed .project-card:nth-child(7) { transition-delay: .35s; }
.projects-grid.revealed .project-card:nth-child(8) { transition-delay: .4s; }
.projects-grid.revealed .project-card:nth-child(9) { transition-delay: .45s; }
.projects-grid.revealed .project-card:nth-child(10) { transition-delay: .5s; }
.articles-grid.revealed .article-card:nth-child(5) { transition-delay: .25s; }
.articles-grid.revealed .article-card:nth-child(6) { transition-delay: .3s; }


/* =======================================================
   16. RESPONSIVE — TABLET (≤ 968px)
   ======================================================= */
@media (max-width: 968px) {
  /* Navigation: slide-in panel */
  .hamburger { display: flex; }

  .nav-menu {
    position: fixed;
    top: var(--nav-h);
    right: -100%;
    width: 300px;
    height: calc(100vh - var(--nav-h));
    flex-direction: column;
    align-items: flex-start;
    background: var(--white);
    padding: 32px 28px;
    box-shadow: var(--shadow-xl);
    transition: right .35s var(--ease);
    overflow-y: auto;
    gap: 8px;
  }
  .nav-menu.open { right: 0; }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 2px;
  }

  .nav-link {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
  }

  .lang-toggle {
    margin-left: 0;
    margin-top: 12px;
  }

  /* Hero */
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 40px;
    gap: 40px;
  }
  .hero-text { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-socials { justify-content: center; }
  .hero-image { width: 280px; height: 280px; }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .about-stats { justify-content: center; }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .contact-card { flex: 1; min-width: 200px; }
}


/* =======================================================
   17. RESPONSIVE — MOBILE (≤ 640px)
   ======================================================= */
@media (max-width: 640px) {
  .section { padding: 72px 0; }

  .hero-name { font-size: 36px; }
  .hero-role { font-size: 17px; }
  .hero-image { width: 220px; height: 220px; }

  /* Stack stats vertically */
  .about-stats {
    flex-direction: column;
    gap: 20px;
    align-items: center;
    text-align: center;
  }

  /* Project / article grids go single column */
  .projects-grid,
  .articles-grid,
  .skills-grid,
  .certificates-grid {
    grid-template-columns: 1fr;
  }

  /* Tabs stack */
  .tabs {
    flex-direction: column;
    gap: 8px;
  }
  .tab { width: 100%; text-align: center; }

  /* Contact info stacks */
  .contact-info { flex-direction: column; }
  .contact-card { width: 100%; }

  /* Footer stacks */
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}