:root {
  --ink: #150e09;
  --ink2: #1f150d;
  --maroon: #5c1622;
  --maroon2: #7e2432;
  --gold: #c9a24b;
  --gold2: #e8c468;
  --parch: #efe3c8;
  --parch-dim: #c9b78e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--parch);
  font-family: "Cairo", sans-serif;
}

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

::selection {
  background: rgba(201, 162, 75, 0.35);
}

/* =========================================================
   Animations
   ========================================================= */

@keyframes starSpin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes nitroShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zellijDrift {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 120px 120px;
  }
}

@keyframes bgPan {
  0% {
    background-position: 50% 40%;
  }

  50% {
    background-position: 54% 44%;
  }

  100% {
    background-position: 50% 40%;
  }
}

@keyframes rippleOut {
  0% {
    transform: scale(0.68);
    opacity: 0.7;
  }

  70% {
    opacity: 0.18;
  }

  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.7;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes starTwinkle {
  0%,
  100% {
    opacity: 0.25;
    transform: scale(0.9);
  }

  50% {
    opacity: 0.9;
    transform: scale(1.15);
  }
}

@keyframes ringBreathe {
  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}

@keyframes headPulse {
  0%,
  100% {
    opacity: 0.6;
    r: 1.7;
  }

  50% {
    opacity: 1;
    r: 2.4;
  }
}

/* =========================================================
   Background
   ========================================================= */

.bg-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: center / cover no-repeat url("assets/isya_games_army.png");
  animation: bgPan 30s ease-in-out infinite;
  filter: saturate(0.9);
}

.bg-photo-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    180deg,
    rgba(21, 14, 9, 0.93) 0%,
    rgba(21, 14, 9, 0.8) 18%,
    rgba(21, 14, 9, 0.87) 55%,
    rgba(21, 14, 9, 0.96) 100%
  );
}

.bg-zellij {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.07;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(
      45deg,
      var(--gold) 0,
      var(--gold) 1px,
      transparent 1px,
      transparent 60px
    ),
    repeating-linear-gradient(
      -45deg,
      var(--gold) 0,
      var(--gold) 1px,
      transparent 1px,
      transparent 60px
    );
  animation: zellijDrift 22s linear infinite;
}

.nitro-banner {
  background: linear-gradient(
    120deg,
    var(--maroon) 0%,
    var(--maroon2) 25%,
    var(--gold) 50%,
    var(--maroon2) 75%,
    var(--maroon) 100%
  );
  background-size: 200% 200%;
  animation: nitroShift 10s ease-in-out infinite;
}

.fade-in {
  animation: floatIn 0.4s ease both;
}

/* =========================================================
   Main Layout
   ========================================================= */

.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
}

.shell {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
}

.arch-panel {
  display: none;
  position: fixed;
  top: 0;
  width: 150px;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.arch-panel.left {
  left: 0;
}

.arch-panel.right {
  right: 0;
}

.arch-inner {
  position: absolute;
  top: 4%;
  width: 130px;
  height: 92%;
  overflow: hidden;
  pointer-events: none;
}

.arch-panel.left .arch-inner {
  left: 10px;
}

.arch-panel.right .arch-inner {
  right: 10px;
}

.arch-lattice {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      rgba(232, 196, 104, 0.09) 0,
      rgba(232, 196, 104, 0.09) 1px,
      transparent 1px,
      transparent 24px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(232, 196, 104, 0.09) 0,
      rgba(232, 196, 104, 0.09) 1px,
      transparent 1px,
      transparent 24px
    );
  -webkit-mask-image: radial-gradient(
    ellipse 60% 48% at 50% 50%,
    black 0%,
    black 30%,
    transparent 72%
  );
  mask-image: radial-gradient(
    ellipse 60% 48% at 50% 50%,
    black 0%,
    black 30%,
    transparent 72%
  );
}

.arch-spine {
  position: absolute;
  left: 50%;
  top: 6%;
  bottom: 6%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(232, 196, 104, 0.5) 18%,
    rgba(232, 196, 104, 0.65) 50%,
    rgba(232, 196, 104, 0.5) 82%,
    transparent 100%
  );
}

.mini-star.faint {
  opacity: 0.5;
}

@media (min-width: 1024px) {
  .arch-panel {
    display: block;
  }
}

/* =========================================================
   Header
   ========================================================= */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 16px 12px;
}

.brand {
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  font-weight: 500;
  color: var(--gold2);
  letter-spacing: 4px;
  word-spacing: normal;
  text-transform: uppercase;
}

.banner {
  position: relative;
  margin: 0 16px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(201, 162, 75, 0.53);
}

.banner-hero {
  position: relative;
  overflow: hidden;
}

.banner-star {
  position: absolute;
  right: -30px;
  top: -40px;
}

.banner-inner {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 40px 20px 20px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 0, 0, 0.35)
  );
}

.banner-name {
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  font-weight: 500;
  color: var(--parch);
  letter-spacing: 4px;
  word-spacing: normal;
  text-transform: uppercase;
}

.banner-tagline {
  font-size: 12.5px;
  color: rgba(239, 227, 200, 0.73);
  font-family: "IBM Plex Mono", monospace;
}

.avatar {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--maroon),
    var(--maroon2)
  );
  border: 3px solid var(--gold);
  flex-shrink: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-divider {
  margin: 4px 20px 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 162, 75, 0.35),
    transparent
  );
}

.banner-player {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px 18px;
}

.player-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--gold),
    var(--gold2)
  );
  color: var(--ink);
  border: 1px solid var(--gold2);
}

.player-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: var(--parch);
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 28px;
  cursor: pointer;
}

.wave-bar {
  flex: 1;
  min-width: 1.5px;
  border-radius: 2px;
  background: rgba(201, 162, 75, 0.28);
  transition: background 0.15s;
}

.wave-bar.played {
  background: linear-gradient(
    180deg,
    var(--gold2),
    var(--gold)
  );
}

.player-times {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--parch-dim);
  font-family: "IBM Plex Mono", monospace;
}

/* =========================================================
   Stories
   ========================================================= */

.stories-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 20px;
  scrollbar-width: none;
}

.story {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 60px;
}

.story-ring {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(
    135deg,
    var(--gold),
    var(--maroon2)
  );
  overflow: hidden;
}

.story-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--ink2);
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  overflow: hidden;
}

.story-inner img,
.story-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-label {
  font-size: 11px;
  color: var(--parch-dim);
}

/* =========================================================
   Tabs
   ========================================================= */

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(201, 162, 75, 0.13);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--parch-dim);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.tab-btn.active {
  color: var(--gold2);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* =========================================================
   Content
   ========================================================= */

.content {
  padding: 20px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feed-filter {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(201, 162, 75, 0.15);
}

.feed-filter-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 12px;
  color: var(--parch-dim);
  white-space: nowrap;
}

.feed-filter-btn.active {
  background: rgba(92, 22, 34, 0.5);
  color: var(--gold2);
  font-weight: 600;
}

/* =========================================================
   Cards
   ========================================================= */

.card {
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 75, 0.13);
  background: rgba(31, 21, 13, 0.8);
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-author {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--parch);
}

.card-time {
  font-size: 11px;
  color: var(--parch-dim);
  font-family: "IBM Plex Mono", monospace;
}

.card-text {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(239, 227, 200, 0.93);
  white-space: pre-wrap;
}

.card-image {
  margin-top: 12px;
  width: 100%;
  max-height: 460px;
  display: block;
  border-radius: 10px;
  border: 1px solid rgba(201, 162, 75, 0.2);
  background: rgba(0, 0, 0, 0.25);
  object-fit: contain;
}

video.card-image {
  background: #000;
}

.article-title {
  font-family: "Amiri", serif;
  font-size: 17px;
  color: var(--gold2);
}

.empty-note {
  text-align: center;
  padding: 24px;
  color: var(--parch-dim);
  font-size: 13px;
}

/* =========================================================
   Avatar Effects
   ========================================================= */

.avatar-ripple {
  position: absolute;
  pointer-events: none;
}

.avatar-ripple .ripple-glow {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 196, 104, 0.45) 0%,
    rgba(232, 196, 104, 0.18) 45%,
    transparent 72%
  );
  filter: blur(4px);
  animation: glowPulse 3.5s ease-in-out infinite;
}

.avatar-ripple .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(232, 196, 104, 0.32) 0%,
    rgba(232, 196, 104, 0.1) 45%,
    transparent 70%
  );
  filter: blur(1.5px);
  opacity: 0;
  animation: rippleOut 3s ease-out infinite;
}

/* =========================================================
   Banner Stars
   ========================================================= */

.mini-stars-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.mini-star {
  animation: starTwinkle 4s ease-in-out infinite;
}

/* =========================================================
   Banner Bio / Skills
   ========================================================= */

.banner-bio {
  position: relative;
  margin: 0;
  padding: 14px 20px 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(239, 227, 200, 0.85);
}

.banner-lower {
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(31, 21, 13, 0.96),
    rgba(21, 14, 9, 0.98)
  );
}

.skills-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 20px 16px;
}

.skill-chip {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.skill-chip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.learning-ring {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  pointer-events: none;
  overflow: visible;
}

.learning-ring-track {
  fill: none;
  stroke: rgba(201, 162, 75, 0.18);
  stroke-width: 2;
}

.learning-ring-progress {
  fill: none;
  stroke: var(--gold2);
  stroke-width: 2;
  stroke-linecap: round;
  animation: ringBreathe 3.2s ease-in-out infinite;
}

.learning-ring-head {
  fill: var(--gold2);
  filter: drop-shadow(0 0 3px rgba(232, 196, 104, 0.9));
  animation: headPulse 1.8s ease-in-out infinite;
}

/* =========================================================
   ARTICLES
   ========================================================= */

.article-card {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 75, 0.16);
  background: linear-gradient(
    180deg,
    rgba(31, 21, 13, 0.92),
    rgba(21, 14, 9, 0.96)
  );
  padding: 18px 18px 20px;
  cursor: pointer;
  text-align: right;
  direction: rtl;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.article-card:hover,
.article-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(232, 196, 104, 0.48);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  outline: none;
}

.article-card:active {
  transform: translateY(-1px);
}

.article-card-title {
  display: block;
  margin: 0;
  color: var(--parch);
  font-family: "Amiri", serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.7;
  text-align: right;
  direction: rtl;
}

.article-card-meta {
  display: none;
}

.article-card-category,
.article-kicker {
  color: var(--gold2);
  font: 10.5px "IBM Plex Mono", monospace;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.article-card-excerpt {
  display: none;
}

.article-card-open {
  display: none;
}

/* =========================================================
   ARTICLE READER
   Full-screen academic / white-paper document
   ========================================================= */

.article-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: block;
  width: 100%;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  background: #ffffff;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #bcbcbc #ffffff;
  transition: opacity 0.24s ease;
  -webkit-overflow-scrolling: touch;
}

.article-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.article-overlay::-webkit-scrollbar {
  width: 9px;
}

.article-overlay::-webkit-scrollbar-track {
  background: #ffffff;
}

.article-overlay::-webkit-scrollbar-thumb {
  background: #c2c2c2;
  border-radius: 0;
}

.article-overlay::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

/* The overlay is the only article scroll container */

.article-sheet {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: none;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  color: #171717;
  transform: none;
  transition: none;
  direction: rtl;
}

.article-overlay.is-open .article-sheet {
  transform: none;
}

/* =========================================================
   Article Close
   ========================================================= */

.article-close {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 100;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7d7d7;
  border-radius: 50%;
  color: #333333;
  background: rgba(255, 255, 255, 0.96);
  font: 400 22px/1 "Segoe UI", sans-serif;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.article-close:hover,
.article-close:focus-visible {
  background: #f4f4f4;
  border-color: #aaaaaa;
  color: #111111;
  transform: rotate(6deg);
  outline: none;
}

/* =========================================================
   Article Header
   ========================================================= */

.article-header {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 34px;
  background: #ffffff;
  border-bottom: 1px solid #dedede;
  direction: rtl;
  text-align: right;
}

.article-kicker {
  margin: 0 0 14px;
  color: #777777;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(11px * var(--article-zoom, 1));
  font-weight: 500;
  letter-spacing: 0.3px;
  direction: rtl;
  text-align: right;
}

.article-reader-title {
  max-width: 900px;
  margin: 0;
  padding: 0;
  color: #111111;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(clamp(30px, 4vw, 46px) * var(--article-zoom, 1));
  font-weight: 700;
  line-height: 1.65;
  text-align: right;
  direction: rtl;
  unicode-bidi: plaintext;
}

.article-reader-date {
  margin-top: 14px;
  color: #777777;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(12px * var(--article-zoom, 1));
  line-height: 1.7;
  direction: rtl;
  text-align: right;
}

.article-rule {
  width: 100%;
  height: 1px;
  margin-top: 28px;
  background: #dcdcdc;
}

/* =========================================================
   Article Body
   ========================================================= */

.article-reader-body {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 110px;
  background: #ffffff;
  direction: rtl;
  text-align: right;
}

.article-body {
  color: #202020;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(18px * var(--article-zoom, 1));
  font-weight: 400;
  line-height: 2.05;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
  word-break: normal;
  overflow-wrap: break-word;
}

.article-paragraph {
  margin: 0 0 24px;
  color: #202020;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: inherit;
  line-height: inherit;
  text-align: right;
  direction: rtl;
}

.article-paragraph:last-child {
  margin-bottom: 0;
}

/* =========================================================
   Article Headings
   ========================================================= */

.article-heading {
  color: #111111;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-weight: 700;
  line-height: 1.7;
  direction: rtl;
  text-align: right;
  scroll-margin-top: 30px;
}

.article-heading-1 {
  margin: 52px 0 22px;
  padding-bottom: 10px;
  font-size: calc(28px * var(--article-zoom, 1));
  border-bottom: 1px solid #dddddd;
}

.article-heading-2 {
  margin: 42px 0 18px;
  font-size: calc(23px * var(--article-zoom, 1));
}

.article-heading-3 {
  margin: 32px 0 15px;
  font-size: calc(20px * var(--article-zoom, 1));
}

.article-body > .article-heading-1:first-child {
  margin-top: 0;
}

/* =========================================================
   Inline Formatting
   ========================================================= */

.article-body strong {
  color: #111111;
  font-weight: 700;
}

.article-body em {
  color: #333333;
  font-style: italic;
}

.article-body code {
  padding: 2px 5px;
  border: 1px solid #dddddd;
  border-radius: 3px;
  background: #f5f5f5;
  color: #333333;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82em;
  direction: ltr;
}

/* =========================================================
   Academic Quote
   ========================================================= */

.article-quote {
  margin: 30px 0;
  padding: 16px 22px;
  border-right: 3px solid #222222;
  border-left: none;
  border-radius: 0;
  background: #f7f7f7;
  color: #252525;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(17px * var(--article-zoom, 1));
  line-height: 1.95;
  direction: rtl;
  text-align: right;
}

/* =========================================================
   Lists
   ========================================================= */

.article-list {
  margin: 18px 0 25px;
  padding-right: 30px;
  padding-left: 0;
  color: #222222;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(17px * var(--article-zoom, 1));
  line-height: 1.95;
  direction: rtl;
  text-align: right;
}

.article-list li {
  margin-bottom: 10px;
  padding-right: 5px;
  line-height: 1.9;
}

.article-list li::marker {
  color: #555555;
}

.article-list-ordered {
  list-style-position: outside;
}

/* =========================================================
   Research Tables
   ========================================================= */

.article-table-wrap {
  width: 100%;
  margin: 32px 0;
  overflow-x: auto;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  background: #ffffff;
  direction: rtl;
}

.article-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  color: #202020;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(13px * var(--article-zoom, 1));
  line-height: 1.7;
  direction: rtl;
}

.article-table th,
.article-table td {
  padding: 11px 13px;
  border-bottom: 1px solid #dddddd;
  border-left: 1px solid #e4e4e4;
  text-align: right;
  vertical-align: top;
  line-height: 1.7;
}

.article-table th {
  color: #111111;
  background: #f4f4f4;
  font-weight: 700;
}

.article-table tr:last-child td {
  border-bottom: none;
}

.article-table tr:nth-child(even) td {
  background: #fafafa;
}

/* =========================================================
   Statistics
   ========================================================= */

.article-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 32px;
  direction: ltr;
}

.article-stat {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dddddd;
  border-radius: 0;
  background: #fafafa;
  text-align: center;
  direction: rtl;
}

.article-stat-value {
  color: #111111;
  font:
    600 calc(19px * var(--article-zoom, 1))
    "IBM Plex Mono",
    monospace;
  line-height: 1.3;
  direction: ltr;
}

.article-stat-label {
  margin-top: 7px;
  color: #666666;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(11px * var(--article-zoom, 1));
  line-height: 1.55;
}

/* =========================================================
   Sources
   ========================================================= */

.article-sources {
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid #dddddd;
  direction: rtl;
  text-align: right;
}

.article-sources-title {
  margin: 0 0 15px;
  color: #111111;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(22px * var(--article-zoom, 1));
  font-weight: 700;
  text-align: right;
}

.article-sources-list {
  margin: 0;
  padding-right: 24px;
  padding-left: 0;
  color: #555555;
  font-family:
    "Noto Sans Arabic",
    "Cairo",
    "Segoe UI",
    sans-serif;
  font-size: calc(12px * var(--article-zoom, 1));
  line-height: 1.8;
}

.article-sources-list li {
  margin-bottom: 7px;
}

/* =========================================================
   Article Zoom Controls
   ========================================================= */

.article-zoom-controls {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid #d8d8d8;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  direction: ltr;
}

.article-zoom-btn {
  width: 34px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  color: #222222;
  background: transparent;
  font-family:
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 18px;
  line-height: 1;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}

.article-zoom-btn:hover,
.article-zoom-btn:focus-visible {
  background: #f2f2f2;
  border-color: #d0d0d0;
  outline: none;
}

.article-zoom-level {
  min-width: 58px;
  padding: 0 7px;
  color: #333333;
  font-family:
    "IBM Plex Mono",
    monospace;
  font-size: 11px;
  line-height: 30px;
  text-align: center;
  user-select: none;
}

body.article-modal-open {
  overflow: hidden;
}

/* =========================================================
   My Projects
   ========================================================= */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.project-card {
  appearance: none;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 75, 0.16);
  background: linear-gradient(
    180deg,
    rgba(31, 21, 13, 0.92),
    rgba(21, 14, 9, 0.96)
  );
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(232, 196, 104, 0.5);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
  outline: none;
}

.project-card:active {
  transform: translateY(-1px) scale(0.995);
}

.project-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 162, 75, 0.12);
  background: rgba(0, 0, 0, 0.22);
}

.project-card-media img,
.project-sheet-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-image-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--parch-dim);
  font: 12px "IBM Plex Mono", monospace;
  letter-spacing: 0.5px;
  background:
    linear-gradient(
      135deg,
      rgba(92, 22, 34, 0.25),
      transparent 45%
    ),
    repeating-linear-gradient(
      45deg,
      rgba(201, 162, 75, 0.07) 0,
      rgba(201, 162, 75, 0.07) 1px,
      transparent 1px,
      transparent 18px
    ),
    rgba(21, 14, 9, 0.72);
}

.project-card-body {
  padding: 11px 12px 13px;
}

.project-card-title {
  overflow: hidden;
  color: var(--parch);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-platforms {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: var(--gold2);
}

.project-platform-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(201, 162, 75, 0.18);
  border-radius: 6px;
  color: var(--gold2);
  background: rgba(0, 0, 0, 0.18);
}

.project-platform-dot svg,
.project-platform svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================================
   Project Overlay
   ========================================================= */

.project-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 7, 5, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s ease;
}

.project-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.project-sheet {
  position: relative;
  width: min(900px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid rgba(201, 162, 75, 0.52);
  border-radius: 16px;
  background: linear-gradient(
    180deg,
    rgba(31, 21, 13, 0.985),
    rgba(21, 14, 9, 0.99)
  );
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  transform: translateY(18px) scale(0.975);
  transition:
    transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.project-overlay.is-open .project-sheet {
  transform: translateY(0) scale(1);
}

.project-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(201, 162, 75, 0.2);
  border-radius: 50%;
  color: var(--gold2);
  background: rgba(21, 14, 9, 0.76);
  font: 400 24px/1 "IBM Plex Mono", monospace;
  transition:
    background 0.2s,
    transform 0.2s;
}

.project-close:hover,
.project-close:focus-visible {
  background: rgba(92, 22, 34, 0.55);
  transform: rotate(6deg);
  outline: none;
}

.project-sheet-grid {
  display: grid;
  grid-template-columns: minmax(210px, 32%) 1fr;
  min-height: 360px;
}

.project-sheet-media {
  position: relative;
  min-height: 360px;
  border-right: 1px solid rgba(201, 162, 75, 0.14);
  background: rgba(0, 0, 0, 0.2);
}

.project-sheet-media .project-image-placeholder {
  position: absolute;
}

.project-sheet-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 36px 38px 30px;
}

.project-sheet-title {
  margin-bottom: 24px;
  color: var(--gold2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.project-section-label {
  margin-bottom: 7px;
  color: var(--gold2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 500;
}

.project-description {
  margin: 0;
  color: rgba(239, 227, 200, 0.88);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.project-meta-block {
  margin-top: 20px;
}

.project-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-platform {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(201, 162, 75, 0.18);
  border-radius: 8px;
  color: var(--parch-dim);
  background: rgba(0, 0, 0, 0.16);
  font: 10.5px "IBM Plex Mono", monospace;
}

.project-platform svg {
  color: var(--gold2);
}

.project-date {
  margin-top: 18px;
  color: var(--parch-dim);
  font: 10.5px "IBM Plex Mono", monospace;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
}

.project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(201, 162, 75, 0.38);
  border-radius: 9px;
  color: var(--gold2);
  background: rgba(92, 22, 34, 0.3);
  font: 11px "IBM Plex Mono", monospace;
  text-decoration: none;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.project-action:hover {
  border-color: rgba(232, 196, 104, 0.7);
  background: rgba(92, 22, 34, 0.52);
  transform: translateY(-1px);
}

/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 620px) {
  .tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .project-card-media {
    aspect-ratio: 16 / 9;
  }

  .project-sheet-grid {
    grid-template-columns: 1fr;
  }

  .project-sheet-media {
    min-height: 230px;
    max-height: 300px;
    border-right: none;
    border-bottom: 1px solid rgba(201, 162, 75, 0.14);
  }

  .project-sheet-details {
    padding: 28px 22px 24px;
  }

  .project-sheet-title {
    padding-right: 34px;
    font-size: 17px;
  }

  /* Articles */

  .article-header {
    width: calc(100% - 36px);
    padding: 72px 0 26px;
  }

  .article-reader-title {
    font-size: calc(26px * var(--article-zoom, 1));
    line-height: 1.6;
  }

  .article-reader-body {
    width: calc(100% - 36px);
    padding: 30px 0 80px;
  }

  .article-body {
    font-size: calc(16.5px * var(--article-zoom, 1));
    line-height: 1.95;
  }

  .article-heading-1 {
    margin-top: 34px;
    font-size: calc(24px * var(--article-zoom, 1));
  }

  .article-heading-2 {
    font-size: calc(21px * var(--article-zoom, 1));
  }

  .article-heading-3 {
    font-size: calc(19px * var(--article-zoom, 1));
  }

  .article-quote {
    font-size: calc(16.5px * var(--article-zoom, 1));
    padding: 14px 17px;
  }

  .article-list {
    font-size: calc(16px * var(--article-zoom, 1));
  }

  .article-stats {
    grid-template-columns: 1fr;
  }

  .article-table {
    min-width: 460px;
  }

  .article-close {
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  .article-zoom-controls {
    left: 12px;
    bottom: 12px;
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-overlay,
  .project-sheet,
  .project-close,
  .project-action,
  .article-card,
  .article-overlay,
  .article-sheet,
  .article-close,
  .article-zoom-btn {
    transition: none;
  }

  .article-overlay {
    scroll-behavior: auto;
  }
}