:root {
  --primary: #7A1022;
  --secondary: #1E3A8A;
  --bg-color: #05050A;
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-hover: rgba(255, 255, 255, 0.1);
  
  --font-ar: 'IBM Plex Sans Arabic', sans-serif;
  --font-en: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-ar);
  background-color: var(--bg-color);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ──────────────────────────────────────────
   Background Calligraphy & Glow
   ────────────────────────────────────────── */
.background-wrapper {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.bg-calligraphy {
  position: absolute;
  inset: -5%; /* Slight bleed for parallax */
  background-image: url('/assets/img/arabic-pattern.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  filter: none;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-color);
  opacity: 0.2; /* Can be changed dynamically via JS */
  transition: opacity 0.3s ease;
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.4;
}

.glow-1 {
  background: var(--primary);
  width: 50vw;
  height: 50vw;
  top: -10vw;
  right: -10vw;
}

.glow-2 {
  background: var(--secondary);
  width: 60vw;
  height: 60vw;
  bottom: -20vw;
  left: -20vw;
}

/* ──────────────────────────────────────────
   Main Layout Container
   ────────────────────────────────────────── */
.links-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Profile Section */
.profile-header {
  text-align: center;
  margin-bottom: 2.5rem;
  width: 100%;
}

.profile-img-container {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--bg-color);
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.profile-bio {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

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

.social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.social-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(122, 16, 34, 0.4);
}

/* ──────────────────────────────────────────
   Links List
   ────────────────────────────────────────── */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Generic Link Block */
.link-block {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1.125rem 1.5rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text-primary);
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.link-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.link-block:hover {
  transform: translateY(-2px);
  background: var(--glass-hover);
  border-color: var(--primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.link-block:hover::before {
  opacity: 1;
}

.link-icon {
  margin-left: 1rem;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.link-content {
  flex: 1;
  text-align: right;
  z-index: 1;
}

.link-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.link-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Project & Article Block */
.card-block {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 1px solid var(--glass-border);
}

.card-content {
  padding: 1.5rem;
}

/* Skeletons */
.skeleton-link {
  height: 64px;
  border-radius: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 0.8; }
  100% { opacity: 0.5; }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.links-footer {
  margin-top: 3rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}
