/* ================================================================
   ANAS — Developer Workspace Portfolio
   نظام تصميم مبني على هوية ANAS البصرية
   ================================================================ */

/* ---------- 1. Design tokens ---------- */
:root {
  --primary: #6366f1;
  --primary-600: #5457e5;
  --secondary: #3882f6;
  --dark: #0f172a;
  --slate: #1e293b;
  --light: #f1f5f9;
  --white: #ffffff;

  --bg: #0b1120;
  --surface: #0f172a;
  --surface-2: #16203a;
  --surface-3: #1e293b;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.28);

  --text: #f1f5f9;
  --text-soft: #cbd5e1;
  --muted: #94a3b8;

  --ring: 0 0 0 1px rgba(99, 102, 241, 0.35);
  --shadow-sm: 0 1px 2px rgba(2, 6, 23, 0.4);
  --shadow-md: 0 10px 30px -12px rgba(2, 6, 23, 0.75);
  --shadow-lg: 0 24px 60px -24px rgba(2, 6, 23, 0.9);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;

  --rail-w: 78px;
  --bottom-h: 66px;

  --font-en: "Poppins", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Poppins", system-ui, sans-serif;
  --font-code: "Fira Code", ui-monospace, "SFMono-Regular", monospace;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
  padding: 0;
}
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body {
  font-family: var(--font-ar);
}
img,
svg {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
ul {
  list-style: none;
}
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}
::selection {
  background: rgba(99, 102, 241, 0.35);
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 999;
  background: var(--primary);
  color: var(--white);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 3. App shell ---------- */
.app-shell {
  display: flex;
  gap: 14px;
  height: 100dvh;
  padding: 16px;
}

/* ---------- 4. Left rail (desktop) ---------- */
.rail {
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  background: linear-gradient(180deg, var(--surface) 0%, #0d1425 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 14px;
}

.rail-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  padding: 7px;
  flex-shrink: 0;
}
.rail-logo svg,
.rail-logo img {
  width: 100%;
  height: auto;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  align-items: center;
  margin-top: 4px;
  overflow-y: auto;
  scrollbar-width: none;
}
.rail-nav::-webkit-scrollbar {
  display: none;
}

.rail-btn {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition:
    color 0.22s var(--ease),
    background 0.22s var(--ease),
    border-color 0.22s var(--ease);
}
.rail-btn svg {
  width: 20px;
  height: 20px;
}
.rail-btn:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}
.rail-btn[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(140deg, var(--primary) 0%, var(--secondary) 100%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 6px 18px -8px rgba(99, 102, 241, 0.9);
}
.rail-btn[aria-current="page"]::before {
  content: "";
  position: absolute;
  inset-inline-start: -13px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 3px;
  background: var(--primary);
}

/* tooltip */
.rail-btn .tip {
  position: absolute;
  inset-inline-start: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) scale(0.96);
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s var(--ease),
    transform 0.18s var(--ease),
    visibility 0.18s var(--ease);
  z-index: 40;
  box-shadow: var(--shadow-md);
}
.rail-btn:hover .tip,
.rail-btn:focus-visible .tip {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.lang-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-family: var(--font-code);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.lang-btn:hover {
  color: var(--white);
  border-color: var(--border-strong);
  background: var(--surface-2);
}

/* ---------- 5. Workspace ---------- */
.workspace {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(
      1100px 520px at 78% -12%,
      rgba(99, 102, 241, 0.13),
      transparent 62%
    ),
    radial-gradient(
      760px 420px at 8% 108%,
      rgba(56, 130, 246, 0.09),
      transparent 60%
    ),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.workspace-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}
.win-dots {
  display: flex;
  gap: 6px;
}
.win-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--border);
}
.win-dots i:first-child {
  background: rgba(232, 125, 125, 0.55);
}
.win-dots i:nth-child(2) {
  background: rgba(224, 164, 88, 0.55);
}
.win-dots i:last-child {
  background: rgba(94, 196, 168, 0.55);
}

.crumb {
  font-family: var(--font-code);
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.crumb b {
  color: var(--text-soft);
  font-weight: 500;
}

.head-tools {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-soft);
  background: rgba(94, 196, 168, 0.08);
  border: 1px solid rgba(94, 196, 168, 0.24);
  border-radius: 999px;
  padding: 5px 11px;
  white-space: nowrap;
}
.status-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ec4a8;
}
.lang-btn--head {
  display: none;
}

/* scroll body */
.workspace-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}
.workspace-body::-webkit-scrollbar {
  width: 10px;
}
.workspace-body::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}

/* ---------- 6. Views & transitions ---------- */
.view {
  display: none;
  padding: 26px clamp(16px, 3vw, 38px) 40px;
}
.view.is-active {
  display: block;
  animation: view-in 0.34s var(--ease) both;
}
/* الواجهة الرئيسية تملأ ارتفاع الحاوية بدل ترك فراغ أسفلها */
.view--hero.is-active {
  display: flex;
  align-items: center;
  min-height: calc(100dvh - 96px);
}
.view--hero > .home {
  width: 100%;
}
@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- 7. Typography & shared blocks ---------- */
.eyebrow {
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--primary);
  display: block;
  margin-bottom: 8px;
}
.view-title {
  font-size: clamp(1.35rem, 1rem + 1.4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.view-title span {
  background: linear-gradient(100deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.view-sub {
  color: var(--muted);
  margin-top: 8px;
  max-width: 62ch;
  font-size: 14.5px;
}
.view-head {
  margin-bottom: 22px;
}

.card {
  background: linear-gradient(
    170deg,
    rgba(30, 41, 59, 0.55) 0%,
    rgba(15, 23, 42, 0.5) 100%
  );
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  transition:
    border-color 0.24s var(--ease),
    transform 0.24s var(--ease),
    background 0.24s var(--ease);
}
.card:hover {
  border-color: var(--border-strong);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 11.5px;
  color: var(--text-soft);
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 9px;
}
.chip--key {
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  transition:
    transform 0.2s var(--ease),
    background 0.2s var(--ease),
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.btn svg {
  width: 17px;
  height: 17px;
}
.btn-primary {
  background: linear-gradient(120deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  box-shadow: 0 10px 26px -14px rgba(99, 102, 241, 0.95);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px -14px rgba(99, 102, 241, 1);
}
.btn-ghost {
  background: rgba(148, 163, 184, 0.06);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  transform: translateY(-1px);
}

/* ---------- 8. Home ---------- */
.home {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  min-height: min(560px, 62vh);
}
.home-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
  background: rgba(94, 196, 168, 0.08);
  border: 1px solid rgba(94, 196, 168, 0.26);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 18px;
}
.home-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ec4a8;
}
.home h1 {
  font-size: clamp(1.9rem, 1.2rem + 3vw, 3.05rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.home h1 .grad {
  background: linear-gradient(100deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-role {
  margin-top: 10px;
  font-family: var(--font-code);
  font-size: clamp(0.85rem, 0.72rem + 0.5vw, 1rem);
  color: var(--secondary);
  letter-spacing: 0.01em;
}
.home-desc {
  margin-top: 16px;
  color: var(--muted);
  max-width: 58ch;
}
.home-ctas {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.home-stats {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stat {
  flex: 1 1 130px;
  min-width: 0;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.stat b {
  display: block;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.stat span {
  font-size: 12.5px;
  color: var(--muted);
}

/* logo mark */
.home-visual {
  display: grid;
  place-items: center;
}
.logo-orb {
  position: relative;
  width: min(280px, 62vw);
  aspect-ratio: 1;
  border-radius: 34%;
  display: grid;
  place-items: center;
  padding: 4px;
  background: conic-gradient(
    from 200deg,
    rgba(99, 102, 241, 0.9),
    rgba(56, 130, 246, 0.55),
    rgba(99, 102, 241, 0.15),
    rgba(99, 102, 241, 0.9)
  );
  box-shadow: 0 0 60px -30px rgba(99, 102, 241, 0.7);
}
.logo-orb__inner {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(165deg, #131c33 0%, #0c1322 100%);
  display: grid;
  place-items: center;
  padding: 17%;
}
.logo-orb__inner svg {
  width: 100%;
  height: auto;
}
.logo-caption {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--muted);
}
.orb-tags {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

/* ---------- 9. Generic grids ---------- */
.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
}
.grid-2 {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(99, 102, 241, 0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.22);
  flex-shrink: 0;
}
.icon-badge svg {
  width: 19px;
  height: 19px;
}

.card h3 {
  font-size: 15.5px;
  font-weight: 600;
  margin: 12px 0 6px;
}
.card p {
  color: var(--muted);
  font-size: 13.8px;
}

/* about */
.about-list {
  margin-top: 14px;
  display: grid;
  gap: 9px;
}
.about-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--text-soft);
  font-size: 14px;
}
.about-list svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 4px;
}

/* skills */
.skill-group {
  margin-bottom: 16px;
}
.skill-group h3 {
  font-family: var(--font-code);
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 500;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* AI feature card */
.card--feature {
  border-color: rgba(99, 102, 241, 0.34);
  background: linear-gradient(
    150deg,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(15, 23, 42, 0.5) 55%
  );
  grid-column: 1 / -1;
}
.feature-caps {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.feature-caps .chip svg {
  width: 13px;
  height: 13px;
  color: var(--primary);
}

/* ---------- 10. Projects ---------- */
.projects-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filter-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    background 0.2s var(--ease);
}
.filter-btn:hover {
  color: var(--text);
}
.filter-btn[aria-pressed="true"] {
  color: var(--white);
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: start;
  cursor: pointer;
  width: 100%;
  font: inherit;
}
.project-card:hover {
  transform: translateY(-2px);
  background: linear-gradient(
    170deg,
    rgba(30, 41, 59, 0.8) 0%,
    rgba(15, 23, 42, 0.6) 100%
  );
}
.project-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.project-thumb {
  height: 92px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(56, 130, 246, 0.04)),
    var(--surface-2);
}
.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000, transparent 78%);
}
.project-thumb svg {
  width: 30px;
  height: 30px;
  position: relative;
  z-index: 1;
}
.project-text {
  display: block;
}
.project-title {
  display: block;
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
}
.project-desc {
  color: var(--muted);
  font-size: 13.6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 4px;
}
.featured-flag {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  font-family: var(--font-code);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.18);
  border: 1px solid rgba(99, 102, 241, 0.36);
  border-radius: 999px;
  padding: 3px 9px;
}
.project-card--featured {
  grid-column: 1 / -1;
  border-color: rgba(99, 102, 241, 0.3);
  background: linear-gradient(
    150deg,
    rgba(99, 102, 241, 0.11) 0%,
    rgba(15, 23, 42, 0.55) 60%
  );
}
@media (min-width: 900px) {
  .project-card--featured {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 22px;
    align-items: center;
  }
  .project-card--featured .project-thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    height: 100%;
    min-height: 160px;
  }
  .project-card--featured .project-text {
    grid-column: 2;
    align-self: end;
  }
  .project-card--featured .project-tags {
    grid-column: 2;
    align-self: start;
  }
  .project-card--featured .project-desc {
    -webkit-line-clamp: 4;
    line-clamp: 4;
  }
}

/* ---------- 11. Experience ---------- */
.timeline {
  position: relative;
  padding-inline-start: 26px;
}
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--primary),
    rgba(99, 102, 241, 0.05)
  );
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding-bottom: 20px;
}
.tl-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -26px;
  top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--primary);
  transform: translateX(0);
}
html[dir="rtl"] .tl-item::before {
  inset-inline-start: -26px;
}
.tl-item h3 {
  font-size: 15.5px;
  font-weight: 600;
}
.tl-meta {
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--primary);
  margin-bottom: 4px;
}
.tl-item p {
  color: var(--muted);
  font-size: 14px;
}

.stack-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
}
.stack-row:last-child {
  border-bottom: 0;
}
.stack-row .nm {
  flex: 0 0 34%;
  min-width: 0;
  font-size: 13.8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stack-row .bar {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.12);
  overflow: hidden;
}
.stack-row .bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}
.stack-row .ct {
  flex: 0 0 auto;
  font-family: var(--font-code);
  font-size: 12.5px;
  color: var(--text-soft);
}

/* ---------- 12. Contact ---------- */
.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  min-height: 56px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(148, 163, 184, 0.04);
  transition:
    border-color 0.2s var(--ease),
    background 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.contact-link:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.07);
  transform: translateY(-1px);
}
.contact-link .icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.contact-link .lbl {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.contact-link .val {
  display: block;
  font-family: var(--font-code);
  font-size: 13.2px;
  color: var(--text);
  word-break: break-word;
}
.contact-link--wa .icon-badge {
  background: rgba(94, 196, 168, 0.12);
  border-color: rgba(94, 196, 168, 0.28);
  color: #5ec4a8;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.field {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  background: rgba(11, 17, 32, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 14.5px;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.field::placeholder {
  color: #64748b;
}
.field:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--ring);
}
textarea.field {
  min-height: 128px;
  resize: vertical;
}
select.field {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2'><path d='M4 6l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 13px center;
}
html[dir="rtl"] select.field {
  background-position: left 13px center;
}
select.field option {
  background: var(--surface);
  color: var(--text);
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  width: 0;
}
.form-status {
  margin-top: 12px;
  font-size: 13.5px;
  border-radius: var(--r-sm);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.25s var(--ease),
    padding 0.25s var(--ease);
}
.form-status.show {
  padding: 10px 13px;
  max-height: 200px;
}
.form-status.ok {
  background: rgba(94, 196, 168, 0.1);
  border: 1px solid rgba(94, 196, 168, 0.3);
  color: #a7e3d2;
}
.form-status.err {
  background: rgba(232, 125, 125, 0.1);
  border: 1px solid rgba(232, 125, 125, 0.3);
  color: #f0b4b4;
}

.view-foot {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  font-family: var(--font-code);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- 13. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal.is-open {
  display: flex;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(4px);
  animation: fade-in 0.2s var(--ease) both;
}
.modal__panel {
  position: relative;
  width: min(660px, 100%);
  max-height: min(86dvh, 760px);
  overflow-y: auto;
  background: linear-gradient(170deg, #16203a 0%, #0f172a 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  animation: modal-in 0.28s var(--ease) both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border);
  color: var(--text-soft);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.modal__close:hover {
  color: var(--white);
  background: rgba(148, 163, 184, 0.16);
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.note {
  font-size: 12.5px;
  color: var(--muted);
  font-family: var(--font-code);
}

/* ---------- 14. Bottom nav (mobile) ---------- */
.bottom-nav {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 700;
  background: rgba(13, 20, 37, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
}
.bottom-nav__scroll {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.bottom-nav__scroll::-webkit-scrollbar {
  display: none;
}
.bnav-btn {
  flex: 1 0 auto;
  min-width: 60px;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 4px 6px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  border-radius: 12px;
  cursor: pointer;
  transition:
    color 0.2s var(--ease),
    background 0.2s var(--ease);
}
.bnav-btn svg {
  width: 19px;
  height: 19px;
}
.bnav-btn[aria-current="page"] {
  color: var(--white);
  background: rgba(99, 102, 241, 0.16);
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1024px) {
  .home {
    grid-template-columns: minmax(0, 1fr);
    text-align: start;
  }
  .home-visual {
    order: -1;
    justify-items: start;
  }
  .logo-orb {
    width: min(180px, 46vw);
  }
  .logo-caption,
  .orb-tags {
    display: none;
  }
}

@media (max-width: 880px) {
  .app-shell {
    padding: 0;
    height: auto;
    min-height: 100dvh;
  }
  .rail {
    display: none;
  }
  .workspace {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
  }
  .workspace-head {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 0 14px;
  }
  .workspace-body {
    overflow: visible;
  }
  .view {
    padding: 20px 16px calc(var(--bottom-h) + 34px);
  }
  .view--hero.is-active {
    min-height: auto;
    display: block;
  }
  .lang-btn--head {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    min-width: 44px;
  }
  .bottom-nav {
    display: block;
  }
  .status-chip .txt {
    display: none;
  }
  .status-chip {
    padding: 7px;
  }
}

@media (max-width: 400px) {
  .view {
    padding-inline: 13px;
  }
  .card {
    padding: 16px;
  }
  .stat {
    flex-basis: 100%;
  }
  .btn {
    width: 100%;
  }
}

/* ---------- 16. Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
