:root {
  --bg: #0b0f1a;
  --bg-alt: #111827;
  --card: #151d30;
  --card-hover: #1a2440;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --border: #232c44;
  --primary: #4f7cff;
  --primary-2: #22d3ee;
  --gradient: linear-gradient(135deg, #4f7cff, #22d3ee);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="light"] {
  --bg: #eceff4;
  --bg-alt: #e2e7ef;
  --card: #ffffff;
  --card-hover: #f0f4ff;
  --text: #0b1220;
  --text-muted: #3d4c63;
  --border: #aeb9cd;
  --primary: #2f63e0;
  --primary-2: #0b8fb0;
  --gradient: linear-gradient(135deg, #2f63e0, #0b8fb0);
  --shadow: 0 10px 40px rgba(15, 23, 42, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Cairo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Animated automation background */
#particleBg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.container,
.header {
  position: relative;
  z-index: 1;
}

/* Cursor glow following mouse */
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 124, 255, 0.12), transparent 65%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.3s;
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

/* Arabic RTL */
[dir="rtl"] body {
  font-family: "Cairo", "Inter", sans-serif;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: background 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
}

.logo-mark {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.4rem;
}

.nav-links {
  position: relative;
  display: flex;
  gap: 28px;
}

.nav-underline {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(79, 124, 255, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: left 0.5s cubic-bezier(0.22, 1, 0.36, 1), width 0.5s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

.nav-underline.show {
  opacity: 1;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-controls {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

/* HERO */
.hero {
  padding: 90px 0 70px;
  background:
    radial-gradient(600px 300px at 10% 10%, rgba(79, 124, 255, 0.15), transparent 60%),
    radial-gradient(500px 300px at 90% 20%, rgba(34, 211, 238, 0.12), transparent 60%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-block;
  background: rgba(79, 124, 255, 0.12);
  color: var(--primary);
  border: 1px solid rgba(79, 124, 255, 0.35);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

h1 {
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
}

.gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 124, 255, 0.35);
}

.btn-outline {
  border: 1.5px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.hero-stats {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.hero-stats strong {
  display: block;
  font-size: 1.8rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-stats span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ORBIT VISUAL */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.orbit {
  position: relative;
  width: 320px;
  height: 320px;
}

.orbit-core {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 110px;
  height: 110px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  box-shadow: var(--shadow);
  z-index: 2;
}

.orbit-ring {
  position: absolute;
  border: 1.5px solid rgba(79, 124, 255, 0.4);
  border-radius: 50%;
}

.ring1 {
  inset: 30px;
  animation: spin 14s linear infinite;
}

.ring2 {
  inset: 70px;
  border-style: dashed;
  border-color: rgba(34, 211, 238, 0.4);
  animation: spin 20s linear infinite reverse;
}

.orbit-node {
  position: absolute;
  width: 52px;
  height: 52px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow);
}

.node1 { top: 0; left: 135px; }
.node2 { top: 135px; right: 0; }
.node3 { bottom: 0; left: 135px; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* HERO AVATAR (beside name) */
.hero-heading {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
}

.hero-avatar {
  position: relative;
  flex-shrink: 0;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  padding: 4px;
  background: var(--gradient);
  box-shadow: 0 8px 30px rgba(79, 124, 255, 0.35);
  animation: glowPulse 3s ease-in-out infinite;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg);
  display: block;
}

.hero-avatar .status-dot {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: #22c55e;
  border: 3px solid var(--bg);
  border-radius: 50%;
  z-index: 3;
  animation: glowPulse 2s ease-in-out infinite;
}

.hero-heading h1 {
  margin-bottom: 0;
  font-size: 2.5rem;
  line-height: 1.15;
}

.greet {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.name {
  display: block;
}

.role-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

@media (max-width: 480px) {
  .hero-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .hero-heading h1 {
    font-size: 2rem;
  }
}

/* ===== Robot head automation animation ===== */
.robot {
  position: relative;
  width: 200px;
  height: 220px;
  margin: 0 auto;
  direction: ltr;
  animation: robotFloat 3.5s ease-in-out infinite;
}

@keyframes robotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.r-face {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 120px;
  background: linear-gradient(160deg, #1c2740, #101a30);
  border: 2.5px solid var(--primary);
  border-radius: 26px;
  box-shadow: 0 0 35px rgba(79, 124, 255, 0.25), inset 0 0 30px rgba(79, 124, 255, 0.06);
  position: relative;
  overflow: hidden;
}

.r-ant {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 24px var(--primary);
  animation: antPulse 2s ease-in-out infinite;
}

@keyframes antPulse {
  0%, 100% { box-shadow: 0 0 18px var(--primary); }
  50% { box-shadow: 0 0 34px var(--primary); opacity: 0.9; }
}

.r-ant::after {
  content: "";
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 18px;
  background: var(--primary);
}

.r-ear {
  position: absolute;
  top: 76px;
  width: 18px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(160deg, #1c2740, #101a30);
  border: 2px solid var(--primary);
}

.r-ear-l { left: 4px; }
.r-ear-r { right: 4px; }

.r-eye {
  position: absolute;
  top: 44px;
  width: 26px;
  height: 16px;
  border-radius: 10px;
  background: var(--primary-2);
  box-shadow: 0 0 18px var(--primary-2);
  animation: robotBlink 3.6s infinite;
}

.re1 { left: 34px; }
.re2 { right: 34px; }

@keyframes robotBlink {
  0%, 90%, 100% { transform: scaleY(1); opacity: 1; }
  93% { transform: scaleY(0.1); opacity: 0.7; }
}

.r-mouth {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 54px;
  height: 5px;
  border-radius: 4px;
  background: var(--primary);
  animation: robotMouth 2.4s ease-in-out infinite;
}

@keyframes robotMouth {
  0%, 100% { width: 54px; opacity: 1; }
  50% { width: 30px; opacity: 0.6; }
}

.r-scan {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.8), transparent);
  animation: robotScan 2.8s ease-in-out infinite;
  z-index: 3;
}

@keyframes robotScan {
  0%, 100% { top: 40px; opacity: 0.3; }
  50% { top: 118px; opacity: 1; }
}

/* Light mode adjustments for the robot */
[data-theme="light"] .r-face {
  background: linear-gradient(160deg, #dfe8fb, #cbd9f4);
  box-shadow: 0 0 30px rgba(47, 99, 224, 0.2), inset 0 0 24px rgba(47, 99, 224, 0.06);
  border-color: #2f63e0;
}

[data-theme="light"] .r-ear {
  background: linear-gradient(160deg, #dfe8fb, #cbd9f4);
  border-color: #2f63e0;
}

[data-theme="light"] .r-scan {
  background: linear-gradient(90deg, transparent, rgba(11, 143, 176, 0.55), transparent);
}

[data-theme="light"] .r-ant {
  background: #2f63e0;
  box-shadow: 0 0 24px rgba(47, 99, 224, 0.5);
}

[data-theme="light"] .r-ant::after {
  background: #2f63e0;
}

[data-theme="light"] .r-mouth {
  background: #2f63e0;
}

[data-theme="light"] .r-eye {
  background: #0b8fb0;
  box-shadow: 0 0 18px rgba(11, 143, 176, 0.7);
}

/* Light mode contrast tweaks */
[data-theme="light"] .hero {
  background:
    radial-gradient(600px 300px at 10% 10%, rgba(47, 99, 224, 0.09), transparent 60%),
    radial-gradient(500px 300px at 90% 20%, rgba(11, 143, 176, 0.08), transparent 60%);
}

[data-theme="light"] .hero-stats strong {
  color: #2f63e0;
}

[data-theme="light"] .tech-tags span {
  background: rgba(47, 99, 224, 0.09);
  border-color: rgba(47, 99, 224, 0.4);
  color: #2f63e0;
}

[data-theme="light"] .wf-node:hover,
[data-theme="light"] .flow-node.active {
  box-shadow: 0 0 24px rgba(47, 99, 224, 0.3);
}

[data-theme="light"] .btn-outline {
  border-color: #aeb9cd;
  color: #0b1220;
}

[data-theme="light"] .btn-outline:hover {
  border-color: #2f63e0;
  color: #2f63e0;
}

[data-theme="light"] .cursor-glow {
  background: radial-gradient(circle, rgba(47, 99, 224, 0.12), transparent 65%);
}

[data-theme="light"] .section-alt {
  background: #e1e6ee;
}

[data-theme="light"] .card,
[data-theme="light"] .about-card,
[data-theme="light"] .contact-box {
  border: 1px solid #9fabc0;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.09);
}

[data-theme="light"] .header {
  background: rgba(236, 239, 244, 0.92);
  border-bottom: 1px solid #9fabc0;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .footer {
  background: #e1e6ee;
  border-top: 1px solid #9fabc0;
  color: #3d4c63;
}

[data-theme="light"] .info-item {
  border: 1px solid #9fabc0;
}

[data-theme="light"] .flow-line {
  background: #9fabc0;
}

[data-theme="light"] .wf-node {
  border: 1.5px solid #9fabc0;
}

[data-theme="light"] .nav-links a {
  color: #3d4c63;
}

[data-theme="light"] .nav-links a:hover {
  color: #2f63e0;
}

[data-theme="light"] .nav-underline {
  box-shadow: 0 0 10px rgba(47, 99, 224, 0.45);
}

[data-theme="light"] .icon-btn {
  background: #ffffff;
  border-color: #aeb9cd;
  color: #0b1220;
}

[data-theme="light"] .hamburger span {
  background: #0b1220;
}

[data-theme="light"] .social-link {
  background: #ffffff;
  border-color: #aeb9cd;
  color: #0b1220;
}

[data-theme="light"] .social-link:hover {
  border-color: #2f63e0;
  color: #2f63e0;
}

[data-theme="light"] .lead,
[data-theme="light"] .section-sub,
[data-theme="light"] .card p,
[data-theme="light"] .contact-box p {
  color: #3d4c63;
}

[data-theme="light"] .badge {
  background: rgba(47, 99, 224, 0.1);
  border-color: rgba(47, 99, 224, 0.4);
  color: #2f63e0;
}

[data-theme="light"] .chip {
  border-color: #9fabc0;
  color: #3d4c63;
}

[data-theme="light"] .chip:hover {
  border-color: #2f63e0;
  color: #2f63e0;
}

[data-theme="light"] .console-output {
  background: #eef1f6;
  border-color: #9fabc0;
}

[data-theme="light"] .flow-node {
  border-color: #9fabc0;
}

[data-theme="light"] .wf-node small {
  color: #3d4c63;
}

[data-theme="light"] .wf-grid-dot {
  fill: #9fabc0;
}

[data-theme="light"] .tech-tags span {
  background: rgba(47, 99, 224, 0.09);
  border-color: rgba(47, 99, 224, 0.4);
  color: #2f63e0;
}

[data-theme="light"] .status-dot {
  border-color: #eceff4;
}

[data-theme="light"] .hero-avatar {
  border-color: #ffffff;
}

@media (max-width: 480px) {
  .robot {
    transform: scale(0.85);
  }
}

/* Scroll down indicator */
.scroll-down-wrap {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.scroll-down {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}

.scroll-down:hover {
  color: var(--primary);
}

.mouse {
  width: 26px;
  height: 42px;
  border: 2px solid var(--text-muted);
  border-radius: 16px;
  display: flex;
  justify-content: center;
  padding-top: 7px;
  transition: border-color 0.2s;
}

.scroll-down:hover .mouse {
  border-color: var(--primary);
}

.wheel {
  width: 4px;
  height: 9px;
  background: var(--primary);
  border-radius: 4px;
  animation: wheelScroll 1.6s ease-in-out infinite;
}

@keyframes wheelScroll {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(12px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

.scroll-hint {
  font-size: 0.78rem;
  font-weight: 600;
}

.scroll-down:hover .scroll-hint {
  color: var(--primary);
}

/* AUTOMATION FLOW ANIMATION */
.flow-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 40px 0 30px;
  flex-wrap: wrap;
}

.flow-node {
  position: relative;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
  min-width: 150px;
}

.flow-step {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
}

.flow-name {
  font-weight: 700;
}

.flow-desc {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.flow-node.active {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(79, 124, 255, 0.4);
  transform: scale(1.06);
}

.flow-icon {
  font-size: 2rem;
}

.flow-line {
  position: relative;
  width: 110px;
  height: 3px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.flow-particle {
  position: absolute;
  top: 50%;
  inset-inline-start: -14px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 12px rgba(79, 124, 255, 0.8);
  opacity: 0;
  animation: travelDot 1.6s linear infinite;
}

.flow-particle.p2 {
  animation-delay: 0.8s;
}

@keyframes travelDot {
  0%   { inset-inline-start: -14px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { inset-inline-start: 100%; opacity: 0; }
}

/* ===== Thinking Brain Agent node ===== */
.brain-node { min-width: 185px; padding-bottom: 14px; }
.brain-wrap { width: 150px; height: 150px; margin: 2px auto 0; }
.brain-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.brain-synapse line {
  stroke: rgba(34, 211, 238, 0.45);
  stroke-width: 1.3;
  animation: brainSyn 2.6s ease-in-out infinite;
}
@keyframes brainSyn { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.95; } }
.brain-neuron {
  fill: #22d3ee;
  transform-box: fill-box;
  transform-origin: center;
  animation: brainNeu 2.6s ease-in-out infinite;
}
@keyframes brainNeu { 0%, 100% { transform: scale(0.7); opacity: 0.4; } 50% { transform: scale(1.3); opacity: 1; } }
.brain-core { animation: brainCore 2.6s ease-in-out infinite; }
@keyframes brainCore {
  0%, 100% { filter: drop-shadow(0 0 12px rgba(79, 124, 255, 0.55)); }
  50% { filter: drop-shadow(0 0 26px rgba(34, 211, 238, 0.95)); }
}
.brain-ring {
  fill: none;
  stroke: rgba(34, 211, 238, 0.7);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: brainRing 2s ease-out infinite;
}
.brain-ring2 { animation-delay: 1s; }
@keyframes brainRing { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.45); opacity: 0; } }
.brain-thoughts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 6px;
}
.brain-thoughts span {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
  color: var(--primary-2);
  background: var(--card);
  opacity: 0;
  animation: brainTh 4s linear infinite;
}
.brain-thoughts span:nth-child(2) { animation-delay: 1.33s; }
.brain-thoughts span:nth-child(3) { animation-delay: 2.66s; }
@keyframes brainTh {
  0%, 8% { opacity: 0; transform: translateY(4px); }
  16%, 78% { opacity: 1; transform: translateY(0); box-shadow: 0 0 8px rgba(34, 211, 238, 0.3); border-color: rgba(34, 211, 238, 0.6); }
  92%, 100% { opacity: 0; transform: translateY(-4px); }
}
.brain-node.active .brain-core { animation-duration: 1.1s; }
.brain-node.active .brain-synapse line { stroke: rgba(34, 211, 238, 0.85); }
.brain-node.active .brain-thoughts span { animation-duration: 1.4s; }

/* Pipeline stagger reveal */
.pipe .pipe-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 0.12s);
}

.pipe.in .pipe-in {
  opacity: 1;
  transform: translateY(0);
}

.pipe .pipe-in:nth-child(1) { --i: 0; }
.pipe .pipe-in:nth-child(2) { --i: 1; }
.pipe .pipe-in:nth-child(3) { --i: 2; }
.pipe .pipe-in:nth-child(4) { --i: 3; }
.pipe .pipe-in:nth-child(5) { --i: 4; }

.pipe .flow-node.active {
  transform: scale(1.06);
  transition-delay: 0s;
}

.flow-console {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.console-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  font-family: "Cairo", "Inter", monospace;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: color 0.3s;
}

.console-output.success {
  color: #22c55e;
  border-color: rgba(34, 197, 94, 0.4);
}

.flow-console .btn {
  margin: 0 auto;
}

/* SECTIONS */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.section-sub {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 48px;
}

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.about-card p {
  margin-bottom: 16px;
}

.about-card p:last-child {
  margin-bottom: 0;
}

.about-info {
  display: grid;
  gap: 12px;
}

.info-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.info-item span {
  color: var(--text-muted);
}

.edu-block {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.info-item .edu-main {
  font-size: 1rem;
  color: #ffffff;
}

.info-item .edu-sub {
  font-size: 0.78rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

[data-theme="light"] .info-item .edu-main {
  color: #0b1220;
}

/* CARDS */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tech-tags span {
  background: rgba(79, 124, 255, 0.1);
  border: 1px solid rgba(79, 124, 255, 0.3);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ===== END CSS ===== */

/* MARQUEE */
.marquee {
  margin-top: 34px;
  overflow: hidden;
  direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 14px;
}

.marquee-group span {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.25s ease, background-color 0.25s ease;
}

.marquee-group span:hover {
  color: var(--primary);
  background: rgba(79, 124, 255, 0.1);
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
  }
  .marquee-group {
    flex-wrap: wrap;
  }
  .flow-particle {
    animation: none;
    opacity: 1;
    inset-inline-start: calc(50% - 7px);
  }
  .brain-synapse line,
  .brain-neuron,
  .brain-core,
  .brain-ring,
  .brain-thoughts span {
    animation: none;
  }
  .brain-thoughts span { opacity: 1; }
}

/* CONTACT */
.contact-box {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 60px 40px;
  box-shadow: var(--shadow);
}

.contact-box p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.contact-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.social-row {
  margin-top: 20px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.social-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

/* FOOTER */
.footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

  .hero-visual {
    order: -1;
  }

  h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 20px 24px;
    gap: 18px;
  }

  .nav-underline {
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* ===== Scroll reveal animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-left.reveal-visible {
  transform: translateX(0);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-right.reveal-visible {
  transform: translateX(0);
}

.reveal-zoom {
  transform: scale(0.9);
}

.reveal-zoom.reveal-visible {
  transform: scale(1);
}

/* ===== Mouse hover animations ===== */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

.card {
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card .card-icon {
  display: inline-block;
  transition: transform 0.4s ease;
}

.card:hover .card-icon {
  transform: scale(1.2) rotate(-10deg);
}

.social-link {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.social-link:hover {
  transform: translateY(-4px) rotate(-4deg);
  box-shadow: 0 8px 20px rgba(79, 124, 255, 0.3);
}

.nav-links a {
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-links a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
