/* ==========================================================================
   SANOU TIDIANE — PORTFOLIO
   Design tokens + global styles
   ========================================================================== */

:root {
  /* Color tokens */
  --bg-void: #060a10;
  --bg-surface: #0b1119;
  --bg-surface-2: #101823;
  --bg-surface-3: #141d29;
  --border-subtle: #1c2733;
  --border-strong: #26333f;

  --text-primary: #eaf1f5;
  --text-secondary: #b7c2cd;
  --text-muted: #7c8a99;

  --accent: #35e1c1;
  --accent-dim: #1c8a77;
  --accent-soft: rgba(53, 225, 193, 0.12);
  --accent-status: #4ade80;

  /* Type */
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Layout */
  --header-height: 72px;
  --container-w: 1180px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-mono); font-weight: 600; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea { font: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

body {
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 18%, rgba(53, 225, 193, 0.16), transparent 22%),
    radial-gradient(circle at 82% 18%, rgba(64, 227, 255, 0.12), transparent 20%),
    radial-gradient(circle at 50% 82%, rgba(53, 225, 193, 0.08), transparent 28%),
    linear-gradient(120deg, rgba(8, 13, 19, 0.96), rgba(4, 8, 12, 0.96));
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(53, 225, 193, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 225, 193, 0.08) 1px, transparent 1px),
    repeating-linear-gradient(180deg, rgba(74, 222, 128, 0.06) 0, rgba(74, 222, 128, 0.06) 1px, transparent 1px, transparent 5px),
    radial-gradient(circle at 20% 25%, rgba(80, 255, 220, 0.18) 0, transparent 20%),
    radial-gradient(circle at 75% 50%, rgba(80, 255, 220, 0.14) 0, transparent 18%);
  background-size: 50px 50px, 50px 50px, 100% 100%, 100% 100%, 100% 100%;
  opacity: 0.95;
  mask-image: radial-gradient(circle at center, black 45%, transparent 100%);
}

main, header, footer {
  position: relative;
  z-index: 1;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--accent);
  color: var(--bg-void);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 999;
  font-family: var(--font-mono);
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

.scroll-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 120;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(53, 225, 193, 0.35);
  background: rgba(9, 16, 22, 0.9);
  color: var(--accent);
  box-shadow: 0 14px 28px -16px rgba(53, 225, 193, 0.75);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease), transform 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.scroll-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: rgba(53, 225, 193, 0.12);
  border-color: var(--accent);
}
.scroll-to-top i {
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-accent { color: var(--accent); }

/* ---------- Background texture ---------- */
body {
  background-image:
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  background-attachment: fixed;
  background-color: var(--bg-void);
}
@media (max-width: 640px) {
  body { background-size: 32px 32px; }
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  background: rgba(6, 10, 16, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}
.header-inner {
  max-width: var(--container-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.brand-prompt { color: var(--text-primary); }
.brand-cursor { color: var(--accent); }

.nav-desktop { display: none; }
.nav-list { display: flex; align-items: center; gap: 2rem; }
.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  transition: color 0.2s var(--ease);
}
.nav-link::before {
  content: "";
  position: absolute;
  left: -1.1rem;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left;
  width: 0.6rem;
  height: 1px;
  background: var(--accent);
  transition: transform 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -4px;
  height: 2px;
  background: var(--accent);
  transition: right 0.25s var(--ease);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link:hover::after { right: 0; }
.nav-link.active { color: var(--accent); }
.nav-link.active::after { right: 0; }
.nav-link.active::before { transform: translateY(-50%) scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(16, 24, 35, 0.85);
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 64px;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.lang-btn.is-active {
  background: rgba(53, 225, 193, 0.12);
  border-color: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}
.lang-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-dim);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-void);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(53, 225, 193, 0.5);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--accent); }
.btn-block { width: 100%; }
.btn-nav { display: none; }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 3.5rem) 0 5rem;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-grid {
  position: absolute;
  inset: -10% -10%;
  background: radial-gradient(ellipse 60% 50% at 75% 20%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-status);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  margin-bottom: 1.5rem;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-status);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}
.hero-role {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-family: var(--font-mono);
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.role-dot { color: var(--border-strong); }
.hero-desc {
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 2.25rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* Terminal */
.hero-terminal { width: 100%; }
.terminal-window {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.terminal-title {
  margin-left: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}
.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.9;
  min-height: 260px;
  color: var(--text-secondary);
}
.terminal-line { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.terminal-prompt { color: var(--accent); flex-shrink: 0; }
.terminal-output { color: var(--text-primary); }
.terminal-cursor {
  display: inline-block;
  width: 8px; height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section { padding: 6rem 0; }
.section-alt { background: var(--bg-surface); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--text-primary);
  margin-bottom: 1rem;
}
.section-note {
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 3rem;
  font-size: 0.95rem;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Profil ---------- */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
.profile-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
  order: -1;
  background: transparent;
  padding: 0;
}
.profile-image {
  width: 100%;
  max-width: 420px;
  height: auto;
  border-radius: 22px;
  border: none;
  box-shadow: none;
  background: transparent;
  transition: transform 0.3s var(--ease), filter 0.3s var(--ease);
}
.profile-image:hover {
  transform: translateY(-4px);
  filter: drop-shadow(0 12px 26px rgba(53, 225, 193, 0.12));
}
.profile-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
}
.profile-text p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: clamp(1.05rem, 1.25vw, 1.35rem);
  line-height: 1.9;
  width: 100%;
}
.profile-highlights { display: flex; flex-direction: column; gap: 1.5rem; }
.profile-highlights li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.profile-highlights strong { display: block; font-family: var(--font-mono); font-size: 0.95rem; margin-bottom: 0.25rem; }
.profile-highlights span { color: var(--text-muted); font-size: 0.875rem; }

.academic-timeline {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.25rem;
}
.academic-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  align-items: center;
}
.academic-year {
  position: relative;
  padding-left: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}
.academic-year::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  box-shadow: 0 0 0 6px rgba(53, 225, 193, 0.08);
}
.academic-card {
  background: linear-gradient(180deg, rgba(13, 18, 25, 0.96), rgba(9, 14, 18, 0.96));
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent-dim);
  border-radius: 16px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 18px 35px -28px rgba(0, 0, 0, 0.7);
}
.academic-level {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.academic-card h3 {
  font-size: clamp(1.05rem, 1.6vw, 1.4rem);
  margin-bottom: 0.3rem;
}
.academic-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

@media (max-width: 640px) {
  .academic-item {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .academic-year {
    padding-left: 1.2rem;
  }
}

/* ---------- Compétences ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.skill-card {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent-dim);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.skill-card:hover { border-left-color: var(--accent); transform: translateY(-3px); }
.skill-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.skill-head h3 { font-size: 1.05rem; }
.skill-list { display: flex; flex-direction: column; gap: 0.75rem; }
.skill-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
  transition: transform 0.2s var(--ease), color 0.2s var(--ease);
}
.skill-item:hover {
  color: var(--text-primary);
  transform: translateX(2px);
}
.skill-icon {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.7rem;
  background: rgba(53, 225, 193, 0.08);
  border: 1px solid rgba(53, 225, 193, 0.2);
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: inset 0 0 12px rgba(53, 225, 193, 0.06);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.skill-item:hover .skill-icon {
  transform: translateY(-1px);
  border-color: rgba(53, 225, 193, 0.4);
  box-shadow: 0 0 18px rgba(53, 225, 193, 0.1);
}
.skill-icon i {
  font-size: 0.9rem;
  line-height: 1;
}

/* ---------- Projets ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
.project-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}
.project-media {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, var(--bg-surface-3), var(--bg-surface-2));
  border-bottom: 1px solid var(--border-subtle);
}
.icon-project { width: 40px; height: 40px; color: var(--accent-dim); }
.project-body { padding: 1.5rem; }
.project-body h3 { font-size: 1.05rem; margin-bottom: 0.75rem; line-height: 1.3; }
.project-body p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.project-tags li {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}
.project-links { display: flex; gap: 1.25rem; border-top: 1px solid var(--border-subtle); padding-top: 1.1rem; }
.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
}
.project-link:hover { color: var(--accent); }

/* ---------- Certifications ---------- */
.cert-page {
  padding-top: calc(var(--header-height) + 2rem);
}
.cert-page-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
.cert-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cert-page-note {
  margin-bottom: 0;
}
.certificates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.certificates-card {
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.96), rgba(10, 15, 22, 0.96));
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.certificates-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-dim);
  box-shadow: 0 18px 40px -28px rgba(53, 225, 193, 0.45);
}
.certificates-card-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  background:
    linear-gradient(135deg, rgba(53, 225, 193, 0.06), rgba(16, 24, 35, 0.82)),
    var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}
.certificates-card-preview i {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  color: var(--accent);
}
.certificates-preview-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  border: 1px solid rgba(53, 225, 193, 0.2);
  background: rgba(53, 225, 193, 0.08);
  color: var(--accent);
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
}
.certificates-card-body {
  padding: 1.35rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.certificates-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}
.certificates-card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.certificates-card-type {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
}
.certificates-card-body h3 {
  font-size: 1.08rem;
  line-height: 1.4;
}
.certificates-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: auto;
}
.certificates-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1 1 150px;
  min-height: 44px;
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.certificates-card-button:hover {
  transform: translateY(-1px);
}
.certificates-card-button--primary {
  background: var(--accent);
  color: var(--bg-void);
}
.certificates-card-button--secondary {
  background: rgba(17, 25, 33, 0.9);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}
.certificates-card-button--secondary:hover {
  border-color: var(--accent-dim);
  color: var(--accent);
}

@media (min-width: 768px) {
  .certificates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .certificates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}
.contact-card {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.contact-card h3 { font-size: 1.1rem; margin-bottom: 1.5rem; }
.contact-list { display: flex; flex-direction: column; gap: 1.1rem; }
.contact-list li { display: flex; align-items: center; gap: 0.85rem; }
.contact-list a { font-size: 0.95rem; transition: color 0.2s var(--ease); }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--bg-void);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-row { display: flex; flex-direction: column; gap: 0.5rem; }
.form-row label { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.form-row input, .form-row textarea {
  background: var(--bg-surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  color: var(--text-primary);
  resize: vertical;
  transition: border-color 0.2s var(--ease);
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-status { font-size: 0.85rem; color: var(--accent); min-height: 1em; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border-subtle); padding-top: 3.5rem; }
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer-nav a { font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-secondary); transition: color 0.2s var(--ease); }
.footer-nav a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer-social a:hover { color: var(--accent); border-color: var(--accent-dim); }
.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; text-align: center; }

.hamburger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: rgba(16, 24, 35, 0.88);
  color: var(--text-primary);
  z-index: 140;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.hamburger:hover {
  border-color: var(--accent-dim);
  background: rgba(19, 29, 40, 0.95);
}
.hamburger:active { transform: scale(0.98); }
.hamburger-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  line-height: 1;
  font-weight: 700;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.hamburger-icon-menu { opacity: 1; transform: rotate(0deg) scale(1); }
.hamburger-icon-close { opacity: 0; transform: rotate(90deg) scale(0.5); }
.hamburger.is-open .hamburger-icon-menu { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.hamburger.is-open .hamburger-icon-close { opacity: 1; transform: rotate(0deg) scale(1); }

.mobile-menu {
  position: fixed;
  top: var(--header-height);
  right: 0;
  width: min(86vw, 360px);
  height: calc(100dvh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem 1.25rem 1.25rem;
  background: rgba(7, 12, 17, 0.97);
  border-left: 1px solid var(--border-subtle);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.2);
  transform: translateX(110%);
  transition: transform 0.28s var(--ease);
  z-index: 130;
  pointer-events: none;
}
.mobile-menu.is-open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 0.25rem;
}
.mobile-nav-link {
  display: block;
  width: 100%;
  padding: 0.9rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  background: transparent;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--accent);
  border-color: var(--accent-dim);
  background: rgba(53, 225, 193, 0.06);
}
.mobile-menu-footer {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}
.lang-switch-mobile {
  display: inline-flex;
  width: 100%;
  justify-content: center;
}
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 9, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s var(--ease), visibility 0.2s var(--ease);
  z-index: 120;
}
.mobile-menu-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (min-width: 768px) {
  .profile-grid { grid-template-columns: 1fr 1.3fr; }
  .profile-image-container { order: 0; }
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .certification-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1.2fr; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; }
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .certification-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .btn-nav { display: inline-flex; }
  .hamburger { display: none; }
  .mobile-menu, .mobile-menu-overlay { display: none; }
  .lang-switch-mobile { display: none; }
}

@media (max-width: 899px) {
  .nav-desktop { display: none; }
  .btn-nav { display: none; }
  .header-actions .lang-switch { display: none; }
  .hamburger { display: inline-flex; }
  .mobile-menu { display: flex; }
  .mobile-menu-overlay { display: block; }
}

@media (max-width: 380px) {
  .hero-actions .btn span { font-size: 0.82rem; }
}

@media (max-width: 767px) {
  .cert-card {
    padding: 1.25rem;
    gap: 0.85rem;
  }
  .cert-card-icon {
    width: 42px;
    height: 42px;
  }
  .cert-card-icon .icon {
    width: 20px;
    height: 20px;
  }
  .cert-card-body h3 {
    font-size: 0.95rem;
  }
  .cert-card-issuer {
    font-size: 0.75rem;
  }
  .cert-card-desc {
    font-size: 0.85rem;
  }
  .cert-card-link {
    font-size: 0.75rem;
  }
}

