/* ================================================
   PORTFOLIO — Sami BELHADRI
   Atelier Design System
   Syne · DM Sans · Gold Accent
   ================================================ */

/* ============ 1. VARIABLES ============ */

:root {
  --bg: #0a0a0a;
  --bg-raised: #111113;
  --bg-card: #161618;
  --bg-card-hover: #1c1c1f;

  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 219, 110, 0.25);

  --text: #ede9df;
  --text-2: #9b9588;
  --text-3: #5e5a52;

  --gold: #FFDB6E;
  --gold-deep: #FFBC5E;
  --gold-glow: rgba(255, 219, 110, 0.12);
  --gold-subtle: rgba(255, 219, 110, 0.06);

  --ff-display: 'Syne', system-ui, sans-serif;
  --ff-body: 'DM Sans', system-ui, sans-serif;

  --fs-hero: clamp(3.2rem, 10vw, 7.5rem);
  --fs-h2: clamp(1.8rem, 4.5vw, 3rem);
  --fs-h3: clamp(1.15rem, 2vw, 1.35rem);
  --fs-body: clamp(0.9rem, 1.4vw, 1rem);
  --fs-sm: clamp(0.8rem, 1.2vw, 0.875rem);
  --fs-xs: 0.75rem;

  --section-py: clamp(5rem, 12vw, 9rem);
  --container: 1140px;
  --gap: clamp(1rem, 3vw, 2rem);
  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 0.15s;
  --t-med: 0.3s;
  --t-slow: 0.6s;
}


/* ============ 2. RESET ============ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--ff-body);
  font-size: var(--fs-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255, 219, 110, 0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 219, 110, 0.4); }

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: none; color: inherit; }
input, textarea { font: inherit; color: inherit; background: none; border: none; outline: none; }
ul, ol { list-style: none; }

::selection { background: rgba(255, 219, 110, 0.25); color: #fff; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.gold { color: var(--gold); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 2rem); }


/* ============ 3. LOADER ============ */

.loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1.5rem;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-inner {
  display: flex; align-items: center; gap: 10px;
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-logo { width: 36px; height: 36px; border-radius: 10px; }

.loader-text {
  font-family: var(--ff-display);
  font-size: 1.75rem; font-weight: 800;
  letter-spacing: -0.02em;
}

.loader-dot { color: var(--gold); }

.loader-bar {
  width: 180px; height: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px; overflow: hidden;
}

.loader-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  border-radius: 2px;
  animation: loaderFill 1.1s var(--ease) forwards;
}

@keyframes loaderPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes loaderFill { to { width: 100%; } }


/* ============ 4. PROGRESS BAR ============ */

.progress-bar {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  z-index: 1000;
  transition: width 0.08s linear;
}


/* ============ 5. NAVIGATION ============ */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1rem 0;
  transition: background var(--t-med), box-shadow var(--t-med), transform 0.4s var(--ease);
}

.nav.scrolled {
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

.nav.hidden { transform: translateY(-110%); }

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
  display: flex; align-items: center; gap: 2rem;
}

.nav-brand {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}

.nav-logo-img { border-radius: 6px; }

.nav-logo-text {
  font-family: var(--ff-display);
  font-size: 1.1rem; font-weight: 800;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex; align-items: center; gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 0.4rem 0.75rem;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-2);
  border-radius: 8px;
  transition: color var(--t-fast);
}

.nav-link:hover { color: var(--text); }

.nav-link::after {
  content: ''; position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 50%; height: 1.5px;
  background: var(--gold);
  border-radius: 1px;
  transition: transform var(--t-med) var(--ease);
}

.nav-link:hover::after,
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }
.nav-link.active { color: var(--text); }

.nav-cta {
  font-size: var(--fs-xs); font-weight: 600;
  padding: 0.4rem 1rem;
  background: var(--gold-subtle);
  border: 1px solid rgba(255, 219, 110, 0.15);
  border-radius: var(--radius-full);
  color: var(--gold);
  transition: background var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
}

.nav-cta:hover {
  background: rgba(255, 219, 110, 0.12);
  border-color: rgba(255, 219, 110, 0.3);
}

/* Hamburger */
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 24px; padding: 2px 0; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--text); border-radius: 2px; transition: transform var(--t-med), opacity var(--t-fast); }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }

  .nav-links {
    position: fixed; top: 0; right: 0;
    width: 280px; height: 100dvh;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(24px);
    flex-direction: column; align-items: flex-start;
    padding: 5rem 2rem 2rem; gap: 0.5rem;
    transform: translateX(100%);
    transition: transform var(--t-med) var(--ease);
    border-left: 1px solid var(--border);
    z-index: 200;
  }

  .nav-links.open { transform: translateX(0); }
  .nav-link { font-size: 1rem; padding: 0.7rem 0; width: 100%; }
}


/* ============ 6. HERO ============ */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center;
  padding: clamp(7rem, 14vw, 11rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.6;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 800px; height: 800px;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 219, 110, 0.06), transparent 65%);
  pointer-events: none;
  filter: blur(40px);
}

.hero-content {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 1.75rem;
  position: relative; z-index: 1;
}

.hero-availability {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text-2);
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 7px; height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

.hero-name {
  font-family: var(--ff-display);
  font-size: var(--fs-hero);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--text);
}

.hero-name-line { display: block; }
.hero-name-line:last-child { color: var(--gold); }

.hero-role {
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: var(--text-2);
  line-height: 1.6;
  max-width: 600px;
}

.hero-noqta {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 600; color: var(--text);
  transition: color var(--t-fast);
}

.hero-noqta:hover { color: var(--gold); }
.hero-noqta img { border-radius: 4px; }

.hero-meta {
  display: flex; align-items: center; gap: 1rem;
  font-size: var(--fs-sm); color: var(--text-3);
  flex-wrap: wrap; justify-content: center;
}

.meta-sep { width: 4px; height: 4px; background: var(--text-3); border-radius: 50%; flex-shrink: 0; }

.hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap; justify-content: center;
  padding-top: 0.5rem;
}

.hero-scroll {
  position: absolute; bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: var(--fs-xs); text-transform: uppercase;
  letter-spacing: 0.15em; color: var(--text-3);
}

.scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; height: 36px; }
  50% { opacity: 0.3; height: 20px; }
}

@media (max-width: 768px) {
  .hero-actions { flex-direction: column; width: 100%; max-width: 280px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-meta { font-size: var(--fs-xs); }
}

@media (max-width: 480px) {
  .hero-scroll { display: none; }
}


/* ============ 7. BUTTONS ============ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-family: var(--ff-body);
  font-size: var(--fs-sm); font-weight: 600;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-med), background var(--t-fast),
              border-color var(--t-fast);
}

.btn:active:not(:disabled) { transform: scale(0.97) !important; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-gold {
  background: var(--gold); color: #0a0a0a;
  border: 1px solid var(--gold);
}

.btn-gold:hover {
  background: var(--gold-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 219, 110, 0.2);
}

.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

.btn-full { width: 100%; }
@media (min-width: 640px) { .btn-full { width: auto; } }


/* ============ 8. SECTIONS ============ */

.section { padding: var(--section-py) 0; position: relative; }
.section-dark { background: var(--bg-raised); }

.section-label {
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--ff-display);
  font-size: var(--fs-h2); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.section-title em {
  font-style: normal;
  color: var(--gold);
}

.section-intro {
  font-size: var(--fs-body);
  color: var(--text-2);
  max-width: 500px;
  margin-bottom: 2.5rem;
}


/* ============ 9. ABOUT ============ */

.about-layout {
  display: grid; grid-template-columns: 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .about-layout { grid-template-columns: 320px 1fr; gap: 4rem; }
}

.about-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--border);
}

.about-photo::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 40%);
  pointer-events: none;
}

.about-photo img { width: 100%; height: 100%; object-fit: cover; }

.about-quick {
  display: flex; flex-direction: column; gap: 0.5rem;
  margin-top: 1rem;
}

.quick-item {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-sm); color: var(--text-2);
}

.quick-item ion-icon { font-size: 16px; color: var(--text-3); flex-shrink: 0; }

.about-text { display: flex; flex-direction: column; gap: 1rem; justify-content: center; }

.about-lead {
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  color: var(--text);
  line-height: 1.75;
}

.about-lead strong,
.about-body strong { color: var(--gold); font-weight: 600; }

.about-body {
  font-size: var(--fs-body);
  color: var(--text-2);
  line-height: 1.75;
}

.about-langs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 0.5rem;
}

.lang-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: var(--gold-subtle);
  border: 1px solid rgba(255, 219, 110, 0.1);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text);
}

.lang-chip small {
  font-size: var(--fs-xs); color: var(--text-3);
  font-weight: 400;
}

/* Noqta Banner */
.noqta-banner {
  display: flex; align-items: center; gap: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--gold-subtle);
  border: 1px solid rgba(255, 219, 110, 0.12);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-fast);
  flex-wrap: wrap;
}

.noqta-banner:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 48px rgba(255, 219, 110, 0.06);
  transform: translateY(-2px);
}

.noqta-brand {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}

.noqta-logo { border-radius: 12px; }

.noqta-wordmark {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 800; letter-spacing: -0.02em;
}

.noqta-tag {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gold);
  padding: 4px 12px;
  background: rgba(255, 219, 110, 0.08);
  border: 1px solid rgba(255, 219, 110, 0.2);
  border-radius: var(--radius-full);
}

.noqta-desc {
  flex: 1; min-width: 200px;
  font-size: var(--fs-sm); color: var(--text-2);
  line-height: 1.6;
}

.noqta-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
  transition: gap var(--t-fast);
}

.noqta-banner:hover .noqta-arrow { gap: 10px; }
.noqta-banner:hover .noqta-arrow svg { transform: translate(2px, -2px); }
.noqta-arrow svg { transition: transform var(--t-fast) var(--ease-spring); }

@media (max-width: 640px) {
  .noqta-banner { flex-direction: column; align-items: flex-start; gap: 1rem; }
}


/* ============ 10. SERVICES ============ */

.services-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

.service-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-fast);
}

.service-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 40px rgba(255, 219, 110, 0.04);
  transform: translateY(-3px);
}

.service-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-subtle);
  border: 1px solid rgba(255, 219, 110, 0.1);
  border-radius: 10px;
  margin-bottom: 1rem;
  transition: transform var(--t-med) var(--ease-spring);
}

.service-card:hover .service-icon { transform: scale(1.1) rotate(-4deg); }

.service-icon img {
  width: 22px; height: 22px;
  filter: brightness(0) saturate(100%) invert(87%) sepia(39%) saturate(611%) hue-rotate(336deg) brightness(101%) contrast(101%);
}

.service-name {
  font-family: var(--ff-display);
  font-size: var(--fs-h3); font-weight: 700;
  margin-bottom: 0.4rem;
}

.service-desc {
  font-size: var(--fs-sm); color: var(--text-2);
  line-height: 1.6;
}

/* Clients Row */
.clients-row {
  display: flex; align-items: center; gap: 2rem;
  flex-wrap: wrap;
}

.clients-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-3);
  white-space: nowrap;
}

.clients-logos {
  display: flex; align-items: center; gap: clamp(1.5rem, 4vw, 3rem);
  flex-wrap: wrap;
}

.clients-logos img {
  height: clamp(36px, 6vw, 52px);
  width: auto; object-fit: contain;
  filter: grayscale(1) brightness(0.5);
  opacity: 0.5;
  transition: filter var(--t-med), opacity var(--t-med);
}

.clients-logos a:hover img,
.clients-logos img:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}


/* ============ 11. PROJECTS ============ */

.project-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 7px 18px;
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-2);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  transition: all var(--t-fast);
}

.filter-btn:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.15); }
.filter-btn:active { transform: scale(0.96); }

.filter-btn.active {
  color: #0a0a0a; background: var(--gold);
  border-color: var(--gold);
}

.project-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) { .project-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card {
  display: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-fast);
}

.project-card.active {
  display: block;
  animation: cardIn 0.45s var(--ease) forwards;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.project-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 12px 48px rgba(255, 219, 110, 0.05);
  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.6s var(--ease);
}

.project-card:hover .project-img img { transform: scale(1.06); }

.project-hover {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.85), rgba(255, 219, 110, 0.05));
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--t-med);
}

.project-card:hover .project-hover { opacity: 1; }

.project-view-btn {
  padding: 8px 20px;
  background: var(--gold); color: #0a0a0a;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm); font-weight: 600;
  transform: translateY(10px);
  transition: transform var(--t-med) var(--ease-spring);
}

.project-card:hover .project-view-btn { transform: translateY(0); }

.project-info { padding: 1.25rem; }

.project-name {
  font-family: var(--ff-display);
  font-size: var(--fs-body); font-weight: 700;
  margin-bottom: 0.2rem;
}

.project-cat { font-size: var(--fs-xs); color: var(--text-3); }


/* ============ 12. PARCOURS / TIMELINE ============ */

.parcours-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 3.5rem;
}

@media (min-width: 1024px) {
  .parcours-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.parcours-heading {
  font-family: var(--ff-display);
  font-size: var(--fs-h3); font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 2rem;
}

.parcours-heading svg { color: var(--gold); }

.timeline { padding-left: 1.5rem; position: relative; }

.timeline::before {
  content: ''; position: absolute;
  top: 0; left: 3px; width: 1.5px; height: 100%;
  background: linear-gradient(to bottom, var(--gold), rgba(255, 219, 110, 0.1), transparent);
  border-radius: 1px;
}

.tl-item { position: relative; margin-bottom: 1.5rem; }
.tl-item:last-child { margin-bottom: 0; }

.tl-dot {
  position: absolute; left: -1.5rem; top: 1.1rem;
  width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%;
  border: 2px solid var(--bg-raised);
  z-index: 1;
  transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast);
}

.tl-item:hover .tl-dot {
  transform: scale(1.5);
  box-shadow: 0 0 0 3px rgba(255, 219, 110, 0.2);
}

.tl-card {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-med), box-shadow var(--t-med);
}

.tl-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 24px rgba(255, 219, 110, 0.03);
}

.tl-top {
  display: flex; align-items: baseline; gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.25rem;
}

.tl-title {
  font-family: var(--ff-display);
  font-size: var(--fs-body); font-weight: 700;
}

.tl-date {
  font-size: var(--fs-xs); color: var(--gold);
  padding: 2px 8px;
  background: var(--gold-subtle);
  border-radius: var(--radius-full);
}

.tl-company {
  display: block;
  font-size: var(--fs-sm); color: var(--text-2);
  margin-bottom: 0.5rem;
}

.noqta-inline {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; color: var(--text);
  transition: color var(--t-fast);
}

.noqta-inline:hover { color: var(--gold); }
.noqta-inline img { border-radius: 3px; }

.tl-list { padding-left: 1rem; margin-bottom: 0.75rem; }

.tl-list li {
  font-size: var(--fs-sm); color: var(--text-2);
  line-height: 1.6; margin-bottom: 0.25rem;
  position: relative; list-style: none;
}

.tl-list li::before {
  content: ''; position: absolute;
  left: -1rem; top: 0.55em;
  width: 4px; height: 4px;
  border-radius: 50%; background: var(--gold);
}

.tl-desc {
  font-size: var(--fs-sm); color: var(--text-2);
  line-height: 1.6;
}

.tl-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tl-tags span {
  font-size: var(--fs-xs);
  padding: 2px 8px;
  background: rgba(255, 219, 110, 0.04);
  border: 1px solid rgba(255, 219, 110, 0.08);
  border-radius: var(--radius-full);
  color: var(--text-2);
}

/* Certifications */
.certs-block, .skills-block { margin-top: 2.5rem; }

.parcours-sub {
  font-family: var(--ff-display);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.cert-item {
  display: flex; align-items: center; gap: 10px;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  transition: border-color var(--t-fast);
}

.cert-item:hover { border-color: var(--border-hover); }
.cert-item ion-icon { font-size: 18px; color: var(--gold); flex-shrink: 0; }
.cert-item strong { font-size: var(--fs-sm); display: block; }
.cert-item span { font-size: var(--fs-xs); color: var(--text-3); }

/* Skills */
.skill-group { margin-bottom: 1rem; }

.skill-group-label {
  font-size: var(--fs-xs); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 0.4rem; display: block;
}

.skill-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.skill-tags span {
  font-size: var(--fs-sm);
  padding: 5px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-2);
  transition: border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}

.skill-tags span:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}


/* ============ 13. CONTACT ============ */

.contact-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-info { display: flex; flex-direction: column; gap: 0.5rem; }

.contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), transform var(--t-fast), background var(--t-fast);
  cursor: pointer;
}

.contact-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.contact-row ion-icon { font-size: 18px; color: var(--gold); flex-shrink: 0; }
.contact-row img { border-radius: 4px; flex-shrink: 0; }
.contact-row div { flex: 1; min-width: 0; }
.contact-row small { display: block; font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-row span { display: block; font-size: var(--fs-sm); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.copy-hint {
  font-size: var(--fs-xs); color: var(--text-3);
  opacity: 0; transition: opacity var(--t-fast), color var(--t-fast);
}
.contact-row:hover .copy-hint { opacity: 1; }
.copy-hint.copied { color: #22c55e; }

.ext-icon { color: var(--text-3); flex-shrink: 0; transition: transform var(--t-fast); }
.contact-row:hover .ext-icon { transform: translate(2px, -2px); }

.contact-row-noqta { border-color: rgba(255, 219, 110, 0.08); }
.contact-row-noqta:hover { border-color: var(--border-hover); }

.map-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-top: 0.5rem;
}

.map-box iframe {
  width: 100%; height: 100%; border: none;
  filter: grayscale(1) invert(1) contrast(0.8) brightness(0.5);
}

/* Contact Form */
.contact-form-box {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t-med);
}

.contact-form-box:focus-within { border-color: var(--border-hover); }

.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: var(--fs-xs); font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-3); }

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 219, 110, 0.08);
}

.form-group textarea { min-height: 130px; resize: vertical; }


/* ============ 14. FOOTER ============ */

.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1rem;
}

.footer-inner p { font-size: var(--fs-xs); color: var(--text-3); }

.footer-brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--ff-display);
  font-size: 0.95rem; font-weight: 700;
  transition: opacity var(--t-fast);
}

.footer-brand:hover { opacity: 0.7; }
.footer-brand img { border-radius: 4px; }

.footer-links { display: flex; align-items: center; gap: 12px; }

.footer-links a {
  font-size: 18px; color: var(--text-3);
  display: flex; align-items: center;
  transition: color var(--t-fast);
}

.footer-links a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
}


/* ============ 15. BACK TO TOP ============ */

.back-to-top {
  position: fixed; bottom: 2rem; right: 2rem;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold); color: #0a0a0a;
  border: none; border-radius: 50%;
  z-index: 50;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--t-med), visibility var(--t-med), transform var(--t-med);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 219, 110, 0.2);
}

.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(255, 219, 110, 0.3); }


/* ============ 16. MODALS ============ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 200;
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-med), visibility var(--t-med);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 90%; max-width: 660px; max-height: 90vh;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  z-index: 201;
  opacity: 0; visibility: hidden;
  transition: all 0.35s var(--ease);
  overflow: hidden;
}

.modal.active { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-sm { max-width: 400px; }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-2); z-index: 10;
  transition: background var(--t-fast), color var(--t-fast);
}

.modal-close:hover { background: var(--gold); color: #0a0a0a; }

.modal-body {
  max-height: 90vh; overflow-y: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.modal-centered { text-align: center; display: flex; flex-direction: column; align-items: center; }

.modal-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; margin-bottom: 1.25rem;
}

.modal-icon.success { background: rgba(34, 197, 94, 0.1); border: 2px solid rgba(34, 197, 94, 0.25); color: #22c55e; }
.modal-icon.error { background: rgba(239, 68, 68, 0.1); border: 2px solid rgba(239, 68, 68, 0.25); color: #ef4444; }

.modal-head { margin-bottom: 1.25rem; }
.modal-head h3 { font-family: var(--ff-display); font-size: var(--fs-h3); font-weight: 800; margin-bottom: 0.5rem; }

.modal-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.modal-tags span {
  font-size: var(--fs-xs); padding: 3px 10px;
  background: var(--gold-subtle); border: 1px solid rgba(255, 219, 110, 0.15);
  border-radius: var(--radius-full); color: var(--gold);
}

.modal-image { margin-bottom: 1.25rem; border-radius: var(--radius); overflow: hidden; }
.modal-image img { width: 100%; border-radius: var(--radius); }

.modal-desc { font-size: var(--fs-sm); color: var(--text-2); line-height: 1.7; margin-bottom: 1.25rem; }

.modal-stack { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 1.25rem; }
.modal-stack span {
  font-size: var(--fs-xs); padding: 3px 10px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border);
  border-radius: var(--radius-full); color: var(--text-2);
}

.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 640px) {
  .modal {
    width: 100%; height: 100%; max-height: 100dvh;
    border-radius: 0; top: 0; left: 0;
    transform: translateY(100%);
  }
  .modal.active { transform: translateY(0); }
}


/* ============ 17. GSAP INITIAL STATES ============ */

.gs-hidden { opacity: 0; transform: translateY(30px); }
.gs-hidden-scale { opacity: 0; transform: scale(0.92); }

@media (prefers-reduced-motion: reduce) {
  .loader { display: none; }
  .gs-hidden, .gs-hidden-scale { opacity: 1; transform: none; }
}
