:root {
  --bg: #f8f9fb;
  --bg2: #ffffff;
  --card: #ffffff;
  --border: #e2e8f0;
  --accent: #1e40af;
  --accent-light: #dbeafe;
  --accent2: #0891b2;
  --accent2-light: #cffafe;
  --accent3: #16a34a;
  --accent3-light: #dcfce7;
  --text: #0f172a;
  --muted: #64748b;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
}

* { 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;
}

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 6%;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: rgba(248,249,251,0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-logo { font-size: 1.4rem; font-weight: 900; color: var(--accent); }
.dot { color: var(--accent2); }
.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;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
  display: flex; align-items: center;
  padding: 7rem 6% 4rem;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr auto;
  gap: 3rem; align-items: center; width: 100%; max-width: 1100px; margin: 0 auto;
}
.hero-tag {
  display: inline-block;
  background: #ffffff22; border: 1px solid #ffffff33;
  color: #86efac; padding: 0.3rem 1rem;
  border-radius: 50px; font-size: 0.85rem;
  margin-bottom: 1.2rem; width: fit-content;
}
.hero-text h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900; line-height: 1.05;
  color: #fff; letter-spacing: -2px;
}
.hero-text h1 span { color: #93c5fd; }
.hero-title { font-size: 1.2rem; color: #bfdbfe; margin-top: 0.5rem; }
.hero-desc { max-width: 480px; color: #93c5fd; margin-top: 1rem; font-size: 0.95rem; }
.hero-btns { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.btn-primary {
  background: #fff; color: var(--accent);
  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.9; transform: translateY(-2px); }
.btn-outline {
  border: 2px solid #ffffff55; color: #fff;
  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: #fff; transform: translateY(-2px); }

/* Hero card */
.hero-card {
  background: #ffffff15; border: 1px solid #ffffff25;
  backdrop-filter: blur(10px);
  border-radius: 20px; padding: 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
  min-width: 220px;
}
.avatar-circle {
  width: 100px; height: 100px;
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 900; color: var(--accent);
}
.hero-card-info { display: flex; flex-direction: column; gap: 0.6rem; width: 100%; }
.card-item { color: #bfdbfe; font-size: 0.9rem; display: flex; align-items: center; gap: 0.4rem; }

/* ===== SECTIONS ===== */
.section { padding: 6rem 6%; max-width: 1100px; margin: 0 auto; }
.section-label { color: var(--accent); font-size: 0.85rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 0.5rem; text-transform: uppercase; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 900; margin-bottom: 2.5rem; letter-spacing: -0.5px; }

/* ===== ABOUT ===== */
.about { padding-top: 5rem; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 1rem; font-size: 1rem; }
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.stat-box {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.3rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s;
}
.stat-box:hover { transform: translateY(-3px); border-color: var(--accent); }
.stat-icon { font-size: 1.5rem; }
.stat-title { font-weight: 700; font-size: 0.95rem; }
.stat-sub { color: var(--muted); font-size: 0.8rem; }

/* ===== SKILLS ===== */
.skills-sec { background: #f1f5f9; border-radius: 24px; }
.skills-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.skills-col-title { font-size: 1rem; font-weight: 700; color: var(--accent); margin-bottom: 1.2rem; }
.skill-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.6rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.95rem; color: var(--text);
}
.skill-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
}
.skill-dot.accent2 { background: var(--accent2); }
.skill-dot.accent3 { background: var(--accent3); }

/* ===== EDUCATION ===== */
.edu-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem;
  display: flex; gap: 2rem; align-items: start;
  box-shadow: var(--shadow); margin-bottom: 3rem;
  border-right: 4px solid var(--accent);
}
.edu-year {
  background: var(--accent-light); color: var(--accent);
  padding: 0.4rem 1rem; border-radius: 8px;
  font-weight: 700; font-size: 0.95rem; white-space: nowrap; height: fit-content;
}
.edu-info h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.4rem; }
.edu-uni { color: var(--muted); margin-bottom: 0.8rem; }
.edu-badge {
  display: inline-block;
  background: var(--accent-light); color: var(--accent);
  padding: 0.25rem 0.8rem; border-radius: 50px; font-size: 0.85rem; font-weight: 700;
}
.lang-section { margin-top: 1rem; }
.lang-cards { display: flex; gap: 1rem; margin-top: 1rem; }
.lang-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.2rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
  box-shadow: var(--shadow); transition: transform 0.2s;
}
.lang-card:hover { transform: translateY(-2px); }
.lang-flag { font-size: 1.8rem; }
.lang-name { font-weight: 700; }
.lang-level { color: var(--muted); font-size: 0.85rem; }

/* ===== CONTACT ===== */
.contact-sec { background: linear-gradient(135deg, #1e3a8a, #1e40af); border-radius: 24px; color: #fff; max-width: 100%; padding: 6rem 8%; }
.contact-sec .section-label { color: #93c5fd; }
.contact-sec .section-title { color: #fff; }
.contact-desc { color: #bfdbfe; margin-top: -1.5rem; margin-bottom: 2.5rem; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.contact-card {
  background: #ffffff15; border: 1px solid #ffffff25;
  border-radius: 14px; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  text-decoration: none; color: #fff;
  transition: background 0.2s, transform 0.2s;
}
.contact-card:hover { background: #ffffff25; transform: translateY(-3px); }
.contact-icon { font-size: 1.5rem; }
.contact-label { color: #93c5fd; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }
.contact-val { font-weight: 700; font-size: 0.95rem; word-break: break-all; }

/* ===== 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); font-weight: 700; }

/* ===== REVEAL ===== */
.reveal { opacity: 0; transform: translateY(25px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { display: none; }
  .about-grid, .skills-wrapper { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .edu-card { flex-direction: column; gap: 1rem; }
}
