@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
  --bg: #050505;
  --surface: #111318;
  --surface-2: #1a1d23;
  --text: #f7f7f7;
  --muted: #9ca3af;
  --accent: #22c55e;
  --accent-2: #34d399;
  --accent-glow: rgba(34, 197, 94, 0.22);
  --border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --link: #8b5cf6;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Tajawal', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.nav-inner { max-width: 1400px; }

/* Navigation - Sticky */
nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-links a:hover {
  color: #fff;
  background: rgba(34, 197, 94, 0.12);
}

/* Hero */
.hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 35%, black 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p {
  color: var(--muted);
  font-size: 1.2rem;
  margin-top: 24px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #02120a;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.18);
}
.link-view {
  color: var(--link);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.link-view:hover { color: #a78bfa; }

/* Section */
.section { padding: 80px 0; }
.section-header { margin-bottom: 48px; text-align: center; }
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}
.section-header p {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: 12px;
}

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

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.card p {
  color: var(--muted);
  font-size: 0.95rem;
}
.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-2);
  border-radius: 12px;
  font-size: 1.25rem;
  margin-bottom: 18px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.12);
  color: var(--accent-2);
}

/* Table */
.table-wrapper { overflow-x: auto; margin: 24px 0; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 14px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  position: sticky;
  top: 0;
}
tr:hover td { background: rgba(255,255,255,0.02); }
td { color: var(--muted); font-size: 0.95rem; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}
.pagination button {
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.pagination button.active {
  background: var(--accent);
  color: #02120a;
  border-color: var(--accent);
  font-weight: 700;
}
.pagination button:hover:not(.active):not(.disabled) {
  border-color: rgba(255,255,255,0.2);
}
.pagination .disabled { opacity: 0.4; cursor: not-allowed; }
.pagination .info {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 8px;
}

/* Code card */
.code-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.code-card .code {
  font-family: ui-monospace, monospace;
  font-size: 1rem;
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: inline-block;
  margin-bottom: 8px;
}
.code-card h3 { font-size: 1.05rem; margin-bottom: 6px; color: #fff; }
.code-card p { color: var(--muted); font-size: 0.9rem; }

/* Search box */
.search-box { position: relative; margin-bottom: 32px; }
.search-box .input {
  width: 60%;
  padding: 14px 16px;
  padding-right: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
}
.search-box .input::placeholder { color: var(--muted); }
.search-box button {
  position: absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  padding: 0 22px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #02120a;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

/* Detail card */
.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.detail-row:last-child { border-bottom: none; }
.detail-label { color: var(--muted); font-weight: 600; }
.detail-value { color: #fff; font-weight: 700; text-align: right; }

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 24px;
  font-weight: 600;
}
.back-link:hover { color: var(--accent-2); }

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
  color: var(--muted);
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 48px;
}
.footer-brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
}
.footer-desc {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--muted);
}
.footer-col h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col a:hover { color: var(--accent-2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}

@media (max-width: 1420px) {
  body::before, body::after,
  .hero::after, .section::after {
    display: none !important;
  }
}

/* No results */
.no-results { text-align: center; padding: 40px; color: var(--muted); }

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #02120a;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: opacity 0.2s;
  box-shadow: 0 4px 16px var(--accent-glow);
}
.scroll-top.visible { display: flex; }

/* Side vertical lines */
body::before,
body::after {
  content: "";
  position: fixed;
  top: 0;
  bottom: 0;
  width: 0.5px;
  background: #555;
  z-index: 3;
  pointer-events: none;
}
body::before { left: calc(50% - 700px); }
body::after { right: calc(50% - 700px); }

/* Section horizontal dividers */
.hero,
.section {
  position: relative;
}
.hero::after,
.section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: calc(50% - 700px);
  right: calc(50% - 700px);
  height: 0.5px;
  background: #555;
  pointer-events: none;
}

/* Blog card styles */
.blog-card { margin-bottom: 24px; }
.blog-card .blog-meta {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 10px;
}
.blog-category {
  background: var(--accent);
  color: #02120a;
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 700;
}
.blog-post-header {
  margin-bottom: 24px;
}
.blog-post-header h1 {
  font-size: 2rem;
  margin-bottom: 12px;
  background: linear-gradient(90deg, #fff 0%, #6ee7b7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.blog-author {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}
.blog-content {
  line-height: 1.8;
  color: var(--muted);
}
.blog-content h2 {
  font-size: 1.5rem;
  margin: 24px 0 16px;
  color: #fff;
}
.blog-content p {
  margin-bottom: 16px;
}
.blog-content ul, .blog-content ol {
  margin: 16px 0;
  padding-right: 32px;
}
.blog-content li {
  margin-bottom: 8px;
}

/* Projects grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.project-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.project-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.project-category {
  display: inline-block;
  background: var(--accent);
  color: #02120a;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.project-desc {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.project-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #02120a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
}
.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}
.service-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.service-price {
  color: var(--accent-2);
  font-weight: 700;
}
