/* =========================================================
   Andrew Wadie — Portfolio
   Bilingual (LTR / RTL) · Dark & Light themes
   ========================================================= */

:root {
  --bg: #0b0d12;
  --bg-2: #0f1219;
  --surface: #131721;
  --surface-2: #181d29;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eceef3;
  --muted: #98a0b0;
  --accent: #d6b46a;
  --accent-2: #f0d9a2;
  --accent-ink: #1a1408;
  --accent-soft: rgba(214, 180, 106, .12);
  --ok: #4fd1a5;
  --err: #ff7a7a;
  --shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1200px;
  --nav-h: 76px;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-display: "Fraunces", Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-2: #efece4;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --line: rgba(20, 22, 30, .09);
  --line-2: rgba(20, 22, 30, .16);
  --text: #15171d;
  --muted: #5f6573;
  --accent: #a77e2b;
  --accent-2: #8a6420;
  --accent-ink: #ffffff;
  --accent-soft: rgba(167, 126, 43, .1);
  --shadow: 0 30px 60px -25px rgba(40, 30, 10, .22);
}

[dir="rtl"] {
  --f-body: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;
  --f-display: "IBM Plex Sans Arabic", "Fraunces", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 10px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}
[dir="rtl"] body { line-height: 1.85; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
.ico { flex: none; }
[dir="rtl"] .ico-flip, [dir="rtl"] .btn .ico, [dir="rtl"] .pill .ico:last-child, [dir="rtl"] .arrow-btn .ico { transform: scaleX(-1); }
[dir="rtl"] .lang-switch .ico { transform: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.muted { color: var(--muted); }
.skip { position: fixed; top: 8px; inset-inline-start: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 999; transform: translateY(-200%); }
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding-inline: 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s, box-shadow .3s;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--accent); }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-2); }
.btn--ghost { border: 1px solid var(--line-2); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.pill { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding-inline: 16px; border-radius: 999px; font-size: 14px; font-weight: 600; transition: .3s var(--ease); }
.pill--ghost { border: 1px solid var(--line-2); }
.pill--ghost:hover { border-color: var(--accent); color: var(--accent); }
.pill--accent { background: var(--accent); color: var(--accent-ink); }
.pill--accent:hover { background: var(--accent-2); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--line-2); transition: .3s var(--ease); }
.icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.i-sun, .i-moon { display: inline-flex; }
[data-theme="dark"] .i-sun, [data-theme="light"] .i-moon { display: none; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50; transition: background .35s, border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); border-color: var(--line); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 26px; letter-spacing: -.02em; color: var(--text); }
.logo::first-letter { color: var(--accent); }
.nav__links { display: flex; gap: 6px; }
.nav__links a { padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--muted); font-weight: 500; transition: color .25s, background .25s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); background: var(--accent-soft); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.burger { display: none; flex-direction: column; gap: 5px; }
.burger span { width: 16px; height: 1.6px; background: currentColor; transition: .3s var(--ease); display: block; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.3px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--nav-h) + 40px) 0 90px; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(900px 500px at 85% 15%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 500px at 5% 90%, rgba(120, 140, 255, .07), transparent 60%);
}
.hero__bg::after { content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 80%);
  opacity: .55;
}
[dir="rtl"] .hero__bg { transform: scaleX(-1); }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 13.5px; color: var(--muted); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(79, 209, 165, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(79, 209, 165, 0); } 100% { box-shadow: 0 0 0 0 rgba(79, 209, 165, 0); } }
.hero__title { margin: 26px 0 22px; font-family: var(--f-display); font-weight: 400; font-size: clamp(42px, 6.4vw, 84px); line-height: 1.04; letter-spacing: -.035em; }
[dir="rtl"] .hero__title { letter-spacing: 0; line-height: 1.25; font-weight: 600; font-size: clamp(38px, 5.6vw, 72px); }
.hero__hi { display: block; }
.hero__hl { display: block; font-style: italic; color: var(--accent); }
[dir="rtl"] .hero__hl { font-style: normal; font-weight: 700; background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--muted); max-width: 560px; margin: 0 0 36px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
.socials { display: flex; gap: 10px; margin-top: 40px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--muted); transition: .3s var(--ease); }
.socials a:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-3px); }

.hero__visual { display: flex; justify-content: center; }
.portrait { position: relative; width: min(420px, 100%); }
.portrait__frame { aspect-ratio: 4 / 5; border-radius: 200px 200px var(--radius) var(--radius); overflow: hidden; border: 1px solid var(--line-2); background: linear-gradient(160deg, var(--surface-2), var(--bg-2)); box-shadow: var(--shadow); position: relative; }
.portrait__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); pointer-events: none; }
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__mono { position: absolute; inset: 0; display: grid; place-items: center; font-family: "Fraunces", serif; font-size: clamp(110px, 14vw, 170px); font-style: italic; color: var(--accent); opacity: .9;
  background: radial-gradient(circle at 50% 35%, var(--accent-soft), transparent 65%); }
.chip { position: absolute; padding: 8px 16px; border-radius: 999px; font-family: var(--f-mono); font-size: 13px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; direction: ltr; }
.chip--1 { top: 12%; inset-inline-start: -34px; }
.chip--2 { top: 38%; inset-inline-end: -30px; animation-delay: -2s; color: var(--accent); }
.chip--3 { top: 64%; inset-inline-start: -22px; animation-delay: -4s; }
@keyframes float { 50% { transform: translateY(-10px); } }
.codecard { position: absolute; bottom: -38px; inset-inline-end: -40px; width: 300px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.codecard__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.codecard__bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.codecard__bar i:first-child { background: #ff6b6b; } .codecard__bar i:nth-child(2) { background: #ffcb57; } .codecard__bar i:nth-child(3) { background: #4fd1a5; }
.codecard__bar span { margin-inline-start: 8px; }
.codecard pre { margin: 0; padding: 14px 16px 16px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.7; white-space: pre; overflow: hidden; }
.codecard .k { color: #c792ea; } .codecard .v { color: #82aaff; } .codecard .s { color: var(--accent); }
[data-theme="light"] .codecard .k { color: #8e44ad; } [data-theme="light"] .codecard .v { color: #2f6fd6; }

.scroll-hint { position: absolute; bottom: 26px; inset-inline-start: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); }
[dir="rtl"] .scroll-hint { transform: translateX(50%); letter-spacing: 0; }
.scroll-hint span { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: drop 2s var(--ease) infinite; transform-origin: top; }
@keyframes drop { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--bg-2); }
.marquee__track { display: flex; gap: 34px; width: max-content; animation: marquee 40s linear infinite; align-items: center; }
[dir="rtl"] .marquee__track { animation-name: marquee-rtl; }
.marquee span { font-family: var(--f-display); font-size: clamp(20px, 2.4vw, 30px); white-space: nowrap; }
.marquee b { color: var(--accent); font-weight: 400; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; position: relative; }
.section--alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
[dir="rtl"] .kicker { letter-spacing: 0; font-size: 15px; }
.kicker i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 999px; letter-spacing: 0; }
.h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 4.4vw, 56px); line-height: 1.1; letter-spacing: -.025em; margin: 18px 0 0; max-width: 760px; }
[dir="rtl"] .h2 { font-weight: 600; letter-spacing: 0; line-height: 1.35; font-size: clamp(28px, 3.8vw, 48px); }
.h2--xl { font-size: clamp(36px, 5vw, 64px); }
.sec-head { margin-bottom: clamp(44px, 6vw, 70px); }
.sec-head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; flex-wrap: wrap; }

/* About */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 80px; }
.prose p { margin: 0 0 18px; color: var(--muted); font-size: 17px; }
.prose p:first-child { color: var(--text); font-size: 19px; }
.about__body .btn { margin-top: 12px; }
.stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 50px; overflow: hidden; background: var(--surface); }
.stat { padding: 34px 28px; border-inline-end: 1px solid var(--line); }
.stat:last-child { border-inline-end: 0; }
.stat__num { font-family: "Fraunces", serif; font-size: clamp(40px, 4.6vw, 60px); line-height: 1; letter-spacing: -.03em; direction: ltr; text-align: start; }
[dir="rtl"] .stat__num { text-align: end; display: flex; justify-content: flex-end; flex-direction: row; }
.stat__num small { color: var(--accent); font-size: .6em; margin-inline-start: 2px; }
.stat__label { color: var(--muted); font-size: 14.5px; margin-top: 12px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service { padding: 32px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .45s var(--ease), border-color .45s, box-shadow .45s; position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 100% 0%, var(--accent-soft), transparent 70%); opacity: 0; transition: opacity .45s; }
[dir="rtl"] .service::before { background: radial-gradient(400px 200px at 0% 0%, var(--accent-soft), transparent 70%); }
.service:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow); }
.service:hover::before { opacity: 1; }
.service > * { position: relative; }
.service__media { display: block; width: calc(100% + 60px); margin: -32px -30px 26px; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--bg-2); cursor: zoom-in; padding: 0; }
.service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.service:hover .service__media img { transform: scale(1.05); }
.service { display: flex; flex-direction: column; }
.service__actions { margin-top: auto; padding-top: 22px; }
.service__actions .pill { height: 38px; font-size: 13.5px; }
.service__actions .pill:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.service__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.service__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.service__num { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.service h3 { font-size: 21px; margin: 0 0 10px; font-weight: 600; letter-spacing: -.01em; }
.service p { color: var(--muted); margin: 0 0 22px; font-size: 15.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 12.5px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-family: var(--f-mono); direction: ltr; }
.tags--sm span { font-size: 11.5px; padding: 4px 10px; }

/* Projects */
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.filters button { padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); transition: .3s var(--ease); }
.filters button:hover { color: var(--text); }
.filters button.is-active { background: var(--accent); color: var(--accent-ink); }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project.is-hidden { display: none; }
.project__btn { display: flex; flex-direction: column; width: 100%; height: 100%; text-align: start; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; transition: transform .45s var(--ease), border-color .45s, box-shadow .45s; }
.project__btn:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: var(--shadow); }
.project__media { aspect-ratio: 16 / 10; overflow: hidden; position: relative; background: var(--bg-2); }
.project__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.project__btn:hover .project__media img { transform: scale(1.06); }
.project__media--ph { display: flex; align-items: flex-end; padding: 22px; }
.ph__title { font-family: var(--f-display); font-size: 24px; line-height: 1.15; color: #fff; max-width: 75%; position: relative; z-index: 1; font-style: italic; }
[dir="rtl"] .ph__title { font-style: normal; font-weight: 600; font-size: 21px; line-height: 1.4; }
.ph__icon { position: absolute; top: 22px; inset-inline-end: 22px; color: rgba(255, 255, 255, .85); transition: transform .6s var(--ease); }
.project__btn:hover .ph__icon { transform: rotate(-8deg) scale(1.1); }
.project__media--ph::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; }
.ph-0 { background: linear-gradient(135deg, #1d2b4f, #3a2f63); }
.ph-1 { background: linear-gradient(135deg, #3b2a18, #8a6420); }
.ph-2 { background: linear-gradient(135deg, #12343b, #1f6f6a); }
.ph-3 { background: linear-gradient(135deg, #2a1f3d, #6b3b6e); }
.ph-4 { background: linear-gradient(135deg, #1b2a24, #3f6b4a); }
.ph-5 { background: linear-gradient(135deg, #2e1d1d, #7a3b2e); }
.project__body { padding: 24px 26px 26px; display: flex; flex-direction: column; flex: 1; }
.project__cat { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
[dir="rtl"] .project__cat { letter-spacing: 0; font-size: 13px; }
.project__body h3 { margin: 8px 0 8px; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.project__body p { margin: 0 0 20px; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project__foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.arrow-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); transition: .35s var(--ease); flex: none; }
.project__btn:hover .arrow-btn { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.step { padding: 34px 28px 10px 0; position: relative; }
[dir="rtl"] .step { padding: 34px 0 10px 28px; }
.step::before { content: ""; position: absolute; top: -5px; inset-inline-start: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); }
.step__num { font-family: "Fraunces", serif; font-style: italic; font-size: 48px; color: var(--accent); line-height: 1; display: block; margin-bottom: 18px; opacity: .9; }
.step h3 { font-size: 20px; margin: 0 0 10px; font-weight: 600; }
.step p { color: var(--muted); margin: 0; font-size: 15.5px; }

/* Skills */
.skills-wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.skills { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 40px; }
.skill__row { display: flex; justify-content: space-between; font-weight: 500; margin-bottom: 10px; font-size: 15.5px; }
.skill__row b { font-family: var(--f-mono); font-weight: 500; color: var(--muted); font-size: 13.5px; }
.bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1.4s var(--ease); }
[dir="rtl"] .bar i { background: linear-gradient(-90deg, var(--accent), var(--accent-2)); }
.skill.is-in .bar i { width: var(--w); }

/* Contact */
.section--contact { background: radial-gradient(800px 400px at 10% 10%, var(--accent-soft), transparent 60%), var(--bg); border-top: 1px solid var(--line); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: start; }
.contact__info .muted { font-size: 17px; margin: 18px 0 36px; max-width: 480px; }
.clist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.clist li { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .3s; }
.clist li:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.clist__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.clist small { display: block; color: var(--muted); font-size: 12.5px; }
.clist a, .clist span { font-weight: 600; word-break: break-word; }
.clist a:hover { color: var(--accent); }
.cform { padding: clamp(26px, 3.5vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.cform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field span { font-size: 13.5px; color: var(--muted); font-weight: 500; }
.field input, .field textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 15px; color: var(--text); font: inherit; font-size: 15px; transition: border-color .25s, box-shadow .25s; resize: vertical; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field.has-error input, .field.has-error textarea { border-color: var(--err); }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cform { position: relative; }
.cform__msg { margin: 16px 0 0; font-size: 14.5px; min-height: 1em; }
.cform__msg.ok { color: var(--ok); } .cform__msg.err { color: var(--err); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 34px 0; font-size: 14px; color: var(--muted); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer p { margin: 0; }
.footer .logo { font-size: 22px; }
.totop:hover { color: var(--accent); }

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(5, 6, 10, .7); backdrop-filter: blur(6px); animation: fade .3s; }
.modal__dialog { position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); animation: pop .4s var(--ease); }
.modal__close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(6px); }
.modal__media { aspect-ratio: 16 / 8; overflow: hidden; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__media .project__media--ph { height: 100%; aspect-ratio: auto; }
.modal__body { padding: 28px 32px 34px; }
.modal__body h3 { font-family: var(--f-display); font-weight: 400; font-size: 32px; margin: 8px 0 12px; letter-spacing: -.02em; }
[dir="rtl"] .modal__body h3 { font-weight: 600; letter-spacing: 0; font-size: 28px; }
.modal__body p { color: var(--muted); font-size: 16.5px; margin: 0 0 22px; white-space: pre-line; }
.modal__body .tags { margin-bottom: 26px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(20px) scale(.98); } }
body.no-scroll { overflow: hidden; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Packages / Pricing ---------- */
.sec-head--center { text-align: center; max-width: 720px; margin-inline: auto; }
.sec-head--center .kicker { justify-content: center; }
.sec-head__lead { margin: 16px auto 0; font-size: 17px; line-height: 1.7; max-width: 620px; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plans--1 { grid-template-columns: minmax(0, 440px); justify-content: center; }
.plans--2 { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
.plans--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.plan { position: relative; display: flex; flex-direction: column; padding: 36px 30px 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .45s var(--ease), border-color .45s, box-shadow .45s; }
.plan:hover { transform: translateY(-6px); border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: var(--shadow); }
.plan--featured { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), transparent 55%), var(--surface); box-shadow: var(--shadow); }
.plan__badge { position: absolute; top: -13px; inset-inline-start: 30px; padding: 5px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
.plan__title { margin: 0 0 8px; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.plan__sub { margin: 0 0 24px; color: var(--muted); font-size: 15px; line-height: 1.6; min-height: 3.2em; }
.plan__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding-block: 18px 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.plan__from { width: 100%; color: var(--muted); font-size: 13px; }
.plan__price strong { font-family: var(--f-display); font-size: clamp(34px, 4vw, 44px); line-height: 1; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.plan--featured .plan__price strong { color: var(--accent); }
.plan__price strong.plan__custom { font-size: clamp(26px, 3vw, 32px); }
.plan__price span { color: var(--muted); font-size: 14.5px; }
.plan__list { list-style: none; margin: 0 0 30px; padding: 0; display: grid; gap: 13px; flex-grow: 1; align-content: start; }
.plan__list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15.5px; line-height: 1.5; }
.plan__list svg { flex: none; margin-top: 2px; color: var(--accent); }
.plan__btn { margin-top: auto; }
@media (max-width: 1080px) {
  .plans, .plans--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .plans, .plans--2, .plans--4 { grid-template-columns: 1fr; }
  .plan { padding: 32px 22px 24px; }
  .plan__sub { min-height: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .services, .projects { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 10px 30px; border-top: 0; }
  .step { border-top: 1px solid var(--line-2); }
  .codecard { inset-inline-end: -10px; width: 270px; }
}
@media (max-width: 900px) {
  :root { --nav-h: 68px; }
  .nav__links { position: fixed; top: var(--nav-h); inset-inline: 0; flex-direction: column; gap: 4px; padding: 16px 24px 26px; background: var(--bg); border-bottom: 1px solid var(--line); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .35s var(--ease); }
  .nav__links.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { font-size: 17px; padding: 12px 14px; }
  .burger { display: inline-flex; }
  .hide-sm { display: none; }
  .hero__grid { grid-template-columns: 1fr; gap: 70px; }
  .hero__visual { order: -1; }
  .portrait { width: min(320px, 82%); }
  .codecard { display: none; }
  .about, .contact, .skills-wrap { grid-template-columns: 1fr; gap: 30px; }
  .contact { gap: 46px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-inline-end: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .scroll-hint { display: none; }
}
@media (max-width: 640px) {
  .container { padding-inline: 16px; }
  .services, .projects, .steps, .skills, .cform__grid { grid-template-columns: 1fr; }
  .lang-switch span { display: none; }
  .lang-switch { width: 40px; padding: 0; justify-content: center; }
  .hero { padding-bottom: 60px; }
  .hero__cta .btn { flex: 1 1 100%; }
  .chip--1 { inset-inline-start: -12px; } .chip--2 { inset-inline-end: -12px; } .chip--3 { inset-inline-start: -6px; }
  .stat { padding: 24px 18px; }
  .filters { width: 100%; justify-content: center; border-radius: 18px; }
  .modal__body { padding: 22px 20px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .bar i { width: var(--w); }
}
