/* =========================================================
   Professional theme — modern security portfolio
   Loaded after styles.css; overrides the retro-OS skin.
   ========================================================= */

:root {
  --desktop: #f7f7f4;
  --desktop-2: #e9e4d8;
  --window: #e6e5df;
  --window-2: #f7f7f4;
  --window-3: #ddd6c8;
  --title-a: #e9e4d8;
  --title-b: #e9e4d8;
  --title-c: #e9e4d8;
  --ink: #161512;
  --ink-2: #4f4a43;
  --muted: #6b655b;
  --line: #c9c2b4;
  --line-2: #8f887b;
  --green: #1e5c3a;
  --green-2: #1e5c3a;
  --phosphor: #1e5c3a;
  --red: #b42318;
  --amber: #a15c00;
  --blue: #1e5c3a;
  --bone: #161512;
  --head: 72px;
  --wrap: 1200px;
  --body: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: #f7f7f4;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  background-image:
    radial-gradient(55% 42% at 82% 0%, rgba(30,92,58,.08), transparent 65%),
    radial-gradient(45% 38% at 8% 18%, rgba(106,169,255,.06), transparent 70%),
    linear-gradient(180deg, #f7f7f4 0%, #081120 100%);
}
body::before { display: none; }
html[lang="ar"] body, .ar body { font-family: var(--arabic); }

h1, h2, h3, h4 { color: var(--ink); }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4,
.ar h1, .ar h2, .ar h3, .ar h4 { color: var(--ink); }

/* ---------- header ---------- */
.site-head {
  background: rgba(247,247,244,.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.titlebar { gap: 26px; }
.brand { gap: 12px; }
.brand-mark {
  color: var(--green);
  font-size: 22px;
  letter-spacing: -.02em;
  text-shadow: none;
}
.brand-name {
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: none;
}
.nav { gap: 26px; }
.nav a {
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .01em;
  text-transform: none;
  border-bottom: 0;
  padding: 8px 0;
  transition: color .15s;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--green);
  text-shadow: none;
  border-bottom-color: transparent;
}
.nav .nav-cta {
  background: var(--green);
  color: #f5f5f5;
  border: 1px solid var(--green);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 700;
}
.nav .nav-cta:hover {
  background: #2f7d50;
  color: #f5f5f5;
  border-color: #2f7d50;
}
.lang-switch {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--arabic);
  font-size: 13px;
  font-weight: 700;
  min-width: 38px;
  height: 34px;
}
.lang-switch:hover { background: transparent; border-color: var(--green); color: var(--green); }
.menu-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}
.menu-bars i { background: var(--ink); }
html[lang="ar"] .brand-name { font-size: 13px; font-weight: 600; }
html[lang="ar"] .nav a { font-family: var(--arabic); font-size: 14px; font-weight: 500; }

/* ---------- panels ---------- */
.window {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.12);
  overflow: hidden;
}
.win-title, .win-menu, .win-controls { display: none !important; }
.win-body { background: transparent; padding: clamp(24px, 4vw, 48px); }
.win-status {
  background: transparent;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: .02em;
  text-transform: none;
  padding: 12px 24px;
}
.win-status span:last-child { color: var(--muted); }

/* ---------- hero ---------- */
.hero { min-height: auto; padding: calc(var(--head) + 72px) 0 64px; }
.hero-bg { background: #f7f7f4; }
.hero-bg img { opacity: .32; filter: saturate(.8) contrast(1.04); }
.hero-scrim {
  background:
    linear-gradient(180deg, rgba(247,247,244,.72) 0%, rgba(247,247,244,.9) 70%, #f7f7f4 100%),
    radial-gradient(60% 50% at 75% 25%, rgba(30,92,58,.08), transparent 70%);
}
.hero-scan { display: none; }
.hero-window {
  max-width: 1120px;
  background: rgba(247,244,236,.94);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 30px 90px rgba(0,0,0,.5);
}
.eyebrow {
  font-family: var(--body);
  color: var(--green);
  font-size: 11.5px;
  letter-spacing: .12em;
  text-transform: none;
}
.hero-role {
  font-family: var(--body);
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .13em;
}
.hero-lede { max-width: 680px; color: var(--ink-2); font-size: 18px; }
h1 { font-size: clamp(46px, 6.2vw, 76px); line-height: .96; letter-spacing: -.04em; }
h1 span { color: var(--green); }
.hero-stats { border-color: var(--line); }
.hero-stats li { border-color: var(--line); }
.hero-stats b { color: var(--ink); }
.hero-stats li:first-child b { color: var(--green); }
.hero-stats span { color: var(--ink-2); }
.hero-stats small { color: var(--muted); }

.avatar-frame {
  background: #161512;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: none;
}
.avatar-frame::before, .avatar-frame::after, .avatar-scan { display: none; }
.avatar-plate figcaption { border-color: var(--line); }
.avatar-id b { color: var(--ink); }
.avatar-id span { color: var(--muted); }

.hero-profile {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: rgba(8, 17, 30, .72);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(30,92,58,.12);
}
.profile-list { margin: 0; display: grid; gap: 14px; }
.profile-list div { display: grid; gap: 3px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.profile-list div:last-child { border-bottom: 0; padding-bottom: 0; }
.profile-list dt {
  font-family: var(--body);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.profile-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}
.profile-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 13px;
}
.profile-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.profile-prompt {
  margin: 0;
  padding: 12px 14px;
  background: #161512;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
}
html[lang="ar"] .profile-head, html[lang="ar"] .profile-list dt {
  font-family: var(--arabic);
  letter-spacing: 0;
  text-transform: none;
}
html[lang="ar"] .profile-list dd, html[lang="ar"] .profile-status {
  font-family: var(--arabic);
  font-size: 14.5px;
}

/* ---------- buttons ---------- */
.btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: none;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .01em;
  text-transform: none;
  min-height: 42px;
  padding: 0 18px;
}
.btn:hover { background: rgba(255,255,255,.04); border-color: var(--green); }
.btn:active { transform: none; box-shadow: none; }
.btn-primary { background: var(--green); color: #f5f5f5; border-color: var(--green); }
.btn-primary:hover { background: #2f7d50; color: #f5f5f5; border-color: #2f7d50; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(255,255,255,.04); }
.btn-sm { min-height: 36px; font-size: 11.5px; }
.hero-actions .btn { min-height: 44px; font-size: 13px; }

/* ---------- sections ---------- */
.section { padding: 80px 0; }
.section-intro { max-width: 820px; margin-bottom: 32px; }
.kicker {
  font-family: var(--body);
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.kicker::before, .kicker::after { content: none; }
.section-intro h2, .about-grid h2, .contact-grid h2 {
  color: var(--ink);
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.section-intro p, .about-grid .prose > p, .contact-grid > div > p {
  color: var(--ink-2);
  font-size: 17px;
}
.text-link {
  color: var(--green);
  border-bottom-color: rgba(30,92,58,.3);
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .03em;
  text-transform: none;
}
.text-link:hover { border-color: var(--green); }
.section-lede { margin-top: 26px; }
.service-num, .profile-head, .profile-list dt { font-size: 11px; }
.cert-meta, .cert-open, .writeup-card .meta, .research-meta small { font-size: 11px; }
th { font-size: 10.5px; }
.article-meta { font-size: 11.5px; }
.article-aside h3, .article-aside dt { font-size: 10.5px; }

/* ---------- cards ---------- */
.case-card, .writeup-card, .service-card, .cert-card,
.method-card, .cert-verify-card {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  color: var(--ink);
}
.case-card:hover, .writeup-card:hover, .cert-card:hover,
.service-card:hover, .cert-verify-card:hover {
  border-color: var(--green);
  background: var(--window);
  transform: translateY(-2px);
}
.case-card h3, .writeup-card h3, .service-card h3, .method-card h3 { color: var(--ink); }
.case-card p, .writeup-card p, .service-card p, .method-card ol { color: var(--ink-2); }
.case-meta, .writeup-card .meta, .cert-meta { color: var(--muted); }
.writeup-card .meta span:first-child { color: var(--green); }
.writeup-card .read, .case-link { color: var(--green); }
.sev { border-radius: 4px; }
.sev-critical { color: var(--red); background: rgba(255,107,107,.06); }
.sev-high, .sev-moderate, .sev-medium { color: var(--amber); background: rgba(245,179,91,.06); }
.sev-low { color: var(--muted); background: rgba(132,150,173,.06); }

/* ---------- research ---------- */
.research-list { border-color: var(--line); }
.research-row { border-color: var(--line); }
.research-row:hover { background: rgba(30,92,58,.04); }
.research-main strong { color: var(--ink); }
.research-main span { color: var(--ink-2); }
.research-meta small { color: var(--muted); }
.research-meta b { color: var(--ink); }
.recognition-band {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.recognition-band div { border-color: var(--line); }
.recognition-band b { color: var(--green); }
.recognition-band span { color: var(--muted); }

/* ---------- about ---------- */
.prose .lead { color: var(--ink); }
.prose p { color: var(--ink-2); }
.about-facts { background: var(--line); border-color: var(--line); border-radius: 12px; overflow: hidden; }
.about-facts div { background: var(--window); }
.about-facts dt { color: var(--muted); }
.about-facts dd { color: var(--ink); }
.ascii-panel {
  background: #161512;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--phosphor);
  box-shadow: none;
}
.method-card ol { color: var(--ink-2); }
.timeline { border-color: var(--line); }
.timeline-row { border-color: var(--line); }
.timeline-row time { color: var(--muted); }
.timeline-row strong { color: var(--ink); }
.timeline-row p { color: var(--ink-2); }
.timeline-row > span { color: var(--green); border-color: var(--line); }

/* ---------- certificates ---------- */
.cert-grid { gap: 16px; }
.cert-card { padding: 12px; }
.cert-thumb { background: #161512; border-color: var(--line); border-radius: 10px; }
.cert-code { color: var(--ink); }
.cert-name { color: var(--ink-2); }
.cert-meta { color: var(--muted); }
.cert-open { color: var(--green); }
.cert-verify-mark {
  border-color: var(--green);
  color: var(--green);
  background: rgba(30,92,58,.08);
  border-radius: 8px;
}
.cert-verify-card strong { color: var(--ink); }
.cert-verify-card span:last-child { color: var(--muted); }
.cert-verify-card span:last-child a { color: var(--green); }
.cert-verify-card span:last-child a:hover { text-decoration: underline; }

/* ---------- ledger ---------- */
.table-wrap {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 14px;
}
th {
  background: var(--window-3);
  color: var(--muted);
  border-color: var(--line);
}
td { color: var(--ink-2); border-color: var(--line); }
td strong { color: var(--ink); }
.ledger-place { color: var(--green); }

/* ---------- services ---------- */
.service-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.service-card { padding: 24px; gap: 10px; }
.service-num { color: var(--green); font-family: var(--mono); }
.service-card h3 { font-size: 19px; line-height: 1.3; letter-spacing: -.01em; }
.service-card p { font-size: 14.5px; line-height: 1.65; }
html[lang="ar"] .service-card h3 { font-size: 20px; line-height: 1.5; }
html[lang="ar"] .service-card p { font-size: 15px; line-height: 1.8; }

/* ---------- contact ---------- */
.contact-side { border-color: var(--line); }
.contact-email {
  color: var(--green);
  border-bottom-color: rgba(30,92,58,.35);
  font-family: var(--display);
}
.contact-email:hover { color: #2f7d50; border-color: var(--green); }
.contact-side h3 { color: var(--ink); }
.contact-side li { color: var(--ink-2); }
.contact-side li::before { color: var(--green); }
.social-row a { color: var(--ink-2); }
.social-row a:hover { color: var(--green); }
.contact-note { color: var(--muted); border-color: var(--line); }

/* ---------- footer ---------- */
.site-foot {
  margin-top: 0;
  background: #161512;
  border-top: 1px solid var(--line);
}
.taskbar {
  min-height: 64px;
  padding: 16px 0;
  font-family: var(--body);
  font-size: 12px;
  color: var(--muted);
}
.start {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 0;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
}
.start-mark { color: var(--green); }
.task { display: none; }
.taskbar-spacer { flex: 1; }
.taskbar-link {
  background: transparent;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  color: var(--ink-2);
  font-family: var(--body);
  font-size: 11px;
  padding: 4px 9px;
}
.taskbar-meta { border-color: var(--line); color: var(--muted); }

/* ---------- ascii accent ---------- */
.ascii-band { padding: 40px 0 0; }
.ascii-art {
  background: #161512;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--phosphor);
  box-shadow: none;
  font-size: clamp(6px, 1.1vw, 10px);
  opacity: .85;
}
.ascii-caption { color: var(--muted); font-size: 10px; }
.ascii-cursor { color: var(--green); }

/* ---------- article pages ---------- */
.article-head {
  background:
    linear-gradient(90deg, rgba(247,247,244,.96), rgba(247,247,244,.7)),
    url('/assets/img/banner.jpg') center 40% / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.article-head h1, .article-head .lede { color: var(--ink); }
.article-body {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: none;
}
.article-body h2, .article-body h3 { color: var(--ink); }
.article-body p, .article-body li { color: var(--ink-2); }
.article-body a { color: var(--green); border-color: rgba(30,92,58,.3); }
.article-body code {
  background: #161512;
  border-color: var(--line);
  color: var(--phosphor);
}
.callout { background: rgba(30,92,58,.06); border-left-color: var(--green); }
.callout p { color: var(--ink-2); }
.article-aside {
  background: var(--window);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
}
.article-aside h3, .article-aside dt { color: var(--muted); }
.article-aside dd { color: var(--ink-2); }
.article-aside .aside-note { color: var(--muted); }
.article-nav a { color: var(--green); }
.timeline-list { border-color: var(--line-2); }
.timeline-list li { color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (min-width: 781px) and (max-width: 1040px) {
  .brand-name { display: none; }
  .nav { gap: 14px; }
  .nav a { font-size: 12px; }
  html[lang="ar"] .nav a { font-size: 13px; }
}
@media (max-width: 1000px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  :root { --head: 64px; }
  .titlebar { gap: 12px; }
  .nav {
    background: var(--desktop-2);
    border-bottom-color: var(--line);
    visibility: hidden;
    transition: transform .25s var(--ease), visibility .25s var(--ease);
  }
  .nav.is-open { visibility: visible; }
  .nav a {
    color: var(--ink-2);
    border-bottom-color: var(--line);
    font-size: 15px;
  }
  .nav a:hover { color: var(--green); }
  .nav .nav-cta { color: #f5f5f5; }
  html[lang="ar"] .nav a { font-size: 16px; }
  .hero { padding-top: calc(var(--head) + 40px); }
  .hero-window { border-radius: 14px; }
  .section { padding: 56px 0; }
  .service-grid { grid-template-columns: 1fr; }
  .win-body { padding: 22px; }
  .win-status { padding: 10px 18px; font-size: 11px; }
  .ascii-band { padding: 28px 0 0; }
  .site-foot { margin-top: 0; }
}
@media (max-width: 520px) {
  .hero-stats b { font-size: 26px; }
  .hero-stats li:first-child b { font-size: 34px; }
  .contact-email { font-size: 18px; }
  .taskbar { flex-wrap: wrap; gap: 8px; }
  .taskbar-meta { border: 0; padding: 0; }
}

/* ---------- Signature dossier skin ---------- */
body {
  background-color: #f5f5f5;
  background-image:
    linear-gradient(rgba(22,21,18,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,21,18,.035) 1px, transparent 1px);
  background-size: 24px 24px;
}
.hero { background: #f7f7f4; }
.hero-bg, .hero-scrim, .hero-scan { display: none; }
.hero-window, .window {
  background: #e6e5df;
  border: 1px solid #161512;
  border-top: 3px solid #1e5c3a;
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,.10);
  overflow: visible;
}
.hero-window { max-width: 100%; -webkit-backdrop-filter: none; backdrop-filter: none; }
.win-title, .win-menu, .win-status, .win-controls { display: none !important; }
.win-body { padding: clamp(24px, 4vw, 48px); }

.site-head {
  background: rgba(247,247,244,.96);
  border-bottom: 2px solid #161512;
  box-shadow: none;
}
.brand-mark { color: #1e5c3a; text-shadow: none; }
.brand-name { color: #4f4a43; letter-spacing: .08em; }
.nav a { color: #161512; }
.nav a:hover, .nav a[aria-current="page"] { color: #1e5c3a; text-shadow: none; }
.nav a::after { background: #1e5c3a; }
.nav .nav-cta {
  background: #161512; color: #f5f5f5;
  border: 1px solid #161512; border-radius: 0;
}
.nav .nav-cta:hover { background: #1e5c3a; border-color: #1e5c3a; }
.lang-switch {
  background: transparent; color: #161512;
  border: 1px solid #161512; border-radius: 0;
}
.lang-switch:hover { background: #161512; color: #f5f5f5; border-color: #161512; }
.menu-btn { background: transparent; border: 1px solid #161512; border-radius: 0; }
.menu-bars i { background: #161512; }

h1, h2, h3, h4 { color: #161512; }
h1 span { color: #1e5c3a; }
.hero-role, .eyebrow { color: #1e5c3a; }
.hero-lede { color: #4f4a43; }
.hero-stats { border-top: 2px solid #161512; border-bottom: 2px solid #161512; }
.hero-stats li { border-color: #c9c2b4; }
.hero-stats b { color: #161512; }
.hero-stats li:first-child b { color: #1e5c3a; }
.hero-stats span { color: #4f4a43; }
.hero-stats small { color: #6b655b; }

.avatar-frame {
  background: #e6e5df;
  border: 2px solid #161512;
  border-radius: 0;
  padding: 8px;
  box-shadow: none;
}
.avatar-frame::before, .avatar-frame::after { display: block; border-color: #1e5c3a; }
.avatar-scan { display: block; opacity: .08; }
.avatar-plate figcaption { border-color: #c9c2b4; }
.avatar-id b { color: #161512; }
.avatar-id span { color: #6b655b; }

.btn {
  background: transparent; color: #161512;
  border: 1px solid #161512; border-radius: 0;
  font-family: var(--mono); text-transform: uppercase;
}
.btn:hover { background: #161512; color: #f5f5f5; border-color: #161512; }
.btn-primary { background: #161512; color: #f5f5f5; border-color: #161512; }
.btn-primary:hover { background: #1e5c3a; border-color: #1e5c3a; color: #fff; }
.btn-ghost { background: transparent; color: #161512; }
.btn-ghost:hover { background: #161512; color: #f5f5f5; }

.kicker { color: #1e5c3a; }
.section-intro h2, .about-grid h2, .contact-grid h2 { color: #161512; }
.section-intro p, .about-grid .prose > p, .contact-grid > div > p { color: #4f4a43; }
.section .window { border-top: 3px solid #1e5c3a; }

.cert-card, .writeup-card, .method-card, .cert-verify-card, .case-card {
  background: #efeee8; border: 1px solid #161512; border-radius: 0;
  box-shadow: 4px 4px 0 rgba(0,0,0,.08);
}
.cert-card:hover, .writeup-card:hover, .cert-verify-card:hover, .method-card:hover {
  border-color: #1e5c3a; background: #efeee8;
}
.cert-thumb { background: #f7f7f4; border: 1px solid #c9c2b4; border-radius: 0; }
.cert-code, .cert-open, .cert-verify-card span:last-child a { color: #1e5c3a; }
.cert-name, .cert-meta { color: #4f4a43; }
.cert-verify-mark { color: #1e5c3a; border-color: #1e5c3a; background: rgba(30,92,58,.06); border-radius: 0; }

.research-list { border-color: #c9c2b4; }
.research-row { border-color: #c9c2b4; }
.research-row:hover { background: rgba(30,92,58,.035); }
.research-main strong, .research-meta b { color: #161512; }
.research-main span, .research-meta small { color: #4f4a43; }
.sev { border-radius: 0; }
.recognition-band { background: #efeee8; border: 1px solid #161512; border-radius: 0; }
.recognition-band div { border-color: #c9c2b4; }
.recognition-band b { color: #1e5c3a; }
.recognition-band span { color: #4f4a43; }

.prose .lead { color: #161512; }
.prose p { color: #4f4a43; }
.about-facts { background: #c9c2b4; border-color: #161512; border-radius: 0; }
.about-facts div { background: #efeee8; }
.about-facts dt { color: #6b655b; }
.about-facts dd { color: #161512; }
.ascii-panel { background: #161512; color: #8ef0a8; border-color: #161512; border-radius: 0; }
.timeline { border-color: #c9c2b4; }
.timeline-row { border-color: #c9c2b4; }
.timeline-row time { color: #6b655b; }
.timeline-row strong { color: #161512; }
.timeline-row p { color: #4f4a43; }
.timeline-row > span { color: #1e5c3a; border-color: #c9c2b4; }

.contact-side { border-color: #c9c2b4; }
.contact-email { color: #1e5c3a; border-color: rgba(30,92,58,.4); }
.contact-email:hover { color: #161512; }
.contact-side h3 { color: #161512; }
.contact-side li { color: #4f4a43; }
.contact-side li::before { color: #1e5c3a; }
.social-row a { color: #4f4a43; }
.social-row a:hover { color: #1e5c3a; }
.contact-note { color: #6b655b; border-color: #c9c2b4; }

.site-foot { background: #161512; border-top: 2px solid #161512; }
.taskbar { color: #f5f5f5; font-family: var(--mono); }
.start { color: #f5f5f5; }
.start-mark { color: #1e5c3a; }
.taskbar-link { background: #f7f7f4; color: #161512; border: 1px solid #f7f7f4; border-radius: 0; }
.taskbar-meta { color: #c9c2b4; border-color: #4f4a43; }

.dot { background: #1e5c3a; box-shadow: 0 0 0 3px rgba(30,92,58,.12); }
@keyframes halo-pulse {
  0%, 100% { box-shadow: 8px 8px 0 rgba(0,0,0,.10); }
  50%      { box-shadow: 8px 8px 0 rgba(0,0,0,.10), 0 0 26px rgba(30,92,58,.14); }
}

/* ---------- Dossier article pages ---------- */
.article-head {
  background: #f7f7f4;
  background-image:
    linear-gradient(rgba(22,21,18,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,21,18,.035) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 2px solid #161512;
}
.article-head h1 { color: #161512; }
.article-head .lede { color: #4f4a43; }
.article-meta { color: #6b655b; }
.article-meta b { color: #161512; }
.article-body {
  background: #e6e5df;
  border: 1px solid #161512;
  border-radius: 0;
  box-shadow: 8px 8px 0 rgba(0,0,0,.10);
}
.article-body h2, .article-body h3 { color: #161512; }
.article-body p, .article-body li { color: #4f4a43; }
.article-body a { color: #1e5c3a; border-color: rgba(30,92,58,.3); }
.article-body code { background: #161512; color: #8ef0a8; border-color: #161512; }
.callout { background: rgba(30,92,58,.05); border-left: 3px solid #1e5c3a; border-radius: 0; }
.callout p { color: #4f4a43; }
.article-aside {
  background: #e6e5df;
  border: 1px solid #161512;
  border-radius: 0;
  box-shadow: 6px 6px 0 rgba(0,0,0,.08);
}
.article-aside h3, .article-aside dt { color: #6b655b; }
.article-aside dd { color: #161512; }
.article-aside .aside-note { color: #6b655b; }
.article-nav a { color: #1e5c3a; }
.timeline-list { border-color: #c9c2b4; }
.timeline-list li { color: #4f4a43; }

@media (max-width: 360px) {
  .hero-copy h1 { font-size: 40px; }
  .hero-stats b { font-size: 26px; }
  .hero-stats li:first-child b { font-size: 32px; }
}

/* About: make the working method the focal card */
.about-grid { grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); gap: 40px; }
.method-card { padding: 24px; }
.method-card h3 { font-size: 24px; margin-bottom: 12px; }
.method-card ol { font-size: 16px; line-height: 1.75; }
.method-card li { margin-bottom: 9px; }
html[lang="ar"] .method-card h3 { font-size: 24px; }
html[lang="ar"] .method-card ol { font-size: 16.5px; line-height: 1.9; }

@media (max-width: 1000px) {
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
}

.site-foot :focus-visible { outline-color: #efeee8; }
.research-main h3 {
  font-family: var(--display); font-size: 21px; line-height: 1.15;
  letter-spacing: -.025em; margin: 0; color: #161512;
}
html[lang="ar"] .research-main h3 {
  font-family: var(--arabic); font-size: 18px; line-height: 1.35; letter-spacing: 0;
}

html[lang="ar"] .article-body code {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

/* Larger social tabs */
.social-row { gap: 10px; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  background: #efeee8;
  border: 1px solid #161512;
  color: #161512;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background .15s, color .15s, border-color .15s;
}
.social-row a:hover {
  background: #e6e5df;
  color: #1e5c3a;
  border-color: #1e5c3a;
}
.social-row svg { width: 16px; height: 16px; }
.social-row a svg:last-child { width: 12px; height: 12px; opacity: .65; }
html[lang="ar"] .social-row a {
  font-family: var(--arabic);
  font-size: 13.5px;
  letter-spacing: 0;
  text-transform: none;
}
@media (max-width: 520px) {
  .social-row a { flex: 1 1 calc(50% - 5px); }
}

/* Stretch the method card to the height of the About prose column */
.about-grid { align-items: stretch; }
.side-stack { display: flex; flex-direction: column; }
.method-card { flex: 1; }
@media (max-width: 1000px) {
  .side-stack { display: block; }
  .method-card { height: auto; }
}

.method-card { display: flex; flex-direction: column; }
.method-card ol { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }

/* Credential verification card */
.cert-verify-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}
.cert-verify-head { display: flex; align-items: flex-start; gap: 12px; }
.cert-verify-mark {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center;
  border: 1px solid #1e5c3a; color: #1e5c3a;
  background: rgba(30,92,58,.06); border-radius: 0;
}
.cert-verify-mark svg { width: 24px; height: 24px; }
.cert-verify-card strong {
  display: block; font-family: var(--display); font-size: 18px;
  line-height: 1.25; color: #161512;
}
.cert-verify-note {
  display: block; margin-top: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: #6b655b;
}
.cert-verify-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cert-verify-links a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 9px;
  border: 1px solid #161512; background: #efeee8; color: #161512;
  font-family: var(--body); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  transition: background .15s, color .15s, border-color .15s;
}
.cert-verify-links a:hover { background: #e6e5df; color: #1e5c3a; border-color: #1e5c3a; }
.cert-verify-links svg { width: 12px; height: 12px; }
html[lang="ar"] .cert-verify-card strong,
html[lang="ar"] .cert-verify-links a { font-family: var(--arabic); }
html[lang="ar"] .cert-verify-note {
  font-family: var(--arabic); letter-spacing: 0; text-transform: none;
}
@media (max-width: 520px) {
  .cert-verify-links { grid-template-columns: 1fr; }
}

/* Research record: larger rows and unified metadata sizes */
.research-row {
  padding: 24px 10px;
  gap: 20px;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr) minmax(160px, 200px);
}
.research-id b { font-size: 12px; line-height: 1.55; }
.research-row .sev { font-size: 12px; padding: 3px 8px; }
.research-main h3 { font-size: 22px; }
.research-main span { font-size: 15.5px; line-height: 1.6; }
.research-meta { gap: 6px; }
.research-meta small, .research-meta b { font-size: 12px; line-height: 1.5; }
html[lang="ar"] .research-id b { font-size: 12.5px; }
html[lang="ar"] .research-main h3 { font-size: 20px; line-height: 1.45; }
html[lang="ar"] .research-main span { font-size: 15px; line-height: 1.8; }
html[lang="ar"] .research-meta small, html[lang="ar"] .research-meta b { font-size: 12.5px; }

main { min-height: calc(100svh - var(--head) - 64px); }
@media (max-width: 780px) {
  .menu-btn { width: 44px; height: 40px; }
  .lang-switch { min-width: 44px; height: 38px; }
}


@media (max-width: 780px) {
  .research-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px 2px;
  }
}

/* Compact credential verification card */
.cert-verify-card {
  align-self: start;
  justify-content: flex-start;
  min-height: 0;
}
/* Certificate lightbox */
.cert-lightbox {
  position: fixed;
  border: 1px solid #161512;
  padding: 0;
  background: #f7f7f4;
  max-width: min(1100px, 92vw);
  max-height: 92vh;
  box-shadow: 8px 8px 0 rgba(0,0,0,.2);
}
.cert-lightbox::backdrop { background: rgba(10,10,10,.78); }
.cert-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
  margin: auto;
  object-fit: contain;
}
.cert-lightbox-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: #161512; color: #f7f7f4;
  border: 0; font-size: 24px; line-height: 1;
  cursor: pointer; z-index: 2;
}
.cert-lightbox-close:hover { background: #1e5c3a; }

/* Smooth certificate preview */
@keyframes cert-lightbox-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes cert-lightbox-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(8px) scale(.98); }
}
@keyframes cert-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cert-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.cert-lightbox[open] {
  animation: cert-lightbox-in .28s cubic-bezier(.22,.61,.36,1) both;
}
.cert-lightbox[open]::backdrop {
  animation: cert-backdrop-in .25s ease both;
}
.cert-lightbox.is-closing {
  animation: cert-lightbox-out .2s ease both;
}
.cert-lightbox.is-closing::backdrop {
  animation: cert-backdrop-out .2s ease both;
}
.cert-lightbox img {
  animation: cert-lightbox-in .35s cubic-bezier(.22,.61,.36,1) both;
}

/* Avatar X link */
.avatar-plate figcaption {
  border-top: 0;
  padding-top: 12px;
  text-align: center;
}
.avatar-id {
  display: inline-flex;
  width: auto;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid #161512;
  background: #f3eee4;
  color: #161512;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background .15s, color .15s, border-color .15s;
}
.avatar-id:hover { background: #e6e5df; color: #1e5c3a; border-color: #1e5c3a; }
.avatar-id span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: inherit; }
.avatar-id svg { width: 14px; height: 14px; }

/* Research record: larger CVE IDs and clearer borders */
.research-row {
  grid-template-columns: minmax(210px, 290px) minmax(0, 1fr) minmax(170px, 210px);
  border-bottom-color: #b7b0a3;
}
.research-list { border-top-color: #b7b0a3; }
.research-id b { font-size: 15px; line-height: 1.55; }
.research-row .sev { font-size: 12.5px; padding: 4px 9px; }
.research-meta small, .research-meta b { font-size: 12.5px; }
html[lang="ar"] .research-id b { font-size: 15px; }
html[lang="ar"] .research-meta small, html[lang="ar"] .research-meta b { font-size: 12.5px; }

.timeline-row strong a {
  color: inherit;
  border-bottom: 1px solid rgba(30,92,58,.35);
}
.timeline-row strong a:hover { color: #1e5c3a; border-color: #1e5c3a; }

.timeline-row strong a { border-bottom: 0; }
.timeline-row strong a:hover { color: #1e5c3a; }
.timeline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 12px;
  border: 1px solid #161512;
  background: #f3eee4;
  color: #161512;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  transition: background .15s, color .15s, border-color .15s;
}
.timeline-link:hover { background: #e6e5df; color: #1e5c3a; border-color: #1e5c3a; }
.timeline-link svg { width: 13px; height: 13px; }

/* Clickable BugBounty timeline row */
.timeline-row--link {
  display: grid;
  color: inherit;
  text-decoration: none;
  padding-inline: 10px;
  margin-inline: -10px;
  transition: background .15s;
}
.timeline-row--link:hover { background: #e6e5df; }
.timeline-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  color: #1e5c3a;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}
.timeline-cta svg { width: 13px; height: 13px; }

/* Work-with-me card */
.method-card { justify-content: center; gap: 12px; }
.method-card p { margin: 0; color: #4f4a43; font-size: 15px; line-height: 1.7; }
.method-card .btn { align-self: flex-start; }
html[lang="ar"] .method-card p { font-family: var(--arabic); font-size: 15px; line-height: 1.8; }

/* Social accounts under the avatar */
.avatar-plate figcaption { border-top: 0; padding-top: 12px; }
.social-row--avatar { margin-top: 2px; justify-content: center; }
.social-row--avatar a {
  flex: 1 1 calc(50% - 5px);
  min-height: 40px;
  padding: 8px 10px;
  font-size: 12px;
}
.social-row--avatar svg { width: 14px; height: 14px; }
.social-row--avatar a svg:last-child { width: 11px; height: 11px; }

/* Hero headline */
.hero-copy h1 { font-size: clamp(56px, 7vw, 96px); letter-spacing: -.05em; }

/* Header name only */
.brand-name {
  display: inline;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #161512;
  text-transform: none;
}
html[lang="ar"] .brand-name { font-family: var(--arabic); font-size: 17px; }
@media (max-width: 780px) {
  .brand-name { display: inline; font-size: 15.5px; }
  html[lang="ar"] .brand-name { display: inline; font-size: 16px; }
}
/* Hero title + bigger handle */
.hero-copy h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.02; letter-spacing: -.035em; }
.hero-copy .eyebrow { font-size: 13.5px; letter-spacing: .08em; }
.hero-copy .eyebrow b { font-size: 16px; letter-spacing: .02em; }

/* Compact scope card */
.side-stack { align-self: start; }
.method-card { flex: 0 0 auto; justify-content: flex-start; }

/* Article kicker and meta */
.article-head .kicker {
  font-size: 15px;
  letter-spacing: .1em;
  font-weight: 600;
}
.article-meta { font-size: 15px; gap: 12px 32px; line-height: 1.7; }
.article-meta b { font-size: 15.5px; font-weight: 600; }
html[lang="ar"] .article-head .kicker {
  font-family: var(--arabic);
  font-size: 15.5px;
  letter-spacing: 0;
}
html[lang="ar"] .article-meta { font-size: 15.5px; }
html[lang="ar"] .article-meta b { font-size: 16px; }

/* Writeups stats */
.writeups-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  margin-top: 24px;
  border-top: 1px solid #161512;
  border-bottom: 1px solid #161512;
}
.writeups-stats div { padding: 16px 18px; border-inline-end: 1px solid #b7b0a3; }
.writeups-stats div:last-child { border-inline-end: 0; }
.writeups-stats span {
  display: block;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: .02em;
  color: #6b655b;
}
.writeups-stats b {
  display: block;
  margin-top: 6px;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.03em;
  color: #161512;
}
html[lang="ar"] .writeups-stats span { font-family: var(--arabic); font-size: 12.5px; }
html[lang="ar"] .writeups-stats b { font-family: var(--display); }
@media (max-width: 780px) {
  .writeups-stats { grid-template-columns: 1fr 1fr; }
  .writeups-stats div:nth-child(1), .writeups-stats div:nth-child(2) { border-bottom: 1px solid #b7b0a3; }
  .writeups-stats div:nth-child(2) { border-inline-end: 0; }
  .writeups-stats b { font-size: 26px; }
}

/* ---------- phone sizing fixes ---------- */
@media (max-width: 780px) {
  .hero-copy h1 { font-size: clamp(32px, 8.4vw, 38px); line-height: 1.06; }
  html[lang="ar"] .hero-copy h1 { font-size: clamp(31px, 8.2vw, 36px); line-height: 1.28; }
  .research-row,
  html[lang="ar"] .research-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 2px;
  }
  .research-main h3 { font-size: 19px; line-height: 1.32; }
  html[lang="ar"] .research-main h3 { font-size: 18.5px; line-height: 1.4; }
  .research-main span { font-size: 15px; line-height: 1.65; }
  html[lang="ar"] .research-main span { font-size: 14.5px; line-height: 1.85; }
  .research-meta,
  html[lang="ar"] .research-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 16px;
    margin-top: 6px;
  }
  .research-meta small,
  .research-meta b,
  html[lang="ar"] .research-meta small,
  html[lang="ar"] .research-meta b { font-size: 11.5px; }
  .writeups-stats b { font-size: 24px; }
}
@media (max-width: 520px) {
  .timeline-row { grid-template-columns: 1fr; gap: 4px; }
  .timeline-row > span { grid-column: auto; }
  .section { padding: 48px 0; }
}
@media (max-width: 400px) {
  .section-intro h2,
  .about-grid h2,
  .contact-grid h2 { font-size: 26px; }
  .writeups-stats b { font-size: 21px; }
  .writeups-stats span { font-size: 10.5px; }
  .article-body { min-width: 0; padding: 18px 14px; }
  .article-body code { white-space: normal; overflow-wrap: anywhere; }
  .article-head h1 { font-size: 30px; }
  .article-meta { font-size: 12.5px; gap: 8px 16px; }
  .article-meta b { font-size: 13px; }
}

@media (max-width: 400px) {
  .article-body code { font-size: .75em; padding: 1px 4px; }
  .contact-email { font-size: 16px; }
}

@media (max-width: 400px) {
  .about-facts { grid-template-columns: 1fr; }
}

html[lang="ar"] .research-meta small {
  font-family: var(--arabic);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

/* Mobile certificate cards: preview flush with the card border */
@media (max-width: 780px) {
  .cert-card { padding: 0; }
  .cert-thumb {
    display: block;
    height: auto;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #c9c2b4;
    border-radius: 0;
    background: #fff;
  }
  .cert-thumb img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }
  .cert-code { margin: 12px 14px 0; }
  .cert-name,
  .cert-meta { margin-inline: 14px; }
  .cert-open { margin: auto 14px 12px; padding-bottom: 6px; }
}
