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

:root {
  --bg: #04050a;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-hover: rgba(255, 255, 255, 0.09);
  --accent: #6ee7ff;
  --accent2: #a78bfa;
  --accent3: #34d399;
  --text: #f0f4ff;
  --muted: rgba(240, 244, 255, 0.45);
  --blur: blur(28px);
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Cairo', sans-serif !important;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  cursor: none;
  line-height: 1.6;
  transition: opacity 0.35s ease;
}

/* ── PREMIUM SCROLLBAR ── */
::-webkit-scrollbar {
  width: 10px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(110, 231, 255, 0.15);
  border-radius: 10px;
  border: 2px solid #04050a;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(110, 231, 255, 0.4);
}

/* ── AMBIENT PARTICLES ── */
#ambient-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
    scale: 1;
  }

  90% {
    opacity: 1;
    scale: 1;
  }

  100% {
    transform: translateY(-10vh) scale(0);
    opacity: 0;
  }
}

/* ── GRAIN OVERLAY ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  animation: grainShift 0.8s steps(2) infinite;
}

@keyframes grainShift {

  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-2px, 1px);
  }

  50% {
    transform: translate(2px, -1px);
  }

  75% {
    transform: translate(-1px, 2px);
  }
}

#about,
#todi,
#skills,
#projects,
#contact {
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}

/* ── AMBIENT PARTICLES ── */
#ambient-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  animation: floatUp linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
    scale: 1;
  }

  90% {
    opacity: 1;
    scale: 1;
  }

  100% {
    transform: translateY(-10vh) scale(0);
    opacity: 0;
  }
}

/* ── CURSOR ── */
#cursor {
  position: fixed;
  z-index: 9999;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: exclusion;
  transition: transform 0.15s ease, width 0.3s, height 0.3s, background 0.3s;
}

#cursor-ring {
  position: fixed;
  z-index: 9998;
  width: 40px;
  height: 40px;
  border: 1.5px solid rgba(110, 231, 255, 0.4);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.35s cubic-bezier(.23, 1, .32, 1), width 0.3s, height 0.3s, border-color 0.3s;
  transform: translate(-50%, -50%);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4, 5, 10, 0.3);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── LANG TOGGLE ── */
#langToggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: rgba(110, 231, 255, 0.06);
  border: 1px solid rgba(110, 231, 255, 0.2);
  color: var(--accent);
  font-family: 'Cairo', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.3s, border-color 0.3s, transform 0.2s;
  flex-shrink: 0;
}

#langToggle:hover {
  background: rgba(110, 231, 255, 0.12);
  border-color: rgba(110, 231, 255, 0.4);
  transform: scale(1.04);
}

/* hide/show by language */
[data-lang] {
  display: none;
}

html[lang="ar"] [data-lang="ar"] {
  display: revert;
}

html[lang="en"] [data-lang="en"] {
  display: revert;
}

html[lang="ar"] .en-only {
  display: none;
}

html[lang="en"] .ar-only {
  display: none;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

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

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

/* ── BACKGROUND BLOBS ── */
.blob-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: blobFloat 14s ease-in-out infinite;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: #6ee7ff;
  top: -20%;
  left: -10%;
  animation-delay: 0s;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #a78bfa;
  bottom: -10%;
  right: -5%;
  animation-delay: -5s;
}

.blob-3 {
  width: 350px;
  height: 350px;
  background: #34d399;
  top: 40%;
  left: 40%;
  animation-delay: -9s;
}

@keyframes blobFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(40px, -30px) scale(1.05);
  }

  66% {
    transform: translate(-20px, 25px) scale(0.97);
  }
}

/* ── SECTIONS ── */
section {
  position: relative;
  z-index: 1;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 0;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2rem;
  backdrop-filter: var(--blur);
  opacity: 0;
  transform: translateY(20px);
}

.hero-tag-dot {
  width: 6px;
  height: 6px;
  background: var(--accent3);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

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

  50% {
    opacity: 0.5;
    transform: scale(1.5)
  }
}

.hero-title {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  opacity: 0;
}

.hero-title .line {
  display: block;
  overflow: hidden;
}

.hero-title .line-inner {
  display: block;
  transform: translateY(110%);
}

.grad-text {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 50%, var(--accent3) 100%, var(--accent) 150%);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 6s ease-in-out infinite alternate;
}

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

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

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-weight: 400;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.8;
  margin-bottom: 3.5rem;
  opacity: 0;
  transform: translateY(20px);
}

.hero-photo-wrap {
  width: clamp(120px, 20vw, 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 4px;
  margin-bottom: 1.7rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  box-shadow: 0 10px 40px rgba(110, 231, 255, 0.2);
  opacity: 0;
  transform: translateY(22px) scale(0.96);
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 50%;
  display: block;
  background: #0e1018;
}

.hero-photo-fallback {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--text);
  background: radial-gradient(circle at 30% 20%, rgba(110, 231, 255, 0.35), rgba(16, 17, 27, 1) 62%);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2.2rem;
  border-radius: 100px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: var(--blur);
  transition: background 0.3s, border-color 0.3s, transform 0.25s, box-shadow 0.3s;
  cursor: none;
  position: relative;
  overflow: hidden;
}

.btn-glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background: radial-gradient(circle at 50% 0%, rgba(110, 231, 255, 0.08), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-glass:hover::after {
  opacity: 1;
}

.btn-glass:hover {
  background: var(--glass-hover);
  border-color: rgba(110, 231, 255, 0.35);
  transform: translateY(-3px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.15), rgba(167, 139, 250, 0.15));
  border-color: rgba(110, 231, 255, 0.4);
}

.btn-primary:hover {
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.28), rgba(167, 139, 250, 0.28));
  box-shadow: 0 0 32px rgba(110, 231, 255, 0.18), 0 0 60px rgba(167, 139, 250, 0.1);
  border-color: rgba(110, 231, 255, 0.6);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top
  }

  50% {
    transform: scaleY(1);
    transform-origin: top
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom
  }
}

/* ── STORY SECTIONS ── */
.story-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 4rem;
}

.story-inner {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.story-inner.reverse {
  direction: ltr;
}

.story-inner.reverse>* {
  direction: rtl;
}

.story-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.story-title {
  font-size: clamp(1.6rem, 7vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

.story-body {
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.9;
}

/* MOUSE SPOTLIGHT GLOW */
.glass-card::after,
.proj-card::after,
.skill-card::after,
.todi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.4s ease;
  background: radial-gradient(600px circle at var(--mouse-x, 0) var(--mouse-y, 0),
      rgba(255, 255, 255, 0.06),
      transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.glass-card:hover::after,
.proj-card:hover::after,
.skill-card:hover::after,
.todi-card:hover::after {
  opacity: 1;
}

/* ── GLASS CARD ── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.4s, transform 0.35s, box-shadow 0.4s;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 24px rgba(0, 0, 0, 0.3);
}

.glass-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle at 50% 0%, rgba(110, 231, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.glass-card:hover {
  border-color: rgba(110, 231, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px rgba(110, 231, 255, 0.06);
}

.glass-card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(110, 231, 255, 0.4));
}

.glass-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.glass-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── TODI FEATURE ── */
.todi-card {
  background: linear-gradient(160deg, rgba(110, 231, 255, 0.07), rgba(167, 139, 250, 0.07) 50%, rgba(52, 211, 153, 0.04));
  border-radius: 36px;
  padding: 3rem;
  backdrop-filter: var(--blur);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 48px rgba(110, 231, 255, 0.1), 0 0 80px rgba(167, 139, 250, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  /* animated gradient border */
  border: 1px solid transparent;
  background-clip: padding-box;
}

.todi-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 36px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.3), rgba(167, 139, 250, 0.25), rgba(52, 211, 153, 0.15), rgba(110, 231, 255, 0.3));
  background-size: 300% 300%;
  animation: todiGradBorder 6s ease infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes todiGradBorder {

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

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

.todi-card::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 70%;
  height: 70%;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.1), transparent 65%);
  pointer-events: none;
  animation: todiGlow 8s ease-in-out infinite alternate;
}

@keyframes todiGlow {
  0% {
    opacity: 0.6;
    transform: translate(0, 0);
  }

  100% {
    opacity: 1;
    transform: translate(-10%, 10%);
  }
}

.todi-logo {
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.todi-tagline {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 2rem;
}

.todi-tags {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.tag {
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}

.tag.accent {
  background: rgba(110, 231, 255, 0.1);
  border-color: rgba(110, 231, 255, 0.3);
  color: var(--accent);
}

.todi-stat {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-box {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}

.stat-label {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.todi-tax-badge {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  background: rgba(110, 231, 255, 0.05);
  border: 1px solid rgba(110, 231, 255, 0.15);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

.todi-tax-badge:hover {
  background: rgba(110, 231, 255, 0.08);
  border-color: rgba(110, 231, 255, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 4px 20px rgba(110, 231, 255, 0.08);
  transform: translateY(-2px);
}

.todi-tax-badge .tax-icon {
  font-size: 1.1rem;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

/* ── SKILLS ── */
#skills {
  padding: 10rem 0;
  overflow: hidden;
}

.skills-header-wrap {
  padding: 0 4rem;
}

/* Standard Grid Container */
#skills-scroll {
  width: 100%;
  margin-top: 4rem;
  padding: 0 4rem;
}

#skills-track {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.skill-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: var(--blur);
  transition: border-color 0.35s, transform 0.35s, box-shadow 0.35s;
  cursor: none;
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 20px rgba(0, 0, 0, 0.25);
}

.skill-card:hover {
  border-color: rgba(110, 231, 255, 0.3);
  transform: translateY(-8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(110, 231, 255, 0.07);
}

.skill-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.skill-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.skill-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  min-width: 80px;
}

.skill-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 100px;
  overflow: hidden;
}

.skill-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  width: 0;
  transition: width 1.5s cubic-bezier(.23, 1, .32, 1);
}

/* ── SECTION DIVIDER ── */
.section-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.12) 20%, rgba(167, 139, 250, 0.12) 50%, rgba(110, 231, 255, 0.12) 80%, transparent);
  transform: scaleX(0);
  transform-origin: center;
  margin: 0;
}

/* ── PROJECTS ── */
#projects {
  padding: 10rem 4rem;
}

.projects-grid {
  max-width: 1100px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.proj-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.8rem 2.5rem;
  backdrop-filter: var(--blur);
  transition: border-color 0.4s cubic-bezier(.23, 1, .32, 1), transform 0.4s cubic-bezier(.23, 1, .32, 1), box-shadow 0.4s;
  cursor: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 4px 24px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.proj-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(110, 231, 255, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}

.proj-card:hover {
  border-color: rgba(110, 231, 255, 0.25);
  transform: translateY(-10px) scale(1.01);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(110, 231, 255, 0.07);
}

.proj-card:hover::before {
  opacity: 1;
}

.proj-card.featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.06), rgba(167, 139, 250, 0.06));
  border-color: rgba(110, 231, 255, 0.15);
}

/* Smart T-Shirt gets purple accent distinguishing it */
.proj-card.smart-tshirt {
  border-color: rgba(167, 139, 250, 0.15);
}

.proj-card.smart-tshirt:hover {
  border-color: rgba(167, 139, 250, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(167, 139, 250, 0.1);
}

.proj-emoji {
  font-size: 2.5rem;
  margin-bottom: 1.2rem;
  display: block;
}

.proj-name {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.proj-desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.proj-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
}

.proj-link:hover {
  gap: 0.7rem;
}

/* ── CONTACT ── */
#contact {
  padding: 10rem 4rem;
  text-align: center;
}

.contact-card {
  max-width: 750px;
  margin: 4rem auto 0;
  background: var(--glass);
  border: 1px solid rgba(110, 231, 255, 0.08);
  border-radius: 32px;
  padding: 5rem 3.5rem;
  backdrop-filter: var(--blur);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.contact-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 231, 255, 0.06), transparent 70%);
  pointer-events: none;
}

.contact-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

.contact-sub {
  color: var(--muted);
  margin-bottom: 3rem;
  font-size: 1rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s;
  cursor: none;
}

.social-link:hover {
  background: rgba(110, 231, 255, 0.08);
  border-color: rgba(110, 231, 255, 0.3);
  color: var(--accent);
  transform: translateY(-3px);
}

.social-icon {
  font-size: 1rem;
}

/* ── SECTION HEADERS ── */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.section-title {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--glass-border);
  padding: 2rem 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── DIVIDER ── */
.divider {
  width: 60px;
  height: 3px;
  margin: 2rem auto;
  background: linear-gradient(90deg, var(--accent), var(--accent2), transparent);
  border-radius: 100px;
  transform: scaleX(0);
  transform-origin: left;
}

html[dir="ltr"] .divider {
  transform-origin: left;
}

html[dir="rtl"] .divider {
  transform-origin: right;
}

/* ── HORIZONTAL MARQUEE ── */
.marquee-wrap {
  overflow: hidden;
  padding: 3rem 0;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 25s linear infinite;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(240, 244, 255, 0.15);
  white-space: nowrap;
}

.marquee-item span {
  color: var(--accent);
  opacity: 0.4;
}

@keyframes marquee {
  from {
    transform: translateX(0)
  }

  to {
    transform: translateX(-50%)
  }
}

/* ── REVEAL CLASSES ── */
.reveal,
.reveal-left,
.reveal-right {
  opacity: 0;
  will-change: transform, opacity;
}

.reveal {
  transform: translateY(40px);
}

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

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

/* Section header clip-path reveal */
.section-header .section-tag,
.section-header .section-title {
  clip-path: inset(0 0 100% 0);
  transform: translateY(20px);
  opacity: 0;
}

/* ── LIQUID SHAPE ── */
.liquid-blob {
  position: absolute;
  pointer-events: none;
  animation: liquidMorph 12s ease-in-out infinite;
}

@keyframes liquidMorph {

  0%,
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }

  25% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }

  50% {
    border-radius: 50% 60% 40% 30% / 40% 50% 60% 50%;
  }

  75% {
    border-radius: 70% 30% 50% 40% / 30% 40% 60% 70%;
  }
}

/* ── ABOUT PARALLAX SECTION ── */
#about {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  contain-intrinsic-size: unset;
}

.about-parallax-bg {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  background:
    radial-gradient(ellipse 80% 60% at 70% 50%, rgba(110, 231, 255, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 30%, rgba(167, 139, 250, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 80%, rgba(52, 211, 153, 0.05) 0%, transparent 60%);
  will-change: transform;
}

.about-parallax-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 231, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 231, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  will-change: transform;
}

.about-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 4rem;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 6rem;
  align-items: center;
}

/* Photo side */
.about-photo-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-photo-frame {
  position: relative;
  width: clamp(260px, 35vw, 420px);
  aspect-ratio: 3/4;
}

.about-photo-glow {
  position: absolute;
  inset: -20px;
  border-radius: 40px;
  background: linear-gradient(135deg, rgba(110, 231, 255, 0.2), rgba(167, 139, 250, 0.2), rgba(52, 211, 153, 0.1));
  filter: blur(30px);
  animation: photoGlow 6s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes photoGlow {
  0% {
    opacity: 0.6;
    transform: scale(0.95);
  }

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

.about-photo-border {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2), var(--accent3));
  padding: 3px;
  z-index: 1;
}

.about-photo-inner {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #0a0d16;
}

.about-photo-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 30px;
  transition: transform 0.6s cubic-bezier(.23, 1, .32, 1);
}

.about-photo-frame:hover .about-photo-inner img {
  transform: scale(1.04);
}

.about-photo-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: var(--bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 0.5rem 1.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  backdrop-filter: var(--blur);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(110, 231, 255, 0.15);
}

.about-photo-orbits {
  position: absolute;
  inset: -40px;
  z-index: 0;
  pointer-events: none;
}

.about-orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(110, 231, 255, 0.12);
}

.about-orbit-1 {
  inset: 0;
  animation: orbitSpin 18s linear infinite;
}

.about-orbit-2 {
  inset: 20px;
  border-color: rgba(167, 139, 250, 0.1);
  animation: orbitSpin 24s linear infinite reverse;
}

.about-orbit-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -4px;
  left: 50%;
  margin-left: -4px;
}

.about-orbit-1 .about-orbit-dot {
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.about-orbit-2 .about-orbit-dot {
  background: var(--accent2);
  box-shadow: 0 0 10px var(--accent2);
}

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

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

/* Content side */
.about-content-col {
  direction: rtl;
}

.about-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

.about-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.about-headline {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.about-hook {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  padding: 1.4rem 1.6rem;
  border-right: 3px solid var(--accent);
  background: linear-gradient(90deg, transparent, rgba(110, 231, 255, 0.05));
  border-radius: 0 12px 12px 0;
}

.about-body {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 2rem;
}

/* Study Timeline */
.study-timeline {
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.study-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: var(--blur);
  transition: border-color 0.3s, transform 0.3s;
}

.study-item:hover {
  border-color: rgba(110, 231, 255, 0.2);
  transform: translateX(-4px);
}

.study-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.study-info {
  flex: 1;
}

.study-degree {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.study-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.study-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  background: rgba(110, 231, 255, 0.1);
  border: 1px solid rgba(110, 231, 255, 0.25);
  color: var(--accent);
  white-space: nowrap;
  align-self: center;
}

/* About Stats */
.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.about-stat {
  text-align: center;
  padding: 1.2rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: var(--blur);
  transition: border-color 0.3s;
}

.about-stat:hover {
  border-color: rgba(110, 231, 255, 0.25);
  box-shadow: 0 10px 30px rgba(110, 231, 255, 0.05);
}

.about-stat-num {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

@media (max-width: 980px) {
  nav {
    padding: 1rem 1.2rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 7rem 1.5rem 5rem;
  }

  .about-photo-frame {
    width: clamp(220px, 70vw, 320px);
  }

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

  .story-section,
  #projects,
  #contact {
    padding: 5rem 1.2rem;
  }

  .btn-glass {
    padding: 0.8rem 1.6rem;
    font-size: 0.85rem;
  }

  /* Mobile formatting */
  #skills {
    padding: 6rem 0;
  }

  #skills-scroll {
    padding: 0 1.2rem;
  }

  .skills-header-wrap {
    padding: 0 1.2rem;
  }

  .story-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-card {
    padding: 3rem 1.5rem;
    border-radius: 24px;
    margin-top: 2rem;
  }

  footer {
    padding: 1.2rem;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  .about-stat:last-child {
    grid-column: 1 / -1;
  }

  .todi-stat {
    grid-template-columns: 1fr 1fr;
  }

  .todi-stat .stat-box:last-child {
    grid-column: 1 / -1;
  }

  .todi-tax-badge {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

@media (pointer: coarse),
(hover: none) {
  body {
    cursor: auto;
  }

  #cursor,
  #cursor-ring {
    display: none;
  }

  .btn-glass,
  .skill-card,
  .proj-card,
  .social-link {
    cursor: pointer;
  }
}

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

  * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════
       🤖 ROBOT ANIMATIONS
    ══════════════════════════════════════════════ */

/* Container for all floating robots */
.robots-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* Base robot SVG wrapper */
.robot-float {
  position: absolute;
  will-change: transform, opacity;
  opacity: 0.55;
  filter: drop-shadow(0 0 18px rgba(110, 231, 255, 0.45));
  cursor: pointer;
  /* JS owns transform; CSS animates only glow */
  animation: robotGlow 4s ease-in-out infinite;
}

/* Robot 1 — top left, large, slow drift */
.robot-1 {
  width: clamp(60px, 8vw, 110px);
  top: 8%;
  left: 5%;
  animation: robotGlow1 5s ease-in-out infinite;
  animation-delay: 0s;
  opacity: 0.45;
}

/* Robot 2 — top right, smaller, faster */
.robot-2 {
  width: clamp(40px, 5vw, 75px);
  top: 15%;
  right: 8%;
  animation: robotGlow2 3.8s ease-in-out infinite;
  animation-delay: -1.5s;
  opacity: 0.38;
  filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.5));
}

/* Robot 3 — bottom left, tiny, orbiting */
.robot-3 {
  width: clamp(30px, 4vw, 55px);
  bottom: 15%;
  left: 12%;
  animation: robotGlow3 6s ease-in-out infinite;
  animation-delay: -3s;
  opacity: 0.3;
  filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.5));
}

/* Robot 4 — middle right, drifter */
.robot-4 {
  width: clamp(45px, 6vw, 85px);
  top: 50%;
  right: 4%;
  animation: robotGlow2 4.5s ease-in-out infinite;
  animation-delay: -2s;
  opacity: 0.32;
}

/* Glow pulse animations — CSS only animates opacity & filter, JS owns transform */
@keyframes robotGlow {

  0%,
  100% {
    opacity: 0.55;
    filter: drop-shadow(0 0 18px rgba(110, 231, 255, 0.45));
  }

  50% {
    opacity: 0.7;
    filter: drop-shadow(0 0 28px rgba(110, 231, 255, 0.75));
  }
}

@keyframes robotGlow1 {

  0%,
  100% {
    opacity: 0.45;
    filter: drop-shadow(0 0 18px rgba(110, 231, 255, 0.4));
  }

  50% {
    opacity: 0.65;
    filter: drop-shadow(0 0 30px rgba(110, 231, 255, 0.8));
  }
}

@keyframes robotGlow2 {

  0%,
  100% {
    opacity: 0.38;
    filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.4));
  }

  50% {
    opacity: 0.58;
    filter: drop-shadow(0 0 24px rgba(167, 139, 250, 0.75));
  }
}

@keyframes robotGlow3 {

  0%,
  100% {
    opacity: 0.3;
    filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.4));
  }

  50% {
    opacity: 0.5;
    filter: drop-shadow(0 0 20px rgba(52, 211, 153, 0.75));
  }
}

/* ══════════════════════════════════════════════
       🏆 ROWAD MASR — INITIATIVE BADGE
    ══════════════════════════════════════════════ */
.study-badge.initiative {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.study-item.initiative-item {
  border-color: rgba(52, 211, 153, 0.15);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.04), var(--glass));
}

.study-item.initiative-item:hover {
  border-color: rgba(52, 211, 153, 0.3);
}

/* ══════════════════════════════════════════════
       ⚡ GPU COMPOSITING & PRODUCTION SMOOTHNESS
    ══════════════════════════════════════════════ */
.blob,
.robot-float,
.about-photo-inner img,
.todi-card,
.hero-photo-wrap,
#skills-track,
.about-parallax-bg,
.about-parallax-grid {
  will-change: transform;
}

/* Prevent subpixel layout shifts on animated elements */
.hero-title .line-inner,
.reveal,
.reveal-left,
.reveal-right {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Smoother scroll snap feel */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* Stronger text rendering for titles */
.hero-title,
.story-title,
.about-headline,
.section-title {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Nav backdrop blur — stronger/smoother */
nav {
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}