/* ============================================================
   ABDULLAH AHMED ABBAS — DATA ANALYST PORTFOLIO
   Design concept: "The Ledger Terminal"
   A data analyst reads spreadsheets and dashboards all day —
   so the UI borrows from graph paper, ledger rows, tabular
   figures and an amber terminal accent (a nod to classic
   trading-desk monitors) instead of generic "SaaS card" chrome.
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Ink navy base (deliberately blue-hued, not near-black) */
  --bg: #0a1120;
  --bg-alt: #0d1526;
  --surface: #121b2e;
  --surface-2: #182541;
  --surface-hover: #1b2740;
  --border: #23304a;
  --border-strong: #324364;

  --text: #eaeff8;
  --text-muted: #91a0be;
  --text-faint: #5a6883;

  /* twin data-accents, like two series on a chart */
  --amber: #ffb454;
  --amber-dim: #c98a3b;
  --teal: #4fd9c7;
  --teal-dim: #2e9c8f;

  --amber-soft: rgba(255, 180, 84, 0.12);
  --teal-soft: rgba(79, 217, 199, 0.12);

  --danger: #ff6b6b;

  /* per-tool brand accents (skills grid) */
  --c-excel: #3fc77e;
  --c-powerbi: #f2c94c;
  --c-python: #6fb7ff;
  --c-sql: #4fd9c7;
  --c-cpp: #7c9cff;
  --c-dax: #e08ae0;

  --grid-line: rgba(255, 255, 255, 0.035);

  --shadow-stamp: 5px 5px 0 rgba(0, 0, 0, 0.35);
  --shadow-stamp-accent: 5px 5px 0 var(--amber);

  --radius-s: 4px;
  --radius-m: 10px;
  --radius-l: 20px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 0.8, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-snap: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1180px;

  --font-en: "Inter", "IBM Plex Mono", sans-serif;
  --font-ar: "Tajawal", "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  color-scheme: dark;
}

body.light-theme {
  color-scheme: light;
  --bg: #f3f5fa;
  --bg-alt: #eaeef6;
  --surface: #ffffff;
  --surface-2: #f5f7fb;
  --surface-hover: #eef1f8;
  --border: #dce2ee;
  --border-strong: #c5cee0;

  --text: #10192b;
  --text-muted: #4e5b76;
  --text-faint: #8390a9;

  --amber: #c97a1e;
  --amber-dim: #a5651a;
  --teal: #0e8e7f;
  --teal-dim: #0b6f63;

  --amber-soft: rgba(201, 122, 30, 0.1);
  --teal-soft: rgba(14, 142, 127, 0.1);

  --grid-line: rgba(16, 25, 43, 0.045);
  --shadow-stamp: 5px 5px 0 rgba(16, 25, 43, 0.08);
  --shadow-stamp-accent: 5px 5px 0 var(--amber);
}

/* ---------- 2. RESET & BASE ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}
/* @media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
} */

body {
  background:
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0/48px 48px,
    var(--bg);
  color: var(--text);
  font-family: var(--font-en);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition:
    background-color 0.35s var(--ease),
    color 0.35s var(--ease);
  position: relative;
}
html[lang="ar"] body {
  font-family: var(--font-ar);
}

/* cursor-reactive spotlight, set by script.js via --mx/--my */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    560px circle at var(--mx, 50%) var(--my, 10%),
    rgba(255, 180, 84, 0.1),
    transparent 62%
  );
  mix-blend-mode: screen;
}
body.light-theme::before {
  opacity: 0.5;
}
/* @media (hover: none) {
  body::before {
    display: none;
  }
} */
.tAndv {
  font-size: 11.2px;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul {
  list-style: none;
}
h1,
h2,
h3,
h4 {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
p {
  color: var(--text-muted);
}

::selection {
  background: var(--amber);
  color: #151b12;
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid var(--bg-alt);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--amber-dim);
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section {
  padding-block: 112px;
  position: relative;
}
.section:nth-of-type(even) {
  background: var(--bg-alt);
}

/* @media (max-width: 720px) {
  .section {
    padding-block: 72px;
  }
}
 */
/* section heading ---------------------------------------- */
.section-heading {
  max-width: 640px;
  margin-bottom: 56px;
}
.section-heading.center {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--amber);
  margin-bottom: 18px;
}
.section-label::before {
  content: "[";
  color: var(--text-faint);
}
.section-label::after {
  content: "]";
  color: var(--text-faint);
}
html[lang="ar"] .section-label {
  font-family: var(--font-mono);
  direction: ltr;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  color: var(--text);
}
/* .section-heading h2 > span > span,
.section-heading h2 > span {
} */
.section-heading h2 span span {
  color: var(--amber);
}
.section-heading p {
  margin-top: 18px;
  font-size: 1.05rem;
  max-width: 52ch;
}
.section-heading.center p {
  margin-inline: auto;
}

/* buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 13px 26px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition:
    transform 0.45s var(--ease-spring),
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.35s var(--ease-snap),
    color 0.25s var(--ease);
  white-space: nowrap;
  will-change: transform;
}
.btn i {
  transition: transform 0.35s var(--ease-spring);
  font-size: 0.85em;
}
.btn:active {
  transform: scale(0.96) !important;
  transition-duration: 0.1s;
}

.btn-primary {
  background: var(--amber);
  color: #1a1204;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 0 0 0 rgba(255, 180, 84, 0);
}
.btn-primary:hover {
  transform: translateY(-5px) scale(1.035);
  box-shadow:
    0 20px 36px -12px rgba(255, 180, 84, 0.65),
    0 0 0 5px var(--amber-soft);
}
.btn-primary:hover i {
  transform: translateX(5px);
}
html[dir="rtl"] .btn-primary:hover i.fa-arrow-right {
  transform: scaleX(-1) translateX(5px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
  position: relative;
}
.btn-outline:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: translateY(-5px) scale(1.035);
  box-shadow: 0 16px 30px -14px rgba(0, 0, 0, 0.45);
}
.btn-outline:hover i {
  transform: translateX(5px) rotate(-4deg);
}
html[dir="rtl"] .btn-outline:hover i.fa-arrow-right {
  transform: scaleX(-1) translateX(5px);
}

html[dir="rtl"] .btn i.fa-arrow-right,
html[dir="rtl"] .text-link i.fa-arrow-right,
html[dir="rtl"] .project-link i.fa-arrow-right {
  transform: scaleX(-1);
}

/* ---------- 3. HEADER / NAVBAR ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo a {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.logo a span:last-child span {
  color: var(--amber);
}

.profile-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-strong);
  transition:
    border-color 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    box-shadow 0.3s var(--ease);
  flex-shrink: 0;
}
.profile-trigger:hover {
  border-color: var(--amber);
  transform: scale(1.14) rotate(-6deg);
  box-shadow: 0 0 0 4px var(--amber-soft);
}
.nav-profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding-block: 6px;
  transition:
    color 0.25s var(--ease),
    transform 0.35s var(--ease-spring);
  display: inline-block;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--amber);
  box-shadow: 0 0 10px 0 var(--amber);
  transition: width 0.35s var(--ease-snap);
}
.nav-link:hover {
  color: var(--text);
  transform: translateY(-2px);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link.active {
  color: var(--amber);
}
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  transition:
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.35s var(--ease-spring),
    background 0.3s var(--ease);
}
.lang-btn:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: translateY(-3px) scale(1.06);
}
.lang-btn:active {
  transform: scale(0.94);
}
.lang-btn .divider {
  color: var(--text-faint);
}

.theme-toggle,
.menu-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition:
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.45s var(--ease-spring),
    background 0.3s var(--ease);
}
.theme-toggle:hover,
.menu-toggle:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: rotate(25deg) scale(1.12);
}
.theme-toggle:active,
.menu-toggle:active {
  transform: scale(0.9);
}
.menu-toggle {
  display: none;
}

/* @media (max-width: 960px) {
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    inset-inline: 0;
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .nav-menu.active {
    max-height: 520px;
  }
  .nav-link {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-link::after {
    display: none;
  }
} */

/* ---------- 4. HERO ---------- */
.hero {
  padding-block: 100px 90px;
  overflow: visible;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  background: var(--surface);
}
.availability-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 var(--teal-soft);
  animation: pulse-dot 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(79, 217, 199, 0.55);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(79, 217, 199, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(79, 217, 199, 0);
  }
}

.hero-greeting {
  font-family: var(--font-mono);
  color: var(--amber);
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.hero-greeting::before {
  content: "> ";
}

.hero-text h1 {
  font-size: clamp(2.6rem, 5.2vw, 4rem);
  color: var(--text);
}
.hero-text h1 span:last-child span {
  color: var(--amber);
}

.hero-text h2 {
  font-weight: 500;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--text-muted);
  margin-top: 10px;
  font-family: var(--font-mono);
}

.hero-description {
  margin-top: 22px;
  font-size: 1.08rem;
  max-width: 54ch;
  color: var(--text-muted);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.social-links {
  display: flex;
  gap: 14px;
  margin-top: 36px;
}
.social-links a {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-muted);
  transition:
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}
.social-links a:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-soft);
  transform: translateY(-6px) scale(1.1) rotate(-8deg);
  box-shadow: 0 14px 24px -10px rgba(255, 180, 84, 0.55);
}
.social-links a:active {
  transform: translateY(-2px) scale(0.96);
}

/* hero visual: live query terminal --------------------------
   Replaces the generic dashboard-mockup line chart with a
   scene closer to what a data analyst actually looks at: a
   query typing itself out, then resolving into a ledger of
   bars with one highlighted outlier — a single orchestrated
   hero moment instead of scattered decoration. */
.hero-visual {
  position: relative;
}

.dashboard-card {
  background:
    radial-gradient(
      circle at var(--glow-x, 85%) var(--glow-y, -10%),
      var(--amber-soft),
      transparent 55%
    ),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 28px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55);
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  transition:
    transform 0.5s var(--ease-snap),
    box-shadow 0.5s var(--ease-snap);
  will-change: transform;
}
.dashboard-card:hover {
  box-shadow:
    0 40px 70px -28px rgba(0, 0, 0, 0.6),
    0 0 0 1px var(--border-strong);
}
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.card-top::before {
  content: "";
  position: absolute;
  top: -10px;
  inset-inline-start: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow:
    16px 0 0 var(--amber),
    32px 0 0 var(--teal);
  opacity: 0.85;
}
.small-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-top: 8px;
  display: block;
}
.card-top h3 {
  font-size: 1.15rem;
  margin-top: 6px;
  color: var(--text);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  background: var(--amber-soft);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.chart {
  position: relative;
  height: 162px;
  margin-bottom: 26px;
  padding-top: 6px;
}

/* typed query lines, revealed character by character -------- */
.chart::before,
.chart::after {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
  max-width: 100%;
  border-inline-end: 2px solid var(--amber);
}
.chart::before {
  content: "> query sales.csv --by=region";
  color: var(--text-muted);
  animation:
    type-line 1.5s steps(30, end) 0.3s forwards,
    caret-blink 1s step-end 1.8s 2;
}
.chart::after {
  content: "✓ done — 6 regions ranked";
  color: var(--teal);
  margin-top: 12px;
  border-inline-end-color: var(--teal);
  animation:
    type-line 1s steps(24, end) 2s forwards,
    caret-blink 1s step-end 3s infinite;
}
@keyframes type-line {
  to {
    width: 100%;
  }
}
@keyframes caret-blink {
  50% {
    border-color: transparent;
  }
}
html[dir="rtl"] .chart::before,
html[dir="rtl"] .chart::after {
  direction: ltr;
  text-align: start;
  margin-inline-start: auto;
}

/* ledger bars rising from the baseline ----------------------- */
.chart-line {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--border) 0 6px,
    transparent 6px 12px
  );
}

.chart-point {
  position: absolute;
  bottom: 0;
  width: 9%;
  max-width: 26px;
  border-radius: 4px 4px 0 0;
  background: var(--teal);
  opacity: 0.85;
  height: 0;
  animation: rise-bar 0.7s var(--ease-snap) forwards;
  transform-origin: bottom;
}
.point-1 {
  inset-inline-start: 2%;
  --bar-h: 38px;
  animation-delay: 2.9s;
}
.point-2 {
  inset-inline-start: 19%;
  --bar-h: 56px;
  animation-delay: 3s;
}
.point-3 {
  inset-inline-start: 36%;
  --bar-h: 34px;
  animation-delay: 3.1s;
}
.point-4 {
  inset-inline-start: 53%;
  --bar-h: 68px;
  animation-delay: 3.2s;
}
.point-5 {
  inset-inline-start: 70%;
  --bar-h: 96px;
  background: var(--amber);
  opacity: 1;
  box-shadow: 0 0 22px -4px rgba(255, 180, 84, 0.7);
  animation-delay: 3.3s;
}
.point-6 {
  inset-inline-start: 88%;
  --bar-h: 48px;
  animation-delay: 3.4s;
}
@keyframes rise-bar {
  to {
    height: var(--bar-h);
  }
}

/* @media (prefers-reduced-motion: reduce) {
  .chart::before,
  .chart::after {
    width: 100%;
    animation: none;
    border-inline-end-color: transparent;
  }
  .chart-point {
    height: var(--bar-h);
    animation: none;
  }
} */

.stats {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.stat {
  opacity: 0;
  animation: stat-in 0.5s var(--ease-snap) 3.6s forwards;
}
.stat:nth-child(2) {
  animation-delay: 3.7s;
}
.stat:nth-child(3) {
  animation-delay: 3.8s;
}
@keyframes stat-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 6px;
}
.stat strong {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
/* @media (prefers-reduced-motion: reduce) {
  .stat {
    opacity: 1;
    animation: none;
  }
} */

/* ---------- HERO: workflow pipeline + skill bars ---------- */
.hero-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}
html[dir="rtl"] .hero-label {
  font-family: var(--font-ar);
  letter-spacing: 0;
}
.hero-label b {
  color: var(--amber);
  font-weight: 600;
}

.pipeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 30px;
  direction: ltr; /* data always flows left to right */
}
.pipeline::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    var(--border-strong) 0 6px,
    transparent 6px 12px
  );
}
.pipe-packet {
  position: absolute;
  top: 15px;
  left: 12.5%;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px 2px rgba(255, 180, 84, 0.7);
  opacity: 0;
  z-index: 2;
  animation: pipe-packet 6s linear infinite;
}
@keyframes pipe-packet {
  0% {
    left: 12.5%;
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  75% {
    left: 87.5%;
    opacity: 1;
  }
  82%,
  100% {
    left: 87.5%;
    opacity: 0;
  }
}
.pipe-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.pipe-node {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-m);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  animation: pipe-node 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 1.5s);
}
@keyframes pipe-node {
  0% {
    border-color: var(--border-strong);
    color: var(--text-faint);
    background: var(--surface);
    box-shadow: 0 0 0 0 transparent;
  }
  5%,
  22% {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-soft);
    box-shadow: 0 0 0 4px var(--amber-soft);
  }
  30%,
  100% {
    border-color: var(--border-strong);
    color: var(--text-faint);
    background: var(--surface);
    box-shadow: 0 0 0 0 transparent;
  }
}
.pipe-name {
  font-size: 0.78rem;
  color: var(--text);
  margin-top: 4px;
}
.pipe-tool {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--text-faint);
}

.term-log {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  background: var(--bg-alt);
}
html[dir="rtl"] .term-line {
  font-family: var(--font-ar);
  font-size: 0.82rem;
}
body.light-theme .term-log {
  background: var(--surface-2);
}
body.light-theme .term-line {
  color: var(--teal-dim);
}
body.light-theme .term-line.t5 {
  color: var(--amber-dim);
}
body.light-theme .pipe-packet {
  box-shadow: 0 0 12px 2px rgba(201, 122, 30, 0.55);
}
.term-line {
  display: block;
  width: 0;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--teal);
  animation-duration: 6s;
  animation-timing-function: steps(26, end);
  animation-iteration-count: infinite;
}
.term-line.t5 {
  color: var(--amber);
}
.t1 {
  animation-name: type-t1;
}
.t2 {
  animation-name: type-t2;
}
.t3 {
  animation-name: type-t3;
}
.t4 {
  animation-name: type-t4;
}
.t5 {
  animation-name: type-t5;
}
@keyframes type-t1 {
  0%,
  0% {
    width: 0;
  }
  18%,
  98% {
    width: 100%;
  }
  98.1%,
  100% {
    width: 0;
  }
}
@keyframes type-t2 {
  0%,
  25% {
    width: 0;
  }
  43%,
  98% {
    width: 100%;
  }
  98.1%,
  100% {
    width: 0;
  }
}
@keyframes type-t3 {
  0%,
  50% {
    width: 0;
  }
  68%,
  98% {
    width: 100%;
  }
  98.1%,
  100% {
    width: 0;
  }
}
@keyframes type-t4 {
  0%,
  75% {
    width: 0;
  }
  93%,
  98% {
    width: 100%;
  }
  98.1%,
  100% {
    width: 0;
  }
}
@keyframes type-t5 {
  0%,
  84% {
    width: 0;
  }
  92%,
  98% {
    width: 100%;
  }
  98.1%,
  100% {
    width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pipe-packet {
    display: none;
  }
  .pipe-node {
    animation: none;
  }
  .term-line {
    animation: none;
    width: 100%;
  }
}

.floating-card {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-stamp);
  z-index: 3;
  animation: float-card 5s ease-in-out infinite;
}
.floating-card i {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-s);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-soft);
  color: var(--teal);
}
.floating-card div {
  display: flex;
  flex-direction: column;
}
.floating-card strong {
  font-size: 0.85rem;
  color: var(--text);
}
.floating-card span {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.floating-card-one {
  top: -6%;
  inset-inline-end: -8%;
  animation-delay: 0s;
}
.floating-card-two {
  bottom: -13%;
  inset-inline-start: -9%;
  animation-delay: 1.6s;
}
@keyframes float-card {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* @media (max-width: 960px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 440px;
    margin-inline: auto;
    margin-top: 24px;
  }
  .floating-card {
    display: none;
  }
}
@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
} */

/* ---------- 5. ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-text p {
  margin-bottom: 18px;
  font-size: 1.02rem;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  color: var(--amber);
  font-weight: 600;
  margin-top: 8px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--amber-dim);
  transition:
    gap 0.35s var(--ease-spring),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.text-link i {
  transition: transform 0.35s var(--ease-spring);
}
.text-link:hover {
  gap: 1em;
  border-color: var(--amber);
}
.text-link:hover i {
  transform: translateX(6px);
}
html[dir="rtl"] .text-link:hover i.fa-arrow-right {
  transform: scaleX(-1) translateX(6px);
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 24px;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.35s var(--ease-snap),
    border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}
.about-card:hover {
  transform: translate(-6px, -6px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--amber);
  border-color: var(--amber);
  background: var(--surface-hover);
}
.about-card i {
  font-size: 1.3rem;
  color: var(--amber);
  margin-bottom: 14px;
  display: block;
  transition: transform 0.4s var(--ease-spring);
}
.about-card:hover i {
  transform: scale(1.25) rotate(-8deg);
}
.about-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 8px;
}
.about-card p {
  font-size: 0.9rem;
}

/* @media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .about-cards {
    grid-template-columns: 1fr;
  }
} */

/* ---------- 6. SKILLS ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px 18px;
  text-align: center;
  transition:
    transform 0.4s var(--ease-spring),
    border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease-snap);
}
.skill-card:hover {
  transform: translateY(-10px) scale(1.04);
  border-color: var(--icon-c, var(--amber));
  box-shadow: 0 20px 34px -18px var(--icon-c, var(--amber));
}
.skill-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-m);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-inline: auto;
  margin-bottom: 16px;
  background: var(--icon-c-soft, var(--amber-soft));
  color: var(--icon-c, var(--amber));
  transition: transform 0.45s var(--ease-spring);
}
.skill-card:hover .skill-icon {
  transform: scale(1.15) rotate(-10deg);
}
.skill-icon.excel {
  --icon-c: var(--c-excel);
  --icon-c-soft: color-mix(in srgb, var(--c-excel) 16%, transparent);
}
.skill-icon.powerbi {
  --icon-c: var(--c-powerbi);
  --icon-c-soft: color-mix(in srgb, var(--c-powerbi) 16%, transparent);
}
.skill-icon.python {
  --icon-c: var(--c-python);
  --icon-c-soft: color-mix(in srgb, var(--c-python) 16%, transparent);
}
.skill-icon.sql {
  --icon-c: var(--c-sql);
  --icon-c-soft: color-mix(in srgb, var(--c-sql) 16%, transparent);
}
.skill-icon.cpp {
  --icon-c: var(--c-cpp);
  --icon-c-soft: color-mix(in srgb, var(--c-cpp) 16%, transparent);
}
.skill-icon.dax {
  --icon-c: var(--c-dax);
  --icon-c-soft: color-mix(in srgb, var(--c-dax) 16%, transparent);
}

.skill-card h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}
.skill-card p {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* @media (max-width: 900px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 520px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
} */

/* ---------- 7. LEARNING ---------- */
.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.learning-card {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--teal);
  border-radius: var(--radius-m);
  padding: 22px;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.35s var(--ease-snap),
    border-inline-start-width 0.3s var(--ease);
}
.learning-card:hover {
  transform: translateX(6px);
  box-shadow: 0 18px 30px -18px rgba(79, 217, 199, 0.5);
  border-inline-start-width: 6px;
}
html[dir="rtl"] .learning-card:hover {
  transform: translateX(-6px);
}
.learning-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: var(--radius-m);
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.4s var(--ease-spring);
}
.learning-card:hover .learning-icon {
  transform: scale(1.15) rotate(8deg);
}
.learning-content h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 6px;
}
.learning-content p {
  font-size: 0.88rem;
  margin-bottom: 10px;
}
.learning-content small {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  border: 1px solid var(--teal-dim);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  display: inline-block;
}

/* @media (max-width: 720px) {
  .learning-grid {
    grid-template-columns: 1fr;
  }
} */

/* ---------- 8. PROJECTS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition:
    transform 0.45s var(--ease-spring),
    box-shadow 0.4s var(--ease-snap),
    border-color 0.3s var(--ease);
}
.project-card:hover {
  transform: translateY(-12px);
  box-shadow:
    0 34px 60px -24px rgba(0, 0, 0, 0.55),
    0 0 0 1px var(--amber);
  border-color: var(--amber);
}
.project-image {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-snap);
}
.project-card:hover .project-image img {
  transform: scale(1.12) rotate(0.5deg);
}

.project-content {
  padding: 26px;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.project-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.project-content h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 10px;
}
.project-content > p {
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.project-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
}
.project-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-faint);
}
.project-meta i {
  color: var(--amber);
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  color: var(--amber);
  font-weight: 600;
  font-size: 0.92rem;
  transition: gap 0.35s var(--ease-spring);
}
.project-link i {
  transition: transform 0.35s var(--ease-spring);
}
.project-link:hover {
  gap: 1em;
}
.project-link:hover i {
  transform: translateX(6px);
}
html[dir="rtl"] .project-link:hover i.fa-arrow-right {
  transform: scaleX(-1) translateX(6px);
}

/* @media (max-width: 820px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
} */

/* ---------- 9. PROJECT MODAL ---------- */
.project-modal,
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s var(--ease);
}
.project-modal.active,
.profile-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay,
.profile-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 18, 0.72);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  max-width: 760px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.project-modal.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition:
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    background 0.3s var(--ease);
}
.modal-close:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: rotate(90deg) scale(1.1);
}

.modal-image {
  aspect-ratio: 16/9;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--text-faint);
}

.modal-body {
  padding: 32px;
}
.modal-body .project-tags {
  margin-bottom: 14px;
}
.modal-body h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 12px;
}
.modal-description {
  font-size: 0.98rem;
  margin-bottom: 28px;
}

.modal-section {
  margin-bottom: 26px;
}
.modal-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: var(--amber);
  margin-bottom: 12px;
  font-family: var(--font-mono);
}
.modal-section ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-section li {
  position: relative;
  padding-inline-start: 22px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.modal-section li::before {
  content: "›";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--teal);
  font-weight: 700;
}
html[dir="rtl"] .modal-section li::before {
  content: "‹";
}
.modal-section p {
  font-size: 0.92rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  padding: 0 6px 6px 0; /* room for the stamp shadow so it never clips */
}

/* Modal buttons: terminal / "stamp" style to match the rest of the modal */
.modal-actions .btn {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  border-radius: var(--radius-m);
}
html[dir="rtl"] .modal-actions .btn {
  font-family: var(--font-ar);
  letter-spacing: 0;
}

.btn-demo {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber);
  box-shadow: 0 0 0 0 var(--amber);
}
.btn-demo::before {
  content: ">";
  opacity: 0.7;
  transition: transform 0.3s var(--ease-spring);
}
html[dir="rtl"] .btn-demo::before {
  content: "<";
}
.btn-demo:hover {
  background: var(--bg);
  color: var(--amber);
  transform: translate(-3px, -3px);
  box-shadow: 4px 4px 0 var(--amber);
}
.btn-demo:hover::before {
  transform: translateX(3px);
}
.btn-demo:hover i {
  transform: translate(3px, -3px);
}
.btn-demo:active {
  transform: translate(0, 0) !important;
  box-shadow: 0 0 0 0 var(--amber);
}

/* ---------- 10. EXPERIENCE TIMELINE ---------- */
.experience-timeline {
  position: relative;
  padding-inline-start: 36px;
  display: flex;
  flex-direction: column;
  gap: 44px;
}
.experience-timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 5px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--border-strong) 0 6px,
    transparent 6px 12px
  );
}
.experience-item {
  position: relative;
  display: flex;
}
.experience-marker {
  position: absolute;
  inset-inline-start: -36px;
  top: 4px;
  width: 11px;
  height: 11px;
}
.experience-marker span {
  display: block;
  width: 11px;
  height: 11px;
  background: var(--bg);
  border: 2px solid var(--amber);
  transform: rotate(45deg);
  transition:
    transform 0.4s var(--ease-spring),
    background 0.3s var(--ease);
}
.experience-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  width: 100%;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.35s var(--ease-snap),
    border-color 0.3s var(--ease);
}
.experience-item:hover .experience-content {
  transform: translateX(6px);
  border-color: var(--amber);
  box-shadow: 0 20px 36px -22px rgba(255, 180, 84, 0.4);
}
html[dir="rtl"] .experience-item:hover .experience-content {
  transform: translateX(-6px);
}
.experience-item:hover .experience-marker span {
  transform: rotate(45deg) scale(1.3);
  background: var(--amber);
}
.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.experience-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--teal);
  display: block;
  margin-bottom: 8px;
}
.experience-content h3 {
  font-size: 1.1rem;
  color: var(--text);
}
.experience-content h4 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}
.experience-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
  padding-top: 4px;
}
.experience-description {
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.experience-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.experience-list li {
  position: relative;
  padding-inline-start: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.experience-list li::before {
  content: "›";
  position: absolute;
  inset-inline-start: 0;
  color: var(--amber);
  font-weight: 700;
}
html[dir="rtl"] .experience-list li::before {
  content: "‹";
}
.experience-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.experience-tools span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

/* @media (max-width: 600px) {
  .experience-timeline {
    padding-inline-start: 24px;
  }
  .experience-marker {
    inset-inline-start: -24px;
  }
} */

/* ---------- 11. EDUCATION ---------- */
.education-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.education-card {
  display: flex;
  gap: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.35s var(--ease-snap),
    border-color 0.3s var(--ease);
}
.education-card:hover {
  transform: translateY(-6px);
  border-color: var(--amber);
  box-shadow: 0 22px 40px -22px rgba(255, 180, 84, 0.4);
}
.education-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-m);
  background: var(--amber-soft);
  color: var(--amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.4s var(--ease-spring);
}
.education-card:hover .education-icon {
  transform: scale(1.15) rotate(-8deg);
}
.education-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.education-type {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  display: block;
  margin-bottom: 8px;
}
.education-content h3 {
  font-size: 1.1rem;
  color: var(--text);
}
.education-content h4 {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 4px;
}
.education-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
}
.education-content > p {
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.education-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.education-tags span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}

/* @media (max-width: 640px) {
  .education-card {
    flex-direction: column;
  }
} */

/* ---------- 12. CERTIFICATIONS ---------- */
.certifications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.certificate-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 26px;
  transition:
    transform 0.4s var(--ease-spring),
    box-shadow 0.35s var(--ease-snap),
    border-color 0.3s var(--ease);
}
.certificate-card:hover {
  transform: translate(-6px, -6px) rotate(-1deg);
  box-shadow: 8px 8px 0 var(--amber);
  border-color: var(--amber);
}
.certificate-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-m);
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  margin-bottom: 16px;
  transition: transform 0.4s var(--ease-spring);
}
.certificate-card:hover .certificate-icon {
  transform: scale(1.15) rotate(8deg);
}
.certificate-status {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-faint);
  display: block;
  margin-bottom: 8px;
}
.certificate-content h3 {
  font-size: 1.02rem;
  color: var(--text);
  margin-bottom: 8px;
}
.certificate-content > p {
  font-size: 0.87rem;
  margin-bottom: 18px;
}
.certificate-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.certificate-footer > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.certificate-footer i {
  color: var(--amber);
}
.certificate-footer .btn {
  padding: 8px 16px;
  font-size: 0.78rem;
}

/* @media (max-width: 900px) {
  .certifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .certifications-grid {
    grid-template-columns: 1fr;
  }
} */

/* ---------- 13. SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-m);
  padding: 28px 24px;
  position: relative;
  transition:
    transform 0.4s var(--ease-spring),
    border-color 0.3s var(--ease),
    box-shadow 0.35s var(--ease-snap);
}
.service-card:hover {
  transform: translateY(-10px);
  border-color: var(--amber);
  box-shadow: 0 20px 36px -18px rgba(255, 180, 84, 0.4);
}
.service-number {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-bottom: 20px;
  transition: color 0.3s var(--ease);
}
.service-card:hover .service-number {
  color: var(--amber);
}
.service-card > i {
  font-size: 1.4rem;
  color: var(--amber);
  display: block;
  margin-bottom: 16px;
  transition: transform 0.45s var(--ease-spring);
}
.service-card:hover > i {
  transform: scale(1.2) rotate(-10deg);
}
.service-card h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
}
.service-card p {
  font-size: 0.87rem;
}

/* @media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 520px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
} */

/* ---------- 14. CONTACT ---------- */
.contact-box {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  overflow: hidden;
}
.contact-box::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: linear-gradient(to bottom, var(--amber), var(--teal));
}
.contact-content .section-label {
  margin-bottom: 20px;
}
.contact-content h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--text);
}
.contact-content h2 span span {
  color: var(--amber);
}
.contact-content p {
  margin-top: 16px;
  margin-bottom: 30px;
  max-width: 44ch;
  font-size: 1rem;
}

.contact-decoration {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-decoration i {
  font-size: 2.6rem;
  color: var(--amber);
  position: relative;
  z-index: 2;
  transition: transform 0.5s var(--ease-spring);
}
.circle {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed var(--border-strong);
  transition:
    transform 0.8s var(--ease-snap),
    border-color 0.4s var(--ease);
}
.circle-one {
  inset: 0;
}
.circle-two {
  inset: 24px;
}
.contact-box:hover .contact-decoration i {
  transform: translate(6px, -6px) rotate(20deg);
}
.contact-box:hover .circle-one {
  transform: rotate(180deg) scale(1.06);
  border-color: var(--amber);
}
.contact-box:hover .circle-two {
  transform: rotate(-140deg) scale(1.04);
  border-color: var(--teal);
}

/* @media (max-width: 820px) {
  .contact-box {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    text-align: center;
  }
  .contact-content p {
    margin-inline: auto;
  }
  .contact-decoration {
    margin-inline: auto;
  }
} */

/* ---------- 15. FOOTER ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer .logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.footer .logo span:last-child span {
  color: var(--amber);
}
.footer-content > div > p {
  font-size: 0.82rem;
  margin-top: 4px;
}
.footer-socials {
  display: flex;
  gap: 12px;
}
.footer-socials a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition:
    color 0.3s var(--ease),
    border-color 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    background 0.3s var(--ease);
}
.footer-socials a:hover {
  color: var(--amber);
  border-color: var(--amber);
  background: var(--amber-soft);
  transform: translateY(-5px) scale(1.1) rotate(-8deg);
}
.copyright {
  font-size: 0.78rem;
  color: var(--text-faint);
  width: 100%;
  text-align: center;
  margin-top: 24px;
}

/* ---------- 16. BACK TO TOP ---------- */
.back-to-top {
  position: fixed;
  bottom: 28px;
  inset-inline-end: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--amber);
  color: #1a1204;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px -12px rgba(255, 180, 84, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease),
    visibility 0.3s var(--ease);
  z-index: 150;
}
.back-to-top {
  transition:
    opacity 0.3s var(--ease),
    visibility 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    box-shadow 0.3s var(--ease);
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 20px 34px -12px rgba(255, 180, 84, 0.75);
}
.back-to-top:active {
  transform: translateY(-2px) scale(0.95);
}

/* ---------- 17. PROFILE MODAL ---------- */
.profile-modal-content {
  position: relative;
  z-index: 2;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  max-width: 420px;
  width: 100%;
  padding: 40px 32px 32px;
  text-align: center;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.3s var(--ease);
}
.profile-modal.active .profile-modal-content {
  transform: translateY(0) scale(1);
}

.profile-modal-close {
  position: absolute;
  top: 16px;
  inset-inline-end: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    transform 0.4s var(--ease-spring),
    background 0.3s var(--ease);
}
.profile-modal-close:hover {
  border-color: var(--amber);
  color: var(--amber);
  background: var(--amber-soft);
  transform: rotate(90deg) scale(1.1);
}

.profile-modal-image {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin-inline: auto;
  margin-bottom: 20px;
  border: 3px solid var(--amber);
}
.profile-modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-modal-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--amber);
  letter-spacing: 0.03em;
}
.profile-modal-info h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-top: 8px;
}
.profile-modal-info > p {
  font-size: 0.92rem;
  margin-top: 10px;
  margin-bottom: 22px;
}

.profile-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-s);
  font-size: 0.87rem;
}
.contact-item i {
  color: var(--amber);
  width: 16px;
  text-align: center;
}
.contact-item a:hover {
  color: var(--amber);
}

/* ---------- 18. SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.6s var(--ease),
    transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 19. RESPONSIVE GLOBAL ---------- */
/* @media (max-width: 1024px) {
  .container {
    padding-inline: 20px;
  }
}
@media (max-width: 600px) {
  .section-heading {
    margin-bottom: 40px;
  }
  .contact-box {
    border-radius: var(--radius-m);
  }
} */
/* ==========================================================================
   RESPONSIVE STYLESHEET — full range: small phones → tablets → desktop → TV
   Consolidated from source fragments. Duplicate breakpoints merged.
   Mobile-first assumptions noted inline where base styles weren't provided.
   ========================================================================== */

/* --------------------------------------------------------------------------
   ACCESSIBILITY — reduced motion (merged from two separate blocks)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .chart::before,
  .chart::after {
    width: 100%;
    animation: none;
    border-inline-end-color: transparent;
  }
  .chart-point {
    height: var(--bar-h);
    animation: none;
  }
  .stat {
    opacity: 1;
    animation: none;
  }
}

/* Touch devices: hide decorative hover-only elements */
@media (hover: none) {
  body::before {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   LARGE SCREENS / TV (1920px and up)
   Prevent content from stretching edge-to-edge on very wide viewports.
   Assumes .container is your max-width wrapper; adjust the value to match
   your design's intended max content width.
   -------------------------------------------------------------------------- */
@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
    margin-inline: auto;
  }
  body {
    font-size: 1.125rem; /* scale up base type so TV viewing distance stays legible */
  }
  .hero-content {
    max-width: 1600px;
    margin-inline: auto;
  }
}

/* Ultra-wide / 4K TV */
@media (min-width: 2560px) {
  .container {
    max-width: 1900px;
  }
  body {
    font-size: 1.25rem;
  }
}

/* --------------------------------------------------------------------------
   DESKTOP / LARGE TABLET (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .container {
    padding-inline: 20px;
  }
}

/* --------------------------------------------------------------------------
   TABLET (max-width: 960px)
   -------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    position: fixed;
    inset-inline: 0;
    top: 76px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease);
  }
  .nav-menu.active {
    max-height: 520px;
  }
  .nav-link {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-link::after {
    display: none;
  }

  .hero-content {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    max-width: 440px;
    margin-inline: auto;
    margin-top: 24px;
  }
  .floating-card {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   TABLET / SMALL LAPTOP (max-width: 900px)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .certifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --------------------------------------------------------------------------
   TABLET / LARGE MOBILE (max-width: 820px)
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  .contact-box {
    grid-template-columns: 1fr;
    padding: 40px 28px;
    text-align: center;
  }
  .contact-content p {
    margin-inline: auto;
  }
  .contact-decoration {
    margin-inline: auto;
  }
}

/* --------------------------------------------------------------------------
   MOBILE LANDSCAPE / SMALL TABLET (max-width: 720px)
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .section {
    padding-block: 72px;
  }
  .learning-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   MOBILE (max-width: 640px)
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .education-card {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   MOBILE (max-width: 600px)
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  .experience-timeline {
    padding-inline-start: 24px;
  }
  .experience-marker {
    inset-inline-start: -24px;
  }
  .certifications-grid {
    grid-template-columns: 1fr;
  }
  .section-heading {
    margin-bottom: 40px;
  }
  .contact-box {
    border-radius: var(--radius-m);
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE (max-width: 520px)
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  .about-cards {
    grid-template-columns: 1fr;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   SMALL MOBILE (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* --------------------------------------------------------------------------
   EXTRA SMALL MOBILE (max-width: 380px)
   New breakpoint added for very small/older phones (e.g. iPhone SE).
   Tightens spacing and grids further; adjust to match your base styles.
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  .container {
    padding-inline: 14px;
  }
  .skills-grid,
  .services-grid,
  .certifications-grid,
  .about-cards {
    grid-template-columns: 1fr;
  }
  .section {
    padding-block: 48px;
  }
  .hero-visual {
    max-width: 100%;
  }
}
.modal-gallery {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.modal-gallery-img {
  width: 100%;
  display: block;
}

.modal-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  /* keeps the tap target comfortable on touch screens */
  -webkit-tap-highlight-color: transparent;
}

.modal-gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.8);
}

.modal-gallery-prev {
  left: 12px;
}

.modal-gallery-next {
  right: 12px;
}

.modal-gallery-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 12px;
}

/* Tablet and small laptop */
@media (max-width: 768px) {
  .modal-gallery-arrow {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .modal-gallery-prev {
    left: 8px;
  }

  .modal-gallery-next {
    right: 8px;
  }

  .modal-gallery-counter {
    bottom: 8px;
    right: 8px;
    font-size: 11px;
    padding: 2px 8px;
  }
}

/* Phones */
@media (max-width: 480px) {
  .modal-gallery-arrow {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .modal-gallery-prev {
    left: 6px;
  }

  .modal-gallery-next {
    right: 6px;
  }

  .modal-gallery-counter {
    font-size: 10px;
    padding: 2px 7px;
  }
}

/* RTL support: mirror arrow positions when the page is in Arabic (dir="rtl") */
[dir="rtl"] .modal-gallery-prev {
  left: auto;
  right: 12px;
}

[dir="rtl"] .modal-gallery-next {
  right: auto;
  left: 12px;
}

[dir="rtl"] .modal-gallery-counter {
  right: auto;
  left: 12px;
}

@media (max-width: 768px) {
  [dir="rtl"] .modal-gallery-prev {
    right: 8px;
  }
  [dir="rtl"] .modal-gallery-next {
    left: 8px;
  }
  [dir="rtl"] .modal-gallery-counter {
    left: 8px;
  }
}

@media (max-width: 480px) {
  [dir="rtl"] .modal-gallery-prev {
    right: 6px;
  }
  [dir="rtl"] .modal-gallery-next {
    left: 6px;
  }
}
