/* =========================================================
   Amr Shbib — Portfolio
   Premium dark + light theme. Apple/Linear/Stripe-class.
   ========================================================= */

/* ----- Tokens: shared ----- */
:root {
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --container: 1200px;
  --space: clamp(96px, 12vw, 140px);

  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --accent: #4f6dff;
  --accent-strong: #3852e0;
  --accent-2: #00d4b4;
  --violet: #8b7cff;
  --amber: #ffb547;
}

/* ----- Theme: dark (default) ----- */
:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080c;
  --bg-soft: #0d0f15;
  --surface: #12141d;
  --surface-2: #181b27;
  --surface-3: #1f2330;
  --border: #1d212e;
  --border-strong: #2a2f41;

  --text: #ecedf2;
  --text-strong: #ffffff;
  --muted: #9aa3b8;
  --dim: #6b7388;

  --accent: #6aa3ff;
  --accent-strong: #87b6ff;
  --accent-2: #5cf3d3;
  --accent-soft: rgba(106, 163, 255, 0.12);
  --accent-glow: rgba(106, 163, 255, 0.35);
  --grad: linear-gradient(135deg, #6aa3ff 0%, #8b7cff 50%, #5cf3d3 100%);

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.55);

  --glass: rgba(7, 8, 12, 0.72);
}

/* ----- Theme: light ----- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --bg-soft: #f3f4f7;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f5;
  --border: #e6e8ee;
  --border-strong: #d6d9e3;

  --text: #1d2230;
  --text-strong: #0a0c14;
  --muted: #4b5468;
  --dim: #7a8294;

  --accent: #2e62ff;
  --accent-strong: #1b48de;
  --accent-2: #0fb89a;
  --accent-soft: rgba(46, 98, 255, 0.10);
  --accent-glow: rgba(46, 98, 255, 0.25);
  --grad: linear-gradient(135deg, #2e62ff 0%, #6a5cff 50%, #0fb89a 100%);

  --shadow-sm: 0 2px 10px rgba(15, 20, 40, 0.06);
  --shadow: 0 14px 32px rgba(15, 20, 40, 0.08);
  --shadow-lg: 0 30px 60px rgba(15, 20, 40, 0.12);

  --glass: rgba(255, 255, 255, 0.78);
}

/* =========================================================
   Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent); }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; color: var(--text-strong); }
p { margin: 0; }
.serif { font-family: var(--font-serif); font-weight: 400; }
.italic { font-style: italic; }

.skip-link {
  position: absolute; top: -40px; left: 12px;
  background: var(--accent); color: #fff;
  padding: 6px 10px; border-radius: 6px; z-index: 1000;
}
.skip-link:focus { top: 12px; }

/* Atmosphere */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 500px at 0% 30%, rgba(139,124,255,0.10), transparent 60%),
    radial-gradient(800px 600px at 50% 110%, rgba(92,243,211,0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

.container {
  width: min(100% - 40px, var(--container));
  margin-inline: auto;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  background: var(--glass);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
  gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--grad);
  color: #00231b; font-family: var(--font-mono); font-weight: 700;
  box-shadow: 0 6px 20px var(--accent-glow);
}
.brand-name { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name-top { font-size: 15px; font-weight: 700; color: var(--text-strong); }
.brand-name-sub { font-size: 11px; color: var(--muted); font-family: var(--font-mono); letter-spacing: .02em; }

.nav-links {
  display: flex; gap: 2px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 5px;
  border-radius: 999px;
}
.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text-strong); }
.nav-links a.active { color: var(--text-strong); background: var(--accent-soft); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 20px;
  transition: all .2s ease;
}
.icon-btn:hover { border-color: var(--border-strong); color: var(--accent); }
.theme-toggle .icon-light { display: none; }
:root[data-theme="light"] .theme-toggle .icon-dark { display: none; }
:root[data-theme="light"] .theme-toggle .icon-light { display: inline-block; }
.nav-toggle { display: none; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 14px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease, box-shadow .25s ease;
  white-space: nowrap;
}
.btn i { font-size: 18px; }
.btn:hover { transform: translateY(-2px); color: inherit; }
.btn-primary {
  background: var(--grad);
  color: #04101a;
  box-shadow: 0 12px 30px -10px var(--accent-glow);
}
.btn-primary:hover { filter: brightness(1.05); color: #04101a; }
.btn-outline { border-color: var(--border-strong); color: var(--text-strong); background: var(--surface); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  color: var(--muted);
  border-color: var(--border);
  background: var(--surface);
  padding: 9px 14px;
}
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding: clamp(72px, 10vw, 120px) 0 var(--space); position: relative; }
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { min-width: 0; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(92,243,211,0.18);
  animation: pulse 2.2s ease-in-out infinite;
}
.dot-mini { width: 6px; height: 6px; box-shadow: 0 0 0 3px rgba(92,243,211,0.16); }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .55; transform: scale(0.85); }
}
.hero-title {
  font-size: clamp(36px, 5.6vw, 64px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text-strong);
}
.hero-title .serif { font-weight: 400; font-size: 1.02em; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin-top: 24px;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 56ch;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text-strong); font-weight: 600; }
.hero-actions {
  display: flex; gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px 28px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-meta li { display: flex; flex-direction: column; gap: 2px; }
.hero-meta strong {
  font-size: clamp(24px, 3vw, 28px);
  font-weight: 700;
  font-family: var(--font-mono);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-meta span { font-size: 12px; color: var(--muted); line-height: 1.4; }
.hero-socials { display: flex; gap: 8px; margin-top: 28px; }
.hero-socials a {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 19px;
  background: var(--surface);
  transition: all .2s ease;
}
.hero-socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* Hero visual */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
  min-height: 380px;
}
.orb {
  position: absolute; inset: -10% -5% -10% -5%;
  background: conic-gradient(from 90deg, var(--accent), var(--violet), var(--accent-2), var(--accent));
  filter: blur(70px);
  opacity: .42;
  border-radius: 50%;
  animation: spin 22s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-wrap {
  position: absolute;
  inset: 7% 7%;
  z-index: 2;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  outline: 2px solid color-mix(in oklab, var(--accent), transparent 40%);
  outline-offset: 4px;
  box-shadow:
    0 40px 90px -20px var(--accent-glow),
    0 20px 50px rgba(0,0,0,0.5);
}
.avatar-wrap img {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.04) saturate(1.05);
}
.floating-card {
  position: absolute;
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  font-size: 13px;
  animation: float 6s ease-in-out infinite;
  min-width: 160px;
}
.floating-card i {
  font-size: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 8px;
  border-radius: 10px;
}
.floating-card strong { display: block; font-size: 13px; color: var(--text-strong); }
.floating-card span { color: var(--muted); font-size: 11px; }
.card-a { top: 4%; left: -10%; animation-delay: 0s; }
.card-b { bottom: 8%; left: -6%; animation-delay: -2s; }
.card-c { top: 18%; right: -8%; animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* =========================================================
   Section primitives
   ========================================================= */
.section { padding: var(--space) 0; }
.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-head {
  margin-bottom: clamp(40px, 6vw, 72px);
  max-width: 760px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 500;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}
.section-head p, .section-sub {
  color: var(--muted);
  margin-top: 14px;
  font-size: clamp(15px, 1.4vw, 17px);
  max-width: 64ch;
  line-height: 1.7;
}
.sub-section-head { margin: 64px 0 28px; }
.sub-section-head h3 { font-size: 24px; font-weight: 700; }
.sub-section-head p { color: var(--muted); margin-top: 6px; font-size: 14px; }

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-text .lead { font-size: 18px; line-height: 1.75; color: var(--text); margin-bottom: 18px; }
.about-text .lead em { color: var(--accent); }
.about-text p { color: var(--muted); margin-bottom: 14px; line-height: 1.75; max-width: 65ch; }
.about-text strong { color: var(--text-strong); font-weight: 600; }
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.about-card-head {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: 18px;
}
.about-list { display: grid; gap: 0; }
.about-list li {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.about-list li:last-child { border-bottom: 0; }
.about-list span { color: var(--muted); }
.about-list strong { color: var(--text-strong); text-align: right; font-weight: 600; }
.about-cta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-weight: 600;
  color: var(--accent);
}
.about-cta i { transition: transform .2s ease; }
.about-cta:hover i { transform: translateX(4px); }

/* =========================================================
   Services / What I Do
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px 200px at 0% 0%, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px -25px var(--accent-glow);
}
.service-card:hover::before { opacity: 1; }
.service-card > * { position: relative; }
.service-icon {
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 26px;
  margin-bottom: 18px;
}
.service-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
.service-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.service-chips li {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* =========================================================
   Leadership
   ========================================================= */
.leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.leadership-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s ease, border-color .2s ease;
}
.leadership-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.leadership-num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
}
.leadership-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.leadership-card p { color: var(--muted); font-size: 13.5px; line-height: 1.65; }

/* =========================================================
   Architecture
   ========================================================= */
.arch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.arch-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
  position: relative;
}
.arch-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 20px 50px -25px var(--accent-glow);
}
.arch-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 28px;
  margin-bottom: 18px;
}
.arch-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.arch-card p { color: var(--muted); font-size: 14px; line-height: 1.65; margin-bottom: 16px; }
.arch-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.arch-tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(106,163,255,0.20);
  color: var(--accent);
}

/* =========================================================
   Projects (Featured) — device-frame cards
   ========================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.project-card {
  --accent: var(--accent);
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.project-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0;
  height: 3px; width: 60px;
  background: var(--accent);
  border-radius: 0 0 4px 0;
  opacity: .85;
}
.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 24px 60px -28px var(--accent);
}

/* Clean app icon (no device frame) */
.app-icon {
  flex-shrink: 0;
  width: 76px; height: 76px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow:
    0 18px 36px -16px var(--accent-glow),
    0 14px 28px rgba(0,0,0,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.04);
  transition: transform .25s ease;
}
.app-icon::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), transparent 35%);
  pointer-events: none;
  border-radius: 20px;
}
.app-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
}
.app-icon-fallback {
  display: grid; place-items: center;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent), transparent 35%), color-mix(in oklab, var(--accent), transparent 80%));
}
.app-icon-fallback i { font-size: 32px; color: var(--text-strong); }
.project-card:hover .app-icon { transform: scale(1.04) rotate(-1.5deg); }

.project-body { flex: 1; min-width: 0; }
.project-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.project-role {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
}
.project-badge {
  font-size: 10px;
  color: var(--text-strong);
  background: var(--surface-2);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
}
.project-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 2px; letter-spacing: -0.02em; }
.project-sub { color: var(--muted); font-size: 12px; margin-bottom: auto; padding-bottom: 14px; }

/* Store badges */
.project-links { display: flex; flex-wrap: wrap; gap: 6px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 10px 6px 8px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  font-family: var(--font-sans);
  transition: transform .15s ease, box-shadow .2s ease;
}
.store-badge:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 10px 24px rgba(0,0,0,0.35); }
.store-badge i { font-size: 18px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.1; gap: 1px; text-align: left; }
.store-badge small { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; opacity: .8; }
.store-badge strong { font-size: 11px; font-weight: 700; }

@media (max-width: 540px) {
  .project-card { flex-direction: column; }
  .app-icon { width: 72px; height: 72px; border-radius: 18px; }
}

/* Project action buttons row */
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.details-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
}
.details-btn:hover {
  transform: translateY(-2px);
  background: var(--accent);
  color: #04101a;
}
.details-btn i { font-size: 15px; }

/* Other-works screenshots badge */
.work-shots-btn {
  position: absolute;
  top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px;
  background: rgba(7,8,12,0.85);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all .2s ease;
  z-index: 2;
}
.work-shots-btn:hover {
  background: var(--accent);
  color: #04101a;
  border-color: var(--accent);
}
.work-shots-btn i { font-size: 14px; }
:root[data-theme="light"] .work-shots-btn { background: rgba(255,255,255,0.92); color: var(--accent); }
:root[data-theme="light"] .work-shots-btn:hover { background: var(--accent); color: #fff; }

/* =========================================================
   Screenshots gallery (embedded inside details modal)
   App Store / Google Play style — horizontal scrollable strip.
   Tap any tile to zoom it via the body-level zoom overlay.
   ========================================================= */
.modal-shots {
  display: flex;
  gap: 12px;
  padding: 4px 2px 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
  margin: 0 -10px;
  padding-inline: 10px;
}
.modal-shots::-webkit-scrollbar { height: 8px; }
.modal-shots::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.modal-shots::-webkit-scrollbar-track { background: transparent; }

.shots-tile {
  flex: 0 0 auto;
  height: 380px;
  padding: 0;
  border: 1px solid var(--border);
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  cursor: zoom-in;
  scroll-snap-align: start;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.shots-tile img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  pointer-events: none;
}
.shots-tile:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 18px 40px -16px var(--accent-glow);
}
.shots-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Body-level zoom overlay (works for any image in the page) */
.shots-zoom {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(3,4,8,0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 24px;
  cursor: zoom-out;
}
.shots-zoom.is-open { display: flex; }
.shots-zoom img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: pop .25s cubic-bezier(.2,.8,.2,1);
}
.shots-zoom-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
  transition: all .2s ease;
}
.shots-zoom-close:hover { color: var(--accent); border-color: var(--accent); }

@media (max-width: 720px) {
  .shots-tile { height: 300px; border-radius: 14px; }
  .shots-tile img { max-width: 70vw; }
}

/* =========================================================
   Other works (legacy)
   ========================================================= */
.other-projects { margin-top: 80px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter {
  font-size: 13px; font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all .2s ease;
}
.filter:hover { color: var(--text-strong); border-color: var(--border-strong); }
.filter.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.work-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.work-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 50px -25px var(--accent-glow); }
.work-thumb {
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  display: grid; place-items: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.work-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.work-card:hover .work-thumb img { transform: scale(1.05); }
.work-meta {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.work-title { font-size: 14px; font-weight: 600; color: var(--text-strong); }
.work-tag { font-family: var(--font-mono); font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: .1em; }
.work-open {
  position: absolute;
  top: 10px; right: 10px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 16px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .25s ease, transform .25s ease;
}
.work-card:hover .work-open { opacity: 1; transform: translateY(0); }

/* =========================================================
   Case Studies
   ========================================================= */
.case-study {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 44px);
  margin-bottom: 28px;
  box-shadow: var(--shadow-sm);
}
.case-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.case-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .15em;
  display: block;
  margin-bottom: 8px;
}
.case-head h3 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  max-width: 28ch;
  letter-spacing: -0.02em;
}
.case-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(106,163,255,0.2);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.case-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.case-narrative p { color: var(--muted); line-height: 1.75; margin-bottom: 14px; max-width: 60ch; }
.case-narrative em { color: var(--accent); }
.case-narrative strong { color: var(--text-strong); }
.case-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-self: start;
}
.case-stats > div {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  text-align: center;
}
.case-stats strong {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(22px, 2.6vw, 26px);
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.case-stats span { font-size: 11px; color: var(--muted); }
.case-bullets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.case-bullets li {
  display: flex; gap: 12px;
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.case-bullets i {
  font-size: 22px;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 8px;
  border-radius: 10px;
  flex-shrink: 0;
  height: fit-content;
}
.case-bullets strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-strong); margin-bottom: 2px; }
.case-bullets span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.case-quote {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--text);
  line-height: 1.45;
  padding: 20px 28px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 880px) {
  .case-body { grid-template-columns: 1fr; }
}

/* =========================================================
   Timeline (Professional Experience)
   ========================================================= */
.timeline {
  position: relative;
  padding: 0;
  list-style: none;
  max-width: 980px;
  margin: 0 auto;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 200px;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--border);
}
.timeline > li {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 32px;
  position: relative;
  padding: 18px 0 28px;
}
.tl-dot {
  position: absolute;
  left: 196px;
  top: 26px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.tl-meta { display: flex; flex-direction: column; text-align: right; padding-right: 28px; }
.tl-period { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.tl-loc { font-size: 12px; color: var(--muted); margin-top: 4px; }
.tl-body { padding-left: 16px; }
.tl-body h4 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.tl-co { color: var(--muted); font-weight: 500; }
.tl-body p { color: var(--muted); font-size: 14px; line-height: 1.65; max-width: 62ch; }
.role-badge {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(106,163,255,0.3);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .05em;
  font-weight: 500;
}

@media (max-width: 720px) {
  .timeline::before { left: 14px; }
  .timeline > li { grid-template-columns: 1fr; gap: 8px; padding-left: 38px; }
  .tl-dot { left: 10px; top: 8px; }
  .tl-meta { text-align: left; padding-right: 0; flex-direction: row; gap: 12px; }
  .tl-body { padding-left: 0; }
}

.education-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 980px;
  margin: 48px auto 0;
}
.edu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.edu-card h4 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.edu-card .time { display: inline-block; font-family: var(--font-mono); font-size: 12px; color: var(--accent); margin: 4px 0 10px; }
.edu-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }
@media (max-width: 720px) {
  .education-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Tech Stack — Expertise grid + chip cloud
   ========================================================= */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 48px;
}
.expertise-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .2s ease, border-color .2s ease;
}
.expertise-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.expertise-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.expertise-head i {
  font-size: 22px;
  color: var(--accent);
  background: var(--accent-soft);
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.expertise-head h3 { font-size: 16px; font-weight: 700; }
.expertise-card ul { display: flex; flex-direction: column; gap: 6px; }
.expertise-card li { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.expertise-card li::before {
  content: "";
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.stack-cloud { padding-top: 32px; border-top: 1px solid var(--border); }
.cloud-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.cloud-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}
.cloud-group h4 {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.cloud-group h4::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.cloud-group ul { display: flex; flex-wrap: wrap; gap: 6px; }
.cloud-group li {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: var(--font-mono);
  transition: all .15s ease;
}
.cloud-group li:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }

/* =========================================================
   Achievements
   ========================================================= */
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.achievement-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.achievement-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 20px 50px -25px var(--accent-glow); }
.achievement-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad);
  color: #04101a;
  font-size: 24px;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px -8px var(--accent-glow);
}
.achievement-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.achievement-card p { color: var(--muted); font-size: 13.5px; line-height: 1.65; margin-bottom: 14px; }
.achievement-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

/* Libraries (inside Achievements) */
.libs-block { margin-top: 64px; }
.libs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.lib-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform .2s ease, border-color .2s ease;
  text-decoration: none;
  display: flex; flex-direction: column;
}
.lib-card:hover { transform: translateY(-3px); border-color: var(--accent); color: inherit; }
.lib-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.lib-head > i:first-child {
  font-size: 24px;
  color: var(--accent);
  background: var(--accent-soft);
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
}
.lib-go { font-size: 16px; color: var(--muted); transition: color .2s ease; }
.lib-card:hover .lib-go { color: var(--accent); }
.lib-card h4 { font-family: var(--font-mono); font-size: 13px; font-weight: 600; word-break: break-word; margin-bottom: 8px; }
.lib-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin-bottom: 14px; flex: 1; }
.lib-foot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.lib-foot i { font-size: 14px; }

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
  align-items: start;
}
.contact-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.contact-info li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-radius: 10px;
  transition: background .2s ease;
}
.contact-info li:hover { background: var(--surface-2); }
.contact-info i {
  font-size: 22px;
  color: var(--accent);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 12px;
  flex-shrink: 0;
}
.contact-info span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.contact-info strong { font-size: 14px; color: var(--text-strong); }
.contact-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  gap: 14px;
}
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.contact-form input,
.contact-form textarea {
  font-family: inherit; font-size: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  resize: vertical;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.contact-form button { justify-self: start; }
.form-note { font-size: 12px; color: var(--dim); }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
  background: var(--bg-soft);
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-brand { font-weight: 700; font-size: 15px; color: var(--text-strong); }
.footer-line { font-size: 12px; color: var(--muted); margin-top: 2px; }
.footer-meta { display: flex; align-items: center; gap: 16px; }
.footer-meta span { font-size: 12px; color: var(--muted); }
.back-top {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface);
  transition: all .2s ease;
}
.back-top:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

/* =========================================================
   Modal
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.is-open { display: flex; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5,7,12,0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-panel {
  position: relative;
  width: min(960px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: pop .3s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(0.97); } to { opacity: 1; transform: none; } }
.modal-close {
  position: sticky;
  top: 20px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  font-size: 22px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all .2s ease;
  z-index: 2;
  float: right;
  margin: 0 0 8px 12px;
  cursor: pointer;
}
:root[dir="rtl"] .modal-close {
  float: left;
  margin: 0 12px 8px 0;
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); }
.modal-body { padding: 28px; }
.modal-hero { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; margin-bottom: 18px; }
.modal-hero img {
  width: 140px; height: 140px;
  object-fit: cover;
  background: var(--bg-soft);
  border-radius: 32px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow:
    0 18px 36px -16px var(--accent-glow),
    0 14px 28px rgba(0,0,0,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-hero h3 { font-size: 24px; margin-bottom: 6px; }
.modal-desc { color: var(--muted); margin: 14px 0 18px; line-height: 1.7; }
.modal-info { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.modal-info > div { padding: 4px 0; }
.modal-info span { display: block; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 4px; }
.modal-info strong { font-size: 13px; color: var(--text-strong); }
.modal-links { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  transition: all .2s ease;
}
.modal-links a:hover { color: var(--accent); border-color: var(--accent); }
.modal-links a i { font-size: 18px; }
.modal-link-store {
  background: #000;
  color: #fff !important;
  border-color: #000 !important;
}
.modal-link-store:hover { background: #111; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.4); }

/* Hero extras */
.modal-hero-fallback {
  width: 140px; height: 140px;
  display: grid; place-items: center;
  background: var(--bg-soft);
  border-radius: 32px;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 56px;
  box-shadow:
    0 18px 36px -16px var(--accent-glow),
    0 14px 28px rgba(0,0,0,0.32),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}
.modal-role {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 500;
  margin-bottom: 6px;
}
.modal-subtitle { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.modal-platforms { display: flex; flex-wrap: wrap; gap: 6px; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-strong);
}
.platform-chip i { font-size: 13px; }
.platform-ios { color: #e0e0e0; }
.platform-android { color: #a4c639; }
.platform-web { color: #6aa3ff; }

/* Modal sections */
.modal-section { margin-bottom: 18px; }
.modal-section-head {
  font-size: 11px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--dim);
  margin-bottom: 10px;
  font-weight: 600;
}
.modal-bullets { display: grid; gap: 8px; }
.modal-bullets li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.modal-bullets i { color: var(--accent); font-size: 16px; flex-shrink: 0; margin-top: 2px; }
.modal-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-stack li {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
}

.modal-actions { margin-bottom: 16px; }

/* =========================================================
   Animations
   ========================================================= */
[data-animate] { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
[data-animate].in-view { opacity: 1; transform: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 340px; }
}
@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .case-body { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 76px; left: 12px; right: 12px;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border-radius: 16px;
    background: var(--glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 16px; border-radius: 10px; font-size: 14px; }
  .nav-toggle { display: grid; }
  .nav-actions .btn span { display: none; }
  .hero-meta { grid-template-columns: 1fr; gap: 14px; }
  .contact-form .row { grid-template-columns: 1fr; }
  .modal-hero { grid-template-columns: 1fr; text-align: center; }
  .modal-hero img { margin-inline: auto; }
  .modal-info { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-animate] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   Language toggle button
   ========================================================= */
.lang-toggle {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  width: 38px;
}
.lang-toggle .lang-current { color: var(--text-strong); }
.lang-toggle:hover .lang-current { color: var(--accent); }

/* =========================================================
   RTL overrides — applied when <html dir="rtl">
   ========================================================= */
:root[dir="rtl"] {
  --font-sans: "Inter", "Cairo", "Noto Naskh Arabic", "Segoe UI", system-ui, sans-serif;
}
:root[dir="rtl"] body { text-align: right; }
:root[dir="rtl"] .hero-title,
:root[dir="rtl"] .hero-sub,
:root[dir="rtl"] .section-head h2,
:root[dir="rtl"] .section-sub,
:root[dir="rtl"] .about-text,
:root[dir="rtl"] .modal-body { text-align: right; }

/* Inputs and code-y content stay LTR */
:root[dir="rtl"] input[type="email"],
:root[dir="rtl"] input[type="tel"],
:root[dir="rtl"] code,
:root[dir="rtl"] .project-stack li,
:root[dir="rtl"] .arch-tags li,
:root[dir="rtl"] .service-chips li,
:root[dir="rtl"] .cloud-group li,
:root[dir="rtl"] .modal-stack li,
:root[dir="rtl"] .platform-chip,
:root[dir="rtl"] .modal-role,
:root[dir="rtl"] .section-tag,
:root[dir="rtl"] .project-role,
:root[dir="rtl"] .modal-section-head { direction: ltr; unicode-bidi: isolate; }

/* Reflect arrow icons that point to a direction */
:root[dir="rtl"] .about-cta i,
:root[dir="rtl"] .case-quote::before,
:root[dir="rtl"] .lib-go { transform: scaleX(-1); }

/* Section tag underline color bar stays on the leading edge (right in RTL) */
:root[dir="rtl"] .section-tag::before { left: auto; right: 0; }

/* Bullets/icons that sit beside text — flip the gap visually */
:root[dir="rtl"] .project-bullets i,
:root[dir="rtl"] .case-bullets i,
:root[dir="rtl"] .modal-bullets i { margin-left: 0; }

/* Timeline dot stays on the start edge (right in RTL) */
:root[dir="rtl"] .tl-dot { right: -6px; left: auto; }
:root[dir="rtl"] .timeline { padding-right: 20px; padding-left: 0; border-right: 1px solid var(--border); border-left: none; }
:root[dir="rtl"] .timeline li { padding-right: 18px; padding-left: 0; }
@media (max-width: 720px) {
  :root[dir="rtl"] .tl-dot { right: 10px; left: auto; }
}

/* Hero floating cards align flipped */
:root[dir="rtl"] .floating-card { direction: rtl; }

/* Brand mark keeps letterforms LTR */
:root[dir="rtl"] .brand-mark { direction: ltr; }
:root[dir="rtl"] .brand-name { direction: rtl; }
