/* ============================================
   HOSSAM HAMED PORTFOLIO — Final v3
   Luxury Dark · Gold Accent · Minimal Elegance
   ============================================ */

:root {
  --black: #0a0a0a;
  --black-2: #111111;
  --black-3: #1a1a1a;
  --black-4: #222222;
  --surface: rgba(255, 255, 255, 0.05);
  --surface-2: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.10);
  --border-2: rgba(255, 255, 255, 0.18);
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --gold-dim: rgba(201, 168, 76, 0.25);
  --gold-glow: rgba(201, 168, 76, 0.12);
  --white: #ffffff;
  --text-1: #f2ede4;
  --text-2: #b8b0a0;
  --text-3: #756d60;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --nav-h: 72px;
  --section-py: 120px;
  --container: 1200px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--text-1);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}
ul,
ol {
  list-style: none;
}
input,
textarea,
select {
  font: inherit;
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
}
.section {
  padding: var(--section-py) 0;
  position: relative;
}

/* ===== TYPOGRAPHY ===== */
.section-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(42px, 5vw, 72px);
  font-weight: 300;
  line-height: 1.05;
  color: var(--text-1);
  letter-spacing: -0.01em;
}
.section-title em {
  font-style: italic;
  color: var(--gold);
}
.section-header {
  margin-bottom: 80px;
}
.portfolio-subtitle {
  font-size: 15px;
  color: var(--text-2);
  margin-top: 20px;
  max-width: 480px;
}

/* ===== REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.8s var(--ease-out),
    transform 0.8s var(--ease-out);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: var(--gold);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  transition:
    background 0.25s,
    color 0.25s,
    transform 0.2s;
}
.btn-primary:hover {
  background: transparent;
  color: var(--gold);
  transform: translateY(-1px);
}
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border-2);
  transition:
    border-color 0.25s,
    color 0.25s,
    transform 0.2s;
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-1px);
}

.nav-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
  /* Logo has black bg, invert slightly on dark bg */
  filter: brightness(1.1);
  transition: opacity 0.2s;
}
.nav-logo:hover .nav-logo-img {
  opacity: 0.85;
}
.footer-logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.05);
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 900;
  transition:
    background 0.4s,
    border-color 0.4s;
}
.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.2s;
}
.nav-logo:hover {
  opacity: 0.8;
}
.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-link {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s var(--ease-out);
}
.nav-link:hover {
  color: var(--text-1);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-cv {
  flex-shrink: 0;
  margin-left: 12px;
  padding: 9px 20px;
  font-size: 12px;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-1);
  transition:
    transform 0.3s,
    opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}
.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 24px 40px 32px;
  background: rgba(10, 10, 10, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  gap: 0;
  transform: translateY(-8px);
  opacity: 0;
  transition:
    transform 0.3s var(--ease-out),
    opacity 0.3s;
}
.nav-mobile.open {
  transform: translateY(0);
  opacity: 1;
}
.nav-mobile-link {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.2s;
}
.nav-mobile-link:hover {
  color: var(--gold);
}
.nav-mobile-cv {
  margin-top: 24px;
  text-align: center;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  position: relative;
  padding-top: var(--nav-h);
  overflow: hidden;
}
.hero-bg-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.bg-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--border) 20%,
    var(--border) 80%,
    transparent
  );
}
.bg-line:nth-child(1) {
  left: 25%;
}
.bg-line:nth-child(2) {
  left: 50%;
}
.bg-line:nth-child(3) {
  left: 75%;
}
.bg-line:nth-child(4) {
  left: 12.5%;
}
.hero-inner {
  padding: 80px 0 80px 40px;
  max-width: 680px;
  margin-left: calc((100vw - var(--container)) / 2);
  padding-left: 40px;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--gold-dim);
  background: var(--gold-glow);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 40px;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.3);
  }
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(72px, 9vw, 128px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text-1);
  margin-bottom: 32px;
}
.hero-name em {
  font-style: italic;
  color: var(--gold);
}
.hero-title-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.hero-line {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: var(--gold);
}
.hero-title {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  white-space: nowrap;
}
.hero-platforms {
  margin-bottom: 48px;
}
.platform-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-2);
  transition: border-color 0.25s, background 0.25s, color 0.25s, transform 0.2s;
}
.platform-badge:hover {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
  color: var(--gold);
  transform: translateY(-2px);
}
.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hero-profile {
  padding: 80px 40px 80px 0;
  position: relative;
  z-index: 2;
  margin-right: calc((100vw - var(--container)) / 2);
}
.profile-frame {
  position: relative;
  width: 380px;
  height: 480px;
}
.profile-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  filter: grayscale(15%);
  transition: filter 0.4s;
}
.profile-frame:hover img {
  filter: grayscale(0%);
}
.profile-frame::before {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: 10px;
  left: 10px;
  border: 1px solid var(--gold-dim);
  z-index: -1;
  transition: transform 0.3s;
}
.profile-frame:hover::before {
  transform: translate(4px, 4px);
}
.profile-glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 60px;
  background: radial-gradient(ellipse, var(--gold-dim) 0%, transparent 70%);
  pointer-events: none;
}
.profile-tag {
  position: absolute;
  bottom: -18px;
  left: -24px;
  background: var(--black-3);
  border: 1px solid var(--border-2);
  padding: 12px 18px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  white-space: nowrap;
}
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: float-hint 2.5s ease-in-out infinite;
}
.scroll-arrow {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--gold));
}
@keyframes float-hint {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ===== STATS ===== */
.stats-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.stats {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  padding: 56px 20px;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;

  /* تأثير hover ناعم */
  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.02);
}

.stat-item + .stat-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: var(--border);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 400; /* خليتها أوضح شوية */
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-plus {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold);
  margin-left: 4px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  max-width: 220px;
  line-height: 1.6;
}
/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-lead {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-1);
  margin-bottom: 24px;
}
.about-body {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 20px;
}
.about-body strong {
  color: var(--gold);
  font-weight: 500;
}
.about-text .btn-primary {
  margin-top: 16px;
}
.skills-heading {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 28px;
}
.skills-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.skill-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.skill-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.02em;
}
.skill-pct {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.04em;
  font-family: var(--font-display);
}
.skill-bar {
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: visible;
}
.skill-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transition: width 1.2s var(--ease-out);
}
.skill-fill.animated {
  width: var(--w);
}

/* ===== SERVICES ===== */
.services-section {
  background: var(--black-2);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--black-2);
  padding: 48px 40px;
  position: relative;
  transition: background 0.3s;
}
.service-card:hover {
  background: var(--black-3);
}
.service-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 300;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  transition: color 0.3s;
}
.service-card:hover .service-num {
  color: var(--gold) !important;
}
.service-icon-wrap {
  color: var(--text-3);
  margin-bottom: 20px;
  transition: color 0.3s;
  height: 44px;
  display: flex;
  align-items: center;
}
.service-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 12px;
  line-height: 1.3;
}
.service-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 24px;
}
.service-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.service-tags span {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 4px 10px;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.service-card:hover .service-tags span {
  color: var(--gold);
  border-color: var(--gold-dim);
}

/* ===== PLUGIN ===== */
.plugin-section {
  overflow: hidden;
}
.plugin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.plugin-mockup {
  position: relative;
}
.plugin-window {
  border: 1px solid var(--border-2);
  background: var(--black-3);
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5);
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--black-4);
  border-bottom: 1px solid var(--border);
}
.w-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.w-dot:nth-child(1) {
  background: #ff5f57;
}
.w-dot:nth-child(2) {
  background: #ffbd2e;
}
.w-dot:nth-child(3) {
  background: #28c840;
}
.w-url {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
}
.window-body img {
  width: 100%;
  display: block;
}
.plugin-stats-row {
  display: flex;
  border-top: 1px solid var(--border);
}
.p-stat {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  font-size: 12px;
  color: var(--text-2);
  border-right: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.p-stat:last-child {
  border-right: none;
}
.plugin-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text-2);
  margin: 24px 0 32px;
}
.plugin-desc strong {
  color: var(--gold);
  font-weight: 500;
}
.plugin-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}
.plugin-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}

/* ===== PORTFOLIO ===== */
.portfolio-section {
  padding-bottom: 0;
}
.portfolio-section .section-header {
  padding: 0 40px;
}
.portfolio-section .container {
  padding-bottom: 0;
}
.masonry-grid {
  column-count: 4;
  column-gap: 4px;
  padding: 0;
  margin-top: 60px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 4px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
}
.masonry-item img {
  width: 100%;
  display: block;
  transition:
    transform 0.5s var(--ease-out),
    filter 0.4s;
  filter: grayscale(10%);
  /* Faster load: no lazy placeholder blur */
}
.masonry-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.35s;
}
.masonry-item:hover img {
  transform: scale(1.03);
  filter: grayscale(0%);
}
.masonry-item:hover::after {
  opacity: 1;
}
.masonry-item:nth-child(4n + 1) img {
  aspect-ratio: 4/3;
  object-fit: cover;
}
.masonry-item:nth-child(4n + 2) img {
  aspect-ratio: 3/4;
  object-fit: cover;
}
.masonry-item:nth-child(4n + 3) img {
  aspect-ratio: 16/9;
  object-fit: cover;
}
.masonry-item:nth-child(4n + 4) img {
  aspect-ratio: 1/1;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox[hidden] {
  display: none;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-content img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid var(--border-2);
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  font-size: 28px;
  color: var(--text-2);
  transition: color 0.2s;
}
.lightbox-close:hover {
  color: var(--gold);
}
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  padding: 16px;
  color: var(--text-2);
  transition: color 0.2s;
}
.lightbox-prev {
  left: 24px;
}
.lightbox-next {
  right: 24px;
}
.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--gold);
}

/* ===== TIMELINE ===== */
.timeline-section {
  background: var(--black-2);
}

.timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Vertical connector line */
.timeline::before {
  content: "";
  position: absolute;
  left: 160px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--gold-dim) 5%,
    var(--gold-dim) 95%,
    transparent
  );
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0 48px;
  padding-bottom: 40px;
  align-items: start;
}
.timeline-item:last-child {
  padding-bottom: 0;
}

/* Date column */
.timeline-date {
  text-align: right;
  padding-right: 24px;
  padding-top: 20px;
  position: relative;
}
.timeline-date-text {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--gold);
  line-height: 1.4;
}

/* Dot — bigger, more visible */
.timeline-dot {
  position: absolute;
  right: -7px;
  top: 24px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--black-2);
  transition: background 0.3s, box-shadow 0.35s, transform 0.3s;
  z-index: 1;
}
.timeline-item:hover .timeline-dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow), 0 0 16px var(--gold-dim);
  transform: scale(1.15);
}

/* Card column */
.timeline-card {
  padding: 24px 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    border-color 0.3s,
    background 0.3s,
    transform 0.3s,
    box-shadow 0.3s;
  position: relative;
}
.timeline-item:hover .timeline-card {
  border-color: var(--border-2);
  background: var(--surface-2);
  transform: translateX(6px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.timeline-card.current {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}
.timeline-card.current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gold);
}

/* Tag */
.tl-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 3px 10px;
  margin-bottom: 12px;
  transition: color 0.3s, border-color 0.3s;
}
.timeline-item:hover .tl-tag {
  color: var(--text-2);
  border-color: var(--border-2);
}
.tl-tag.active {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

/* Card content */
.timeline-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 6px;
  line-height: 1.3;
}
.tl-company {
  font-size: 12px;
  color: var(--gold);
  margin-bottom: 12px;
  letter-spacing: 0.06em;
  font-weight: 500;
  text-transform: uppercase;
}
.tl-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-2);
}
.tl-desc strong {
  color: var(--gold);
  font-weight: 500;
}

/* ===== TESTIMONIALS ===== */
.testimonials-section {
  background: var(--black);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  padding: 36px 32px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    border-color 0.3s,
    background 0.3s;
  position: relative;
}
.testimonial-card:hover {
  border-color: var(--gold-dim);
  background: var(--surface-2);
}
.testi-quote {
  margin-bottom: 20px;
}
.testi-text {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text-1);
  margin-bottom: 28px;
  font-style: italic;
}
.testi-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testi-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}
.testi-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 2px;
}
.testi-role {
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.testi-stars {
  margin-left: auto;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 2px;
  flex-shrink: 0;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 64px;
  align-items: start;
}
.contact-intro {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-1);
  margin-bottom: 40px;
}
.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.contact-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 1px;
  transition: background 0.25s, border-color 0.25s;
}
.contact-channel:hover {
  background: var(--surface-2);
  border-color: var(--gold-dim);
}
.channel-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black-4);
  flex-shrink: 0;
  transition: background 0.25s, color 0.25s;
}
/* Brand colors on hover per channel */
.contact-channel:hover .channel-icon-wa { background: rgba(37,211,102,0.15); color: #25d366; }
.contact-channel:hover .channel-icon-li { background: rgba(10,102,194,0.15); color: #0a66c2; }
.contact-channel:hover .channel-icon-gh { background: rgba(255,255,255,0.08); color: var(--text-1); }
.contact-channel:hover .channel-icon-em { background: var(--gold-glow); color: var(--gold); }
.channel-icon svg { transition: color 0.25s; }
/* Default icon colors */
.channel-icon-wa { color: #25d366; }
.channel-icon-li { color: #0a66c2; }
.channel-icon-gh { color: var(--text-2); }
.channel-icon-em { color: var(--gold); }
.channel-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 2px;
}
.channel-value {
  font-size: 14px;
  color: var(--text-1);
}
.channel-arrow {
  margin-left: auto;
  color: var(--text-3);
  flex-shrink: 0;
  transition: color 0.2s, transform 0.2s;
}
.contact-channel:hover .channel-arrow {
  color: var(--gold);
  transform: translate(2px, -2px);
}

/* ===== STEPPER FORM ===== */
.contact-form-wrap {
  background: var(--black-2);
  border: 1px solid var(--border);
  padding: 36px 40px 32px;
}

/* Stepper header */
.wa-stepper {
  margin-bottom: 32px;
  position: relative;
}
.wa-steps-row {
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.wa-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 25%;
}
.wa-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  background: var(--black-4);
  color: var(--text-3);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease-out);
  position: relative;
  z-index: 2;
}
.wa-step-dot.active {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow);
}
.wa-step-dot.completed {
  background: #4ade80;
  color: var(--black);
  border-color: #4ade80;
}
.wa-chk { width: 14px; height: 14px; }
.hidden { display: none !important; }
.wa-step-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  text-align: center;
  transition: color 0.3s;
}
.wa-step-label.active {
  color: var(--gold);
  font-weight: 600;
}
.wa-step-label.completed {
  color: #4ade80;
}
.wa-progress-track {
  position: absolute;
  top: 18px;
  left: 12.5%;
  right: 12.5%;
  height: 1px;
  background: var(--border);
  z-index: 1;
}
.wa-progress-fill {
  position: absolute;
  top: 0; left: 0; right: auto; height: 100%;
  background: var(--gold);
  transition: width 0.5s var(--ease-out);
}

/* Step content */
.wa-step-content {
  min-height: 220px;
  animation: waFadeIn 0.35s ease forwards;
}
@keyframes waFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.wa-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.wa-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.wa-field-row .wa-field {
  margin-bottom: 0;
}
.wa-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.wa-input {
  background: var(--black-3);
  border: 1px solid var(--border);
  color: var(--text-1);
  padding: 12px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  width: 100%;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.wa-input:focus {
  border-color: var(--gold);
}
.wa-input.error {
  border-color: #f87171;
}
textarea.wa-input {
  resize: vertical;
  min-height: 100px;
}
select.wa-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23756d60' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
select.wa-input option {
  background: var(--black-3);
}
.wa-err {
  font-size: 11px;
  color: #f87171;
  letter-spacing: 0.04em;
}

/* Nav buttons */
.wa-nav-btns {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}
.wa-btn-prev {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--font-body);
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.wa-btn-prev:hover { color: var(--text-1); border-color: var(--border-2); }
.wa-btn-prev.invisible { visibility: hidden; pointer-events: none; }
.wa-btn-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 28px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--text-1);
  border: 1px solid var(--text-1);
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}
.wa-btn-next:hover { background: var(--gold); border-color: var(--gold); transform: translateY(-1px); }
.wa-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  border: 1px solid var(--gold);
  font-family: var(--font-body);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}
.wa-btn-submit:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-1px); }

/* Success message */
.wa-success {
  text-align: center;
  padding: 60px 20px;
  animation: waFadeIn 0.4s ease forwards;
}
.wa-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: #4ade80;
}
.wa-success-icon svg { width: 28px; height: 28px; }
.wa-success h3 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--text-1);
  margin-bottom: 8px;
}
.wa-success p {
  font-size: 14px;
  color: var(--text-2);
}
.wa-form { position: relative; }

/* ===== FOOTER ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-brand {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 12px;
}
.footer-brand p {
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: 0.05em;
}
.footer-copy {
  font-size: 12px;
  color: var(--text-3);
}
.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--gold);
}

/* ===== FLOATING CTA ===== */
.floating-cta {
  position: fixed;
  bottom: 32px;
  right: 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 800;
}
.float-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  background: var(--black-3);
  color: var(--text-2);
  transition:
    background 0.25s,
    color 0.25s,
    border-color 0.25s,
    transform 0.2s;
}
.float-btn:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
  transform: scale(1.08);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: 32px;
  left: 32px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
  cursor: pointer;
  z-index: 800;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.25s, color 0.25s, border-color 0.25s;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

/* ===== CUSTOM CURSOR ===== */
@media (pointer: fine) {
  body { cursor: none; }
  .cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--gold);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, width 0.2s, height 0.2s, background 0.2s;
  }
  .cursor-ring {
    width: 32px;
    height: 32px;
    border: 1px solid var(--gold-dim);
    border-radius: 50%;
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out), border-color 0.25s, left 0.08s linear, top 0.08s linear;
  }
  body.cursor-hover .cursor-dot {
    width: 10px;
    height: 10px;
    background: var(--gold-light);
  }
  body.cursor-hover .cursor-ring {
    width: 48px;
    height: 48px;
    border-color: var(--gold);
  }
  a, button, .masonry-item, .service-card, .platform-badge, .timeline-card { cursor: none; }
}

/* ===== TIMELINE DOT — scroll-activated glow ===== */
.timeline-dot {
  position: absolute;
  right: -7px;
  top: 24px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--gold-dim);
  background: var(--black-2);
  transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.3s;
  z-index: 1;
}
.timeline-item.tl-active .timeline-dot {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow), 0 0 18px var(--gold-dim);
}
.timeline-item:hover .timeline-dot {
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-glow), 0 0 16px var(--gold-dim);
  transform: scale(1.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .nav-links {
    gap: 20px;
  }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-inner {
    margin-left: 0;
    padding: 80px 40px 60px;
    max-width: 100%;
  }
  .hero-profile {
    display: none;
  }
  .hero-scroll-hint {
    display: none;
  }
  /* hero-profile بيظهر تاني في موبايل عبر override في 600px */
  .masonry-grid {
    column-count: 3;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .plugin-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .plugin-visual {
    order: -1;
  }
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --section-py: 80px;
  }
  .container {
    padding: 0 24px;
  }
  .nav-inner {
    padding: 0 24px;
  }
  .nav-links,
  .nav-cv {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
  .nav-mobile {
    display: flex;
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .wa-field-row {
    grid-template-columns: 1fr;
  }
  .contact-form-wrap {
    padding: 28px 24px 24px;
  }

  /* ===== Hero profile — موبايل ===== */
  .hero-profile {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 20px 40px;
    margin-right: 0;
    order: -1;
  }
  .profile-frame {
    width: 160px !important;
    height: 200px !important;
  }
  .profile-frame img {
    width: 160px !important;
    height: 200px !important;
  }
  .profile-glow { display: none; }
  .profile-tag {
    font-size: 10px;
    padding: 6px 12px;
    margin-top: 12px;
  }

  /* ===== Stats Section ===== */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* إزالة الخط العمودي */
  .stat-item + .stat-item::before {
    display: none;
  }

  /* إضافة خط أفقي بين الصفوف */
  .stat-item:nth-child(n + 3)::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: var(--border);
  }
  /* ===== End Stats ===== */

  .contact-form-wrap {
    padding: 32px 24px;
  }
  .timeline {
    max-width: 100%;
  }
  .timeline::before {
    left: 120px;
  }
  .timeline-item {
    grid-template-columns: 120px 1fr;
    gap: 0 32px;
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  :root {
    --section-py: 60px;
  }
  .container {
    padding: 0 20px;
  }
  .hero-name {
    font-size: 58px;
  }
  .hero-title {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  .services-grid {
    grid-template-columns: 1fr;
  }

  /* ===== Hero profile — موبايل ===== */
  .hero-profile {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 0 20px 40px;
    margin-right: 0;
    order: -1;
  }
  .profile-frame {
    width: 160px !important;
    height: 200px !important;
  }
  .profile-frame img {
    width: 160px !important;
    height: 200px !important;
  }
  .profile-glow { display: none; }
  .profile-tag {
    font-size: 10px;
    padding: 6px 12px;
    margin-top: 12px;
  }

  /* ===== Stats Section ===== */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* إزالة كل الخطوط */
  .stat-item::before {
    display: none !important;
  }

  .stat-item {
    padding: 24px 0;
  }

  .stat-num {
    font-size: 44px;
  }

  .stat-plus {
    font-size: 22px;
  }

  .stat-label {
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  /* ===== End Stats ===== */

  .timeline::before {
    left: 0;
  }
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0;
    padding-left: 24px;
    padding-bottom: 36px;
  }
  .timeline::before {
    left: 0;
  }
  .timeline-dot {
    left: -30px;
    right: auto;
    top: 4px;
  }
  .timeline-date {
    text-align: left;
    padding-right: 0;
    padding-top: 0;
    padding-bottom: 10px;
  }
  .timeline-card {
    padding: 18px 16px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .footer-links {
    justify-content: center;
  }
  .section-title {
    font-size: 38px;
  }
  .contact-form-wrap {
    padding: 24px 20px;
  }
  .portfolio-section .section-header {
    padding: 0 20px;
  }
}


/* ===================================================
   MOBILE HORIZONTAL SLIDER — max-width: 600px
   Overrides masonry layout on small screens
=================================================== */
@media (max-width: 600px) {
  .masonry-grid {
    column-count: unset !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px 16px;
    margin-top: 32px;
    cursor: grab;
  }
  .masonry-grid::-webkit-scrollbar { display: none; }
  .masonry-grid:active { cursor: grabbing; }

  .masonry-item {
    flex: 0 0 72vw;
    max-width: 280px;
    scroll-snap-align: start;
    break-inside: unset;
    margin-bottom: 0;
    border-radius: 8px;
  }

  .masonry-item img {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    aspect-ratio: unset !important;
  }

  /* progress + hint — injected by JS */
  .portfolio-slider-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    margin-top: 10px;
  }
  .slider-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.1);
    border-radius: 999px;
    overflow: hidden;
  }
  .slider-progress-fill {
    height: 100%;
    background: var(--gold, #c9a84c);
    border-radius: 999px;
    width: 4%;
    transition: width 0.15s linear;
  }
  .slider-progress-text {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: var(--text-3, #888);
    min-width: 40px;
    text-align: right;
  }
  .slider-drag-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    margin-bottom: 8px;
    opacity: 1;
    transition: opacity 0.4s;
  }
  .slider-drag-hint.hidden { opacity: 0; pointer-events: none; }
  .slider-drag-hint span {
    font-size: 11px;
    font-family: 'Courier New', monospace;
    color: var(--text-3, #888);
    letter-spacing: 0.08em;
  }
  .drag-arr {
    width: 22px; height: 1px;
    background: #888;
    position: relative;
    display: inline-block;
  }
  .drag-arr::after {
    content: '';
    position: absolute;
    right: 0; top: -3px;
    width: 6px; height: 6px;
    border-right: 1px solid #888;
    border-bottom: 1px solid #888;
    transform: rotate(-45deg);
  }
}

/* Active nav link */
.nav-link.active { color: var(--text-1); }
.nav-link.active::after { width: 100%; }
