/* ===== Portfolio professionnel — KADIEBWE MAKINA EDVAIS ===== */
:root {
  --bg: #050810;
  --bg-elevated: #0a0f18;
  --bg-alt: #0d121c;
  --surface: #0f1624;
  --surface-hover: #151e30;
  --border: rgba(94, 184, 255, 0.14);
  --border-light: rgba(94, 184, 255, 0.08);
  --text: #eef6ff;
  --text-secondary: #7a8fa8;
  --primary: #5eb8ff;
  --primary-hover: #3da8f5;
  --primary-soft: rgba(94, 184, 255, 0.14);
  --primary-glow: rgba(0, 232, 255, 0.35);
  --accent: #c9a86c;
  --accent-soft: rgba(201, 168, 108, 0.14);
  --accent-glow: rgba(201, 168, 108, 0.3);
  --success: #5a9a7a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
  --font: 'Inter', system-ui, sans-serif;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --header-h: 76px;
  --radius: 8px;
  --radius-lg: 12px;
  --ease: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --container: min(1160px, 92vw);
}

[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-alt: #f1f5f9;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --primary-glow: rgba(37, 99, 235, 0.2);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1);
}

html[lang="ar"] { font-family: 'Noto Sans Arabic', var(--font); }
html[lang="zh"] { font-family: 'Noto Sans SC', var(--font); }
html[lang="ja"] { font-family: 'Noto Sans JP', var(--font); }
html[lang="hi"] { font-family: 'Noto Sans Devanagari', var(--font); }

html[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
html[dir="rtl"] .hero-grid,
html[dir="rtl"] .about-grid,
html[dir="rtl"] .contact-grid { direction: rtl; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.nav-open { overflow: hidden; }
::selection {
  background: var(--primary-soft);
  color: var(--text);
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 10001;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
  outline: none;
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  z-index: 10001;
  box-shadow: 0 0 12px var(--primary-glow);
}
img { max-width: 100%; display: block; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--primary-hover); }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
.container { width: var(--container); margin-inline: auto; }
.section {
  padding: clamp(2.75rem, 5vw, 4rem) 0;
  content-visibility: auto;
  contain-intrinsic-size: auto 480px;
}
#home { content-visibility: visible; }
.text-primary { color: var(--primary); }

/* Loader */
.loader {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  transition: opacity 0.4s, visibility 0.4s;
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-spinner {
  width: 40px; height: 40px; margin: 0 auto 1rem;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { font-size: 0.875rem; color: var(--text-secondary); }

/* Buttons — système professionnel unifié */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease), transform 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--text-secondary);
  color: var(--text);
}
.btn-filter {
  min-height: 38px;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-filter:hover,
.btn-filter.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-sm { min-height: 38px; padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-full { width: 100%; }
.btn-icon {
  min-height: 40px;
  min-width: 40px;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
}
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-group { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1.5rem; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--header-h);
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}
[data-theme="light"] .header { background: rgba(248, 250, 252, 0.9); }
.header.scrolled {
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.nav-logo:hover { color: var(--text); }
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  font-size: 0.75rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nav-link {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius);
  transition: color var(--ease), background var(--ease);
}
.nav-link:hover,
.nav-link.active:not(.nav-link-cta) { color: var(--text); background: var(--surface-hover); }
.nav-link-cta {
  margin-left: 0.5rem;
  background: var(--primary);
  color: #fff !important;
}
.nav-link-cta:hover,
.nav-link-cta.active { background: var(--primary-hover); color: #fff !important; }
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--ease);
  pointer-events: none;
}
.nav-overlay.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-actions { display: flex; align-items: center; gap: 0.5rem; }
.lang-btn { gap: 0.35rem; font-size: 0.8125rem; font-weight: 600; }
.lang-switcher { position: relative; }
.lang-dropdown {
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: var(--ease);
  max-height: 280px; overflow-y: auto; z-index: 100;
}
.lang-switcher.open .lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-dropdown li {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
}
.lang-dropdown li:hover,
.lang-dropdown li.active { background: var(--primary-soft); color: var(--primary); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  transition: var(--ease);
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.fab-translate {
  display: none;
  position: fixed; bottom: 5.5rem; right: 1rem; z-index: 900;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* Sections */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}
.section-subtitle,
.section-lead {
  margin-top: 0.75rem;
  max-width: 42rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}
.section-header {
  margin-bottom: 2.5rem;
  position: relative;
}
.section-header::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 1.25rem;
  background: var(--primary);
  border-radius: 2px;
}
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-stagger.visible { transition-delay: var(--delay, 0ms); }
.section-alt { background: var(--bg-alt); }
.section-contact {
  background: linear-gradient(180deg, var(--bg-alt) 0%, var(--bg-elevated) 100%);
  border-top: 1px solid var(--border-light);
}

/* Chapter rail — navigation type vidéo portfolio */
.chapter-rail {
  position: fixed;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.chapter-link {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform var(--ease), background var(--ease), box-shadow var(--ease);
}
.chapter-link span { display: none; }
.chapter-link:hover,
.chapter-link.active {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.35);
  box-shadow: 0 0 12px var(--primary-glow);
}
@media (max-width: 900px) {
  .chapter-rail { display: none; }
}

/* Hero cinéma */
.hero.hero-cinema {
  min-height: min(92vh, 820px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-cinema .container.hero-grid { flex: 1; display: grid; align-content: center; }
.hero-reel {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hero-reel-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  animation: reelScroll 42s linear infinite;
}
.hero-reel-item {
  flex: 0 0 auto;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  opacity: 0.85;
}
.hero-reel-item img {
  width: 140px;
  height: 80px;
  object-fit: cover;
  display: block;
}
@keyframes reelScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-reel-track { animation: none; }
  .reveal { transition: none; }
}

/* Hero */
.hero {
  position: relative;
  padding-top: calc(var(--header-h) + 1.5rem);
  padding-bottom: 1rem;
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(37, 99, 235, 0.15), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 20%, rgba(96, 165, 250, 0.08), transparent 50%),
    linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 20%, transparent 85%);
}
.hero-grid { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}
.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}
.hero-typing {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-height: 1.5em;
  margin-bottom: 1rem;
}
.typing-cursor { color: var(--primary); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero-desc { color: var(--text-secondary); max-width: 34rem; margin-bottom: 1rem; }
.hero-location { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 1.5rem; }
.hero-location i { color: var(--primary); margin-right: 0.35rem; }
.hero-social { display: flex; gap: 0.75rem; }
.hero-social a {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: var(--ease);
}
.hero-social a:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.profile-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.profile-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--primary), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.profile-photo { width: 100%; object-fit: cover; aspect-ratio: 4/5; }
.status-badge {
  position: absolute;
  bottom: 1rem; left: 1rem; right: 1rem;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--success);
  color: #fff;
  border-radius: var(--radius);
}
.expertise-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}
.expertise-pills li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-secondary);
}

/* Stats */
.stats { background: var(--bg-elevated); border-block: 1px solid var(--border-light); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.stat-card {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat-label { margin-top: 0.35rem; font-size: 0.875rem; color: var(--text-secondary); }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 1.75rem;
  align-items: start;
}
.about-photo {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.about-content h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.about-content p { color: var(--text-secondary); margin-bottom: 1rem; }
.info-list { margin: 1.5rem 0; }
.info-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
}
.info-list dt { font-weight: 600; color: var(--text); }
.info-list dd { color: var(--text-secondary); }
.tag-group { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-group span {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.skill-card {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.skill-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.skill-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.skill-card-header i {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius);
  font-size: 1.1rem;
}
.skill-card h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
}
.skill-stack {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.skill-level-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}
.skill-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.skill-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 999px;
  transition: width 1.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.service-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
  height: 100%;
}
.service-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1.15rem;
}
.service-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.service-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Projects */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.projects-grid {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.projects-grid .project-card {
  flex: 0 0 min(300px, 82vw);
  scroll-snap-align: start;
}
@media (min-width: 1100px) {
  .projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    overflow: visible;
  }
  .projects-grid .project-card { flex: unset; }
}
.project-desc-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), opacity 0.35s ease;
}
.project-card.hidden { display: none !important; }
.project-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  transform: translateY(-4px);
}
.project-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.project-card:hover .project-img img { transform: scale(1.03); }
.project-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 55%, rgba(0,0,0,0.75));
  display: flex; align-items: flex-end;
  padding: 1rem;
}
.project-img { position: relative; }
.project-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.project-body { padding: 1.25rem; }
.project-body h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.project-body p { font-size: 0.875rem; color: var(--text-secondary); }

/* Archive intro gate */
body.archive-gate-open { overflow: hidden; }
.archive-gate {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.archive-gate.is-visible {
  opacity: 1;
  visibility: visible;
}
.archive-gate-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 100%, var(--primary-soft), transparent 50%),
    rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(12px);
}
.archive-gate-panel {
  position: relative;
  max-width: 22rem;
  text-align: center;
  padding: 1.75rem 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 60px var(--accent-glow);
  animation: archivePanelIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes archivePanelIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.archive-gate-code {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.archive-gate-panel h2 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.archive-gate-lead {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.archive-gate-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}
.archive-gate-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* Projects archive section */
.section-archive {
  position: relative;
  overflow: hidden;
}
.section-archive::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto;
  height: 50%;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-soft), transparent 70%);
  pointer-events: none;
}
.project-card--sealed { cursor: pointer; }
.project-card--sealed .project-thumb {
  filter: brightness(0.5) saturate(0.9);
  transform: scale(1.02);
  transition: filter 0.35s ease, transform 0.35s ease;
}
.project-card--sealed:hover .project-thumb {
  filter: brightness(0.72);
}
.project-card--opened .project-thumb {
  filter: none;
  transform: none;
}
.project-seal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(2, 6, 23, 0.35);
  transition: opacity 0.35s ease;
  z-index: 2;
}
.project-card--opened .project-seal,
.project-card--sealed:hover .project-seal {
  opacity: 0.85;
}
.project-card--opened .project-seal { opacity: 0; pointer-events: none; }
.project-seal-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 1rem;
  box-shadow: 0 0 24px var(--accent-glow);
}
.project-seal-text {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #e2e8f0;
}
.project-reveal-hint {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.project-card--sealed:hover .project-reveal-hint {
  opacity: 1;
  transform: translateY(0);
}
.project-overlay {
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
}
.project-stack-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
}
.project-stack-preview li {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 4px;
}
[data-theme="light"] .project-stack-preview li {
  color: var(--primary-hover);
}

/* Project detail modal */
body.modal-open { overflow: hidden; }
.project-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.project-modal.is-open {
  opacity: 1;
  visibility: visible;
}
.project-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(8px);
}
.project-modal-panel {
  position: relative;
  width: min(920px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  animation: modalIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.project-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ease);
}
.project-modal-close:hover { background: var(--surface-hover); }
.project-modal-visual {
  padding: 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}
.project-modal-zoom-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}
.project-modal-zoom-bar .btn-zoom {
  min-width: 36px;
  min-height: 36px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
}
#zoom-reset.btn-zoom {
  min-width: 52px;
}
.project-modal-viewport {
  overflow: auto;
  max-height: min(48vh, 360px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  -webkit-overflow-scrolling: touch;
}
.project-modal-viewport.is-zoomed {
  cursor: zoom-out;
}
.project-modal-viewport img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  -webkit-user-drag: none;
}
.project-modal-zoom-hint {
  margin: 0.45rem 0 0.65rem;
  font-size: 0.72rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}
.project-modal-gallery {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}
.project-modal-thumb {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  background: none;
  cursor: pointer;
  opacity: 0.65;
  transition: opacity var(--ease), border-color var(--ease);
}
.project-modal-thumb.active,
.project-modal-thumb:hover {
  opacity: 1;
  border-color: var(--primary);
}
.project-modal-thumb img {
  width: 72px;
  height: 44px;
  object-fit: cover;
  display: block;
}
.project-modal-body {
  padding: 1.5rem 1.5rem 1.5rem 1rem;
}
.project-modal-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.project-modal-body h3 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0.35rem 0 0.75rem;
}
.project-modal-body > p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.project-modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  list-style: none;
  padding: 0;
}
.project-modal-stack li {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
}
.project-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media (max-width: 768px) {
  .project-modal-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }
  .project-modal-visual { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .project-modal-body { padding: 1.25rem; }
}

/* Timeline */
.timeline { position: relative; padding-left: 1.75rem; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 0; bottom: 0;
  width: 2px;
  background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
  position: absolute;
  left: -1.75rem; top: 1.25rem;
  width: 12px; height: 12px;
  background: var(--primary);
  border: 2px solid var(--bg);
  border-radius: 50%;
}
.timeline-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.timeline-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  margin: 0.35rem 0;
}
.timeline-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* Testimonials */
.testimonials-slider { position: relative; min-height: 130px; }
.testimonial-card {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: opacity 0.4s ease;
}
.testimonial-card.is-hidden {
  display: none;
  opacity: 0;
}
.testimonial-card p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}
.about-p2 {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}
.testimonial-author { display: flex; align-items: center; gap: 1rem; }
.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}
.testimonial-author h4 { font-size: 0.95rem; font-weight: 600; }
.testimonial-author span { font-size: 0.85rem; color: var(--text-secondary); }
.testimonial-dots {
  display: flex; justify-content: center; gap: 0.5rem;
  margin-top: 1.25rem;
}
.testimonial-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  padding: 0;
}
.testimonial-dots button.active { background: var(--primary); }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.5rem;
  align-items: start;
}
.contact-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.75rem;
}
.contact-card i { font-size: 1.25rem; color: var(--primary); margin-bottom: 0.5rem; }
.contact-card h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.contact-card a,
.contact-card p {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.contact-form .form-group { margin-bottom: 1.25rem; }
.contact-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 3rem 0 1.5rem;
  background: var(--bg-elevated);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid p,
.footer-grid a {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}
.footer-grid h4 {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.footer-social { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.footer-social a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  margin-top: 0;
}
.footer-social a:hover { color: var(--primary); border-color: var(--primary); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.fab-whatsapp {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 900;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  transition: transform var(--ease);
}
.fab-whatsapp:hover { transform: scale(1.05); color: #fff; }

.back-to-top {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--ease), visibility var(--ease), transform var(--ease), border-color var(--ease), color var(--ease);
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.toast {
  position: fixed; bottom: 5rem; left: 50%;
  transform: translateX(-50%) translateY(12px);
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: var(--ease);
  z-index: 10000;
}
.toast.show { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 992px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 380px; margin: 0 auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: var(--ease);
  }
  .nav-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .back-to-top { bottom: 6.5rem; right: 1rem; }
  .nav-link-cta { margin-left: 0; text-align: center; }
  .nav-toggle { display: flex; }
  .fab-translate { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .info-list > div { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .skill-bar-fill, .back-to-top, .project-card { transition: none !important; }
  .loader-spinner { animation: none; }
  .typing-cursor { animation: none; }
}
