/* ==========================================================================
   SEIF4D Portfolio — Creative, Responsive, SEO & GEO Optimized Stylesheet
   Designed for High Performance, Accessibility (WCAG AA), and Multi-Sensory UX
   ========================================================================== */

:root {
  --ink: #08090a;
  --black: #0a0c0d;
  --black-2: #101315;
  --panel: #141719;
  --panel-2: #1a1e20;
  --panel-border: rgba(255, 255, 255, 0.08);
  --paper: #f3f2ed;
  --paper-2: #e9e8e2;
  --text: #f5f5f1;
  --muted: #9aa1a4;
  --muted-dark: #5e6264;
  --line: #24292b;
  --line-light: #cdcdc6;
  --lime: #c8ff35;
  --lime-2: #aefd16;
  --lime-glow: rgba(200, 255, 53, 0.35);
  --cyan: #00f0ff;
  --radius: 20px;
  --radius-sm: 10px;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 30px rgba(200, 255, 53, 0.15);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sans-ar: "Cairo", "Tajawal", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Arial Black", Impact, Haettenschweiler, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  --transition: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* RTL Language Overrides */
[dir="rtl"] {
  font-family: var(--sans-ar);
}
[dir="rtl"] body {
  font-family: var(--sans-ar);
}
[dir="rtl"] .brand,
[dir="rtl"] .hero h1 {
  letter-spacing: -0.02em;
}
[dir="rtl"] .kicker,
[dir="rtl"] .section-index,
[dir="rtl"] .hero-note p,
[dir="rtl"] .identity-strip {
  font-family: var(--sans-ar);
  letter-spacing: 0.04em;
}

*, *::before, *::after {
  box-sizing: border-box;
}
.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;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 86px;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

main:focus {
  outline: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--lime);
  color: #050505;
}

/* Skip link for A11y */
.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 99999;
  padding: 10px 16px;
  background: var(--lime);
  color: #050505;
  font-weight: 700;
  border-radius: 999px;
  transform: translateY(-180%);
  transition: transform 0.2s;
}
[dir="rtl"] .skip-link {
  left: auto;
  right: 16px;
}
.skip-link:focus {
  transform: none;
}

/* Ambient Canvas & Cursor Orb */
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
}

.cursor-orb {
  position: fixed;
  z-index: 0;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(200, 255, 53, 0.08), rgba(200, 255, 53, 0) 65%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  background: transparent;
}
.scroll-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--lime), #e4ff85);
  box-shadow: 0 0 12px var(--lime-glow);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: auto;
  min-width: min(94vw, 840px);
  max-width: min(94vw, 1060px);
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 6px 4px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 15, 17, 0.72);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 999px;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 40%, rgba(200,255,53,0.25) 80%, transparent 100%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  pointer-events: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.site-header:hover::after {
  opacity: 1;
}

.site-header.scrolled {
  top: 12px;
  height: 48px;
  background: rgba(10, 12, 14, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7),
              0 0 25px rgba(200, 255, 53, 0.08),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Brand HUD */
.brand {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.06em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  padding: 4px 8px 4px 0;
}
.brand-text span {
  color: var(--lime);
}
.brand-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 4px;
}
.brand-status .pulse-dot {
  width: 7px;
  height: 7px;
  background: var(--lime);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--lime);
  animation: pulse-dot 2s infinite ease-in-out;
}

/* Desktop Navigation — Floating Pill Segment */
.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}
.desktop-nav a {
  position: relative;
  padding: 6px 13px;
  font-size: 0.76rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  color: #9ea5a7;
  border-radius: 999px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
}
.desktop-nav a:hover,
.desktop-nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.desktop-nav a.active {
  color: #080808;
  background: var(--lime);
  font-weight: 750;
  box-shadow: 0 2px 12px rgba(200, 255, 53, 0.3);
}

/* Header Controls Cockpit */
.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Command Palette Trigger Button */
.cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 550;
  color: #c5cbcd;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cmd-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(200, 255, 53, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.cmd-key {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--lime);
}

/* Language Switcher Jewel */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 12px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #d1d6d8;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

/* Header CTA — Liquid Lime Button */
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  background: var(--lime);
  color: #080808;
  border: 1px solid transparent;
  box-shadow: 0 4px 18px rgba(200, 255, 53, 0.25);
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.header-cta:hover {
  background: var(--lime-2);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 8px 25px rgba(200, 255, 53, 0.45);
  color: #080808;
}
.header-cta span:last-child {
  font-size: 0.88rem;
  transition: transform 0.2s ease;
}
.header-cta:hover span:last-child {
  transform: translate(2px, -2px);
}
[dir="rtl"] .header-cta:hover span:last-child {
  transform: translate(-2px, -2px);
}

/* Menu Button */
.menu-btn {
  display: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.menu-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}
.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   Mobile Fullscreen Sheet
   ========================================================================== */
.mobile-sheet {
  position: fixed;
  inset: 0;
  z-index: 600;
  padding: 24px;
  background: #0b0d0e;
  transform: translateY(-105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.75, 0, 0.2, 1), visibility 0.5s;
  display: flex;
  flex-direction: column;
}
.mobile-sheet.open {
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}
.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #aeb4b6;
  letter-spacing: 0.1em;
}
.sheet-head button {
  background: none;
  border: 1px solid #333;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.8rem;
  line-height: 1;
  color: #fff;
}
.mobile-sheet nav {
  margin: auto 0;
  display: grid;
}
.mobile-sheet nav a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  border-top: 1px solid #222729;
  padding: 16px 0;
  font-size: clamp(1.8rem, 8vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}
.mobile-sheet nav a:last-child {
  border-bottom: 1px solid #222729;
}
.mobile-sheet nav b {
  font: 600 0.7rem var(--mono);
  color: #72797c;
}
.mobile-sheet nav span {
  font-size: 1.5rem;
  color: var(--lime);
}
.sheet-socials {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: #b4b9ba;
  padding-top: 20px;
}

/* ==========================================================================
   Main & Sections
   ========================================================================== */
main {
  position: relative;
  z-index: 1;
}
.section-dark {
  background: linear-gradient(180deg, #0b0d0e, #0e1112);
  color: var(--text);
}
.section-light {
  background: var(--paper);
  color: var(--ink);
}

/* Availability Pill */
.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #33383a;
  margin-bottom: 18px;
}
.section-dark .availability-pill {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: #d1d6d8;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background: var(--black);
  color: var(--text);
  min-height: 100vh;
  padding: 96px max(5vw, 32px) 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  align-items: center;
  gap: 48px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 35%, rgba(200, 255, 53, 0.08), transparent 45%),
              radial-gradient(circle at 20% 70%, rgba(0, 240, 255, 0.04), transparent 40%),
              linear-gradient(to bottom, rgba(10, 12, 13, 0.2), var(--black));
  pointer-events: none;
  z-index: 0;
}
.hero-copy {
  align-self: center;
  padding-top: 0;
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
}
.kicker, .section-index {
  font: 700 0.72rem/1.3 var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  margin: 0 0 16px;
  color: #fff;
}
.kicker span {
  color: #d1d6d8;
}
.kicker span:nth-child(2) {
  color: var(--lime);
  font-weight: 900;
  text-shadow: 0 0 12px var(--lime-glow);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(4.4rem, 7.8vw, 7.6rem);
  letter-spacing: -0.07em;
  line-height: 0.84;
  margin: 0 0 10px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff 30%, #c8ff35 75%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-sweep 8s ease infinite;
}
.hero h2 {
  font-size: clamp(1.75rem, 2.7vw, 2.85rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0 0 14px;
  max-width: 680px;
  color: #f0f2f3;
}
.hero h2 mark, .about h2 mark {
  background: linear-gradient(180deg, transparent 55%, rgba(200, 255, 53, 0.35) 55% 92%, transparent 92%);
  color: #fff;
  padding: 0 0.04em;
}
.hero-intro {
  font-size: 0.95rem;
  line-height: 1.68;
  max-width: 520px;
  color: #9aa1a4;
  margin: 0 0 20px;
}

.hero-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  position: relative;
  z-index: 3;
}
.hero-tags span {
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--lime);
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.hero-tags span:hover {
  background: rgba(200, 255, 53, 0.15);
  border-color: var(--lime);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(200, 255, 53, 0.25);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border-radius: 999px;
  padding: 13px 24px;
  font-weight: 750;
  font-size: 0.86rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.button-lime {
  background: var(--lime);
  color: #080808;
  box-shadow: 0 12px 30px rgba(161, 220, 0, 0.25);
}
.button-lime:hover {
  background: var(--lime-2);
  box-shadow: 0 16px 40px rgba(161, 220, 0, 0.4);
  transform: translateY(-2px);
}
.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  backdrop-filter: blur(10px);
}
.button-ghost:hover {
  background: #fff;
  color: #0b0b0b;
  border-color: #fff;
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stats > div {
  padding: 0 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  min-width: 100px;
}
[dir="rtl"] .hero-stats > div {
  border-right: none;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stats > div:first-child {
  padding-left: 0;
}
[dir="rtl"] .hero-stats > div:first-child {
  padding-left: 24px;
  padding-right: 0;
}
.hero-stats > div:last-child {
  border: 0;
}
.hero-stats dt {
  font-size: 1.85rem;
  font-weight: 850;
  letter-spacing: -0.05em;
  line-height: 1;
  color: #fff;
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.68rem;
  color: #8c9395;
}

.hero-art {
  height: min(560px, 75vh);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.hero-art::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200, 255, 53, 0.15) 0%, rgba(0, 240, 255, 0.06) 50%, transparent 70%);
  filter: blur(50px);
  z-index: 1;
  pointer-events: none;
}

.hero-photo-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2;
  overflow: hidden;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 25%, #181d1f 0%, #0f1214 70%, #08090a 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(200, 255, 53, 0.06);
}
.hero-photo-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(to bottom, transparent 0%, rgba(8, 9, 10, 0.7) 60%, #08090a 100%);
  z-index: 3;
}
.hero-photo-wrap img {
  height: 105%;
  width: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(1) contrast(1.1) brightness(0.92);
  mix-blend-mode: normal;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.hero-art:hover .hero-photo-wrap img {
  transform: scale(1.03);
}

.brush, .brush-b, .scribble {
  display: none;
}

.hero-note {
  position: absolute;
  right: max(2vw, 24px);
  bottom: 36px;
  z-index: 3;
  display: grid;
  grid-template-columns: 1px 1fr;
  gap: 12px;
  align-items: center;
  opacity: 0.55;
}
[dir="rtl"] .hero-note {
  right: auto;
  left: max(2vw, 24px);
}
.note-line {
  width: 1px;
  height: 65px;
  background: rgba(255, 255, 255, 0.2);
}
.hero-note p {
  font: 700 0.58rem/1.5 var(--mono);
  letter-spacing: 0.16em;
  color: #72797b;
  margin: 0;
}

/* ==========================================================================
   Work & Projects Section
   ========================================================================== */
.work, .process, .connect, .faq-section {
  padding: 90px max(5.5vw, 28px);
}
.build, .about {
  padding: 90px max(5.5vw, 28px);
}
.section-top {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  gap: 50px;
  align-items: end;
  margin-bottom: 36px;
}
.section-index {
  color: #a6abad;
}
.section-light .section-index {
  color: #686c6d;
}
.section-top h2, .about h2, .connect h2, .faq-section h2 {
  font-size: clamp(3.2rem, 5.8vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.065em;
  margin: 12px 0 0;
}
.section-lead {
  color: #aeb4b6;
  line-height: 1.68;
  margin: 0 0 8px;
  font-size: 0.98rem;
}
.dark-copy {
  color: #414647;
}

/* Project Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 12px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  color: #8d9597;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
}
.filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}
.filter-btn.active {
  background: var(--lime);
  color: #080808;
  border-color: var(--lime);
  box-shadow: 0 4px 15px rgba(200, 255, 53, 0.25);
}

/* Project Grid */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.project-card {
  color: inherit;
  text-decoration: none;
  border-radius: 16px;
  padding: 14px;
  transform-style: preserve-3d;
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.3s ease;
  position: relative;
  cursor: pointer;
}
.project-card.hidden {
  display: none;
}
.light-card {
  background: #f1f1ec;
  color: #0b0b0b;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.project-card:hover {
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28), 0 0 0 1px var(--lime);
  transform: translateY(-4px);
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 4px 4px 12px;
}
.card-head h3 {
  margin: 0;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-head p {
  margin: 3px 0 0;
  color: #3b3f40;
  font-size: 0.74rem;
  font-weight: 500;
}
.card-head > span {
  font: 600 0.7rem var(--mono);
  color: #737676;
}

.project-media {
  display: block;
  position: relative;
  aspect-ratio: 1.55 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: #16191a;
}
.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.55s;
}
.project-card:hover .project-media img {
  transform: scale(1.06);
  filter: contrast(1.05);
}
.project-media b {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(7, 8, 8, 0.82);
  color: #fff;
  backdrop-filter: blur(12px);
  font: 700 0.6rem var(--mono);
  letter-spacing: 0.06em;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 5px;
}
[dir="rtl"] .project-media b {
  right: auto;
  left: 10px;
}
.card-tags {
  display: flex;
  gap: 6px;
  padding-top: 12px;
  flex-wrap: wrap;
}
.card-tags span {
  font: 700 0.55rem var(--mono);
  letter-spacing: 0.05em;
  border: 1px solid #bfc2bc;
  padding: 4px 8px;
  border-radius: 999px;
  color: #353a3b;
}

/* Affordance Hint */
.card-click-hint {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.68rem;
  font-weight: 650;
  color: #3b3f40;
  opacity: 0.85;
}
.card-click-hint span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.card-click-hint i {
  font-style: normal;
  transition: transform 0.2s;
}
.project-card:hover .card-click-hint i {
  transform: translateX(3px);
}
[dir="rtl"] .project-card:hover .card-click-hint i {
  transform: translateX(-3px);
}

/* ==========================================================================
   Capabilities Section (Build)
   ========================================================================== */
.capability-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line-light);
  border-left: 1px solid var(--line-light);
}
[dir="rtl"] .capability-grid {
  border-left: none;
  border-right: 1px solid var(--line-light);
}
.capability {
  min-height: 270px;
  padding: 24px;
  border-right: 1px solid var(--line-light);
  border-bottom: 1px solid var(--line-light);
  display: flex;
  flex-direction: column;
  transition: background var(--transition);
}
[dir="rtl"] .capability {
  border-right: none;
  border-left: 1px solid var(--line-light);
}
.capability:hover {
  background: rgba(0, 0, 0, 0.02);
}
.capability > span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #c6c6c1;
  border-radius: 12px;
  font-size: 1.25rem;
  background: #fff;
}
.capability h3 {
  font-size: 1.05rem;
  margin: 30px 0 10px;
  letter-spacing: -0.025em;
}
.capability p {
  font-size: 0.8rem;
  line-height: 1.62;
  color: #4f5454;
  margin: 0;
}
.capability small {
  margin-top: auto;
  padding-top: 22px;
  font: 650 0.62rem var(--mono);
  color: #717575;
  letter-spacing: 0.03em;
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process .section-top h2 span {
  color: var(--lime);
}
.process-track {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.process-track li {
  position: relative;
  min-height: 220px;
  padding: 20px;
  border: 1px solid #2d3335;
  border-radius: 16px;
  background: linear-gradient(145deg, #181c1e, #101314);
  transition: transform 0.25s ease, border-color 0.25s;
}
.process-track li:hover {
  border-color: rgba(200, 255, 53, 0.4);
  transform: translateY(-3px);
}
.process-track li::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: var(--lime);
  font-size: 1.4rem;
}
[dir="rtl"] .process-track li::after {
  content: "←";
  right: auto;
  left: -14px;
}
.process-track li:last-child::after {
  display: none;
}
.process-track b {
  font: 500 0.72rem var(--mono);
  color: #92999b;
}
.process-track i {
  position: absolute;
  right: 16px;
  top: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #232729;
  border: 1px solid #363c3e;
  font-style: normal;
}
[dir="rtl"] .process-track i {
  right: auto;
  left: 16px;
}
.process-track h3 {
  font-size: 1.2rem;
  margin: 54px 0 8px;
}
.process-track p {
  color: #adb2b3;
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0;
}

.statement {
  margin-top: 24px;
  min-height: 180px;
  border: 1px solid #282e30;
  border-radius: 18px;
  display: grid;
  grid-template-columns: 1fr 2fr 0.7fr;
  align-items: center;
  overflow: hidden;
  background: #0f1213;
}
.statement > div:first-child {
  padding: 30px;
}
.statement p {
  font-size: clamp(1.5rem, 2.5vw, 2.3rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0;
}
.statement img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(1) brightness(0.65);
}
.statement > div:last-child {
  padding: 24px;
  display: grid;
  gap: 6px;
  font: 700 0.6rem var(--mono);
  letter-spacing: 0.2em;
  color: #9da4a5;
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-main p:last-child {
  max-width: 640px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #373c3d;
}
.about-panels {
  display: grid;
}
.about-panel {
  padding: 22px 0;
  border-bottom: 1px solid #cacac4;
}
.about-panel:first-child {
  border-top: 1px solid #cacac4;
}
.about-panel b {
  font: 700 0.64rem var(--mono);
  letter-spacing: 0.15em;
  color: #696d6e;
}
.about-panel h3 {
  font-size: 1.48rem;
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
}
.about-panel p {
  font-size: 0.8rem;
  color: #5b6060;
  line-height: 1.62;
  margin: 0;
  max-width: 480px;
}
.identity-strip {
  grid-column: 1 / -1;
  margin-top: 8px;
  border-top: 1px solid #cacac4;
  border-bottom: 1px solid #cacac4;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  font: 850 clamp(0.72rem, 1.3vw, 1.02rem) var(--mono);
  letter-spacing: 0.14em;
}
.identity-strip i {
  color: #a4a5a1;
  font-style: normal;
}

/* ==========================================================================
   FAQ Section (SEO & GEO Engine)
   ========================================================================== */
.faq-section {
  border-top: 1px solid #1a1e20;
}
.faq-container {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 32px auto 0;
}
.faq-item {
  border: 1px solid #23282a;
  border-radius: 14px;
  background: #111416;
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item:hover {
  border-color: rgba(200, 255, 53, 0.35);
}
.faq-item details summary {
  padding: 20px 24px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-item details summary::-webkit-details-marker {
  display: none;
}
.faq-item details summary span.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid #32383a;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  color: var(--lime);
  transition: transform 0.25s ease;
}
.faq-item details[open] summary span.faq-icon {
  transform: rotate(45deg);
}
.faq-item .faq-answer {
  padding: 0 24px 22px;
  color: #a4aaac;
  font-size: 0.88rem;
  line-height: 1.7;
}

/* ==========================================================================
   Connect / Contact Section
   ========================================================================== */
.connect {
  padding-bottom: 70px;
}
.connect-card {
  border: 1px solid #2a2f31;
  border-radius: 24px;
  padding: 40px;
  background: radial-gradient(circle at 85% 20%, rgba(200, 255, 53, 0.08), transparent 30%),
              linear-gradient(145deg, #141719, #0e1112);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.connect-card > p:not(.section-index) {
  max-width: 620px;
  color: #aeb4b6;
  line-height: 1.7;
  font-size: 1.02rem;
}
.direct-contact-bar {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(200, 255, 53, 0.12);
  border: 1px solid var(--lime);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.86rem;
  font-weight: 700;
  transition: all var(--transition);
}
.copy-email-btn:hover {
  background: var(--lime);
  color: #080808;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(200, 255, 53, 0.35);
}

.social-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.social-grid a {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid #2c3133;
  border-radius: 16px;
  background: #111415;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.social-grid a:hover {
  transform: translateY(-2px);
  border-color: #555c5e;
  background: #16191b;
}
.social-grid > a > span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #202527;
  font: 800 0.76rem var(--mono);
}
.social-grid b {
  display: block;
  font-size: 0.92rem;
}
.social-grid small {
  display: block;
  color: #858d8f;
  font-size: 0.7rem;
  margin-top: 2px;
}
.social-grid i {
  font-style: normal;
  color: var(--lime);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  background: #080a0b;
  border-top: 1px solid #202426;
  padding: 34px max(5.5vw, 28px) 44px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: end;
  gap: 40px;
}
.footer-brand {
  font-size: 1.4rem;
}
.site-footer p {
  color: #6f7678;
  font-size: 0.72rem;
  margin: 8px 0 0;
}
.site-footer nav {
  display: flex;
  gap: 20px;
  font-size: 0.75rem;
  color: #a1a7a9;
}
.site-footer nav a:hover {
  color: #fff;
}
.site-footer small {
  font-size: 0.68rem;
  color: #697072;
}
.privacy-note {
  font-size: 0.68rem;
  color: #727a7c;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sheet-actions {
  margin: 16px 0 6px;
}
.sheet-cmd-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  color: #fff;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  transition: all var(--transition);
}
.sheet-cmd-btn:hover {
  background: var(--lime);
  color: #080808;
  border-color: var(--lime);
}

/* ==========================================================================
   Project Detail Drawer / Modal
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}
.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.project-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(92vw, 600px);
  z-index: 950;
  background: #0d1011;
  border-left: 1px solid #292f31;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
[dir="rtl"] .project-drawer {
  right: auto;
  left: 0;
  border-left: none;
  border-right: 1px solid #292f31;
  transform: translateX(-105%);
}
.drawer-backdrop.active .project-drawer {
  transform: translateX(0);
}

.drawer-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: rgba(13, 16, 17, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #222729;
}
.drawer-category {
  font: 700 0.68rem var(--mono);
  letter-spacing: 0.12em;
  color: var(--lime);
  text-transform: uppercase;
}
.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #33383a;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #cdd2d4;
  transition: all var(--transition);
}
.drawer-close-btn:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.drawer-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.drawer-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #151819;
  border: 1px solid #282e30;
}
.drawer-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.drawer-title-block h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  letter-spacing: -0.04em;
  margin: 8px 0 4px;
  line-height: 1.1;
}
.drawer-subtitle {
  color: #8f9698;
  font-size: 0.88rem;
  margin: 0;
}

.drawer-grid-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  background: #131718;
  border: 1px solid #222729;
}
.drawer-meta-item dt {
  font: 600 0.65rem var(--mono);
  color: #72797b;
  text-transform: uppercase;
}
.drawer-meta-item dd {
  margin: 4px 0 0;
  font-weight: 700;
  font-size: 0.84rem;
  color: #e2e6e7;
}

.drawer-section h4 {
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--lime);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.drawer-section p {
  color: #b1b7b9;
  font-size: 0.86rem;
  line-height: 1.7;
  margin: 0;
}

.drawer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}
.drawer-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #181d1e;
  border: 1px solid #2c3335;
  color: #ccd2d4;
  font: 700 0.62rem var(--mono);
}

.drawer-footer {
  margin-top: auto;
  padding: 20px 24px;
  border-top: 1px solid #222729;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0d1011;
}

/* ==========================================================================
   Command Palette Terminal Modal
   ========================================================================== */
.palette-backdrop {
  position: fixed;
  inset: 0;
  z-index: 980;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  display: grid;
  place-items: center;
  padding: 20px;
}
.palette-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.command-palette {
  width: min(94vw, 620px);
  background: #101315;
  border: 1px solid #2c3335;
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 35px rgba(200, 255, 53, 0.1);
  overflow: hidden;
  transform: scale(0.96) translateY(-10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.palette-backdrop.active .command-palette {
  transform: scale(1) translateY(0);
}

.palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid #222729;
  background: #14181a;
}
.palette-prompt-symbol {
  color: var(--lime);
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 800;
}
.palette-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-family: var(--sans);
  font-size: 1.05rem;
  outline: none;
}
.palette-input::placeholder {
  color: #656c6e;
}
.palette-esc {
  font-family: var(--mono);
  font-size: 0.65rem;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #363c3e;
  color: #8c9395;
}

.palette-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 22px;
  border-bottom: 1px solid #1c2022;
  background: #0d1011;
}
.palette-chip {
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 0.65rem var(--mono);
  background: #1a1e20;
  border: 1px solid #282f31;
  color: #9ea5a7;
  cursor: pointer;
  transition: all 0.15s;
}
.palette-chip:hover {
  background: var(--lime);
  color: #080808;
  border-color: var(--lime);
}

.palette-results {
  max-height: 280px;
  overflow-y: auto;
  padding: 16px 22px;
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #c7cdcf;
}
.palette-log {
  margin: 6px 0;
  word-break: break-word;
}
.palette-log.success {
  color: var(--lime);
}
.palette-log.info {
  color: var(--cyan);
}
.palette-log.dim {
  color: #6f7678;
}

/* ==========================================================================
   Toast Notification System
   ========================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px;
  background: #14181a;
  color: #fff;
  border: 1px solid var(--lime);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(200, 255, 53, 0.2);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.3s ease 2.7s forwards;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(-8px) scale(0.95); }
}

/* Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.72s ease, transform 0.72s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Creative Visual Enhancements
   ========================================================================== */

/* 1. Animated Gradient Text on Hero Title */
@keyframes gradient-sweep {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero h1 {
  background: linear-gradient(90deg, #ffffff 0%, var(--lime) 25%, #ffffff 50%, var(--lime) 75%, #ffffff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-sweep 8s ease infinite;
}

/* 2. Floating Glow Orbs in Hero Background */
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}
.hero::after {
  content: "";
  position: absolute;
  top: 15%;
  left: 5%;
  width: 450px;
  height: 450px;
  background: var(--lime);
  border-radius: 50%;
  opacity: 0.08;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  animation: float 15s ease-in-out infinite;
}
.hero-copy::before {
  content: "";
  position: absolute;
  top: 60%;
  right: -20%;
  width: 350px;
  height: 350px;
  background: var(--cyan);
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  animation: float 18s ease-in-out infinite reverse;
}
[dir="rtl"] .hero::after {
  left: auto;
  right: 5%;
}
[dir="rtl"] .hero-copy::before {
  right: auto;
  left: -20%;
}

/* 3. Project Cards Glassmorphism Enhancement */
.project-card {
  position: relative;
  z-index: 1;
}
.project-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(45deg, rgba(255,255,255,0.05), rgba(200,255,53,0.3), rgba(255,255,255,0.05));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  padding: 1px;
}
.project-card:hover::before {
  opacity: 1;
}



/* 5. Animated Gradient Borders on Process Cards */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
@keyframes rotate-gradient {
  0% { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}
.process-track li {
  position: relative;
  z-index: 1;
}
.process-track li::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from var(--gradient-angle), transparent 25%, var(--lime) 50%, transparent 75%);
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition);
  animation: rotate-gradient 4s linear infinite;
}
.process-track li:hover::before {
  opacity: 1;
}

/* 6. Infinite Scroll Marquee for Identity Strip */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
[dir="rtl"] @keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
.identity-strip {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
}
.identity-strip-track {
  display: inline-flex;
  min-width: 200%;
  animation: marquee-scroll 25s linear infinite;
  align-items: center;
  gap: 2rem;
  padding-right: 2rem;
}
.identity-strip:hover .identity-strip-track {
  animation-play-state: paused;
}
[dir="rtl"] .identity-strip-track {
  padding-right: 0;
  padding-left: 2rem;
}

/* 7. Enhanced Button Hover Effects */
.button-lime {
  position: relative;
  overflow: hidden;
  z-index: 1;
}
.button-lime::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.5s ease;
  z-index: -1;
}
.button-lime:hover::before {
  left: 150%;
}
[dir="rtl"] .button-lime::before {
  left: auto;
  right: -100%;
  transform: skewX(20deg);
  transition: right 0.5s ease;
}
[dir="rtl"] .button-lime:hover::before {
  right: 150%;
}

/* 8. Enhanced Scroll Progress Bar */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 12px var(--lime-glow); }
  50% { box-shadow: 0 0 20px var(--lime), 0 0 10px var(--lime); }
}
.scroll-progress span {
  animation: pulse-glow 2s infinite;
}

/* 9. Tech Ticker Strip */
@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
[dir="rtl"] @keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}
.tech-ticker {
  position: relative;
  z-index: 2;
  background: var(--panel-2);
  color: var(--lime);
  padding: 14px 0;
  overflow: hidden;
  display: flex;
  white-space: nowrap;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ticker-track {
  display: inline-flex;
  min-width: 200%;
  animation: ticker-scroll 35s linear infinite;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tech-ticker:hover .ticker-track {
  animation-play-state: paused;
}
[dir="rtl"] .ticker-track {
  padding-right: 0;
  padding-left: 2.5rem;
}

/* 10. Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--black);
  display: grid;
  place-items: center;
  z-index: 400;
  box-shadow: 0 4px 15px rgba(200, 255, 53, 0.3);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
}
.back-to-top.visible {
  transform: scale(1);
  opacity: 1;
}
.back-to-top:hover {
  background: var(--lime-2);
  transform: scale(1.1);
}
[dir="rtl"] .back-to-top {
  right: auto;
  left: 30px;
}

/* 11. Stagger Animation Support */
.reveal.stagger-1 { transition-delay: 0.08s; }
.reveal.stagger-2 { transition-delay: 0.16s; }
.reveal.stagger-3 { transition-delay: 0.24s; }
.reveal.stagger-4 { transition-delay: 0.32s; }
.reveal.stagger-5 { transition-delay: 0.40s; }
.reveal.stagger-6 { transition-delay: 0.48s; }

/* 12. Text Scramble Styling */
.text-scramble {
  font-family: var(--mono);
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* 13. Typing Cursor Effect */
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.typing-cursor::after {
  content: "|";
  display: inline-block;
  color: var(--lime);
  margin-left: 4px;
  animation: blink-cursor 1.1s step-start infinite;
}
[dir="rtl"] .typing-cursor::after {
  margin-left: 0;
  margin-right: 4px;
}

/* 14. Capability Cards Enhancement */
.capability {
  transition: background var(--transition), transform var(--transition);
}
.capability:hover {
  background: radial-gradient(circle at top left, rgba(200, 255, 53, 0.05), transparent 70%);
  transform: translateY(-3px);
}
[dir="rtl"] .capability:hover {
  background: radial-gradient(circle at top right, rgba(200, 255, 53, 0.05), transparent 70%);
}

/* 15. FAQ Enhancement */
details {
  overflow: hidden;
}
details > summary {
  cursor: pointer;
}
details[open] summary ~ * {
  animation: faq-expand 0.35s ease-in-out;
}
@keyframes faq-expand {
  0% { opacity: 0; transform: translateY(-10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   App Navigation for Mobile
   ========================================================================== */
.app-nav {
  display: none;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1.05fr 0.85fr;
    min-height: 720px;
  }
  .hero-note {
    display: none;
  }
  .capability-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .site-footer {
    grid-template-columns: 1fr auto;
  }
  .site-footer small {
    grid-column: 1 / -1;
  }
  .hero h1 {
    font-size: clamp(3.8rem, 8vw, 5.8rem);
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 76px;
  }
  .cursor-orb {
    display: none;
  }
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    height: 48px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px 0 16px;
    min-width: 0;
  }
  .desktop-nav,
  .header-cta,
  .cmd-btn {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
  .brand {
    font-size: 1.05rem;
  }
  /* ======== MOBILE HERO — Refined Studio Layout ======== */
  .hero {
    min-height: auto;
    padding: 72px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    background: var(--black);
    color: #fff;
    position: relative;
    overflow: hidden;
  }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 12%, rgba(200, 255, 53, 0.08), transparent 45%),
                radial-gradient(circle at 50% 85%, rgba(0, 240, 255, 0.04), transparent 40%);
    pointer-events: none;
    z-index: 0;
  }

  /* Portrait: Compact, Framed, Luxury Avatar Studio Card */
  .hero-art {
    order: 1;
    position: relative;
    width: 140px;
    height: 165px;
    margin: 4px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
  }
  .hero-art::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(200, 255, 53, 0.22) 0%, rgba(0, 240, 255, 0.08) 60%, transparent 75%);
    filter: blur(22px);
    z-index: 1;
    pointer-events: none;
  }
  .hero-photo-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 25%, #1c2225 0%, #101416 70%, #08090a 100%);
    border: 1.5px solid rgba(200, 255, 53, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 25px rgba(200, 255, 53, 0.15);
    z-index: 2;
  }
  .hero-photo-wrap::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(to bottom, transparent 0%, rgba(8, 9, 10, 0.75) 100%);
    z-index: 3;
  }
  .hero-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: grayscale(1) contrast(1.1) brightness(0.95);
    mix-blend-mode: normal;
  }

  .brush, .brush-b, .scribble {
    display: none;
  }

  /* Content underneath portrait */
  .hero-copy {
    order: 2;
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    width: 100%;
    max-width: 480px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 13vw, 4rem);
    margin: 4px 0 2px;
    line-height: 0.88;
    background: linear-gradient(135deg, #ffffff 30%, #c8ff35 80%, #ffffff 100%) !important;
    background-size: 200% auto !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    color: transparent !important;
    text-shadow: none !important;
    animation: gradient-sweep 8s ease infinite;
  }
  .kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fff;
    margin: 2px 0 10px;
  }
  .kicker span {
    color: #d1d6d8;
  }
  .kicker span:nth-child(2) {
    color: var(--lime);
    font-weight: 900;
    font-size: 1.05em;
    text-shadow: 0 0 10px var(--lime);
  }
  .hero h2 {
    font-size: clamp(1.35rem, 5.2vw, 1.85rem);
    line-height: 1.15;
    color: #f0f2f3;
    margin: 0 0 8px;
    max-width: 400px;
  }
  .hero h2 mark {
    background: linear-gradient(180deg, transparent 55%, rgba(200, 255, 53, 0.35) 55% 92%, transparent 92%);
    color: #fff;
  }
  .hero-intro {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #9aa1a4;
    margin: 0 0 14px;
    max-width: 380px;
  }

  .hero-tags {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin: 0 0 18px;
  }
  .hero-tags span {
    padding: 4px 11px;
    font-size: 0.6rem;
    font-family: var(--mono);
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--lime);
    backdrop-filter: blur(10px);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
    max-width: 360px;
    margin: 0 0 20px;
  }
  .button {
    padding: 12px 14px;
    font-size: 0.76rem;
    gap: 8px;
  }
  .button-ghost {
    border-color: rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.06);
    color: #fff;
  }
  .button-ghost:hover {
    background: #fff;
    color: #0b0b0b;
    border-color: #fff;
  }

  .hero-stats {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .hero-stats > div {
    padding: 0 16px;
    flex: 1;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  [dir="rtl"] .hero-stats > div {
    border-right: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }
  .hero-stats > div:last-child {
    border: 0;
  }
  .hero-stats dt {
    font-size: 1.45rem;
    font-weight: 850;
    color: #fff;
  }
  .hero-stats dd {
    font-size: 0.58rem;
    color: #8c9395;
    margin-top: 2px;
  }

  .work, .process, .connect, .build, .about, .faq-section {
    padding: 58px 16px;
  }
  .section-top {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 24px;
  }
  .section-top h2, .about h2, .connect h2, .faq-section h2 {
    font-size: clamp(2.8rem, 15vw, 4.2rem);
  }
  .section-lead {
    font-size: 0.86rem;
  }
  .project-grid {
    grid-template-columns: 1fr;
  }
  .capability-grid {
    grid-template-columns: 1fr;
    border-left: 0;
  }
  [dir="rtl"] .capability-grid {
    border-right: 0;
  }
  .capability {
    min-height: 190px;
    border-left: 1px solid var(--line-light);
    padding: 20px;
  }
  [dir="rtl"] .capability {
    border-right: 1px solid var(--line-light);
  }
  .capability h3 {
    margin-top: 22px;
  }
  .process-track {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .process-track li {
    min-height: 180px;
  }
  .process-track li::after {
    display: none;
  }
  .process-track h3 {
    margin-top: 44px;
  }
  .statement {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .statement > div:first-child {
    padding: 22px;
  }
  .statement img {
    height: 120px;
  }
  .statement > div:last-child {
    display: flex;
    justify-content: space-between;
    padding: 14px 18px;
  }
  .about {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-main p:last-child {
    font-size: 0.9rem;
  }
  .back-to-top {
    bottom: 85px;
  }
  .connect-card {
    padding: 24px 18px;
  }
  .social-grid {
    grid-template-columns: 1fr;
  }
  .site-footer {
    padding: 28px 18px 110px;
    grid-template-columns: 1fr;
  }
  .site-footer nav {
    display: none;
  }

  /* Fixed Bottom App Navigation (Sleek Compact Dock) */
  .app-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 28px), 390px);
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 520;
    background: rgba(13, 16, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(24px) saturate(140%);
    border-radius: 20px;
    padding: 4px 4px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
  .app-nav a,
  .app-nav button {
    border: 0;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 5px 2px;
    border-radius: 12px;
    color: #8c9395;
    transition: all 0.2s ease;
  }
  .app-nav svg.app-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.85;
    transition: transform 0.2s ease, stroke 0.2s;
  }
  .app-nav small {
    font-size: 0.62rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    line-height: 1;
    transition: color 0.2s;
  }
  .app-nav a:hover,
  .app-nav button:hover {
    color: #e8ebec;
  }
  .app-nav a.active {
    color: var(--lime);
    background: rgba(200, 255, 53, 0.09);
  }
  .app-nav a.active svg.app-icon {
    transform: scale(1.06);
    stroke: var(--lime);
    filter: drop-shadow(0 0 5px rgba(200, 255, 53, 0.35));
  }
  .app-nav a.active small {
    color: #fff;
    font-weight: 750;
  }
  .app-nav button {
    cursor: pointer;
  }

  .project-drawer {
    width: 100vw;
  }
}

@media (max-width: 420px) {
  .hero-actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .project-card, .button, .project-media img, .mobile-sheet, .project-drawer, .command-palette {
    transition: none;
  }
  .cursor-orb, #ambient-canvas, .pulse-dot, .hero::after, .hero-copy::before {
    display: none !important;
  }
  .hero h1, .process-track li::before, .identity-strip-track, .ticker-track, .scroll-progress span, .typing-cursor::after {
    animation: none !important;
  }
}
