/* =========================================================
   Habib Alkhalaf — Portfolio
   1 Tokens · 2 Base · 3 Background & preload · 4 Clock · 5 Toolbar
   6 Profile card · 7 Shared section bits · 8 Hero · 9 About
   10 Experience · 11 Work · 12 Services · 13 Tools · 14 Contact
   15 Footer · 16 Hover card · 17 Mobile menu · 18 Responsive
   ========================================================= */

/* 1. Tokens ------------------------------------------------ */
:root {
  --brand: #1e90ff;          /* Shareik blue */
  --brand-rgb: 30, 144, 255;
  --on-brand: #ffffff;

  /* light */
  --bg: #eef3f8;
  --surface: #ffffff;
  --card-bg: linear-gradient(180deg, #e4ebf3 0%, #d3dde8 100%);
  --text: #0b1220;
  --text-72: rgba(11, 18, 32, .72);
  --text-56: rgba(11, 18, 32, .56);
  --line: rgba(11, 18, 32, .1);
  --chip: rgba(11, 18, 32, .06);
  --tool-bg: rgba(255, 255, 255, .72);
  --photo-filter: none;

  --font: "Inter", system-ui, sans-serif;
  --font-head: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  --card-w: clamp(360px, 32.6vw, 470px);
  --gap: 18px;
  --radius: 24px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
body.dark-mode {
  --bg: #0a0d12;
  --surface: #131821;
  --card-bg: linear-gradient(180deg, #1a202a 0%, #0e1218 100%);
  --text: #f0f8ff;
  --text-72: rgba(240, 248, 255, .72);
  --text-56: rgba(240, 248, 255, .54);
  --line: rgba(240, 248, 255, .1);
  --chip: rgba(240, 248, 255, .07);
  --tool-bg: rgba(22, 27, 36, .75);
  --photo-filter: grayscale(1) contrast(1.05);
}

/* 2. Base -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); font-weight: 500; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
svg.fill, svg use { stroke: none; }
svg.fill { fill: currentColor; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
::selection { background: var(--brand); color: var(--on-brand); }

/* 3. Background & preload --------------------------------- */
.page-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(140px); opacity: .14;
  background: var(--brand);
  animation: drift 22s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; top: -160px; right: 8%; }
.blob-2 { width: 420px; height: 420px; bottom: -180px; left: 38%; animation-delay: -8s; opacity: .08; }
body:not(.dark-mode) .blob { opacity: .12; }
.grain {
  position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate(-120px, 80px) scale(1.15); } }

.preload {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.preload.done { opacity: 0; visibility: hidden; }
.preload-dots { width: 96px; height: 48px; color: var(--brand); animation: dotsPulse 1.2s ease-in-out infinite; }
@keyframes dotsPulse { 50% { opacity: .35; transform: scale(.92); } }

/* 4. Clock ------------------------------------------------- */
.time-local {
  position: fixed; top: 22px; right: 24px; z-index: 30;
  text-align: right; font-size: 13px; line-height: 1.35; color: var(--text-72);
}
.time-local .clock { font-weight: 500; color: var(--text); }

/* 5. Toolbar ----------------------------------------------- */
.toolbar {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.tool-btn, .nav-list {
  background: var(--tool-bg); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tool-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-72);
  transition: color .3s, border-color .3s, transform .3s var(--ease);
}
.tool-btn svg { width: 18px; height: 18px; }
.tool-btn:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); }
.toggle-mode .ic-moon { display: none; }
body:not(.dark-mode) .toggle-mode .ic-sun { display: none; }
body:not(.dark-mode) .toggle-mode .ic-moon { display: block; }
body.dark-mode .toolbar .toggle-mode { color: var(--brand); }

.nav-list { border-radius: 40px; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.nav-sep { height: 1px; margin: 4px 8px; background: var(--line); }
.nav-link {
  position: relative; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text-56);
  transition: color .3s, background-color .3s;
}
.nav-link svg { width: 16px; height: 16px; }
.nav-link:hover, .nav-link.active { color: var(--brand); }
.nav-link.active { background: var(--chip); }
.nav-link::after {
  content: attr(data-tip);
  position: absolute; right: calc(100% + 14px); top: 50%;
  transform: translate(8px, -50%); opacity: 0; pointer-events: none;
  white-space: nowrap; font-size: 12px; font-weight: 500;
  padding: 5px 10px; border-radius: 8px; background: var(--text); color: var(--bg);
  transition: opacity .25s, transform .25s var(--ease);
}
.nav-link:hover::after { opacity: 1; transform: translate(0, -50%); }

/* 6. Profile card ------------------------------------------ */
.profile-card {
  position: fixed; z-index: 20;
  top: var(--gap); bottom: var(--gap); left: var(--gap);
  width: var(--card-w);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--card-bg);
  overflow: hidden; isolation: isolate;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, .5);
  transition: background .5s var(--ease), border-color .5s;
}
.profile-card::before {
  content: ""; position: absolute; z-index: -1;
  width: 120%; aspect-ratio: 1; left: -10%; top: 6%;
  background: radial-gradient(circle, rgba(var(--brand-rgb), .2) 0%, transparent 60%);
}
.card-photo { position: absolute; inset: 0; z-index: 0; }
.card-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%;
  filter: var(--photo-filter); transform: scale(1.02);
  transition: filter .8s var(--ease), transform 1.2s var(--ease);
}
.profile-card:hover .card-photo img { transform: scale(1.05); }
/* desktop: JS sizes the photo so the face lines up with the hero headline */
.card-photo.aligned img {
  position: absolute; left: 50%; top: var(--pt, 0px);
  width: var(--pw, 100%); height: auto; max-width: none; object-fit: initial;
  transform: translateX(-50%) scale(1.02); transform-origin: 50% 15%;
}
.profile-card:hover .card-photo.aligned img { transform: translateX(-50%) scale(1.04); }
.card-photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(6, 9, 14, .7) 62%, rgba(6, 9, 14, .96) 100%);
}

.card-logo {
  position: absolute; z-index: 2; top: 20px; left: 20px;
  padding: 9px 12px; border-radius: 14px;
  color: #f0f8ff;
  background: rgba(10, 14, 20, .5); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .4s var(--ease), background-color .3s;
}
.card-logo svg { display: block; width: 78px; height: auto; }
.card-logo:hover { transform: translateY(-2px); background: rgba(10, 14, 20, .7); }

.card-social { position: absolute; z-index: 2; top: 20px; right: 20px; display: grid; gap: 10px; }
.card-social a {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #f0f8ff;
  background: rgba(10, 14, 20, .45); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .3s, color .3s, transform .3s var(--ease);
}
.card-social svg { width: 16px; height: 16px; }
.card-social a:hover { background: var(--brand); color: var(--on-brand); transform: scale(1.08); }

.available-tab {
  position: absolute; z-index: 2; left: -1px; top: 34%;
  padding: 18px 9px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--line); border-left: 0;
  border-radius: 0 16px 16px 0;
  font-size: 12px; font-weight: 500; color: var(--text-72);
  transition: background-color .5s var(--ease);
}
.vertical-text { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand); flex: none;
  box-shadow: 0 0 0 0 rgba(var(--brand-rgb), .6); animation: pulse 1.8s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 7px rgba(var(--brand-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--brand-rgb), 0); }
}

.card-info { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 0 30px 30px; color: #f0f8ff; }
.available-inline { display: none; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 10px; color: rgba(240, 248, 255, .8); }
.greeting { font-size: clamp(24px, 2vw, 30px); line-height: 1.2; margin-bottom: 14px; white-space: nowrap; }
.words-wrapper { position: relative; display: inline-block; vertical-align: top; overflow: hidden; white-space: nowrap; padding-right: 6px; }
.words-wrapper::after { content: ""; position: absolute; right: 0; top: 10%; height: 80%; width: 2px; background: var(--brand); }
.word { display: none; }
.word.is-visible { display: inline-block; }
.introduce { font-size: 14px; line-height: 1.6; color: rgba(240, 248, 255, .6); max-width: 360px; }
.card-line { height: 1px; background: rgba(240, 248, 255, .14); margin: 22px 0; }
.card-actions { display: flex; align-items: center; gap: 22px; }

.btn-talk { position: relative; display: inline-flex; align-items: center; height: 44px; border-radius: 40px; font-size: 14px; font-weight: 500; color: var(--on-brand); }
.btn-talk .text {
  height: 44px; padding: 0 20px; border-radius: 40px; margin-left: 6px;
  display: grid; place-items: center; background: var(--brand);
  transition: margin .5s var(--ease);
}
.btn-talk .ic-wrap {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--brand);
  transition: transform .5s var(--ease), width .5s var(--ease), margin .5s var(--ease);
}
.btn-talk .ic-wrap svg { width: 18px; height: 18px; stroke-width: 2; transition: transform .5s var(--ease); }
.btn-talk .ic-wrap:last-child { width: 0; transform: scale(0); margin-left: 0; }
.btn-talk:hover .ic-wrap:first-child { width: 0; transform: scale(0); }
.btn-talk:hover .text { margin-left: 0; }
.btn-talk:hover .ic-wrap:last-child { width: 44px; transform: scale(1); margin-left: 6px; }
.btn-talk:hover .ic-wrap:last-child svg { transform: rotate(45deg); }
.btn-cv { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: rgba(240, 248, 255, .85); transition: color .3s; }
.btn-cv svg { width: 16px; height: 16px; }
.btn-cv:hover { color: var(--brand); }

/* 7. Shared section bits ----------------------------------- */
.main-content {
  margin-left: calc(var(--card-w) + var(--gap) * 2);
  margin-right: 90px;
  padding: 0 clamp(24px, 5vw, 80px);
  max-width: 900px;
}
.section { padding: 110px 0 20px; }
.sect-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  padding: 6px 12px 6px 10px; border-radius: 30px;
  background: var(--chip); color: var(--text-72);
  margin-bottom: 26px;
}
.sect-tag svg { width: 14px; height: 14px; color: var(--brand); stroke-width: 2; }
.s-title { font-size: clamp(26px, 2.4vw, 36px); line-height: 1.22; letter-spacing: -.03em; color: var(--text-72); max-width: 660px; margin-bottom: 26px; }
.list-title { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-56); margin: 56px 0 8px; }

.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in-view { opacity: 1; transform: none; }

/* word-by-word blur fade for section titles (JS wraps words) */
.split .w {
  display: inline-block; opacity: 0; filter: blur(8px); transform: translateY(14px);
  transition: opacity .9s var(--ease), filter .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--d) * 28ms);
}
.split.in-view .w { opacity: 1; filter: blur(0); transform: none; }

.count { font-variant-numeric: tabular-nums; }

/* 8. Hero -------------------------------------------------- */
.section.hero { padding-top: 70px; }
.hero-author { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.author-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 2px solid var(--surface);
  background: #d3dde8 url("../assets/img/habib.webp") no-repeat 50% 4% / 230%;
  box-shadow: 0 0 0 1px var(--line);
}
.author-name { font-size: 15px; font-weight: 500; }
.author-role { font-size: 13px; color: var(--text-56); }

.hero-title { font-size: clamp(36px, 3.7vw, 58px); line-height: 1.12; letter-spacing: -.035em; }
.hero-title .line { display: block; }
.hero-title .line-in {
  display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(20px);
  transition: opacity 1s var(--ease), filter 1s var(--ease), transform 1s var(--ease);
}
.hero-title .line:nth-child(2) .line-in { transition-delay: .1s; }
.hero-title .line:nth-child(3) .line-in { transition-delay: .2s; }
.hero-title.in-view .line-in { opacity: 1; filter: blur(0); transform: none; }

.hl { position: relative; display: inline-block; padding: 0 .16em; margin: 0 -.04em; color: var(--brand); }
.hl > span { position: relative; z-index: 1; }
.hl::before {
  content: ""; position: absolute; inset: .08em 0 .02em; border-radius: .5em;
  transform: scaleX(0); transform-origin: left center;
  transition: transform .9s var(--ease) .6s;
}
.hl-1::before { background: var(--surface); }
.hl-2::before { background: var(--text); transition-delay: .8s; }
body.dark-mode .hl-1 { color: var(--on-brand); }
body.dark-mode .hl-1::before { background: var(--brand); }
body.dark-mode .hl-2::before { background: var(--chip); }
.hero-title.in-view .hl::before { transform: scaleX(1); }

.hero-art { position: relative; margin: -10px 0 0 -6%; width: 112%; max-width: 820px; }
.ribbon { width: 100%; height: auto; display: block; overflow: visible; }
.ribbon stop { stop-color: var(--brand); }
.ribbon path {
  stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000);
  transition: stroke-dashoffset 2.4s cubic-bezier(.65, 0, .35, 1) .3s;
}
.hero-art.in-view .ribbon path { stroke-dashoffset: 0; }
.badge {
  position: absolute; left: 56%; top: 6%;
  width: clamp(110px, 10vw, 140px); aspect-ratio: 1; border-radius: 50%;
  background: #0d1118; border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 20px 40px -16px rgba(0, 0, 0, .6);
  display: grid; place-items: center;
  opacity: 0; transform: scale(.6) rotate(-30deg);
  transition: opacity .8s var(--ease) 1.4s, transform 1s var(--ease) 1.4s;
}
body:not(.dark-mode) .badge { background: #fff; border-color: var(--line); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .25); }
.hero-art.in-view .badge { opacity: 1; transform: none; }
.badge-text { position: absolute; inset: 0; animation: spin 16s linear infinite; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; color: #f0f8ff; }
body:not(.dark-mode) .badge-text { color: var(--text); }
.badge-text span { position: absolute; left: 50%; top: 8px; height: calc(50% - 8px); width: 1em; margin-left: -.5em; text-align: center; transform-origin: 50% 100%; }
.badge-core { width: 46%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; }
.badge-core svg { width: 52%; height: auto; fill: currentColor; }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-counters { display: flex; gap: clamp(32px, 5vw, 64px); margin: 10px 0 56px; }
.counter-num, .stat-num { font-family: var(--font-head); font-size: clamp(40px, 3.6vw, 56px); line-height: 1; letter-spacing: -.04em; font-weight: 400; margin-bottom: 10px; }
.counter-label, .stat-label { font-size: 13px; color: var(--text-56); }

.hero-clients { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 18px; }
.hero-clients svg { width: 18px; height: 18px; color: var(--text-72); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee-track { display: flex; width: max-content; gap: 56px; padding-right: 56px; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.brand-word { font-family: var(--font-head); font-size: 20px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; color: var(--text-56); transition: color .3s; }
.brand-word:hover { color: var(--brand); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* 9. About ------------------------------------------------- */
.s-desc { display: grid; gap: 16px; color: var(--text-56); max-width: 620px; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 44px; padding: 28px 0; border-block: 1px solid var(--line);
}
.stat-num { font-size: clamp(32px, 2.8vw, 44px); }

.award-item {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; border-bottom: 1px solid var(--line); cursor: default;
}
.award-item > div { transition: transform .5s var(--ease); }
.award-name { font-size: clamp(17px, 1.4vw, 21px); color: var(--text-72); margin-bottom: 4px; transition: color .3s; }
.award-by { font-size: 14px; color: var(--text-56); }
.award-year { font-family: var(--font-head); font-size: 15px; font-weight: 500; color: var(--text-56); white-space: nowrap; }
.award-item:hover > div { transform: translateX(8px); }
.award-item:hover .award-name { color: var(--brand); }

/* 10. Experience ------------------------------------------- */
.timeline { position: relative; display: grid; gap: 44px; padding: 6px 0; }
.timeline-line { position: absolute; top: 12px; bottom: 12px; left: 123px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline-progress { position: absolute; inset: 0 0 auto; height: calc(var(--p, 0) * 100%); background: var(--brand); border-radius: 2px; box-shadow: 0 0 12px rgba(var(--brand-rgb), .6); }
.timeline-item { display: grid; grid-template-columns: 110px 28px 1fr; align-items: start; }
.t-date { font-size: 14px; color: var(--text-56); padding-top: 2px; white-space: nowrap; }
.t-dot {
  justify-self: center; margin-top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--text-56); position: relative; z-index: 1;
  transition: background-color .4s, border-color .4s, box-shadow .4s;
}
.timeline-item.active .t-dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px rgba(var(--brand-rgb), .18); }
.t-body { padding-left: 18px; }
.t-logo {
  display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px;
  font-family: var(--font-head); font-size: 13px; font-weight: 600;
  background: var(--chip); color: var(--text-72); margin-bottom: 14px;
  transition: background-color .4s, color .4s;
}
.timeline-item.active .t-logo { background: rgba(var(--brand-rgb), .14); color: var(--brand); }
.t-role { font-size: 17px; font-weight: 500; color: var(--text-72); margin-bottom: 6px; }
.t-desc { font-size: 14px; color: var(--text-56); max-width: 520px; }

/* 11. Work ------------------------------------------------- */
.work-list { display: grid; }
/* z-index > profile card (20) so each item's fixed detail panel can sit on top of it */
.work-item { position: sticky; z-index: 21; top: calc(96px + var(--i) * 14px); padding-bottom: 48px; }
.work-image {
  display: block; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -20px 50px -30px rgba(0, 0, 0, .5);
}
.work-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; transition: transform 1.2s var(--ease); }
.work-image:hover img { transform: scale(1.04); }

/* the detail panel takes over the left card while its project is on screen */
.work-detail {
  position: fixed; z-index: 25;
  top: var(--gap); bottom: var(--gap); left: var(--gap); width: var(--card-w);
  border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, .1);
  background: #0c1016; color: #f0f8ff; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 30px;
  opacity: 0; visibility: hidden; transform: scale(.985);
  transition: opacity .5s var(--ease), transform .5s var(--ease), visibility .5s;
}
.work-item.active .work-detail { opacity: 1; visibility: visible; transform: none; }
.wd-bg { position: absolute; inset: -40px; z-index: -1; background: center / cover no-repeat; filter: blur(40px) brightness(.35) saturate(1.2); transform: scale(1.1); }
.wd-top, .wd-bottom { position: relative; }
.wd-kicker { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.wd-title { font-size: clamp(30px, 2.6vw, 40px); line-height: 1.05; letter-spacing: -.035em; margin-bottom: 14px; }
.wd-desc { font-size: 14px; line-height: 1.6; color: rgba(240, 248, 255, .62); margin-bottom: 28px; }
.wd-facts { display: grid; gap: 18px; margin-bottom: 26px; }
.wd-label { font-size: 13px; color: rgba(240, 248, 255, .5); margin-bottom: 2px; }
.wd-value { font-size: 17px; color: rgba(240, 248, 255, .85); }
.wd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-tags span, .acc-tags span, .lang-chips span {
  font-size: 13px; font-weight: 500; padding: 7px 13px; border-radius: 30px;
}
.wd-tags span { background: rgba(240, 248, 255, .08); border: 1px solid rgba(240, 248, 255, .1); color: rgba(240, 248, 255, .8); }
.wd-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; border-top: 1px solid rgba(240, 248, 255, .14); }
.wd-link {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px 0 20px; border-radius: 40px;
  background: #f0f8ff; color: #0b1220; font-size: 14px; font-weight: 500;
  transition: background-color .3s, color .3s;
}
.wd-link svg { width: 16px; height: 16px; stroke-width: 2; transition: transform .4s var(--ease); }
.wd-link:hover { background: var(--brand); color: #fff; }
.wd-link:hover svg { transform: rotate(45deg); }
.wd-count { font-size: 14px; color: rgba(240, 248, 255, .45); }
.wd-count b { font-weight: 500; color: rgba(240, 248, 255, .85); }

.more-list li a {
  display: grid; grid-template-columns: 1fr auto 20px; align-items: center; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.m-name { font-family: var(--font-head); font-size: clamp(18px, 1.5vw, 22px); font-weight: 500; color: var(--text-72); transition: color .3s, transform .5s var(--ease); }
.m-type { font-size: 13px; color: var(--text-56); text-align: right; }
.more-list svg { width: 18px; height: 18px; color: var(--text-56); transition: transform .4s var(--ease), color .3s; }
.more-list li a:hover .m-name { color: var(--brand); transform: translateX(8px); }
.more-list li a:hover svg { color: var(--brand); transform: rotate(45deg); }

/* 12. Services --------------------------------------------- */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 0; text-align: left; }
.acc-head h4 { font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.03em; color: var(--text-72); transition: color .3s; }
.acc-head:hover h4, .acc-item.open .acc-head h4 { color: var(--text); }
.acc-icon { position: relative; width: 38px; height: 38px; flex: none; border-radius: 50%; border: 1px solid var(--line); transition: background-color .3s, border-color .3s; }
.acc-icon::before, .acc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.6px; background: currentColor; transform: translate(-50%, -50%); transition: transform .4s var(--ease); }
.acc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.acc-item.open .acc-icon { background: var(--brand); border-color: var(--brand); color: #fff; }
.acc-item.open .acc-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.acc-item.open .acc-panel { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; }
.acc-inner > :last-child { margin-bottom: 30px; }
.acc-images { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.acc-images img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 16px; border: 1px solid var(--line); }
.acc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.acc-tags span, .lang-chips span { background: var(--chip); color: var(--text-72); }
.acc-desc { color: var(--text-56); max-width: 620px; }

/* 13. Tools ------------------------------------------------ */
.tool { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.tool-info { display: flex; align-items: center; gap: 14px; }
.tool-icon {
  width: 50px; height: 50px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line);
  font-family: var(--font-head); font-weight: 600; font-size: 16px;
}
.tool-icon svg { width: 18px; height: 26px; }
.tool-icon.ai { background: #330000; color: #ff9a00; border-color: transparent; }
.tool-icon.ps { background: #001e36; color: #31a8ff; border-color: transparent; }
.tool-icon.web { background: var(--brand); color: #fff; border-color: transparent; font-size: 14px; }
.tool-name { font-weight: 500; color: var(--text-72); }
.tool-duty { font-size: 13px; color: var(--text-56); }
.tool-bar { position: relative; width: 46%; height: 46px; flex: none; border-radius: 40px; background: var(--chip); border: 1px solid var(--line); overflow: hidden; }
.bar-fill {
  position: absolute; inset: 0 auto 0 0; width: 15%; min-width: 64px;
  border-radius: 40px;
  background: linear-gradient(90deg, rgba(var(--brand-rgb), .08), rgba(var(--brand-rgb), .4));
  transition: width 1.6s var(--ease);
}
.bar-fill b { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 30px; background: var(--brand); color: #fff; }
.languages { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 36px; }
.lang-title { font-size: 14px; font-weight: 600; color: var(--text-56); text-transform: uppercase; letter-spacing: .05em; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* 14. Contact ---------------------------------------------- */
.contact-list { border-top: 1px solid var(--line); }
.contact-row {
  display: grid; grid-template-columns: 52px 1fr 24px; align-items: center; gap: 18px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.c-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--chip); color: var(--text-72);
  transition: background-color .3s, color .3s, transform .5s var(--ease);
}
.c-icon svg { width: 20px; height: 20px; }
.c-label { display: block; font-size: 13px; color: var(--text-56); margin-bottom: 2px; }
.c-value { display: block; font-family: var(--font-head); font-size: clamp(20px, 2vw, 28px); letter-spacing: -.02em; color: var(--text-72); transition: color .3s, transform .5s var(--ease); }
.c-arrow { width: 22px; height: 22px; color: var(--text-56); transition: transform .4s var(--ease), color .3s; }
.contact-row:hover .c-icon { background: var(--brand); color: #fff; transform: rotate(-8deg); }
.contact-row:hover .c-value { color: var(--text); transform: translateX(6px); }
.contact-row:hover .c-arrow { color: var(--brand); transform: rotate(45deg); }

/* 15. Footer ----------------------------------------------- */
.footer { padding: 110px 0 40px; }
.quote p { font-family: var(--font-serif); font-size: clamp(26px, 2.6vw, 38px); line-height: 1.25; color: var(--text-72); }
.quote cite { display: block; text-align: right; margin-top: 10px; font-family: var(--font-serif); font-style: normal; font-size: 20px; color: var(--text-56); }
.foot-line { height: 1px; background: var(--line); margin: 50px 0 30px; }
.foot-inner, .foot-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.big-word { font-family: var(--font-head); font-weight: 500; font-size: clamp(88px, 12vw, 180px); line-height: .9; letter-spacing: -.06em; color: var(--text-72); }
.big-word.outline { color: transparent; -webkit-text-stroke: 1.5px var(--text-56); }
.big-word.outline.reveal { transform: translateY(40px) scaleX(-1); }
.big-word.outline.in-view { transform: scaleX(-1); }
.foot-logo {
  width: 70px; height: 70px; border-radius: 50%; flex: none; margin-bottom: 14px;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--brand);
  transition: transform .6s var(--ease), background-color .3s, color .3s;
}
.foot-logo svg { width: 30px; height: auto; fill: currentColor; }
.foot-logo:hover { transform: rotate(-12deg) scale(1.06); background: var(--brand); color: #fff; }
.foot-bottom { margin-top: 10px; }
.foot-meta { display: grid; gap: 14px; padding-bottom: 12px; }
.foot-shareik { width: 130px; height: auto; color: var(--text); }
.foot-meta p { font-size: 14px; color: var(--text-56); }

/* 16. Hover card (follows the cursor) ---------------------- */
.hover-card {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none;
  width: 220px; aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5);
  opacity: 0; transform: translate(var(--x, 0), var(--y, 0)) scale(.4) rotate(-6deg);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.hover-card.show { opacity: 1; transform: translate(var(--x, 0), var(--y, 0)) scale(1) rotate(-3deg); }
.hover-card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.hc-fallback {
  position: absolute; inset: 0; display: none; place-content: center; justify-items: center; gap: 12px;
  background: linear-gradient(135deg, #1e90ff, #0b4f9c); color: #fff; text-align: center; padding: 16px;
}
.hc-fallback svg { width: 72px; height: 36px; fill: currentColor; }
.hc-fallback b { font-family: var(--font-head); font-weight: 600; font-size: 18px; }
.hover-card.fallback img { display: none; }
.hover-card.fallback .hc-fallback { display: grid; }

/* 17. Mobile menu ------------------------------------------ */
.mobile-menu-btn, .mobile-nav { display: none; }

/* 18. Responsive ------------------------------------------ */
@media (max-width: 1199px) {
  .tool-bar { width: 40%; }
}

@media (max-width: 991px) {
  .toolbar, .time-local, .hover-card { display: none; }

  .profile-card { position: relative; inset: auto; width: auto; height: min(760px, 92svh); margin: 16px; }
  .card-social { top: 78px; }
  .main-content { margin: 0; padding: 0 16px; max-width: none; }
  .section { padding-top: 80px; }

  /* work: no takeover panel, details sit inside each card */
  .work-item { position: relative; top: auto; padding-bottom: 28px; }
  .work-image { border-radius: var(--radius) var(--radius) 0 0; border-bottom: 0; box-shadow: none; }
  .work-detail {
    position: relative; inset: auto; width: auto; z-index: 0;
    opacity: 1; visibility: visible; transform: none;
    border-radius: 0 0 var(--radius) var(--radius); padding: 24px;
  }
  .wd-facts { grid-template-columns: 1fr 1fr; }

  .mobile-menu-btn {
    display: grid; place-items: center;
    position: fixed; top: 28px; right: 28px; z-index: 60;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--tool-bg); border: 1px solid var(--line);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .mobile-menu-btn span, .mobile-menu-btn span::before, .mobile-menu-btn span::after {
    content: ""; display: block; width: 16px; height: 1.6px; background: var(--text); border-radius: 2px;
    position: relative; transition: transform .3s var(--ease), background-color .3s;
  }
  .mobile-menu-btn span::before { position: absolute; top: -5px; }
  .mobile-menu-btn span::after { position: absolute; top: 5px; }
  .mobile-menu-btn.open span { background: transparent; }
  .mobile-menu-btn.open span::before { transform: translateY(5px) rotate(45deg); }
  .mobile-menu-btn.open span::after { transform: translateY(-5px) rotate(-45deg); }
  .mobile-nav {
    display: flex; flex-direction: column; gap: 4px;
    position: fixed; top: 78px; right: 28px; z-index: 59;
    min-width: 200px; padding: 10px; border-radius: 18px;
    background: var(--surface); border: 1px solid var(--line);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, .4);
    opacity: 0; transform: translateY(-8px) scale(.98); pointer-events: none;
    transition: opacity .3s, transform .3s var(--ease);
  }
  .mobile-nav.open { opacity: 1; transform: none; pointer-events: auto; }
  .mobile-nav a, .mobile-toggle { padding: 10px 12px; border-radius: 10px; font-size: 15px; text-align: left; }
  .mobile-nav a:hover, .mobile-nav a.active { background: var(--chip); color: var(--brand); }
  .mobile-toggle { border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; color: var(--text-56); }
}

@media (max-width: 575px) {
  .profile-card { margin: 10px; }
  .card-info { padding: 0 22px 24px; }
  .available-tab { display: none; }
  .available-inline { display: flex; }
  .greeting { white-space: normal; }
  .mobile-menu-btn { top: 22px; right: 22px; }
  .mobile-nav { right: 22px; top: 72px; }

  .section.hero { padding-top: 48px; }
  .hero-art { margin-left: -4%; width: 108%; }
  .badge { width: 92px; left: 54%; top: 2%; }
  .badge-text { font-size: 7.5px; }
  .badge-text span { top: 5px; height: calc(50% - 5px); }
  .brand-word { font-size: 17px; }

  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: span 2; }

  .timeline-line { left: 13px; }
  .timeline-item { grid-template-columns: 28px 1fr; }
  .t-dot { grid-column: 1; grid-row: 1 / span 2; }
  .t-date { grid-column: 2; padding-left: 16px; margin-bottom: 10px; }
  .t-body { grid-column: 2; padding-left: 16px; }

  .more-list li a { grid-template-columns: 1fr 20px; gap: 4px 12px; }
  .m-type { grid-row: 2; text-align: left; }
  .more-list svg { grid-row: 1 / span 2; grid-column: 2; }
  .contact-row { grid-template-columns: 44px 1fr 20px; gap: 14px; }
  .c-icon { width: 44px; height: 44px; }

  .acc-images { grid-template-columns: 1fr; }
  .tool { flex-direction: column; align-items: stretch; gap: 14px; }
  .tool-bar { width: 100%; }

  .foot-inner .foot-logo { width: 56px; height: 56px; }
  .foot-bottom { flex-direction: column-reverse; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal, .split .w, .hero-title .line-in { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* language switch */
.lang-btn { font-family: "IBM Plex Sans Arabic", var(--font); font-size: 16px; font-weight: 600; line-height: 1; }
.lang-btn.is-en { font-family: var(--font-head); font-size: 12px; letter-spacing: .02em; }
.mobile-lang { display: block; padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--brand); }
