/* ============================================================
   A7mad.me · Layout
   Rhythm calibrated against the A9L baseline:
   sections 96-110px, wrap 1200px, sides 32px, hero grid 1.15/.85
   ============================================================ */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--side-pad);
}

.wrap--narrow {
  max-width: var(--wrap-narrow);
}

.section {
  padding-block: var(--sec-pad);
}

.section + .section {
  border-top: 1px solid var(--border-soft);
}

/* Section header: pixel kicker + big Arabic title */
.sec-head {
  margin-bottom: clamp(36px, 6vw, 56px);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-kicker);
  color: var(--accent-warm);
  margin-bottom: 18px;
}

.kicker .px-label {
  font-size: 19px;
  color: var(--accent-warm);
}

.kicker__dash {
  width: 22px;
  height: 2px;
  background: var(--border-soft);
}

.sec-title {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

.sec-lead {
  margin-top: 16px;
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: var(--measure);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding-block: clamp(64px, 9vw, 104px);
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 8%, var(--glow-warm-faint), transparent 46%),
    radial-gradient(circle at 12% 90%, var(--glow-brand), transparent 40%);
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(40px, 5vw, 64px);
  align-items: center;
}

/* Hero hierarchy (D-031/D-043): A7MAD TECH leads, أحمد التقني tight under it,
   everything on one start-edge axis */
.hero h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* RTL: flex-start = right edge, one shared axis */
  gap: 2px;
  margin-bottom: 14px;
}

.hero__brand-en {
  font-size: clamp(46px, 8.6vw, 88px);
  line-height: 0.95;
  color: var(--brand-primary);
  letter-spacing: 0.03em;
  /* VT323 is monospace: its space glyph is a full cell, which read as a
     double gap between A7MAD and TECH. Pull the word gap back to a
     normal single-space feel. */
  word-spacing: -0.24em;
  text-align: end; /* LTR span: end = right, matches the Arabic line */
  white-space: nowrap;
  max-width: 100%;
}

.hero__brand-ar {
  font-size: clamp(26px, 4.6vw, 40px);
  font-weight: 800;
  color: var(--brand-mid);
  line-height: 1.2;
}

.hero__tagline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 2.2vw, 18px);
  font-weight: 500;
  color: var(--accent-warm);
  margin-bottom: 16px;
}

.hero__def {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: 30em;
  margin-bottom: 38px;
}

.hero__cta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Hero visual: character slot + bubble on a pixel stage */
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__scene {
  position: relative;
  width: min(100%, 380px);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* D-046: speaker unit - the tail points at Ahmed but never enters
     his head; small clear gap instead of overlap */
  gap: 4px;
}

.hero__scene .speech {
  position: relative;
  z-index: 2;
}

/* ---- Generic split used by about / beyond ---- */
.split {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.about-lines {
  display: grid;
  gap: 14px;
  font-size: var(--fs-lead);
  line-height: 1.9;
  max-width: var(--measure);
}

.about-ai {
  margin-top: 30px;
  padding: 22px 26px;
  background: var(--surface-primary);
  border: 1px solid var(--border-mid);
  border-inline-start: 3px solid var(--accent-warm);
  border-radius: var(--r-card);
  font-size: var(--fs-lead);
  line-height: 1.9;
  max-width: 36em;
}

/* ---- Projects ---- */
.projects .sec-head {
  max-width: var(--wrap-narrow);
}

.stage {
  /* Featured frame (D-036): navy shell paints a 2px chamfered border,
     the grid inside paints the surface. Glow via drop-shadow so it
     follows the chamfer. Rest-state glow is barely-there. */
  position: relative;
  margin-top: clamp(48px, 7vw, 72px);
  background: var(--border-strong);
  padding: 2px;
  clip-path: var(--chamfer-lg);
  /* D-042: navy edge + ambient glow felt even at rest, plus soft depth */
  filter:
    drop-shadow(0 10px 18px rgba(28, 47, 73, 0.10))
    drop-shadow(0 0 20px rgba(36, 58, 90, 0.08));
  overflow: hidden;
}

.stage + .stage {
  margin-top: clamp(56px, 8vw, 88px);
}

.stage__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 460px;
  background: var(--surface-primary);
  clip-path: var(--chamfer-md);
}

.stage--flip .stage__grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.stage__body {
  padding: clamp(30px, 4.5vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stage__visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(28px, 4vw, 48px);
  border-inline-start: 1px solid var(--border-soft);
  background:
    radial-gradient(circle at 50% 45%, var(--glow-warm-faint), transparent 62%),
    var(--surface-warm);
  overflow: hidden;
}

.stage--flip .stage__visual {
  border-inline-start: 0;
  border-inline-end: 1px solid var(--border-soft);
}

.stage__title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.stage__title {
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: var(--lh-tight);
}

.stage__line {
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.stage__desc {
  color: var(--text-muted);
  max-width: 32em;
  margin-bottom: 26px;
}

.stage__foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 10px;
}

/* Bubble inside a stage sits with the character slot in the visual pane */
.stage__scene {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

/* ---- Journey (approach-style cycler) ---- */
.journey-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(36px, 6vw, 52px);
}

.cycler {
  position: relative;
  min-height: 240px;
}

.cycler__slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition:
    opacity 0.6s var(--ease-soft),
    transform 0.6s var(--ease-soft),
    filter 0.6s ease;
  pointer-events: none;
}

.cycler__slide.active {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}

.cycler__num {
  font-family: var(--font-px);
  font-size: 58px;
  line-height: 1;
  color: var(--accent-warm);
  margin-bottom: 20px;
}

.cycler__text {
  font-size: clamp(20px, 3.6vw, 30px);
  font-weight: 700;
  line-height: 1.6;
  max-width: 24em;
  color: var(--text-heading); /* display text, not body */
}

/* ---- Skills ---- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-card);
  background: var(--surface-primary);
  overflow: hidden;
}

.skill-col {
  padding: 30px 26px 34px;
}

.skill-col + .skill-col {
  border-inline-start: 1px solid var(--border-soft);
}

.skill-col h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--accent-warm);
  margin-bottom: 18px;
}

.skill-col ul {
  display: grid;
  gap: 10px;
  color: var(--text-secondary);
}

.skill-col li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.skill-col li::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--beige);
  transform: translateY(-2px);
}

.skills-closing {
  margin-top: clamp(44px, 7vw, 64px);
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(36px, 5vw, 56px);
  align-items: center;
}

.skills-closing__line {
  font-size: clamp(24px, 4.4vw, 36px);
  font-weight: 800;
  line-height: 1.45;
  max-width: 18em;
  color: var(--text-heading); /* display text, not body */
}

.tools-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: clamp(40px, 6vw, 56px);
}

/* ---- Beyond (outside work) ---- */
.beyond-quotes {
  display: grid;
  gap: 22px;
  max-width: 38em;
}

.beyond-quotes blockquote {
  margin: 0;
  padding: 20px 26px;
  background: var(--surface-primary);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-card);
  font-size: var(--fs-lead);
  line-height: 1.9;
}

.beyond-quotes blockquote.strong {
  font-weight: 700;
  border-color: var(--beige);
  background: var(--surface-warm);
}

/* ---- Contact (dark strong block, allowed by Design System) ---- */
.contact {
  background:
    radial-gradient(120% 120% at 50% 0%, var(--dark-raised) 0%, var(--dark-bg) 62%);
  color: var(--dark-text);
  text-align: center;
}

.contact .wrap {
  padding-block: clamp(88px, 12vw, 120px) clamp(56px, 8vw, 72px);
}

.contact__mark {
  width: 60px;
  height: 60px;
  margin-inline: auto;
  margin-bottom: 34px;
  background: var(--accent-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: -3px 4px 0 rgba(28, 47, 73, 0.55);
}

.contact__mark i {
  width: 9px;
  height: 9px;
  background: var(--dark-text);
}

.contact__mark i:nth-child(2) {
  transform: translateY(-6px);
}

.contact h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: var(--lh-tight);
  margin-bottom: 18px;
}

.contact__soon {
  font-size: clamp(19px, 3vw, 24px);
  color: var(--dark-muted);
  margin-bottom: 46px;
}

.contact__closing {
  font-size: var(--fs-lead);
  color: var(--accent-warm-bright);
  font-weight: 500;
}

/* ---- Footer ---- */
.footer {
  background: var(--dark-bg);
  color: var(--dark-muted);
  border-top: 1px solid var(--dark-line);
}

.footer .wrap {
  padding-block: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: var(--fs-small);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__brand .px-label {
  font-size: 19px;
  color: var(--dark-text);
}

.footer a:hover {
  color: var(--dark-text);
}

/* ---- 404 ---- */
.notfound {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  text-align: center;
  padding: var(--side-pad);
}

.notfound .px-label {
  font-size: clamp(64px, 16vw, 120px);
  color: var(--beige);
  line-height: 1;
}

.notfound p {
  font-size: var(--fs-lead);
  color: var(--text-secondary);
}
