/* ════════════════════════════════════════
   Mustafa Aboelhamd — Editorial Portfolio
   Warm paper · deep ink · champagne gold
   Calm, spacious, oversized type
   ════════════════════════════════════════ */

:root {
  --paper: #f4f1ea;
  --paper-2: #efebe1;
  --paper-3: #e9e4d8;
  --ink: #181a20;
  --ink-2: #2c2f38;
  --ink-soft: #595d68;
  --ink-faint: #8e9099;
  --gold: #9a7b43;
  --gold-bright: #b6914f;
  --gold-soft: rgba(154, 123, 67, 0.10);
  --line: rgba(24, 26, 32, 0.13);
  --line-soft: rgba(24, 26, 32, 0.07);
  --maxw: 1240px;
  --gutter: clamp(22px, 5vw, 88px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; color: var(--gold); }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 1000;
  background: var(--ink); color: var(--paper); padding: 8px 16px; border-radius: 6px;
}
.skip-link:focus { left: 12px; }

/* ════ NAV ════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.4s var(--ease), border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.solid {
  background: rgba(244, 241, 234, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav-brand { font-weight: 600; font-size: 0.95rem; letter-spacing: -0.2px; white-space: nowrap; }
.nav-menu { display: flex; gap: 36px; }
.nav-menu a {
  font-size: 0.84rem; font-weight: 500; color: var(--ink-soft);
  display: inline-flex; align-items: baseline; gap: 6px; transition: color 0.25s;
}
.nav-menu a .idx { font-size: 0.62rem; color: var(--gold); font-weight: 600; }
.nav-menu a:hover { color: var(--ink); }
.nav-cta {
  font-size: 0.82rem; font-weight: 600; color: var(--ink);
  border: 1px solid var(--line); border-radius: 100px; padding: 9px 20px;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-burger span { width: 24px; height: 1.5px; background: var(--ink); transition: 0.3s; }
.nav-mobile { display: none; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line-soft); }
.nav-mobile a { padding: 16px var(--gutter); font-size: 1rem; border-top: 1px solid var(--line-soft); }
.nav-mobile.open { display: flex; }

/* ════ Layout primitives ════ */
.band {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(80px, 12vw, 160px) var(--gutter);
  border-top: 1px solid var(--line-soft);
}
.band-alt { background: var(--paper-2); max-width: none; }
.band-alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.band-head {
  display: flex; align-items: baseline; gap: 16px; margin-bottom: clamp(40px, 6vw, 72px);
}
.band-no {
  font-family: 'Fraunces', serif; font-size: 1rem; color: var(--gold); font-weight: 500;
}
.band-label {
  font-size: 0.74rem; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--ink-soft);
}
.band-label.sub { color: var(--gold); }

/* ════ HERO ════ */
.hero { padding: clamp(130px, 16vw, 180px) var(--gutter) 0; max-width: var(--maxw); margin: 0 auto; }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 80px);
  align-items: center; padding-bottom: clamp(64px, 9vw, 120px);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.8rem; font-weight: 500; letter-spacing: 0.4px; color: var(--ink-soft);
  margin-bottom: 30px;
}
.eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #5a9e6b;
  box-shadow: 0 0 0 0 rgba(90,158,107,0.5); animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%{box-shadow:0 0 0 0 rgba(90,158,107,.5)} 70%{box-shadow:0 0 0 8px rgba(90,158,107,0)} 100%{box-shadow:0 0 0 0 rgba(90,158,107,0)} }

.display {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 8.2rem); line-height: 0.92; letter-spacing: -0.03em;
  color: var(--ink);
}
.display .line { display: block; }
.display .accent { color: var(--gold); font-style: italic; font-weight: 300; }
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.32rem); color: var(--ink-soft); line-height: 1.65;
  max-width: 540px; margin: clamp(28px, 4vw, 40px) 0 36px; font-weight: 300;
}
.lead { font-weight: 400; }
.hero-links { display: flex; gap: 32px; flex-wrap: wrap; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.95rem; font-weight: 600; color: var(--ink);
  padding-bottom: 5px; border-bottom: 1px solid var(--ink);
  transition: gap 0.28s var(--ease), color 0.25s, border-color 0.25s;
}
.arrow-link svg { transition: transform 0.28s var(--ease); }
.arrow-link:hover { gap: 16px; }
.arrow-link:hover svg { transform: translateX(3px); }
.arrow-link.muted { color: var(--ink-soft); border-color: var(--line); }
.arrow-link.muted:hover { color: var(--ink); border-color: var(--ink); }

/* Hero photo */
.hero-photo { position: relative; justify-self: end; }
.photo-frame {
  width: clamp(220px, 26vw, 330px); aspect-ratio: 1 / 1.16; border-radius: 6px; overflow: hidden;
  border: 1px solid var(--line); box-shadow: 0 30px 70px -30px rgba(24,26,32,0.4);
  background: var(--paper-3);
}
.photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.18) contrast(1.03); transition: filter 0.6s var(--ease);
}
.hero-photo:hover .photo-frame img { filter: grayscale(0) contrast(1.03); }
.photo-cap {
  position: absolute; bottom: -14px; left: -14px;
  background: var(--paper); border: 1px solid var(--line);
  font-size: 0.72rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 100px;
}

/* Marquee */
.hero-marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 22px 0; overflow: hidden; white-space: nowrap;
  margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1);
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 28px;
  animation: marquee 38s linear infinite; will-change: transform;
}
.marquee-track span {
  font-family: 'Fraunces', serif; font-size: 1.15rem; color: var(--ink-2); font-weight: 400;
}
.marquee-track .sep { color: var(--gold); font-size: 0.8rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ════ Prose / About ════ */
.prose { max-width: 720px; }
.prose-lead {
  font-family: 'Fraunces', serif; font-size: clamp(1.5rem, 3vw, 2.1rem); line-height: 1.3;
  font-weight: 400; color: var(--ink); margin-bottom: 36px; letter-spacing: -0.01em;
}
.prose p { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 22px; line-height: 1.8; }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  margin-top: clamp(48px, 7vw, 80px); padding-top: 44px; border-top: 1px solid var(--line);
}
.stat-num {
  display: block; font-family: 'Fraunces', serif; font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 400; color: var(--ink); line-height: 1; letter-spacing: -0.02em;
}
.stat-cap { display: block; font-size: 0.8rem; color: var(--ink-faint); margin-top: 12px; letter-spacing: 0.2px; }

/* ════ Experience ════ */
.exp { list-style: none; }
.exp-row {
  display: grid; grid-template-columns: 140px 1fr; gap: clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 44px) 0; border-top: 1px solid var(--line);
  transition: padding-left 0.4s var(--ease);
}
.exp-row:hover { padding-left: 10px; }
.exp-when {
  display: flex; gap: 8px; font-size: 0.8rem; font-weight: 500; color: var(--ink-faint);
  letter-spacing: 1px;
}
.exp-when .now { color: var(--gold); }
.exp-what h3 { font-family: 'Fraunces', serif; font-size: clamp(1.3rem, 2.4vw, 1.8rem); font-weight: 400; letter-spacing: -0.01em; margin-bottom: 4px; }
.exp-org { font-size: 0.86rem; color: var(--gold); font-weight: 500; margin-bottom: 16px; }
.exp-what p { font-size: 0.96rem; color: var(--ink-soft); line-height: 1.75; max-width: 640px; }

/* ════ Work ════ */
.work { display: flex; flex-direction: column; }
.work-item {
  padding: clamp(34px, 5vw, 56px) 0; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 0.8fr 2fr; gap: clamp(20px, 4vw, 56px); align-items: start;
}
.work-meta { display: flex; flex-direction: column; gap: 8px; }
.work-sector { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--ink); }
.work-client { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ink-faint); }
.work-kpi {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(154,123,67,0.22);
  padding: 5px 10px; border-radius: 100px; width: fit-content; margin-top: 4px;
}
.work-title {
  font-family: 'Fraunces', serif; font-size: clamp(1.6rem, 3.4vw, 2.5rem); font-weight: 400;
  letter-spacing: -0.015em; line-height: 1.08; margin-bottom: 16px; color: var(--ink);
  transition: color 0.3s;
}
.work-item:hover .work-title { color: var(--gold); }
.work-item > p { font-size: 1rem; color: var(--ink-soft); line-height: 1.75; max-width: 620px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chips li {
  font-size: 0.76rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 100px; padding: 5px 14px;
}

/* ════ Expertise ════ */
.domains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.domain { background: var(--paper); padding: clamp(24px, 3vw, 34px); transition: background 0.3s; }
.band-alt .domain { background: var(--paper-2); }
.domain:hover { background: var(--paper-3); }
.domain h3 { font-family: 'Fraunces', serif; font-size: 1.2rem; font-weight: 500; margin-bottom: 12px; }
.domain p { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.75; }

.cred-head { margin: clamp(56px, 8vw, 88px) 0 28px; }
.creds { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.creds li {
  display: flex; align-items: center; gap: 14px; padding: 16px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; color: var(--ink-2);
}
.ci {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.5px;
  padding: 4px 9px; border-radius: 5px; flex-shrink: 0; min-width: 60px; text-align: center;
}
.ci.up { background: rgba(200,70,70,0.12); color: #b04a4a; }
.ci.aa { background: rgba(200,140,30,0.14); color: #a06a14; }
.ci.ud { background: rgba(50,110,210,0.12); color: #3568b0; }
.ci.sc { background: rgba(40,150,80,0.13); color: #2c8050; }
.ci.dr { background: rgba(140,70,200,0.12); color: #7a44b0; }
.edu { margin-top: 36px; font-size: 0.94rem; color: var(--ink-soft); }

/* ════ Contact ════ */
.contact {
  max-width: var(--maxw); margin: 0 auto; padding: clamp(90px, 13vw, 170px) var(--gutter) 0;
  border-top: 1px solid var(--line-soft);
}
.contact-display {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.0; letter-spacing: -0.03em;
  color: var(--ink); margin-bottom: 32px;
}
.contact-display .accent { color: var(--gold); font-style: italic; font-weight: 300; }
.contact-sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 520px; margin-bottom: 48px; }
.contact-actions { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Fraunces', serif; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 400;
  color: var(--ink); border-bottom: 1.5px solid var(--ink); padding-bottom: 8px;
  transition: gap 0.28s var(--ease), color 0.25s, border-color 0.25s;
}
.btn:hover { gap: 18px; color: var(--gold); border-color: var(--gold); }
.contact-secondary { display: flex; gap: 28px; }
.contact-secondary a {
  font-size: 0.9rem; font-weight: 500; color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding-bottom: 3px; transition: color 0.25s, border-color 0.25s;
}
.contact-secondary a:hover { color: var(--ink); border-color: var(--ink); }

.contact-secondary a { display: inline-flex; align-items: center; gap: 7px; }
.wa-link svg { color: #25a34a; transition: color 0.25s; }
.wa-link:hover svg { color: #128c3e; }

/* Floating WhatsApp button */
.wa-float {
  position: fixed; right: clamp(18px, 3vw, 32px); bottom: clamp(18px, 3vw, 32px);
  z-index: 200; display: inline-flex; align-items: center; gap: 0;
  height: 58px; padding: 0; border-radius: 100px; overflow: hidden;
  background: #25d366; color: #fff;
  box-shadow: 0 10px 30px -6px rgba(37,211,102,0.55), 0 4px 14px rgba(0,0,0,0.18);
  transition: gap 0.3s var(--ease), padding 0.3s var(--ease), transform 0.25s, box-shadow 0.25s;
}
.wa-float svg { flex-shrink: 0; margin: 0 15px; }
.wa-float-label {
  font-size: 0.9rem; font-weight: 600; white-space: nowrap;
  max-width: 0; opacity: 0; transition: max-width 0.35s var(--ease), opacity 0.25s, margin 0.35s var(--ease);
  margin-right: 0;
}
.wa-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px -6px rgba(37,211,102,0.6), 0 6px 18px rgba(0,0,0,0.22);
}
.wa-float:hover .wa-float-label { max-width: 120px; opacity: 1; margin-right: 22px; }
@media (max-width: 620px) {
  .wa-float { height: 54px; }
  .wa-float svg { margin: 0 13px; width: 26px; height: 26px; }
  .wa-float:hover .wa-float-label { max-width: 0; opacity: 0; margin-right: 0; } /* icon-only on mobile */
}

.footer {
  margin-top: clamp(80px, 12vw, 150px); padding: 40px 0;
  border-top: 1px solid var(--line-soft);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  font-size: 0.8rem; color: var(--ink-faint);
}
.footer a:hover { color: var(--ink); }

/* ════ Reveal ════ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ════ Responsive ════ */
@media (max-width: 920px) {
  .nav-menu, .nav-cta { display: none; }
  .nav-burger { display: flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-photo { justify-self: start; order: -1; margin-bottom: 16px; }
  .photo-frame { width: clamp(180px, 50vw, 260px); }
  .domains { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .stat-row { grid-template-columns: 1fr 1fr; gap: 28px; }
  .exp-row { grid-template-columns: 1fr; gap: 10px; }
  .exp-when { flex-direction: row; }
  .work-item { grid-template-columns: 1fr; gap: 14px; }
  .work-meta { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; }
  .domains { grid-template-columns: 1fr; }
  .creds { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}
