/*
Theme Name: Hani Signature Blog
Theme URI: https://example.com
Author: Hani
Description: قالب مدونة شخصية احترافي باسم هاني، عربي/إنجليزي، خفيف وسريع وبدون اعتماد خارجي.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: hani-signature-blog
*/

:root {
  --ink: #070707;
  --charcoal: #191919;
  --paper: #ffffff;
  --warm: #f6f6f4;
  --soft: #eeeeec;
  --line: #d9d9d6;
  --text: #202020;
  --muted: #6a6a6a;
  --radius: 8px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(0, 0, 0, .035) 1px, transparent 1px),
    var(--warm);
  background-size: 76px 76px, 76px 76px, auto;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.75;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: #555; }
img { max-width: 100%; height: auto; }

.site-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(217, 217, 214, .9);
  background: rgba(246, 246, 244, .94);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  font-weight: 900;
}

.brand-mark {
  width: 68px;
  height: 68px;
  border: 1px solid #cfcfcc;
  border-radius: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

.brand-name { display: grid; line-height: 1.2; }
.brand-name span {
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}
.brand-name small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.primary-menu a:hover {
  color: var(--paper);
  background: var(--ink);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 590px;
  margin: 0 auto 26px;
  display: grid;
  align-items: stretch;
  background: transparent;
}

.hero::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 40%;
  height: 100%;
  background: var(--ink);
}

.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: 38%;
  top: 70px;
  bottom: 70px;
  width: 1px;
  background: rgba(0, 0, 0, .22);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 430px) minmax(0, 1fr);
  gap: clamp(26px, 6vw, 76px);
  align-items: center;
  padding: clamp(34px, 6vw, 76px) 0;
}

.brand-panel {
  min-height: 440px;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .14);
}

.brand-panel-mark {
  width: min(430px, 96%);
  height: auto;
  display: block;
  border-radius: 8px;
  filter: grayscale(1) contrast(1.08);
  mix-blend-mode: normal;
}

.brand-panel-copy { display: none; }

.eyebrow {
  width: fit-content;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(58px, 9vw, 112px);
  line-height: .95;
  font-weight: 900;
  letter-spacing: 0;
}

.hero p {
  max-width: 570px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--paper);
  background: var(--ink);
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}

.button.secondary {
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--ink);
  box-shadow: none;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.social-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, .62);
  font-size: 13px;
  font-weight: 900;
}

.social-link:hover {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}

.social-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
  margin: 26px auto 50px;
}

.posts-grid { display: grid; gap: 18px; }

.post-card,
.single-post,
.sidebar-card,
.page-card,
.linkedin-quote-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow);
}

.post-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.post-thumb {
  position: relative;
  min-height: 210px;
  display: block;
  overflow: hidden;
  background: var(--ink);
}

.post-thumb::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
}

.post-thumb::after {
  content: "H";
  position: absolute;
  inset-inline-end: 24px;
  bottom: -18px;
  color: rgba(255, 255, 255, .10);
  font-size: 150px;
  font-weight: 900;
  line-height: 1;
}

.post-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  display: block;
  filter: grayscale(1);
}

.post-body { padding: 24px; }

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.post-meta span,
.post-meta a { color: var(--muted); }

.post-title {
  margin: 9px 0 10px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.25;
}

.post-title a { color: inherit; }
.post-excerpt { color: var(--muted); }

.read-more {
  display: inline-flex;
  margin-top: 12px;
  color: var(--ink);
  font-weight: 900;
}

.linkedin-quotes { display: grid; gap: 14px; margin: 22px 0; }

.linkedin-quote-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background: rgba(255, 255, 255, .78);
}

.linkedin-quote-card::before {
  content: "in";
  position: absolute;
  inset-inline-end: 20px;
  top: 12px;
  color: rgba(0, 0, 0, .06);
  font-size: 94px;
  font-weight: 900;
  line-height: 1;
}

.linkedin-quote-card h3 {
  position: relative;
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.35;
}

.linkedin-quote-card blockquote {
  position: relative;
  margin: 12px 0;
  border-inline-start: 4px solid var(--ink);
  padding: 10px 14px;
  color: var(--text);
  background: rgba(246, 246, 244, .82);
  border-radius: 8px;
}

.linkedin-meta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 104px;
}

.sidebar-card {
  overflow: hidden;
  padding: 20px;
}

.profile-card {
  color: var(--paper);
  background: var(--ink);
}

.profile-card .social-link {
  color: var(--paper);
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .07);
}

.sidebar-card h2,
.sidebar-card h3 {
  margin: 0 0 12px;
  color: inherit;
  font-size: 19px;
}

.sidebar-card:not(.profile-card) h2,
.sidebar-card:not(.profile-card) h3 { color: var(--ink); }
.sidebar-card p { margin: 0 0 12px; }
.sidebar ul { margin: 0; padding-inline-start: 18px; }

.single-post,
.page-card { padding: clamp(22px, 4vw, 42px); }

.entry-title {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
}

.entry-content { font-size: 18px; }
.entry-content h2,
.entry-content h3 { color: var(--ink); line-height: 1.3; }

.entry-content blockquote {
  margin: 22px 0;
  border-inline-start: 4px solid var(--ink);
  padding: 12px 18px;
  color: var(--ink);
  background: rgba(246, 246, 244, .78);
  border-radius: 8px;
}

.entry-content code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--soft);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  background: rgba(255, 255, 255, .68);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-socials { display: flex; flex-wrap: wrap; gap: 12px; }
.pagination { display: flex; gap: 8px; margin-top: 18px; }

.pagination .page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.pagination .current {
  color: var(--paper);
  background: var(--ink);
}

@media (max-width: 940px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .primary-menu { flex-wrap: wrap; }
  .hero::before,
  .hero::after { display: none; }

  .hero-inner,
  .content-layout,
  .post-card { grid-template-columns: 1fr; }

  .brand-panel { min-height: 270px; }
  .brand-panel-mark { width: 280px; }
  .sidebar { position: static; }
}

@media (max-width: 560px) {
  .site-wrap { width: min(100% - 22px, 1180px); }
  .hero-inner { min-height: auto; padding: 26px 0; }
  .post-body { padding: 18px; }
}
