:root {
  --bg: #080b12;
  --bg2: #0e1420;
  --card: #111827;
  --border: #1e2d45;
  --accent: #38bdf8;
  --accent2: #818cf8;
  --text: #e2e8f0;
  --muted: #64748b;
  --green: #4ade80;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Tajawal', sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

.mono { font-family: 'JetBrains Mono', monospace; color: var(--accent); font-size: 0.9em; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 6%;
  background: transparent;
  transition: background 0.3s, backdrop-filter 0.3s;
}
nav.scrolled {
  background: rgba(8,11,18,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-size: 1.5rem; font-weight: 900; color: var(--text);
  letter-spacing: -1px;
}
.dot { color: var(--accent); }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: 0.95rem; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 8rem 6% 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, #38bdf81a 0%, transparent 60%),
    radial-gradient(ellipse 40% 40% at 20% 80%, #818cf81a 0%, transparent 60%);
  pointer-events: none;
}
.hero-tag {
  display: inline-block;
  background: #4ade8022; border: 1px solid #4ade8044;
  color: var(--green); padding: 0.3rem 1rem;
  border-radius: 50px; font-size: 0.85rem;
  margin-bottom: 1.5rem; width: fit-content;
  animation: fadeUp 0.6s ease both;
}
.hero-name {
  font-size: clamp(3.5rem, 10vw, 7rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: -2px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-name span { color: var(--accent); }
.hero-title {
  font-size: 1.3rem; color: var(--muted);
  margin-top: 0.8rem;
  animation: fadeUp 0.6s 0.2s ease both;
}
.hero-desc {
  max-width: 480px; color: var(--muted);
  margin-top: 1rem; font-size: 1.05rem;
  animation: fadeUp 0.6s 0.3s ease both;
}
.hero-btns {
  display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap;
  animation: fadeUp 0.6s 0.4s ease both;
}
.btn-primary {
  background: var(--accent); color: #080b12;
  padding: 0.75rem 2rem; border-radius: 8px;
  font-weight: 700; font-size: 1rem;
  text-decoration: none; transition: opacity 0.2s, transform 0.2s;
  font-family: 'Tajawal', sans-serif;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn-outline {
  border: 1px solid var(--border); color: var(--text);
  padding: 0.75rem 2rem; border-radius: 8px;
  font-size: 1rem; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
  font-family: 'Tajawal', sans-serif;
}
.btn-outline:hover { border-color: var(--accent); transform: translateY(-2px); }
.hero-stats {
  display: flex; gap: 3rem; margin-top: 3rem;
  animation: fadeUp 0.6s 0.5s ease both;
}
.stat { display: flex; flex-direction: column; }
.stat-num {
  font-size: 2.2rem; font-weight: 900;
  color: var(--accent); line-height: 1;
  font-family: 'JetBrains Mono', monospace;
}
.stat-num::after { content: '+'; font-size: 1.5rem; }
.stat-label { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }

/* ===== SECTIONS ===== */
.section { padding: 6rem 6%; }
.section-label {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent); font-size: 0.85rem;
  margin-bottom: 1rem; opacity: 0.8;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900; margin-bottom: 3rem;
  letter-spacing: -1px;
}

/* ===== ABOUT ===== */
.about { background: var(--bg2); }
.about-grid {
  display: grid; grid-template-columns: auto 1fr;
  gap: 4rem; align-items: start;
}
.about-img { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.avatar {
  width: 160px; height: 160px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; font-weight: 900; color: #080b12;
  font-family: 'JetBrains Mono', monospace;
}
.about-badge {
  background: var(--card); border: 1px solid var(--border);
  padding: 0.4rem 1rem; border-radius: 50px;
  font-size: 0.85rem; color: var(--muted);
}
.about-text h2 { font-size: 2rem; font-weight: 900; margin-bottom: 1rem; }
.about-text h2 span { color: var(--accent); }
.about-text p { color: var(--muted); margin-bottom: 0.8rem; }
.about-info { margin-top: 1.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.info-item { display: flex; flex-direction: column; gap: 0.2rem; }
.info-label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.available { color: var(--green); }

/* ===== SKILLS ===== */
.skills-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
}
.skill-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 1.5rem; border-radius: 12px;
  transition: border-color 0.2s, transform 0.2s;
}
.skill-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.skill-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.skill-name { font-weight: 700; margin-bottom: 0.8rem; }
.skill-bar {
  height: 4px; background: var(--border);
  border-radius: 4px; overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px; width: 0;
  transition: width 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* ===== PROJECTS ===== */
.projects { background: var(--bg2); }
.projects-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.project-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 2rem; border-radius: 16px;
  transition: border-color 0.2s, transform 0.2s;
  display: flex; flex-direction: column; gap: 0.8rem;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-4px); }
.project-card.featured { border-color: var(--accent2); }
.project-top { display: flex; justify-content: space-between; align-items: center; }
.project-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent); font-size: 0.8rem; opacity: 0.6;
}
.project-tag {
  background: #38bdf810; border: 1px solid #38bdf830;
  color: var(--accent); padding: 0.2rem 0.7rem;
  border-radius: 50px; font-size: 0.75rem;
}
.project-card h3 { font-size: 1.2rem; font-weight: 700; }
.project-card p { color: var(--muted); font-size: 0.95rem; flex: 1; }
.project-links { display: flex; gap: 1.5rem; margin-top: 0.5rem; }
.project-links a {
  color: var(--accent); text-decoration: none;
  font-size: 0.9rem; transition: opacity 0.2s;
}
.project-links a:hover { opacity: 0.7; }

/* ===== CONTACT ===== */
.contact-desc { color: var(--muted); margin-top: -1.5rem; margin-bottom: 2.5rem; font-size: 1.05rem; }
.contact-cards { display: flex; gap: 1rem; flex-wrap: wrap; }
.contact-card {
  background: var(--card); border: 1px solid var(--border);
  padding: 1.2rem 2rem; border-radius: 12px;
  text-decoration: none; color: var(--text);
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 1rem; transition: border-color 0.2s, transform 0.2s;
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.contact-icon { font-size: 1.3rem; }

/* ===== FOOTER ===== */
footer {
  text-align: center; padding: 2rem;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.9rem;
}
footer span { color: var(--accent); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.5rem; }
  .nav-links { display: none; }
}
