/* ============================================================
   ARMORY — the about page's visual world
   Direction borrowed from the Armory template: a near-black
   ground, white type, translucent white surfaces, hairline
   white rules, one blue accent used sparingly. Display voice
   is Inter at weight 400 with tight negative tracking; the
   machine voice is mono, uppercase, tracked.

   Palette: ground #060606 · surfaces rgba(255,255,255,.1)
   hairlines rgba(255,255,255,.08) · text #fff
   muted rgba(255,255,255,.6) · faint rgba(255,255,255,.35)
   accent #09f (rare)
   Loaded only by about.html (after dark.css).
   ============================================================ */

/* ---------- document base ---------- */

html {
  scroll-behavior: smooth;
  background: #060606;
}

.sections-standalone {
  margin: 0;
  padding: 0;
  background: #060606 !important;
  color: #fff;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}

/* themed body scrollbar (the part of the surface the design owns) */
.sections-standalone::-webkit-scrollbar {
  width: 10px;
}
.sections-standalone::-webkit-scrollbar-track {
  background: #0a0a0a;
}
.sections-standalone::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
}
.sections-standalone::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 153, 255, 0.5);
}
.sections-standalone {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) #0a0a0a;
}

/* text selection: blue on the dark stock, not the browser default */
.sections-standalone ::selection {
  background: rgba(0, 153, 255, 0.3);
  color: #fff;
}

/* ---------- the voice ---------- */

.manual,
.manual button,
.manual a,
.manual input,
.manual select,
.manual textarea {
  font-family: Inter, "Inter Display", -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* ordinary links never underline: Armory keeps them clean */
.manual a,
.manual .manual-toc,
.manual .letters-social-btn,
.manual .link,
.manual .sections-foot a {
  text-decoration: none;
}

.manual .sec-num,
.manual .project-year,
.manual .manual-spec dt,
.manual .manual-doc-id,
.manual .manual-rail-cap,
.manual .manual-fig-cap,
.manual .toc-num,
.manual .sec-sub,
.manual .skills-hint,
.manual .project-fig,
.manual .project-stack,
.manual .ledger-period,
.manual .ledger-meta,
.manual .rec-stamp,
.manual .rec-year,
.manual .op-box-cap,
.manual .op-data dt,
.manual .letters-label,
.manual .letters-block-label,
.manual .letters-eta,
.manual .sections-foot a,
.manual .link {
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* ---------- layout ---------- */

.manual {
  max-width: 1200px;
  margin: 0 auto;
  padding: 88px 24px 60px;
}

.manual-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 214px;
  grid-template-rows: auto;
  gap: 34px;
  align-items: start;
}

.manual-rail {
  grid-column: 2;
  grid-row: 1;
}

.manual-doc {
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}

/* ---------- the cover spread ---------- */

.manual-cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.manual-fig {
  padding: 16px 16px 14px;
  background: transparent;
  border-inline-end: 1px solid rgba(255, 255, 255, 0.08);
}

.manual-figure {
  position: relative;
  margin: 0;
}

.manual-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  filter: grayscale(30%) contrast(1.05);
}

/* registration corner marks on the plate */
.manual-figure::before,
.manual-figure::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.manual-figure::before {
  top: -4px;
  inset-inline-start: -4px;
  border-top: 1px solid #09f;
  border-inline-start: 1px solid #09f;
}

.manual-figure::after {
  bottom: -4px;
  inset-inline-end: -4px;
  border-bottom: 1px solid #09f;
  border-inline-end: 1px solid #09f;
}

.manual-fig-cap {
  margin: 10px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

.manual-titleblock {
  padding: 30px 30px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.manual-doc-id {
  margin: 0 0 14px;
  color: #09f;
  font-size: 11px;
}

.manual-title {
  margin: 0 0 10px;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: #fff;
}

.manual-subtitle {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
}

.manual-spec {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.manual-spec > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.manual-spec > div:last-child {
  border-bottom: none;
}

.manual-spec dt {
  padding-top: 3px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.manual-spec dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #fff;
}

/* ---------- the document (sections) ---------- */

.page-sections.group {
  margin-top: 18px;
  padding: 8px 30px 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
}

/* ---------- chapters ---------- */

.sec {
  padding: 30px 0 10px;
  scroll-margin-top: 96px;
}

.sec-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  column-gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 26px;
}

.sec-num {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  color: #09f;
  border: 1px solid rgba(0, 153, 255, 0.4);
  padding: 2px 8px;
  font-size: 11px;
}

/* the kicker: the mono label above the big title (Armory voice) */
.sec-sub {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  padding-bottom: 3px;
}

.sec-title {
  grid-column: 2;
  grid-row: 2;
  margin: 6px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: #fff;
}

/* the rule: each chapter's hairline, lit from the number */
.sec-line {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: stretch;
  justify-self: stretch;
  min-width: 40px;
  height: auto;
  background: linear-gradient(to bottom, rgba(0, 153, 255, 0.5), rgba(255, 255, 255, 0.08) 60%);
  margin-top: 6px;
}

/* ---------- 01 about: description + data box ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
  align-items: start;
}

.about-text p {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.72;
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.82);
}

.about-text p:last-child {
  margin-bottom: 0;
}

/* the data box: what the system is, in spec rows */
.op-box {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: 1px solid rgba(0, 153, 255, 0.5);
  border-radius: 6px;
  padding: 16px 18px 8px;
  background: rgba(255, 255, 255, 0.1);
}

.op-box-cap {
  margin: 0 0 10px;
  color: #09f;
  font-weight: 500;
}

.op-data {
  margin: 0;
}

.op-data > div {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.op-data > div:first-child {
  border-top: none;
}

.op-data dt {
  color: rgba(255, 255, 255, 0.45);
}

.op-data dd {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: #fff;
}

/* the stats strip: Armory-style quantifiable impact, big numbers */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  overflow: hidden;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  background: #060606;
}

.stat-num {
  font-size: clamp(34px, 4.5vw, 52px);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}

.stat-label {
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

/* the marquee: Armory's scrolling words strip under the cover */
.mta-marquee {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.mta-marquee-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation: mta-marquee-scroll 28s linear infinite;
}

.mta-marquee-track span {
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", monospace;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  padding: 13px 0;
}

.mta-marquee-track .mta-marq-dot {
  color: #09f;
  letter-spacing: 0;
  padding: 13px 18px;
}

@keyframes mta-marquee-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

[dir="rtl"] .mta-marquee-track {
  animation-direction: reverse;
}

/* ---------- 02 skills: the stack graph (obsidian-style) ---------- */

.skills-graph {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  background:
    radial-gradient(ellipse 62% 55% at 50% 46%, rgba(212, 175, 55, 0.07), rgba(6, 6, 6, 0) 70%),
    radial-gradient(ellipse 95% 85% at 50% 50%, rgba(0, 153, 255, 0.05), rgba(6, 6, 6, 0) 78%),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.skills-canvas {
  display: block;
  width: 100%;
  height: 460px;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

.skills-graph.dragging .skills-canvas {
  cursor: grabbing;
}

.skills-hint {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.45);
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

/* graph chrome: search, zoom, legend, tooltip */
.graph-search {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 150px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(6, 6, 6, 0.55);
  color: rgba(255, 255, 255, 0.9);
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  outline: none;
  transition: border-color 160ms, width 160ms;
}

.graph-search::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.graph-search:focus {
  border-color: rgba(212, 175, 55, 0.8);
  width: 190px;
}

.graph-zoom {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(6, 6, 6, 0.55);
}

.graph-zoom button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.graph-zoom button:hover,
.graph-zoom button:focus-visible {
  color: #d4af37;
  background: rgba(212, 175, 55, 0.08);
}

.graph-zoom button:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.graph-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 14px;
  max-width: 46%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(6, 6, 6, 0.55);
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.graph-tip {
  position: absolute;
  z-index: 6;
  pointer-events: none;
  padding: 5px 9px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 4px;
  background: rgba(6, 6, 6, 0.92);
  color: rgba(255, 255, 255, 0.95);
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transform: translate(-50%, -130%);
  opacity: 0;
  transition: opacity 100ms;
}

.graph-tip.visible {
  opacity: 1;
}

[dir="rtl"] .graph-search {
  right: auto;
  left: 12px;
}

[dir="rtl"] .graph-zoom {
  right: auto;
  left: 12px;
}

[dir="rtl"] .graph-legend {
  left: auto;
  right: 12px;
}

@media (max-width: 640px) {
  .skills-canvas {
    height: 380px;
  }

  .graph-legend {
    grid-template-columns: 1fr;
    max-width: 55%;
  }

  .graph-search {
    width: 120px;
  }

  .graph-search:focus {
    width: 150px;
  }
}

/* ---------- 03 projects: plates ---------- */

.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.project {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 0 16px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: border-color 180ms, background 180ms;
}

.project:hover {
  border-color: rgba(0, 153, 255, 0.6);
  background: rgba(255, 255, 255, 0.14);
}

.project-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
}

.project-fig {
  flex: none;
  color: #09f;
}

.project-head h3 {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  color: #fff;
}

.project-year {
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.45);
}

.project-summary {
  margin: 12px 16px 0;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.project-stack {
  margin: 10px 16px 0;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.04em;
}

.project-links {
  margin: 12px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #fff;
  color: #060606;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: background 180ms, color 180ms;
}

.link svg {
  width: 13px;
  height: 13px;
}

.link:hover {
  background: #09f;
  color: #fff;
}

/* ---------- 04 experience: the career ledger ---------- */

/* the head line: a running-total label on the far side, like the
   register column it borrows from */
.ledger-head {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 16px;
}

.ledger-meta {
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

/* the register itself: a thick top rule, then ruled rows */
.ledger {
  border-top: 2px solid rgba(255, 255, 255, 0.85);
}

.ledger-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 6px 24px;
  align-items: baseline;
  padding: 22px 4px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ledger-row:last-child {
  border-bottom: none;
}

/* the period column: the logged range, machine voice */
.ledger-period {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
}

/* the role: display voice, with the company as a small cap below */
.ledger-role {
  margin: 0;
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: #fff;
}

.ledger-org {
  display: block;
  margin-top: 7px;
  font-family: "IBM Plex Mono", "Geist Mono", "Fragment Mono", "Cascadia Mono",
    "Consolas", "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.ledger-desc {
  margin: 0;
  max-width: 60ch;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

/* ---------- 05/06 records: certification records / awards ---------- */

.sec-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 05 education: certification records — stamped years */
.rec-item.records {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 6px 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  align-items: baseline;
}

.rec-item.records:last-child {
  border-bottom: none;
}

.rec-stamp {
  grid-row: 1 / span 2;
  align-self: center;
  color: #09f;
  border: 1px solid rgba(0, 153, 255, 0.4);
  padding: 3px 0;
  text-align: center;
  background: transparent;
}

.rec-item.records .rec-title {
  font-size: 15px;
  color: #fff;
}

.rec-item.records .rec-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

/* 06 recognition: awards — the one filled marker */
.rec-item.awards {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr) auto;
  gap: 4px 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  align-items: baseline;
}

.rec-item.awards:last-child {
  border-bottom: none;
}

/* the seal: the only filled dot in the document */
.rec-item.awards::before {
  content: "";
  grid-row: 1 / span 2;
  align-self: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #09f;
}

.rec-item.awards .rec-title {
  grid-column: 2;
  font-size: 15px;
  color: #fff;
}

.rec-item.awards .rec-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 153, 255, 0.4);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.rec-item.awards .rec-link:hover {
  color: #09f;
  border-color: #09f;
}

.rec-item.awards .rec-ext {
  width: 11px;
  height: 11px;
  margin-left: 6px;
  vertical-align: 0.1em;
}

html[lang="ar"] .rec-ext {
  margin-left: 0;
  margin-right: 6px;
}

.rec-item.awards .rec-sub {
  grid-column: 2;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.rec-item.awards .rec-year {
  grid-column: 3;
  grid-row: 1 / span 2;
  align-self: center;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------- 07 contact: the letters & commissions card ---------- */

.letters-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  overflow: hidden;
}

/* left: the form */
.letters-form {
  padding: 30px 32px 32px;
}

.letters-h3 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: #fff;
}

.letters-intro {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.6);
}

.letters-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.letters-field {
  display: grid;
  gap: 6px;
}

.letters-field-wide {
  grid-column: 1 / -1;
}

.letters-field input,
.letters-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
  font-size: 14px;
  transition: border-color 160ms, background 160ms;
}

.letters-field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.5;
}

.letters-field input::placeholder,
.letters-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.letters-field input:focus,
.letters-field textarea:focus {
  outline: none;
  border-color: rgba(212, 175, 55, 0.65);
  background: rgba(255, 255, 255, 0.06);
}

.letters-label {
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.letters-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 18px;
  margin-top: 22px;
}

.letters-eta {
  color: rgba(255, 255, 255, 0.4);
  font-size: 10px;
}

.letters-send {
  padding: 13px 28px;
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 3px;
  background: transparent;
  color: #d4af37;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}

.letters-send:hover,
.letters-send:focus-visible {
  background: #d4af37;
  color: #0a0a0a;
}

.letters-hp {
  display: none;
}

/* right: the info panel */
.letters-info {
  display: flex;
  flex-direction: column;
  padding: 10px 0 26px;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.letters-block {
  padding: 18px 26px 19px;
}

.letters-block + .letters-block {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.letters-block-label {
  margin: 0 0 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 10px;
}

.letters-block-value {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  color: #fff;
  overflow-wrap: anywhere;
}

.letters-block-value a {
  color: #d4af37;
}

.letters-block-value a:hover,
.letters-block-value a:focus-visible {
  color: #fff;
}

.letters-block-sub {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.55);
}

.letters-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding: 20px 26px 0;
}

.letters-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  transition: border-color 160ms, color 160ms, background 160ms;
}

.letters-social-btn svg {
  width: 18px;
  height: 18px;
}

.letters-social-btn:hover,
.letters-social-btn:focus-visible {
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(212, 175, 55, 0.08);
  color: #d4af37;
}

/* ---------- footer ---------- */

.sections-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 22px;
  padding: 18px 4px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sections-foot a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 180ms;
}

.sections-foot a:hover {
  color: #09f;
}

/* ---------- the margin rail (table of contents) ---------- */

.manual-rail {
  position: sticky;
  top: 84px;
  grid-column: 2;
  border-inline-start: 1px solid rgba(255, 255, 255, 0.12);
  padding-inline-start: 22px;
  padding-bottom: 12px;
}

.manual-rail-cap {
  display: block;
  margin: 2px 0 10px;
  color: #09f;
  font-size: 11px;
}

.manual-toc {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.manual-toc:last-child {
  border-bottom: none;
}

/* the blue tick: the page's one authored motion */
.manual-toc::before {
  content: "";
  position: absolute;
  inset-inline-start: -23px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #09f;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 260ms ease-out;
}

.manual-toc:hover .toc-num,
.manual-toc:hover .toc-title {
  color: #fff;
}

.manual-toc.active .toc-num {
  color: #09f;
}

.manual-toc.active .toc-title {
  color: #fff;
}

.manual-toc.active::before {
  transform: scaleY(1);
}

.toc-num {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
  transition: color 180ms;
}

.toc-title {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  transition: color 180ms;
}

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .manual-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* the rail becomes a sticky strip of part pills */
  .manual-rail {
    position: sticky;
    top: 72px;
    z-index: 5;
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 18px 0 0;
    border-inline-start: none;
    padding: 6px 0;
    background: #060606;
    scrollbar-width: none;
  }
  .manual-rail::-webkit-scrollbar {
    display: none;
  }
  .manual-rail-cap {
    display: none;
  }
  .manual-toc {
    flex: none;
    min-height: 44px;
    align-items: center;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
  }
  .manual-toc:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }
  .manual-toc::before {
    display: none;
  }
  .manual-toc.active {
    border-color: #09f;
  }
  .manual-toc.active .toc-num {
    color: #09f;
  }
}

@media (max-width: 640px) {
  .manual {
    padding: 88px 12px 84px;
  }

  .manual-cover {
    grid-template-columns: 1fr;
  }

  .manual-fig {
    border-inline-end: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .manual-figure img {
    max-width: 320px;
    margin: 0 auto;
  }

  .manual-titleblock {
    padding: 24px 20px 20px;
  }

  .manual-spec > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .page-sections.group {
    padding-inline: 16px;
  }

  .sec {
    padding-top: 22px;
    scroll-margin-bottom: 84px;
  }

  .sec-title {
    font-size: 28px;
  }

  .sec-sub {
    display: none;
  }

  .about-grid,
  .project-grid,
  .letters-grid {
    grid-template-columns: 1fr;
  }

  .letters-fields {
    grid-template-columns: 1fr;
  }

  .letters-info {
    border-inline-start: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 6px 0 24px;
  }

  .op-box {
    margin-top: 6px;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 18px 4px 20px;
  }

  /* the rail docks as a fixed channel bar above the fold */
  .manual-rail {
    position: fixed;
    top: auto;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    right: 10px;
    z-index: 20;
    margin: 0;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(6, 6, 6, 0.92);
    backdrop-filter: blur(4px);
    transition: transform 240ms ease-out, opacity 200ms ease-out;
  }

  /* while the cover is in view the dock steps aside, so the
     spec strip is never hidden under it; focus brings it back */
  .manual-rail.is-rail-hidden {
    transform: translateY(calc(100% + 26px));
    opacity: 0;
    pointer-events: none;
  }
}

/* ---------- Arabic (RTL) ---------- */

html[lang="ar"] .manual,
html[lang="ar"] .manual button,
html[lang="ar"] .manual a,
html[lang="ar"] .manual input,
html[lang="ar"] .manual select,
html[lang="ar"] .manual textarea {
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", "Noto Naskh Arabic",
    sans-serif;
}

/* tracked caps read as broken spacing in Arabic; the accent carries on */
html[lang="ar"] .manual .manual-doc-id,
html[lang="ar"] .manual .manual-subtitle,
html[lang="ar"] .manual .manual-spec dt,
html[lang="ar"] .manual .sec-num,
html[lang="ar"] .manual .sec-sub,
html[lang="ar"] .manual .skills-hint,
html[lang="ar"] .manual .project-year,
html[lang="ar"] .manual .project-fig,
html[lang="ar"] .manual .project-stack,
html[lang="ar"] .manual .ledger-period,
html[lang="ar"] .manual .ledger-org,
html[lang="ar"] .manual .ledger-meta,
html[lang="ar"] .manual .rec-stamp,
html[lang="ar"] .manual .rec-year,
html[lang="ar"] .manual .op-box-cap,
html[lang="ar"] .manual .op-data dt,
html[lang="ar"] .manual .letters-label,
html[lang="ar"] .manual .letters-block-label,
html[lang="ar"] .manual .letters-eta,
html[lang="ar"] .manual .letters-send,
html[lang="ar"] .manual .manual-rail-cap,
html[lang="ar"] .manual .manual-fig-cap,
html[lang="ar"] .manual .sections-foot a,
html[lang="ar"] .manual .link {
  letter-spacing: 0;
}
