/* ================================================================
   Janfolio — style.css  v2.2
   ================================================================ */

:root {
  --bg: #080a0e; --bg2: #0d1017; --surface: #111520;
  --border: rgba(255,255,255,0.08); --accent: #c8a97e; --accent2: #4f8ef7;
  --text: #f0f2f8; --muted: #6b7280; --dim: #a1a8b5;
  --grid-line: rgba(255,255,255,0.02); --noise-op: 0.25;
  --shadow-heavy: rgba(0,0,0,0.9);
  --accent-alpha: rgba(200,169,126,0.1); --accent-hover: rgba(200,169,126,0.35);
  --accent-border: rgba(200,169,126,0.4);
}
[data-theme="light"] {
  --bg: #f5f2ec; --bg2: #ede9e0; --surface: #ffffff;
  --border: rgba(0,0,0,0.09); --accent: #9a6f3f; --accent2: #1d5fc4;
  --text: #12100d; --muted: #8a8278; --dim: #5a5248;
  --grid-line: rgba(0,0,0,0.03); --noise-op: 0.06;
  --shadow-heavy: rgba(0,0,0,0.12);
  --accent-alpha: rgba(154,111,63,0.1); --accent-hover: rgba(154,111,63,0.35);
  --accent-border: rgba(154,111,63,0.4);
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.01ms !important; transition-duration:.01ms !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

body {
  background: var(--bg); color: var(--text);
  font-family: 'Outfit', sans-serif; font-weight: 300;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background .5s ease, color .5s ease;
  cursor: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='12' cy='12' r='4' fill='%23c8a97e'/%3E%3C/svg%3E") 12 12, auto;
}
a, button, .project-item, .service-card, .highlight-item, .ctrl-btn, .chatbot-btn {
  cursor: url("data:image/svg+xml,%3Csvg width='36' height='36' viewBox='0 0 36 36' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='18' cy='18' r='5' fill='%23c8a97e'/%3E%3Ccircle cx='18' cy='18' r='14' stroke='%23c8a97e' stroke-opacity='0.6' stroke-width='1.5'/%3E%3C/svg%3E") 18 18, pointer !important;
}
[data-lang="ar"] body,[data-lang="ar"] { font-family: 'Noto Kufi Arabic', sans-serif; }

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9995;
  opacity: var(--noise-op);
  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.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  transition: opacity .5s ease;
}

/* Preloader */
#preloader {
  position: fixed; inset: 0; background: var(--bg); z-index: 10000;
  display: flex; justify-content: center; align-items: center;
}
.preloader-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem,7vw,7rem); font-weight: 400; letter-spacing: .15em;
  background: linear-gradient(90deg,transparent 0%,transparent 40%,var(--accent) 50%,transparent 60%,transparent 100%);
  background-size: 300% auto; color: transparent;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: aura 2s linear infinite;
}
[data-theme="light"] .preloader-text {
  background: linear-gradient(90deg,#c8b89a 0%,#c8b89a 40%,var(--accent) 50%,#c8b89a 60%,#c8b89a 100%);
  background-size: 300% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
@keyframes aura { 0%{background-position:150% center} 100%{background-position:-50% center} }

/* Nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px 60px; border-bottom: 1px solid transparent; transition: all .4s ease;
}
nav.scrolled {
  background: rgba(8,10,14,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border); padding: 16px 60px;
}
[data-theme="light"] nav.scrolled { background: rgba(245,242,236,.92); }
.nav-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 600;
  letter-spacing: .02em; color: var(--text); text-decoration: none; z-index: 101; flex-shrink: 0;
}
[data-lang="ar"] .nav-logo { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 1.5rem; letter-spacing: 0; }
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex; gap: 36px; list-style: none;
  position: absolute; left: 50%; transform: translateX(-50%);
}
.nav-links a {
  font-family: 'DM Mono', monospace; font-size: .74rem; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase; color: var(--dim);
  text-decoration: none; transition: color .3s; position: relative; padding-bottom: 4px;
}
[data-lang="ar"] .nav-links a { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; font-size: .82rem; }
.nav-links a::after {
  content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
  background: var(--accent); transition: width .3s cubic-bezier(.16,1,.3,1);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ctrl-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 13px;
  background: var(--surface); border: 1px solid var(--border); color: var(--dim);
  font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .1em;
  text-transform: uppercase; transition: all .3s ease; border-radius: 20px; white-space: nowrap;
}
[data-lang="ar"] .ctrl-btn { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; font-size: .72rem; }
.ctrl-btn:hover { color: var(--accent); border-color: var(--accent-hover); background: var(--accent-alpha); }
.ctrl-btn svg { width: 11px; height: 11px; fill: currentColor; flex-shrink: 0; }
.menu-btn { display: none; background: transparent; border: none; z-index: 101; flex-direction: column; gap: 5px; padding: 8px; }
.menu-btn span { display: block; width: 26px; height: 2px; background: var(--text); transition: all .3s ease; border-radius: 2px; }
.menu-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--accent); }
.menu-btn.active span:nth-child(2) { opacity: 0; }
.menu-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--accent); }
.mobile-menu {
  position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
  background: rgba(8,10,14,.98); backdrop-filter: blur(20px); z-index: 150;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  transition: right .5s cubic-bezier(.77,0,.175,1);
}
[data-theme="light"] .mobile-menu { background: rgba(245,242,236,.98); }
.mobile-menu.active { right: 0; }
.mobile-menu ul { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 28px; }
.mobile-menu a { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; color: var(--text); text-decoration: none; transition: color .3s; }
[data-lang="ar"] .mobile-menu a { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 2rem; }
.mobile-menu a:hover { color: var(--accent); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
#main-wrapper {
  position: relative; z-index: 2; background: var(--bg);
  margin-bottom: 100vh; box-shadow: 0 20px 60px var(--shadow-heavy); transition: background .5s ease;
}

/* Hero */
#hero {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  align-items: center; padding: 0 60px; position: relative; overflow: hidden;
}
#hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px);
  background-size: 100px 100px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%,black 40%,transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%,black 40%,transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.orb-1 { width: 500px; height: 500px; background: radial-gradient(circle,rgba(200,169,126,.1),transparent 70%); top: -100px; right: -100px; }
.orb-2 { width: 400px; height: 400px; background: radial-gradient(circle,rgba(79,142,247,.07),transparent 70%); bottom: 0; left: -100px; }
[data-theme="light"] .orb-1 { background: radial-gradient(circle,rgba(154,111,63,.12),transparent 70%); }
[data-theme="light"] .orb-2 { background: radial-gradient(circle,rgba(29,95,196,.07),transparent 70%); }
.hero-content { z-index: 2; padding-top: 80px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'DM Mono', monospace; font-size: .7rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 32px;
}
[data-lang="ar"] .hero-tag { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; flex-direction: row-reverse; }
.hero-tag::before { content: ''; width: 40px; height: 1px; background: var(--accent); opacity: .7; }
[data-lang="ar"] .hero-tag::before { display: none; }
[data-lang="ar"] .hero-tag::after { content: ''; width: 40px; height: 1px; background: var(--accent); opacity: .7; }
.hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.2rem,6.5vw,6.5rem); font-weight: 300; line-height: 1.05;
  letter-spacing: -.01em; color: var(--text);
}
[data-lang="ar"] .hero-name { font-family: 'Noto Kufi Arabic', sans-serif; font-size: clamp(2.6rem,5.5vw,5.5rem); letter-spacing: 0; line-height: 1.25; font-weight: 400; }
.hero-name em { font-style: italic; color: var(--accent); }
[data-lang="ar"] .hero-name em { font-style: normal; }
.hero-tagline { margin-top: 28px; font-size: clamp(.95rem,2vw,1.1rem); font-weight: 300; color: var(--dim); line-height: 1.7; max-width: 500px; }
[data-lang="ar"] .hero-tagline { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2; }
.hero-tagline strong { color: var(--text); font-weight: 400; }
.hero-cta { margin-top: 50px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.btn-wrapper { display: inline-block; padding: 15px; margin: -15px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 36px;
  background: var(--accent); color: #12100d;
  font-family: 'DM Mono', monospace; font-size: .75rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  border: none; transition: all .3s ease; position: relative; overflow: hidden; border-radius: 4px;
}
.btn-primary::before {
  content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.2);
  transform: translateX(-101%); transition: transform .4s cubic-bezier(.16,1,.3,1);
}
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary span { position: relative; z-index: 1; pointer-events: none; }
[data-lang="ar"] .btn-primary { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost {
  font-family: 'DM Mono', monospace; font-size: .75rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); text-decoration: none;
  position: relative; padding-bottom: 4px; transition: color .3s; background: none; border: none;
}
[data-lang="ar"] .btn-ghost { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.btn-ghost::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--border); transition: background .3s; }
.btn-ghost:hover { color: var(--text); }
.btn-ghost:hover::after { background: var(--text); }
.hero-stats { margin-top: 70px; display: flex; gap: 40px; flex-wrap: wrap; }
.stat-num { font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem,4vw,2.6rem); font-weight: 600; color: var(--text); line-height: 1; }
[data-lang="ar"] .stat-num { font-family: 'Noto Kufi Arabic', sans-serif; }
.stat-num span { color: var(--accent); }
.stat-label { font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
[data-lang="ar"] .stat-label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.hero-image-side {
  position: relative; display: flex; justify-content: center; align-items: center;
  height: 100vh; z-index: 2; padding-bottom: 40px;
}
.hero-img-wrapper { position: relative; width: 100%; max-width: 600px; height: 600px; overflow: hidden; display: flex; justify-content: center; align-items: center; }
spline-viewer { position: absolute; top: -20px; left: 0; width: 100%; height: 100%; display: block; border: none; outline: none; background: transparent; }
spline-viewer::part(logo) { display: none !important; }
.hero-img-badge {
  position: absolute; bottom: 60px; left: 0; background: rgba(17,21,32,.85);
  border: 1px solid var(--border); padding: 18px 24px; z-index: 5;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 15px 35px rgba(0,0,0,.5); pointer-events: none; border-radius: 8px;
}
[data-theme="light"] .hero-img-badge { background: rgba(255,255,255,.88); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
[data-lang="ar"] .hero-img-badge { left: auto; right: 0; }
.badge-label { font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
[data-lang="ar"] .badge-label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.badge-value { font-size: .95rem; font-weight: 500; color: var(--text); margin-top: 6px; display: flex; align-items: center; gap: 8px; }
.badge-dot { display: inline-block; width: 8px; height: 8px; background: #4ade80; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 10px rgba(74,222,128,.5); animation: pulse-dot 2s ease infinite; }
@keyframes pulse-dot { 0%,100%{box-shadow:0 0 10px rgba(74,222,128,.5)} 50%{box-shadow:0 0 20px rgba(74,222,128,.9)} }

/* Sections */
section { padding: 130px 60px; position: relative; }
.section-header { display: flex; align-items: flex-end; gap: 32px; margin-bottom: 90px; flex-wrap: wrap; }
.section-num { font-family: 'DM Mono', monospace; font-size: .75rem; letter-spacing: .15em; color: var(--accent); margin-bottom: 12px; }
[data-lang="ar"] .section-num { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.section-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.2rem,5vw,4rem); font-weight: 300; line-height: 1.1; color: var(--text); }
[data-lang="ar"] .section-title { font-family: 'Noto Kufi Arabic', sans-serif; font-weight: 400; line-height: 1.3; }
.section-line { flex: 1; height: 1px; background: var(--border); margin-bottom: 16px; min-width: 100px; }

/* About */
#about { background: var(--bg2); border-top: 1px solid var(--border); transition: background .5s ease; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.about-text p { font-size: clamp(1rem,2vw,1.15rem); line-height: 2; color: var(--dim); margin-bottom: 24px; font-weight: 300; }
[data-lang="ar"] .about-text p { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2.1; }
.about-highlights { display: flex; flex-direction: column; gap: 24px; }
.highlight-item { display: flex; gap: 24px; padding: 32px; border: 1px solid var(--border); background: var(--surface); transition: all .4s cubic-bezier(.16,1,.3,1); }
[data-theme="light"] .highlight-item { background: rgba(255,255,255,.7); }
.highlight-item:hover { border-color: var(--accent-hover); transform: translateX(8px); background: var(--accent-alpha); }
[data-lang="ar"] .highlight-item:hover { transform: translateX(-8px); }
[data-theme="light"] .highlight-item:hover { background: rgba(255,255,255,.95); }
.highlight-icon { font-size: 1.6rem; flex-shrink: 0; margin-top: 2px; }
.highlight-title { font-size: 1rem; font-weight: 500; color: var(--text); margin-bottom: 8px; }
[data-lang="ar"] .highlight-title { font-family: 'Noto Kufi Arabic', sans-serif; }
.highlight-desc { font-size: .9rem; color: var(--muted); line-height: 1.7; }
[data-lang="ar"] .highlight-desc { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 1.9; }

/* Marquee */
.marquee-section { padding: 70px 0; background: var(--bg); border-top: 1px solid var(--border); overflow: hidden; display: flex; flex-direction: column; gap: 15px; transition: background .5s ease; }
.marquee-track { display: flex; white-space: nowrap; animation: scroll 35s linear infinite; }
.marquee-track.reverse { animation-direction: reverse; animation-duration: 40s; }
.marquee-item {
  font-family: 'Cormorant Garamond', serif; font-size: clamp(2rem,5vw,4.5rem); font-weight: 300;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.12);
  text-transform: uppercase; padding-right: 50px; transition: color .3s,-webkit-text-stroke .3s;
}
[data-theme="light"] .marquee-item { -webkit-text-stroke: 1px rgba(0,0,0,.12); }
[data-lang="ar"] .marquee-item { font-family: 'Noto Kufi Arabic', sans-serif; font-size: clamp(1.6rem,4vw,3.5rem); }
.marquee-item:hover { color: var(--accent); -webkit-text-stroke: 0px transparent; }
@keyframes scroll { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* Skills */
#skills { border-top: 1px solid var(--border); }
.skills-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--border); }
.skill-category { background: var(--bg); padding: 50px 40px; transition: background .4s ease; }
.skill-category:hover { background: var(--surface); }
[data-theme="light"] .skill-category:hover { background: #fff; }
.skill-cat-label { font-family: 'DM Mono', monospace; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 32px; display: flex; align-items: center; gap: 12px; }
[data-lang="ar"] .skill-cat-label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; flex-direction: row-reverse; }
.skill-cat-label::after { content: ''; flex: 1; height: 1px; background: var(--accent-alpha); }
[data-lang="ar"] .skill-cat-label::after { order: -1; }
.skill-list { display: flex; flex-direction: column; gap: 16px; }
.skill-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
[data-lang="ar"] .skill-item { flex-direction: row-reverse; }
.skill-name { font-size: .95rem; color: var(--dim); transition: color .3s; white-space: nowrap; }
.skill-category:hover .skill-name { color: var(--text); }
.skill-bar { flex: 1; height: 3px; background: rgba(128,128,128,.12); position: relative; overflow: hidden; border-radius: 4px; }
.skill-bar-fill {
  position: absolute; top: 0; left: 0; height: 100%;
  background: linear-gradient(90deg,var(--accent),var(--accent2));
  width: 0; border-radius: 4px; transition: width 1.5s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 0 10px rgba(79,142,247,.3);
}
[data-lang="ar"] .skill-bar-fill { left: auto; right: 0; background: linear-gradient(270deg,var(--accent),var(--accent2)); }
.skill-level { font-family: 'DM Mono', monospace; font-size: .65rem; color: var(--muted); }

/* Projects */
#projects { background: var(--bg2); border-top: 1px solid var(--border); padding-bottom: 0; transition: background .5s ease; }
#projects .section-header { margin-bottom: 30px; }
.projects-pin-container { height: auto; min-height: 70vh; padding: 20px 0 80px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.projects-horizontal-wrapper { display: flex; gap: 50px; padding: 0 60px; align-items: center; }
.project-item {
  min-width: 850px; background: var(--surface); padding: 70px;
  display: grid; grid-template-columns: 80px 1fr auto; gap: 40px; align-items: start;
  transition: all .4s cubic-bezier(.16,1,.3,1); position: relative; border: 1px solid var(--border);
}
[data-theme="light"] .project-item { background: rgba(255,255,255,.8); }
.project-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transition: transform .4s ease; transform-origin: bottom;
}
[data-lang="ar"] .project-item::before { left: auto; right: 0; }
.project-item:hover { background: rgba(255,255,255,.03); border-color: var(--accent-hover); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,.2); }
[data-theme="light"] .project-item:hover { background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,.08); }
.project-item:hover::before { transform: scaleY(1); }
.project-num { font-family: 'Cormorant Garamond', serif; font-size: clamp(3rem,5vw,4.5rem); font-weight: 300; color: var(--border); line-height: .9; transition: color .4s; }
.project-item:hover .project-num { color: var(--accent-alpha); }
.project-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tag { font-family: 'DM Mono', monospace; font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; padding: 6px 12px; border: 1px solid var(--border); color: var(--muted); transition: all .3s; }
.project-item:hover .tag { border-color: var(--accent-hover); color: var(--accent); }
.project-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.8rem,3vw,2.4rem); font-weight: 400; color: var(--text); margin-bottom: 16px; line-height: 1.2; }
[data-lang="ar"] .project-title { font-family: 'Noto Kufi Arabic', sans-serif; font-size: clamp(1.5rem,2.5vw,2rem); }
.project-desc { font-size: clamp(.9rem,2vw,1rem); color: var(--dim); line-height: 1.8; max-width: 650px; }
[data-lang="ar"] .project-desc { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2; }
.project-arrow { font-size: 2rem; color: var(--border); transition: all .4s; margin-top: 8px; }
.project-item:hover .project-arrow { color: var(--accent); transform: translate(6px,-6px); }

/* Services */
#services { border-top: 1px solid var(--border); background: var(--bg); transition: background .5s ease; }
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.service-card {
  padding: 50px 40px; border: 1px solid var(--border); background: var(--surface);
  position: relative; overflow: hidden; transition: all .4s cubic-bezier(.16,1,.3,1);
}
[data-theme="light"] .service-card { background: rgba(255,255,255,.7); }
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg,var(--accent),var(--accent2)); transform: scaleX(0); transition: transform .4s ease;
}
.service-card:hover { border-color: var(--accent-hover); transform: translateY(-8px); background: rgba(255,255,255,.03); }
[data-theme="light"] .service-card:hover { background: #fff; box-shadow: 0 16px 32px rgba(0,0,0,.07); }
.service-card:hover::after { transform: scaleX(1); }
.service-icon { font-size: 2.2rem; margin-bottom: 28px; display: block; }
.service-title { font-size: 1.2rem; font-weight: 500; color: var(--text); margin-bottom: 16px; }
[data-lang="ar"] .service-title { font-family: 'Noto Kufi Arabic', sans-serif; }
.service-desc { font-size: .95rem; color: var(--dim); line-height: 1.8; }
[data-lang="ar"] .service-desc { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2; }
.services-cta {
  margin-top: 70px; text-align: center; padding: 40px; background: var(--surface);
  border: 1px dashed var(--accent-border); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 20px; transition: background .5s ease;
}
[data-theme="light"] .services-cta { background: rgba(255,255,255,.6); }
.services-cta-text { font-size: 1.1rem; color: var(--text); max-width: 600px; line-height: 1.6; }
[data-lang="ar"] .services-cta-text { font-family: 'Noto Kufi Arabic', sans-serif; }

/* Contact */
.footer-reveal-container { position: fixed; bottom: 0; left: 0; width: 100%; height: 100vh; z-index: 1; background: var(--bg2); display: flex; flex-direction: column; justify-content: center; transition: background .5s ease; }
#contact { background: transparent; text-align: center; padding: 0 60px; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; }
[data-lang="ar"] #contact { direction: rtl; }
.contact-tag { font-family: 'DM Mono', monospace; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 24px; }
[data-lang="ar"] .contact-tag { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.contact-heading { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem,6.5vw,6.5rem); font-weight: 300; line-height: 1.1; color: var(--text); margin-bottom: 24px; max-width: 800px; }
[data-lang="ar"] .contact-heading { font-family: 'Noto Kufi Arabic', sans-serif; font-size: clamp(2rem,5vw,5rem); font-weight: 400; line-height: 1.25; }
.contact-heading em { color: var(--accent); font-style: italic; }
[data-lang="ar"] .contact-heading em { font-style: normal; }
.contact-sub { font-size: 1.15rem; color: var(--muted); margin-bottom: 60px; max-width: 500px; }
[data-lang="ar"] .contact-sub { font-family: 'Noto Kufi Arabic', sans-serif; line-height: 2; }
.contact-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.contact-link {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 32px;
  border: 1px solid var(--border); background: var(--bg); color: var(--dim);
  text-decoration: none; font-family: 'DM Mono', monospace; font-size: .75rem;
  letter-spacing: .1em; text-transform: uppercase; transition: all .4s cubic-bezier(.16,1,.3,1);
}
[data-lang="ar"] .contact-link { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.contact-link:hover { border-color: var(--accent-hover); color: var(--accent); background: var(--accent-alpha); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,.1); }
.contact-special-btn { border-color: var(--accent); color: var(--accent); background: rgba(200,169,126,0.05); }
footer { padding: 40px 60px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: transparent; flex-wrap: wrap; gap: 20px; }
[data-lang="ar"] footer { direction: rtl; }
.footer-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem; color: var(--muted); }
[data-lang="ar"] .footer-logo { font-family: 'Noto Kufi Arabic', sans-serif; }
.footer-copy { font-family: 'DM Mono', monospace; font-size: .65rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
[data-lang="ar"] .footer-copy { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }

/* Chatbot */
.chatbot-btn {
  position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
  background: var(--accent); border-radius: 50%; display: flex; justify-content: center;
  align-items: center; z-index: 500; box-shadow: 0 10px 30px var(--accent-alpha);
  transition: transform .3s cubic-bezier(.16,1,.3,1); border: none;
}
[data-lang="ar"] .chatbot-btn { right: auto; left: 30px; }
.chatbot-btn:hover { transform: scale(1.1) translateY(-5px); }
.chatbot-btn svg { width: 30px; height: 30px; fill: currentColor; color: #12100d; }
.chatbot-window {
  position: fixed; bottom: 100px; right: 30px; width: 360px; height: 490px;
  background: rgba(13,16,24,.97); border: 1px solid var(--border); border-radius: 16px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 500;
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px) scale(.9); opacity: 0; pointer-events: none;
  transition: all .4s cubic-bezier(.16,1,.3,1); box-shadow: 0 24px 48px rgba(0,0,0,.55);
}
[data-theme="light"] .chatbot-window { background: rgba(255,255,255,.97); }
[data-lang="ar"] .chatbot-window { right: auto; left: 30px; }
.chatbot-window.active { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,.2); }
[data-theme="light"] .chat-header { background: rgba(0,0,0,.04); }
.chat-header-title { font-family: 'DM Mono', monospace; font-size: .8rem; color: var(--text); letter-spacing: .1em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
[data-lang="ar"] .chat-header-title { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; flex-direction: row-reverse; }
.chat-header-title::before { content: ''; display: block; width: 8px; height: 8px; background: #4ade80; border-radius: 50%; box-shadow: 0 0 10px rgba(74,222,128,.5); }
.chat-close { background: none; border: none; color: var(--dim); font-size: 1.2rem; transition: color .3s; padding: 4px 8px; }
.chat-close:hover { color: var(--accent); }
.chat-messages { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: .9rem; line-height: 1.55; }
.msg.bot { background: rgba(255,255,255,.04); color: var(--text); align-self: flex-start; border-bottom-left-radius: 0; border: 1px solid var(--border); }
[data-theme="light"] .msg.bot { background: rgba(0,0,0,.05); }
[data-lang="ar"] .msg.bot { align-self: flex-end; border-bottom-left-radius: 12px; border-bottom-right-radius: 0; text-align: right; font-family: 'Noto Kufi Arabic', sans-serif; }
.msg.user { background: var(--accent); color: #12100d; align-self: flex-end; border-bottom-right-radius: 0; font-weight: 500; }
[data-lang="ar"] .msg.user { align-self: flex-start; border-bottom-right-radius: 12px; border-bottom-left-radius: 0; }
.typing-indicator { font-size: .8rem; color: var(--dim); align-self: flex-start; display: none; padding: 12px 16px; letter-spacing: .1em; }
.chat-input-area { padding: 15px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: rgba(0,0,0,.18); }
[data-theme="light"] .chat-input-area { background: rgba(0,0,0,.04); }
.chat-input-area input {
  flex: 1; background: transparent; border: 1px solid var(--border); padding: 11px 14px;
  border-radius: 8px; color: var(--text); font-family: 'Outfit', sans-serif;
  outline: none; transition: border-color .3s; font-size: .9rem;
}
[data-lang="ar"] .chat-input-area input { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; text-align: right; }
.chat-input-area input:focus { border-color: var(--accent); }
.chat-input-area button {
  background: var(--accent); color: #12100d; border: none; padding: 0 18px;
  border-radius: 8px; font-family: 'DM Mono', monospace; font-weight: 600; font-size: .75rem;
  transition: transform .2s, opacity .2s; flex-shrink: 0;
}
[data-lang="ar"] .chat-input-area button { font-family: 'Noto Kufi Arabic', sans-serif; }
.chat-input-area button:hover { transform: scale(1.05); }
.chat-input-area button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ================================================================
   AI MODAL SYSTEM
   KEY FIX: display:none by default, switched to flex only when .active
   This prevents mobile content bleed-through entirely
   ================================================================ */

.ai-modal {
  /* HIDDEN by default — display:none prevents any layout impact */
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
/* SHOW — switch to flex, then animate opacity via the panel */
.ai-modal.active {
  display: flex;
}

.ai-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn .25s ease forwards;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Panel — slides in from below */
.ai-modal-panel {
  position: relative;
  z-index: 1;
  background: #0d1017;
  border: 1px solid rgba(200,169,126,.2);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 40px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(200,169,126,.06);
  animation: slideUp .35s cubic-bezier(.16,1,.3,1) forwards;
  overflow: hidden;
}
[data-theme="light"] .ai-modal-panel { background: #f5f2ec; }
.ai-modal-panel--wide { max-width: 820px; }
@keyframes slideUp { from{opacity:0;transform:translateY(32px) scale(.97)} to{opacity:1;transform:translateY(0) scale(1)} }

/* Header strip */
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(135deg, rgba(200,169,126,.07) 0%, transparent 60%);
  flex-shrink: 0;
  gap: 12px;
}
.ai-modal-header-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ai-modal-icon {
  width: 42px; height: 42px; flex-shrink: 0;
  background: rgba(200,169,126,.1); border: 1px solid rgba(200,169,126,.3);
  border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.ai-modal-title {
  font-family: 'Cormorant Garamond', serif; font-size: 1.3rem;
  font-weight: 600; color: var(--accent); line-height: 1.2;
}
[data-lang="ar"] .ai-modal-title { font-family: 'Noto Kufi Arabic', sans-serif; font-size: 1.1rem; }
.ai-modal-subtitle {
  font-family: 'DM Mono', monospace; font-size: .62rem;
  color: var(--muted); letter-spacing: .07em; margin-top: 3px;
}
[data-lang="ar"] .ai-modal-subtitle { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; font-size: .7rem; }
.ai-modal-close {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1); background: transparent;
  color: var(--muted); display: flex; align-items: center; justify-content: center; transition: all .2s;
}
[data-theme="light"] .ai-modal-close { border-color: rgba(0,0,0,.1); }
.ai-modal-close svg { width: 15px; height: 15px; }
.ai-modal-close:hover { background: rgba(200,169,126,.12); border-color: rgba(200,169,126,.4); color: var(--accent); }

/* Body — scrollable */
.ai-modal-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 22px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ai-modal-body::-webkit-scrollbar { width: 5px; }
.ai-modal-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

/* Step blocks */
.ai-step-block {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
[data-theme="light"] .ai-step-block { background: rgba(0,0,0,.025); border-color: rgba(0,0,0,.07); }
.ai-step-label {
  display: flex; align-items: center; gap: 10px;
  font-family: 'DM Mono', monospace; font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text); font-weight: 500;
}
[data-lang="ar"] .ai-step-label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; font-size: .78rem; flex-direction: row-reverse; }
.ai-step-badge {
  width: 22px; height: 22px; background: var(--accent); color: #12100d;
  border-radius: 50%; font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Fields */
.ai-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-field-group { display: flex; flex-direction: column; gap: 6px; }
.ai-label {
  font-family: 'DM Mono', monospace; font-size: .63rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
[data-lang="ar"] .ai-label { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; font-size: .73rem; }
.ai-optional { color: var(--muted); opacity: .7; font-size: .58rem; }
.ai-input {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px; padding: 10px 13px; color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: .92rem;
  outline: none; transition: border-color .2s, box-shadow .2s; width: 100%;
}
[data-theme="light"] .ai-input { background: #fff; border-color: rgba(0,0,0,.1); }
[data-lang="ar"] .ai-input { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; }
.ai-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,169,126,.12); }
.ai-input.field-error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.1); }

/* Textarea */
.ai-input-group { display: flex; flex-direction: column; gap: 6px; }
.ai-textarea {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09);
  border-radius: 8px; padding: 13px; color: var(--text);
  font-family: 'Outfit', sans-serif; font-size: .92rem;
  resize: none; outline: none; transition: border-color .2s, box-shadow .2s;
  width: 100%; height: 108px; line-height: 1.6;
}
[data-theme="light"] .ai-textarea { background: #fff; border-color: rgba(0,0,0,.1); }
[data-lang="ar"] .ai-textarea { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; }
.ai-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,169,126,.12); }
.ai-char-hint {
  font-family: 'DM Mono', monospace; font-size: .6rem;
  color: var(--muted); text-align: right; opacity: .7;
}

/* Submit button */
.ai-submit-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 26px; background: var(--accent); color: #12100d;
  border: none; border-radius: 8px; font-family: 'DM Mono', monospace;
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .2s, box-shadow .2s; align-self: flex-start;
}
[data-lang="ar"] .ai-submit-btn { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.ai-submit-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.ai-submit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(200,169,126,.35); }
.ai-submit-btn:disabled { opacity: .5; transform: none; cursor: not-allowed; box-shadow: none; }

/* Result */
.ai-result {
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; overflow: hidden;
}
[data-theme="light"] .ai-result { background: rgba(0,0,0,.02); border-color: rgba(0,0,0,.08); }
.ai-result-header {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-bottom: 1px solid rgba(255,255,255,.07);
  font-family: 'DM Mono', monospace; font-size: .63rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
[data-theme="light"] .ai-result-header { border-color: rgba(0,0,0,.06); }
.ai-result-dot {
  width: 7px; height: 7px; background: #4ade80; border-radius: 50%;
  box-shadow: 0 0 8px rgba(74,222,128,.6); animation: pulse-dot 2s ease infinite; flex-shrink: 0;
}
.ai-result-content {
  padding: 18px 20px; font-size: .9rem; line-height: 1.8; color: var(--text);
}
[data-lang="ar"] .ai-result-content { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; }
.ai-result-content h1,.ai-result-content h2,.ai-result-content h3 {
  color: var(--accent); font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 600; margin: 14px 0 7px;
}
[data-lang="ar"] .ai-result-content h1,[data-lang="ar"] .ai-result-content h2,[data-lang="ar"] .ai-result-content h3 {
  font-family: 'Noto Kufi Arabic', sans-serif;
}
.ai-result-content p { margin-bottom: 10px; color: var(--dim); }
.ai-result-content ul { margin: 0 0 12px 20px; color: var(--dim); }
[data-lang="ar"] .ai-result-content ul { margin: 0 20px 12px 0; }
.ai-result-content strong { color: var(--accent2); font-weight: 500; }
.ai-result-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .84rem; }
.ai-result-content th { background: rgba(200,169,126,.08); color: var(--accent); padding: 8px 12px; text-align: left; border: 1px solid rgba(200,169,126,.2); font-size: .68rem; font-family: 'DM Mono', monospace; }
.ai-result-content td { padding: 8px 12px; border: 1px solid rgba(255,255,255,.06); color: var(--dim); }
.ai-result-plain {
  white-space: pre-wrap; font-family: 'Outfit', sans-serif;
  font-size: .9rem; color: var(--dim); line-height: 1.85;
}
[data-lang="ar"] .ai-result-plain { font-family: 'Noto Kufi Arabic', sans-serif; direction: rtl; }
.ai-result-actions {
  display: flex; gap: 10px; padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07); flex-wrap: wrap;
}
[data-theme="light"] .ai-result-actions { border-color: rgba(0,0,0,.06); }
.ai-action-ghost {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; background: transparent;
  border: 1px solid rgba(255,255,255,.12); color: var(--dim); border-radius: 7px;
  font-family: 'DM Mono', monospace; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
  transition: all .2s;
}
[data-theme="light"] .ai-action-ghost { border-color: rgba(0,0,0,.12); }
[data-lang="ar"] .ai-action-ghost { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.ai-action-ghost svg { width: 13px; height: 13px; flex-shrink: 0; }
.ai-action-ghost:hover { border-color: var(--accent-hover); color: var(--accent); background: var(--accent-alpha); }
.ai-action-primary {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; background: var(--accent); color: #12100d;
  border: none; border-radius: 7px; font-family: 'DM Mono', monospace;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; transition: all .2s;
}
[data-lang="ar"] .ai-action-primary { font-family: 'Noto Kufi Arabic', sans-serif; letter-spacing: 0; }
.ai-action-primary svg { width: 13px; height: 13px; flex-shrink: 0; }
.ai-action-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(200,169,126,.3); }
.ai-action-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* Feedback */
.ai-feedback {
  padding: 13px 16px; border-radius: 9px; font-size: .87rem;
  font-weight: 500; border: 1px solid; line-height: 1.55;
}
.ai-feedback.success { background: rgba(74,222,128,.06); border-color: rgba(74,222,128,.25); color: #4ade80; }
.ai-feedback.error   { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.25); color: #ef4444; }

/* Spinner */
.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(18,16,13,.3); border-top-color: #12100d;
  border-radius: 50%; animation: spin .55s linear infinite; flex-shrink: 0;
}
@keyframes spin { to{transform:rotate(360deg)} }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1000px) {
  nav { padding: 16px 20px; }
  nav.scrolled { padding: 14px 20px; }
  .nav-links { display: none; }
  .menu-btn { display: flex; }
  .ctrl-btn span { display: none; }
  .ctrl-btn { padding: 8px 10px; border-radius: 50%; width: 36px; height: 36px; justify-content: center; }
  .ctrl-btn svg { width: 14px; height: 14px; }
  section, footer, #contact { padding: 80px 24px; }
  #hero { grid-template-columns: 1fr; padding-top: 120px; padding-bottom: 40px; text-align: center; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-tagline { text-align: center; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; gap: 24px; }
  .hero-image-side { display: flex !important; width: 100%; height: auto; min-height: 450px; margin-top: 30px; padding-bottom: 20px; }
  .hero-img-wrapper { height: 450px; width: 100%; max-width: 100vw; pointer-events: none !important; }
  .hero-img-badge { bottom: 0; left: 50% !important; right: auto !important; transform: translateX(-50%); width: 90%; max-width: 300px; text-align: left; }
  [data-lang="ar"] .hero-img-badge { text-align: right; }
  .about-grid, .skills-grid, .services-grid { grid-template-columns: 1fr; gap: 40px; }
  #projects { padding-bottom: 80px; }
  .projects-pin-container { height: auto; min-height: auto; padding-bottom: 0; }
  .projects-horizontal-wrapper { flex-direction: column; padding: 0; gap: 30px; }
  .project-item { min-width: 100%; grid-template-columns: 1fr; gap: 24px; padding: 40px 24px; }
  .project-num, .project-arrow { display: none; }
  #main-wrapper { margin-bottom: 0; box-shadow: none; }
  .footer-reveal-container { position: relative; height: auto; }
  .chatbot-window { width: calc(100% - 40px); right: 20px; bottom: 90px; }
  [data-lang="ar"] .chatbot-window { left: 20px; right: auto; }
  [data-lang="ar"] .chatbot-btn { left: 20px; right: auto; }
}

/* ── Mobile modals: bottom sheet style ── */
@media (max-width: 680px) {
  .ai-modal {
    padding: 0;
    align-items: flex-end;
  }
  .ai-modal-panel,
  .ai-modal-panel--wide {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 94vh;
    border-bottom: none;
    /* Slide up from bottom on mobile */
    animation: slideUpMobile .38s cubic-bezier(.16,1,.3,1) forwards;
  }
  @keyframes slideUpMobile {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
  /* Drag handle visual */
  .ai-modal-panel::before {
    content: '';
    display: block;
    width: 40px; height: 4px;
    background: rgba(255,255,255,.15);
    border-radius: 2px;
    margin: 10px auto 0;
    flex-shrink: 0;
  }
  [data-theme="light"] .ai-modal-panel::before { background: rgba(0,0,0,.15); }
  .ai-modal-header { padding: 12px 18px 16px; }
  .ai-modal-icon { width: 36px; height: 36px; font-size: 1rem; }
  .ai-modal-title { font-size: 1.05rem; }
  .ai-modal-subtitle { display: none; }
  .ai-modal-body { padding: 16px 16px 32px; gap: 14px; }
  .ai-step-block { padding: 14px 16px; }
  .ai-fields-grid { grid-template-columns: 1fr; gap: 10px; }
  .ai-submit-btn { width: 100%; justify-content: center; padding: 14px; }
  .ai-result-actions { flex-direction: column; }
  .ai-action-ghost, .ai-action-primary { width: 100%; justify-content: center; padding: 13px; }
  .ai-textarea { height: 90px; }
}
