/* ==========================================================================
   Welcom World — welcomworld.info
   Main stylesheet: design system, layout, components
   ========================================================================== */

/* ---------- 1. THEME TOKENS ---------- */
:root {
  /* Dark theme (default) */
  --bg:            #0a0e13;
  --bg-alt:        #0e141b;
  --surface:       #131c26;
  --surface-2:     #18232f;
  --text:          #e9eff7;
  --text-muted:    #8d9cb0;
  --text-dim:      #64748b;
  --accent:        #10b981;
  --accent-soft:   rgba(16, 185, 129, .14);
  --accent-2:      #38bdf8;
  --border:        rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --shadow:        0 10px 40px rgba(0, 0, 0, .45);
  --shadow-sm:     0 4px 16px rgba(0, 0, 0, .3);
  --nav-bg:        rgba(10, 14, 19, .72);
  --gradient:      linear-gradient(135deg, #10b981 0%, #38bdf8 100%);

  /* Scale */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --maxw:      1140px;
  --nav-h:     68px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --font-ar: 'Amiri', 'Scheherazade New', 'Traditional Arabic', 'Times New Roman', serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
}

html[data-theme="light"] {
  --bg:            #ffffff;
  --bg-alt:        #f6f8fb;
  --surface:       #ffffff;
  --surface-2:     #f1f5f9;
  --text:          #0f172a;
  --text-muted:    #526077;
  --text-dim:      #7c8899;
  --accent:        #059669;
  --accent-soft:   rgba(5, 150, 105, .10);
  --accent-2:      #0284c7;
  --border:        rgba(15, 23, 42, .10);
  --border-strong: rgba(15, 23, 42, .18);
  --shadow:        0 10px 40px rgba(15, 23, 42, .10);
  --shadow-sm:     0 4px 16px rgba(15, 23, 42, .07);
  --nav-bg:        rgba(255, 255, 255, .78);
  --gradient:      linear-gradient(135deg, #059669 0%, #0284c7 100%);
}

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

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: #fff; }

/* ---------- 3. LAYOUT HELPERS ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section   { padding: 92px 0; position: relative; }
.section--alt { background: var(--bg-alt); }

.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 16px;
}

h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
h2.section-title { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 14px; }
.section-sub { color: var(--text-muted); font-size: 1.05rem; }

.grad-text {
  background: var(--gradient);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.arabic { font-family: var(--font-ar); direction: rtl; line-height: 1.9; }

/* ---------- 4. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 26px; border-radius: 100px;
  font-weight: 600; font-size: .95rem;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  white-space: nowrap; cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }

.btn--primary {
  background: var(--gradient); color: #fff;
  box-shadow: 0 6px 22px rgba(16, 185, 129, .3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(16, 185, 129, .42); }

.btn--ghost { background: transparent; color: var(--text); border: 1px solid var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }

.btn--sm { padding: 9px 18px; font-size: .86rem; }

/* ---------- 5. HEADER / NAV ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.header.scrolled { border-bottom-color: var(--border); }

.nav { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); }

.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--gradient);
  display: grid; place-items: center;
  color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: -.04em;
  box-shadow: 0 4px 14px rgba(16, 185, 129, .35);
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 9px;
  font-size: .92rem; font-weight: 500; color: var(--text-muted);
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--accent); font-weight: 600; }

.nav-right { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-muted);
  transition: all .2s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); transform: rotate(-12deg); }
.theme-toggle svg { width: 19px; height: 19px; }
.icon-sun  { display: none; }
html[data-theme="light"] .icon-sun  { display: block; }
html[data-theme="light"] .icon-moon { display: none; }

.hamburger { display: none; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); place-items: center; }
.hamburger svg { width: 20px; height: 20px; }

/* ---------- 6. HERO ---------- */
.hero {
  min-height: 100svh; display: flex; align-items: center;
  padding-top: calc(var(--nav-h) + 40px); padding-bottom: 70px;
  position: relative; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::before, .hero-bg::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5;
}
.hero-bg::before { width: 520px; height: 520px; background: rgba(16,185,129,.30); top: -180px; right: -120px; }
.hero-bg::after  { width: 440px; height: 440px; background: rgba(56,189,248,.22); bottom: -180px; left: -140px; }
html[data-theme="light"] .hero-bg::before { opacity: .30; }
html[data-theme="light"] .hero-bg::after  { opacity: .26; }

.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 60px; align-items: center;
}

.hero-bismillah {
  font-family: var(--font-ar); font-size: 1.5rem; color: var(--accent);
  margin-bottom: 18px; direction: rtl; text-align: right; display: inline-block;
}

.hero-greet {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 16px; border-radius: 100px; margin-bottom: 22px;
}
.hero-greet .ar { font-family: var(--font-ar); color: var(--accent); font-size: 1.05rem; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.4rem); font-weight: 800;
  letter-spacing: -.035em; margin-bottom: 16px;
}

.hero-role {
  font-size: clamp(1.05rem, 2.4vw, 1.4rem); font-weight: 600;
  color: var(--text-muted); margin-bottom: 20px; min-height: 1.9em;
}
.hero-role .typed { color: var(--accent); }
.cursor { display: inline-block; width: 2px; height: 1.05em; background: var(--accent);
  vertical-align: text-bottom; margin-left: 3px; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-desc { font-size: 1.06rem; color: var(--text-muted); max-width: 540px; margin-bottom: 32px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 36px; }

/* Social row */
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link {
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text-muted);
  transition: all .22s ease;
}
.social-link svg { width: 19px; height: 19px; }
.social-link:hover { color: #fff; background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* Hero portrait */
.hero-visual { display: flex; justify-content: center; }
.portrait {
  position: relative; width: 100%; max-width: 310px; aspect-ratio: 1;
  border-radius: 28px; overflow: hidden;
  border: 1px solid var(--border-strong); background: var(--surface);
  box-shadow: var(--shadow);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-ring {
  position: absolute; inset: -14px; border-radius: 34px;
  border: 1.5px dashed var(--accent); opacity: .35;
  animation: spin 26s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge-float {
  position: absolute; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 9px 15px; border-radius: 100px; font-size: .82rem; font-weight: 600;
  box-shadow: var(--shadow-sm); white-space: nowrap;
}
.badge-float .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.badge-a { bottom: 18px; left: -26px; animation: float 4s ease-in-out infinite; }
.badge-b { top: 26px; right: -22px; animation: float 4s ease-in-out infinite .8s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* Scroll hint */
.scroll-hint {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1;
}
.scroll-hint .line { width: 1px; height: 34px; background: linear-gradient(var(--accent), transparent); }

/* ---------- 7. CARDS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
  position: relative; overflow: hidden; height: 100%;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.card-icon {
  width: 50px; height: 50px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.14rem; margin-bottom: 9px; }
.card p  { color: var(--text-muted); font-size: .94rem; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.tag {
  font-size: .75rem; font-weight: 600; padding: 4px 11px; border-radius: 100px;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 8. ABOUT STRIP ---------- */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 54px; align-items: center; }
.about-text p { color: var(--text-muted); margin-bottom: 15px; font-size: 1.02rem; }
.about-text p strong { color: var(--text); font-weight: 600; }

.quote-box {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 20px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 24px 0;
}
.quote-box .ar { font-family: var(--font-ar); font-size: 1.32rem; color: var(--text); direction: rtl; text-align: right; margin-bottom: 8px; }
.quote-box .tr { font-size: .93rem; color: var(--text-muted); font-style: italic; }
.quote-box .src { font-size: .8rem; color: var(--accent); font-weight: 600; margin-top: 6px; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; text-align: center; }
.stat .n { font-size: 1.7rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat .l { font-size: .78rem; color: var(--text-muted); margin-top: 3px; }

.about-visual { position: relative; }
.about-visual img { width: 100%; border-radius: var(--radius-lg); border: 1px solid var(--border); }

/* ---------- 9. VENTURES ---------- */
.venture {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; position: relative; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.venture::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--gradient);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.venture:hover::before { transform: scaleX(1); }
.venture:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }

.venture-top { display: flex; align-items: center; gap: 16px; }
.venture-logo {
  width: 58px; height: 58px; border-radius: 16px; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 800; font-size: 1.15rem; color: #fff;
}
.venture-logo.etc { background: linear-gradient(135deg, #10b981, #0d9488); }
.venture-logo.crk { background: linear-gradient(135deg, #6366f1, #38bdf8); }
.venture-top h3 { font-size: 1.28rem; margin-bottom: 3px; }
.role-badge {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); padding: 3px 10px; border-radius: 100px;
}
.venture p { color: var(--text-muted); font-size: .96rem; }
.venture-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-weight: 600; font-size: .92rem; margin-top: auto; }
.venture-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
.venture:hover .venture-link svg { transform: translateX(4px); }

/* ---------- 10. PROJECTS ---------- */
.project { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.project-thumb {
  aspect-ratio: 16/9; background: var(--surface-2);
  display: grid; place-items: center; color: var(--accent);
  border-bottom: 1px solid var(--border); position: relative;
}
.project-thumb svg { width: 48px; height: 48px; opacity: .55; }
.project-body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.project-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.project-body p { color: var(--text-muted); font-size: .92rem; flex: 1; }
.project-links { display: flex; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.project-links a { font-size: .86rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }
.project-links svg { width: 14px; height: 14px; }

/* ---------- 11. TIMELINE ---------- */
.timeline { position: relative; padding-left: 34px; max-width: 760px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: -33px; top: 6px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent);
}
.tl-year { font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .05em; }
.tl-item h4 { font-size: 1.05rem; margin: 4px 0 6px; }
.tl-item p { color: var(--text-muted); font-size: .93rem; }

/* ---------- 12. VOICE TEASER ---------- */
.voice-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 48px; text-align: center;
  position: relative; overflow: hidden;
}
.voice-block::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--accent-soft), transparent 65%);
  pointer-events: none;
}
.voice-block > * { position: relative; }
.voice-block h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin-bottom: 16px; max-width: 700px; margin-inline: auto; }
.voice-block p { color: var(--text-muted); max-width: 620px; margin: 0 auto 26px; }
.voice-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px; }
.voice-pill {
  font-size: .85rem; font-weight: 600; padding: 8px 18px; border-radius: 100px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}

/* ---------- 13. BLOG CARDS ---------- */
.post { display: flex; flex-direction: column; }
.post-meta { display: flex; align-items: center; gap: 10px; font-size: .8rem; color: var(--text-dim); margin-bottom: 11px; }
.post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.post h3 { font-size: 1.08rem; margin-bottom: 9px; transition: color .2s ease; }
.post:hover h3 { color: var(--accent); }
.post p { color: var(--text-muted); font-size: .92rem; flex: 1; }
.post-more { margin-top: 15px; font-size: .87rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- 14. CONTACT CTA ---------- */
.cta {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 56px 44px; text-align: center;
  position: relative; overflow: hidden;
}
.cta::after {
  content: ''; position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: var(--accent); filter: blur(140px); opacity: .17;
  top: -190px; left: 50%; transform: translateX(-50%); pointer-events: none;
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 14px; }
.cta p { color: var(--text-muted); max-width: 520px; margin: 0 auto 30px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 13px; justify-content: center; margin-bottom: 32px; }

/* ---------- 15. FOOTER ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 44px; padding-bottom: 44px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--text-muted); font-size: .93rem; max-width: 330px; margin-bottom: 18px; }
.footer h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-bottom: 16px; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: var(--text-muted); font-size: .93rem; transition: color .2s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .87rem; color: var(--text-dim);
}
.footer-bottom .ar { font-family: var(--font-ar); color: var(--accent); }

/* ---------- 16. SCROLL REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s cubic-bezier(.16,1,.3,1), transform .65s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 17. RESPONSIVE ---------- */
@media (max-width: 980px) {
  .hero-grid  { grid-template-columns: 1fr; gap: 46px; text-align: center; }
  .hero-desc  { margin-inline: auto; }
  .hero-actions, .socials { justify-content: center; }
  .hero-visual { order: -1; }
  .portrait   { max-width: 230px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-visual { order: -1; max-width: 400px; margin-inline: auto; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 14px 22px 22px;
    transform: translateY(-120%); transition: transform .32s cubic-bezier(.16,1,.3,1);
    box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 10px; border-radius: 9px; font-size: 1rem; }
  .hamburger { display: grid; }
  .section { padding: 68px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .voice-block, .cta { padding: 36px 24px; }
  .badge-a { left: -8px; } .badge-b { right: -6px; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
