
/* =========================
   Design tokens
   ========================= */

:root {
  --bg: #f5f7f7;
  --fg: #202525;
  --muted: #667373;
  --card: #ffffff;
  --surface: #e8eeee;
  --accent: #69d6d6;
  --accent-fg: #202525;
  --link:#168b8b;
  --muted-dark: rgb(189, 189, 189);

  --overlay: rgba(17, 24, 39, .85);
  --ring: #3b82f6;
  --title-bg: rgba(17, 24, 39, .06);
  --title-border: rgba(17, 24, 39, .12);
  --overlay-text: #ecdfdf;
}

html[data-theme="dark"] {
   
    --bg: #1F1F1F;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --card: #111827;
    --surface: #333333;
    --accent: #69d6d6;
    --link: #69d6d6;

    --overlay: rgba(0, 0, 0, .75);
    --ring: #60a5fa;
    --title-bg: rgba(255, 255, 255, .04);
    --title-border: rgba(255, 255, 255, .12);
  }

.dark-profile {
  display: none;
}

html[data-theme="dark"] .light-profile {
  display: none;
}

html[data-theme="dark"] .dark-profile {
  display: block;
}

/* =========================
   Reset & Base
   ========================= */

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

html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto,
    "Noto Naskh Arabic", Arial, sans-serif;
  background: var(--bg);
  /*background-image: url("image/green-dust-and-scratches.png");*/
  /*background-image: url("image/asfalt-light.png");*/
  color: var(--fg);
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;

  background-image: url("image/green-dust-and-scratches.png");
  background-repeat: repeat;

  opacity: 0.40;

  pointer-events: none;
  z-index: -1;
}

/* =========================
   Layout
   ========================= */

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px;
}

/* =========================
   Typography
   ========================= */

h1 {
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  margin: 2rem 0;
  color: var(--fg);
  font-weight: 700;
  text-align: center;
  padding: 30px;
}

h2 {
  color: var(--accent);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
}



p.lead {
  text-align: center;
}

.product-name {
  font-weight: 600;
}
/* =========================
   Layout
   ========================= */

/* main, .container, .profile */
.img_pro {
  width: 100%;
  max-width: 200px;
  object-fit: cover;
  vertical-align: middle;
  border-radius: 8px; 
}

.profile {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 15px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.pro_text {
  flex: 1;
  min-width: 300px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}
/* =========================
   Navigation
   ========================= */

/* .nav */

.nav ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  justify-content: center;
  display: flex;
}

.nav a {
  text-decoration: none;
  display: block;
  color: var(--fg);
  padding: 16px;
  opacity: 0.7;
  transition: 0.5s;
}

.nav a:hover {
  background-color: var(--accent);
  opacity: 1;
  color: var(--accent-fg);
  border-radius: 8px;
}

.theme-toggle {
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 16px;
  border-radius: 8px;
}

.theme-toggle:hover {
 background-color: var(--accent);
 color: var(--accent-fg);
}




/* =========================
   Cards
   ========================= */

/* .grid, .site, .site-card */

.stroke {
  -webkit-text-stroke: 0.1px #ffffff;
  text-shadow: 2px 2px 2px  #000000;
    }

.grid {
      display: grid; gap: 16px;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      background-color: var(--surface);
      padding: 30px;
      border-radius: 15px;

    }

    /* عنصر يحتوي العنوان فوق البطاقة */
    .site { display: flex; flex-direction: column; align-items: center; gap: 8px; }
    .site-title {
      width: 100%;
      text-align: center;
      font-weight: 600;
      font-size: .95rem;
      padding: 8px 10px;
      border-radius: 12px;
      white-space: normal;
      overflow: hidden;
      text-overflow: ellipsis;
      height: 44px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* البطاقة */
    .site-card {
      position: relative; display: block; isolation: isolate;
      border-radius: 16px; overflow: hidden; background: var(--card);
      box-shadow: 0 4px 20px rgba(0,0,0,.08);
      outline: none; text-decoration: none; color: inherit;
      aspect-ratio: 1 / 1;
      width: 100%;
    }

    .site-card img {
      position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
      transition: transform .4s ease;
    }

    .site-card .overlay {
      position: absolute; inset: 0; padding: 14px; display: flex; align-items: end;
      background: linear-gradient(180deg, transparent 20%, var(--overlay));
      color: var(--overlay-text); opacity: 0; transition: opacity .25s ease; z-index: 1;
      
    }
    .site-card .overlay p { margin: 0; font-size: .95rem;
    
    }

    /* أزلنا العنوان داخل الصورة تمامًا */

    .site-card:hover img { transform: scale(1.06); }
    .site-card:hover .overlay { opacity: 1; }
    .site-card:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
    .site-card:focus-visible .overlay { opacity: 1; }

    .site-card.tapped .overlay { opacity: 1; }

    .hint {
      position: absolute; top: 10px; inset-inline-end: 15px; z-index: 2; opacity: .9;
      background: rgba(255,255,255,.85); color: #111; padding: 2px 8px; border-radius: 999px; font-size: .75rem;
      backdrop-filter: blur(6px);
    }

    @media (prefers-contrast: more) {
      .site-card { box-shadow: 0 0 0 2px var(--muted); }
      .hint { background: #000; color: #fff; }
    }

/* =========================
   Components
   ========================= */
/* .divider, .masto-card, .notfound icon */

.notfound{
background-color: var(--surface);
padding: 20px;
border-radius: 15px;
margin: 50px auto;
max-width: 900px;

}

.h1-notfound {
text-align: center;
}

.img-notfound {
  text-align: center;
  padding: 20px;
}

.img-notfound img {
  width: 50%;
  max-width: 300px;
  height: auto;
}

.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 3rem 0;
}

.divider::before,
.divider::after {
    content: "";
    width: 100px;
    height: 1px;
    background: currentColor;
}

.icon_img {
  height: 24px;
 
}





.mastodon-page {
  max-width: 750px;
  margin: 0 auto;
  padding: 0 20px;
}

.masto-card{
  border:2px solid var(--accent);
  border-radius:12px;
  padding:14px;
  margin:12px 0;
  background: var(--surface);
  box-shadow:0 2px 6px rgba(0,0,0,0.06);
}
.masto-card .date{
  font-size:12px;
  color: var(--muted);
  margin-top:8px;
}
.masto-card a{
  text-decoration:none;
  font-size:13px;
}
.masto-card img{
  max-width:100%;
  border-radius:10px;
  display: block;
  margin: auto;
}

.masto-card .date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

 /* ═══════════════════════════════════════
       الوسائط
       ═══════════════════════════════════════ */

    .masto-card img,
    .masto-card video {
      max-width: 50%;
      border-radius: 10px;
      display: block;
      margin: 10px auto;
    }

    .masto-card audio {
      width: 100%;
      margin: 10px 0;
    }


    /* ═══════════════════════════════════════
       معاينة الرابط
       ═══════════════════════════════════════ */

    .masto-link-card {
      display: block;
      margin-top: 12px;
      border: 1px solid #d1d5db;
      border-radius: 10px;
      overflow: hidden;
      text-decoration: none;
      color: inherit;
    }

    .masto-link-card img {
      width: 100%;
      max-height: 400px;
      object-fit: cover;
      margin: 0;
      border-radius: 0;
    }

    .masto-link-card-info {
      padding: 12px;
    }

    .masto-link-card-title {
      display: block;
      margin-bottom: 5px;
    }

    .masto-link-card-description {
      margin: 0;
      font-size: 14px;
      color: #6b7280;
    }

  .masto-link-card-url {
  display: block;
  margin-top: 8px;
   font-size: 12px;
      color: #6b7280;
      direction: ltr;
      text-align: left;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

#loading {
  text-align: center;
}

#load-more {
      height: 1px;
    }
/* =========================================
   سجل التغيير
========================================= */


.changelog-page {
    --changelog-border: var(--border, #dce4e4);
    --changelog-shadow: 0 4px 20px rgba(32, 37, 37, 0.05);
    --changelog-accent-soft: rgba(105, 214, 214, 0.12);

    width: min(850px, calc(100% - 32px));
    margin-inline: auto;
    padding-block: 70px 100px;
}


/* =========================================
   رأس الصفحة
========================================= */

.changelog-page .changelog-header {
    margin-bottom: 45px;
}

.changelog-page .changelog-title {
    margin: 0 0 8px;

    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.2;
}

.changelog-page .changelog-description {
    max-width: 600px;
    margin: 0;

    color: var(--muted);
    font-size: 1rem;
}


/* =========================================
   الفلتر
========================================= */

.changelog-page .changelog-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 15px;
    margin-bottom: 55px;
    background: var(--card);
    border: 1px solid var(--changelog-border);
    border-radius: 14px;
    box-shadow: var(--changelog-shadow);
}

.changelog-page .changelog-filter-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.changelog-page .changelog-select {
    min-width: 180px;
    padding: 9px 35px 9px 12px;
    border: 1px solid var(--changelog-border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--fg);
    font: inherit;
    cursor: pointer;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.changelog-page .changelog-select:focus {
    border-color: var(--accent);
    box-shadow:
        0 0 0 3px var(--changelog-accent-soft);
}


/* =========================================
   السنة
========================================= */

.changelog-page .changelog-year {
    margin-bottom: 60px;
}

.changelog-page .changelog-year-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0 0 35px;
    font-size: 1.8rem;
}

.changelog-page .changelog-year-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--changelog-border);
}


/* =========================================
   الشهر
========================================= */

.changelog-page .changelog-month {
    margin-bottom: 45px;
}

.changelog-page .changelog-month-title {
    margin: 0 0 25px;
    color: var(--muted);
    font-size: 1.1rem;
    font-weight: 600;
}


/* =========================================
   الخط الزمني
========================================= */

.changelog-page .changelog-timeline {
    position: relative;
    padding-inline-start: 28px;
    padding-inline-end: 0;
}

.changelog-page .changelog-timeline::before {
    content: "";
    position: absolute;
    top: 8px;
    bottom: 8px;
    right: 6px;
    left: auto;
    width: 1px;
    background: var(--changelog-border);
}


/* =========================================
   عنصر التغيير
========================================= */

.changelog-page .changelog-entry {
    position: relative;
    margin-bottom: 25px;
}

.changelog-page .changelog-entry:last-child {
    margin-bottom: 0;
}


/* النقطة */

.changelog-page .changelog-entry::before {
    content: "";
    position: absolute;
    top: 25px;
    inset-inline-end: -28px;
    right: -28px;
    left: auto;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 4px var(--bg);
}


/* =========================================
   بطاقة التغيير
========================================= */

.changelog-page .changelog-card {
    padding: 20px 22px;
    background: var(--card);
    border: 1px solid var(--changelog-border);
    border-radius: 14px;
    box-shadow: var(--changelog-shadow);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* =========================================
   التاريخ
========================================= */

.changelog-page .changelog-date {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.82rem;
}


/* =========================================
   اسم الموقع
========================================= */

.changelog-page .changelog-site {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-weight: 700;
}


/* =========================================
   قائمة التغييرات
========================================= */

.changelog-page .changelog-list {
    margin: 0;
    padding-inline-start: 20px;
    color: var(--fg);
}

.changelog-page .changelog-list li {
    margin-bottom: 4px;
}

.changelog-page .changelog-list li:last-child {
    margin-bottom: 0;
}


/* =========================================
   لا توجد نتائج
========================================= */

.changelog-page .changelog-no-results {
    display: none;
    padding: 40px 20px;
    color: var(--muted);
    text-align: center;
    background: var(--card);
    border: 1px solid var(--changelog-border);
    border-radius: 14px;
}

/*=========================
صفحة المشاريع
===========================*/

.projects {
  list-style-type: none;
  padding: 10px 0 40px;
  margin: 0;
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, 200px);
  grid-auto-rows: min-content;
  column-gap: 20px;
  row-gap: 20px;
  
}
.project {
  border:1px solid var(--muted-dark);
  background-color: var(--surface);
}
.project a {
  text-decoration: none;
  color: var(--link-2-color);
}
.project img {
  display: block;
  background: var(--bb-white);
  width: 198px;
  height: 200px;

}
.project h2 {
  font-size: 1rem;
  margin: 0;
  display: inline;
  font-weight: bold;
}
.project span {
  font-size: 1rem;
  color: var(--bb-inert-gray);
  
}
.project__content {
  border-top: var(--accent);
  padding: 10px;
  line-height: 1.375;
  
}
.link_a {
  color: var(--accent);

 }
/* =========================================
   الجوال
========================================= */

@media (max-width: 600px) {

    .changelog-page {
        width: min(100% - 24px, 850px);
        padding-block-start: 45px;
    }

    .changelog-page .changelog-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .changelog-page .changelog-select {
        width: 100%;
    }

    .changelog-page .changelog-timeline {
        padding-inline-start: 23px;
        padding-inline-end: 0;
    }

    .changelog-page .changelog-entry::before {
        right: -23px;
        left: auto;
    }

    .changelog-page .changelog-card {
        padding: 17px;
    }

    .changelog-page .changelog-year-title {
        font-size: 1.5rem;
    }
  .changelog-page .changelog-filter {
        align-items: flex-start;
        flex-direction: column;
    }

    .changelog-page .changelog-filters {
        width: 100%;

        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .changelog-page .changelog-filter-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }
.changelog-page .changelog-filters {
    scrollbar-width: none;
}

.changelog-page .changelog-filters::-webkit-scrollbar {
    display: none;
}

}
/* =========================================
   أزرار فلترة المواقع
========================================= */

.changelog-page .changelog-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px;
    margin-bottom: 55px;
    background: var(--card);
    border: 1px solid var(--changelog-border);
    border-radius: 14px;
    box-shadow: var(--changelog-shadow);
    overflow-x: auto;
}

.changelog-page .changelog-filter-label {
    flex-shrink: 0;
    padding-inline: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.changelog-page .changelog-filters {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.changelog-page .changelog-filter-btn {
    flex-shrink: 0;
    padding: 8px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition:
      background 0.2s ease,
      color 0.2s ease;
}

.changelog-page .changelog-filter-btn:hover {
    background: var(--surface);
    color: var(--fg);
}

.changelog-page .changelog-filter-btn.active {
    background: var(--accent);
    color: var(--fg);
}


/* =========================
   Footer
   ========================= */

footer {
    text-align: center;
    padding: 2rem;
}
/* =========================
   Responsive
   ========================= */

   @media (max-width: 600px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    padding: 15px;
    gap: 12px;
  }
   .img_pro {
    max-width: 130px;
  }

    .nav ul {
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav a {
    padding: 8px;
  }

  .theme-toggle {
    padding: 8px;
  }

  .notfound {
  margin: 20px 15px;
  padding: 15px;
}
}