/* ============================================================
   Faker Shouikhy — cyber-minimalist executive identity
   ============================================================ */

::selection {
  background: rgba(82, 224, 196, 0.28);
  color: #fff;
}

html {
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: #05070a;
  overflow-x: hidden;
}

/* film grain / depth wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(82, 224, 196, 0.06), transparent 70%),
    radial-gradient(700px 500px at 0% 40%, rgba(99, 102, 241, 0.05), transparent 70%);
}

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

/* ---------- language switcher ---------- */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  flex: none;
}

.lang-btn {
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a97a6;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.lang-btn:hover {
  color: #fff;
}

.lang-btn.is-active {
  background: #52e0c4;
  color: #04120f;
  font-weight: 500;
}

/* ---------- image placeholders ---------- */
.logo-placeholder {
  display: block;
  background: transparent;
}

.personal-headshot-placeholder {
  display: block;
  background: #0a0f14;
}

.project-visuals-placeholder {
  display: block;
  background: #0a0f14;
}

/* ---------- Arabic typography ---------- */
html[lang="ar"] body,
html[lang="ar"] .font-sans,
html[lang="ar"] .font-display,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] .btn-primary,
html[lang="ar"] .btn-ghost,
html[lang="ar"] .field,
html[lang="ar"] .nav-link,
html[lang="ar"] .section-label,
html[lang="ar"] .field-label,
html[lang="ar"] .tag,
html[lang="ar"] .marquee span {
  font-family: "IBM Plex Sans Arabic", "Space Grotesk", Inter, system-ui, sans-serif;
}

/* Arabic script needs connected letterforms: drop the Latin tracking */
html[lang="ar"] :where(h1, h2, h3, h4, h5, h6, p, span, a, li, label, button, dt, dd, figcaption, input) {
  letter-spacing: 0 !important;
}

html[lang="ar"] h1,
html[lang="ar"] h2 {
  line-height: 1.4;
}

/* ---------- grid backdrop ---------- */
.grid-overlay {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 60% at 50% 0%, #000 35%, transparent 100%);
}

/* ---------- type helpers ---------- */
.gradient-text {
  background: linear-gradient(100deg, #ffffff 0%, #d9fff8 42%, #52e0c4 78%, #7c8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-label {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #52e0c4;
}

.nav-link {
  position: relative;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8a97a6;
  transition: color 0.25s ease;
  padding-bottom: 2px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 0;
  background: #52e0c4;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: 100%;
}

/* ---------- buttons ---------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: transform 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease, box-shadow 0.3s ease, color 0.25s ease;
}

.btn-primary {
  background: #52e0c4;
  color: #04120f;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgba(82, 224, 196, 0.4), 0 10px 40px -12px rgba(82, 224, 196, 0.55);
}

.btn-primary:hover {
  background: #7ff0da;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(82, 224, 196, 0.6), 0 16px 48px -12px rgba(82, 224, 196, 0.7);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8ee;
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(82, 224, 196, 0.45);
  color: #fff;
  background: rgba(82, 224, 196, 0.06);
}

/* ---------- hero portrait ---------- */
.portrait {
  aspect-ratio: 4 / 5;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.portrait img {
  display: block;
  height: 100%;
  width: 100%;
}

.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(82, 224, 196, 0.055) 48%,
    rgba(82, 224, 196, 0.14) 50%,
    rgba(82, 224, 196, 0.055) 52%,
    transparent 100%
  );
  background-size: 100% 220%;
  animation: scan 7s linear infinite;
  opacity: 0.7;
  mix-blend-mode: screen;
}

@keyframes scan {
  0% {
    background-position: 0 -120%;
  }
  100% {
    background-position: 0 220%;
  }
}

.bracket {
  position: absolute;
  height: 18px;
  width: 18px;
  border-color: rgba(82, 224, 196, 0.7);
  z-index: 2;
}

.bracket.tl {
  top: 12px;
  left: 12px;
  border-top: 1px solid;
  border-left: 1px solid;
}

.bracket.tr {
  top: 12px;
  right: 12px;
  border-top: 1px solid;
  border-right: 1px solid;
}

.bracket.bl {
  bottom: 12px;
  left: 12px;
  border-bottom: 1px solid;
  border-left: 1px solid;
}

.bracket.br {
  bottom: 12px;
  right: 12px;
  border-bottom: 1px solid;
  border-right: 1px solid;
}

/* ---------- marquee ---------- */
.marquee {
  display: flex;
  align-items: center;
  gap: 2.75rem;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.marquee span {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #6b7788;
  white-space: nowrap;
}

/* in RTL the strip travels the other way, so it must not drift off-canvas */
html[dir="rtl"] .marquee {
  animation-name: marquee-rtl;
}

@keyframes marquee-rtl {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(50%, 0, 0);
  }
}

.marquee i {
  height: 3px;
  width: 3px;
  border-radius: 999px;
  background: rgba(82, 224, 196, 0.55);
  flex: none;
}

@keyframes marquee {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* ---------- cards ---------- */
.card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s ease;
}

.card:hover {
  border-color: rgba(82, 224, 196, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}

.card img {
  display: block;
}

.tag {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a97a6;
  background: rgba(255, 255, 255, 0.02);
}

/* ---------- form ---------- */
.panel {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #070b10;
  box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 1);
}

.field-label {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a97a6;
  margin-bottom: 0.55rem;
}

.field {
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.025);
  padding: 0.8rem 0.95rem;
  font-size: 14px;
  color: #f1f5f9;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.field::placeholder {
  color: #5b6878;
}

.field:hover {
  border-color: rgba(255, 255, 255, 0.18);
}

.field:focus {
  outline: none;
  border-color: rgba(82, 224, 196, 0.65);
  background: rgba(82, 224, 196, 0.04);
  box-shadow: 0 0 0 3px rgba(82, 224, 196, 0.13);
}

.field.is-invalid {
  border-color: rgba(248, 113, 113, 0.7);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.1);
}

.status {
  margin-top: 1.25rem;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.85rem 1rem;
  font-size: 13px;
  line-height: 1.55;
}

.status.is-visible {
  display: block;
}

.status--ok {
  border-color: rgba(82, 224, 196, 0.35);
  background: rgba(82, 224, 196, 0.08);
  color: #a7f3e4;
}

.status--err {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.07);
  color: #fecaca;
}

.status a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- contact rows ---------- */
.contact-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: #070b10;
  padding: 1.15rem 1.35rem;
  transition: background-color 0.25s ease;
}

.contact-row:hover {
  background: #0b1117;
}

.social {
  display: grid;
  place-items: center;
  height: 38px;
  width: 38px;
  flex: none;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: #b9c4d0;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease,
    transform 0.25s ease;
}

.contact-row:hover .social {
  color: #52e0c4;
  border-color: rgba(82, 224, 196, 0.4);
  background: rgba(82, 224, 196, 0.08);
  transform: translateY(-1px);
}

/* ---------- reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: inherit;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #05070a;
}

::-webkit-scrollbar-thumb {
  background: #1b2430;
  border-radius: 999px;
  border: 2px solid #05070a;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3644;
}

/* ---------- accessibility / motion ---------- */
:focus-visible {
  outline: 2px solid rgba(82, 224, 196, 0.7);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .marquee,
  .portrait::after {
    animation: none;
  }

  .card:hover,
  .btn-primary:hover {
    transform: none;
  }
}

/* ---------- theme toggle ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  height: 2.5rem;
  width: 2.5rem;
  flex: none;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: #8a97a6;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:hover {
  color: #52e0c4;
  border-color: rgba(82, 224, 196, 0.45);
}

.theme-toggle__moon {
  display: none;
}

html[data-theme="light"] .theme-toggle__sun {
  display: none;
}

html[data-theme="light"] .theme-toggle__moon {
  display: block;
}

/* ============================================================
   LIGHT THEME
   ============================================================ */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: #f4f7f6;
  color: #33414f;
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(82, 224, 196, 0.28), transparent 70%),
    radial-gradient(700px 500px at 0% 40%, rgba(99, 102, 241, 0.14), transparent 70%);
}

html[data-theme="light"] ::selection {
  background: rgba(82, 224, 196, 0.42);
  color: #04120f;
}

/* ---------- surfaces ---------- */
html[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.85) !important;
  border-bottom-color: rgba(10, 20, 32, 0.1) !important;
}

html[data-theme="light"] #mobileMenu {
  background-color: rgba(255, 255, 255, 0.98) !important;
  border-top-color: rgba(10, 20, 32, 0.1) !important;
}

html[data-theme="light"] #mobileMenu a:hover {
  background-color: rgba(10, 20, 32, 0.05) !important;
}

html[data-theme="light"] dl > div {
  background-color: #ffffff !important;
}

html[data-theme="light"] .badge-corner {
  background-color: rgba(255, 255, 255, 0.88) !important;
  border-color: rgba(10, 20, 32, 0.12) !important;
  color: #33414f !important;
}

html[data-theme="light"] header .bg-white,
html[data-theme="light"] #mobileMenu .bg-white {
  background-color: #0a1420 !important;
  color: #f8fbfa !important;
}

html[data-theme="light"] [class*="border-linen"] {
  border-color: rgba(10, 20, 32, 0.1) !important;
}

html[data-theme="light"] [class*="border-white/10"] {
  border-color: rgba(10, 20, 32, 0.12) !important;
}

html[data-theme="light"] [class*="bg-white/["] {
  background-color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="light"] [class*="bg-linen"] {
  background-color: rgba(10, 20, 32, 0.08) !important;
}

/* ---------- type colours ---------- */
html[data-theme="light"] .text-white {
  color: #0a1420 !important;
}

html[data-theme="light"] .text-slate-200 {
  color: #1f2c3a !important;
}

html[data-theme="light"] .text-slate-300 {
  color: #2f3d4b !important;
}

html[data-theme="light"] .text-slate-400 {
  color: #46545f !important;
}

html[data-theme="light"] .text-slate-500 {
  color: #586675 !important;
}

html[data-theme="light"] .text-slate-600 {
  color: #6d7b89 !important;
}

html[data-theme="light"] .text-slate-700 {
  color: #8b97a3 !important;
}

html[data-theme="light"] .text-dim,
html[data-theme="light"] [class*="text-accent"] {
  color: #0b7f6d !important;
}

/* ---------- components ---------- */
html[data-theme="light"] .grid-overlay {
  background-image:
    linear-gradient(to right, rgba(10, 20, 32, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(10, 20, 32, 0.06) 1px, transparent 1px);
}

html[data-theme="light"] .gradient-text {
  background-image: linear-gradient(100deg, #0b1220 0%, #0c3f36 42%, #0b7f6d 78%, #4653c8 100%);
}

html[data-theme="light"] .section-label,
html[data-theme="light"] .field-label {
  color: #0b7f6d;
}

html[data-theme="light"] .nav-link {
  color: #5a6875;
}

html[data-theme="light"] .nav-link:hover {
  color: #0a1420;
}

html[data-theme="light"] .marquee span {
  color: #6b7788;
}

html[data-theme="light"] .marquee i {
  background: rgba(11, 127, 109, 0.6);
}

html[data-theme="light"] .card {
  border-color: rgba(10, 20, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 20px 50px -34px rgba(10, 20, 32, 0.4);
}

html[data-theme="light"] .card:hover {
  border-color: rgba(11, 127, 109, 0.45);
  box-shadow: 0 28px 60px -34px rgba(10, 20, 32, 0.3);
}

html[data-theme="light"] .tag {
  border-color: rgba(10, 20, 32, 0.12);
  background: #f7faf9;
  color: #586675;
}

html[data-theme="light"] .panel {
  border-color: rgba(10, 20, 32, 0.1);
  background: #ffffff;
  box-shadow: 0 30px 80px -50px rgba(10, 20, 32, 0.45);
}

html[data-theme="light"] .field {
  border-color: rgba(10, 20, 32, 0.14);
  background: #f7faf9;
  color: #0a1420;
  color-scheme: light;
}

html[data-theme="light"] .field::placeholder {
  color: #8492a0;
}

html[data-theme="light"] .field:hover {
  border-color: rgba(10, 20, 32, 0.24);
}

html[data-theme="light"] .field:focus {
  border-color: #0b7f6d;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(82, 224, 196, 0.2);
}

html[data-theme="light"] .contact-row {
  background: #ffffff;
}

html[data-theme="light"] .contact-row:hover {
  background: #f2f7f5;
}

html[data-theme="light"] .social {
  border-color: rgba(10, 20, 32, 0.12);
  background: #f7faf9;
  color: #46545f;
}

html[data-theme="light"] .contact-row:hover .social {
  color: #0b7f6d;
  border-color: rgba(11, 127, 109, 0.35);
  background: rgba(82, 224, 196, 0.14);
}

html[data-theme="light"] .btn-ghost {
  border-color: rgba(10, 20, 32, 0.16);
  color: #0a1420;
  background: #ffffff;
}

html[data-theme="light"] .btn-ghost:hover {
  border-color: rgba(11, 127, 109, 0.45);
  color: #0a1420;
  background: rgba(82, 224, 196, 0.12);
}

html[data-theme="light"] .btn-primary {
  box-shadow: 0 0 0 1px rgba(11, 127, 109, 0.25), 0 12px 34px -16px rgba(11, 127, 109, 0.5);
}

html[data-theme="light"] .theme-toggle {
  border-color: rgba(10, 20, 32, 0.14);
  background: #ffffff;
  color: #46545f;
}

html[data-theme="light"] .theme-toggle:hover {
  color: #0b7f6d;
  border-color: rgba(11, 127, 109, 0.4);
}

html[data-theme="light"] .lang-switch {
  border-color: rgba(10, 20, 32, 0.12);
  background: #ffffff;
}

html[data-theme="light"] .lang-btn {
  color: #5a6875;
}

html[data-theme="light"] .lang-btn:hover {
  color: #0a1420;
}

html[data-theme="light"] .lang-btn.is-active {
  background: #0a1420;
  color: #f4f7f6;
}

html[data-theme="light"] .portrait {
  box-shadow: 0 30px 80px -42px rgba(10, 20, 32, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

html[data-theme="light"] .portrait figcaption {
  background-image: linear-gradient(
    to top,
    #ffffff 0%,
    rgba(255, 255, 255, 0.92) 55%,
    rgba(255, 255, 255, 0) 100%
  ) !important;
}

html[data-theme="light"] .logo-placeholder {
  box-shadow: 0 1px 3px rgba(10, 20, 32, 0.14);
}

html[data-theme="light"] .status--ok {
  border-color: rgba(11, 127, 109, 0.3);
  background: rgba(82, 224, 196, 0.16);
  color: #0a4f43;
}

html[data-theme="light"] .status--err {
  border-color: rgba(185, 28, 28, 0.3);
  background: rgba(248, 113, 113, 0.12);
  color: #8a1c1c;
}

html[data-theme="light"] .status a {
  color: #0a1420;
}

html[data-theme="light"]::-webkit-scrollbar-track {
  background: #eef3f1;
}

html[data-theme="light"]::-webkit-scrollbar-thumb {
  background: #c3cfcb;
  border-color: #eef3f1;
}

html[data-theme="light"]::-webkit-scrollbar-thumb:hover {
  background: #a9b7b2;
}
