/* ============================================================
   Ubeydullah Ademi — warm editorial system
   ============================================================ */
:root{
  --bg:#F7F4ED;
  --bg-2:#F0ECE3;          /* quiet secondary surface */
  --surface:#FFFDF9;
  --ink:#182334;
  --body:#4A5568;
  --accent:#146B5C;
  --accent-dark:#0F5548;
  --clay:#B85F3D;          /* entrepreneurship, human emphasis, the outcome point */
  --clay-deep:#9C4E2F;     /* clay as a background: darkened so ivory text passes AA */
  --sand:#EFE8DC;          /* animation field */
  --blue-gray:#E8EEF0;     /* AI–human field */
  --blue-muted:#58748A;    /* communication accent */
  --rule:#D9D4C8;
  --serif:"Newsreader",Georgia,"Times New Roman",serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --measure:70ch;
  --pad:clamp(1.25rem,5vw,3rem);
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;background:var(--bg);color:var(--body);
  font-family:var(--sans);font-size:1.0625rem;line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;height:auto;display:block}
a{color:var(--accent);text-decoration:none;border-bottom:1px solid rgba(20,107,92,.32);transition:border-color .18s ease,background-color .18s ease}
a:hover{border-bottom-color:var(--accent);background:rgba(20,107,92,.07)}
::selection{background:var(--accent);color:var(--surface)}

.wrap{max-width:1120px;margin:0 auto;padding:0 var(--pad)}
.measure{max-width:var(--measure)}

.skip{position:absolute;left:-9999px;top:0;z-index:200;border:0}
.skip:focus{
  left:max(var(--pad),calc((100vw - 1120px)/2 + var(--pad)));
  top:.55rem;
  background:var(--surface);color:var(--accent);
  border:1px solid var(--accent);border-radius:2px;
  padding:.45rem .85rem;font-size:.88rem;font-weight:500;
}
:focus-visible{outline:2px solid var(--accent);outline-offset:3px}

/* ---------- typography ---------- */
h1,h2,h3{font-family:var(--serif);color:var(--ink);margin:0;line-height:1.12;letter-spacing:-.02em;font-weight:700}
h1{font-size:clamp(2.6rem,6vw,4.5rem);line-height:1.02}
h2{font-size:clamp(1.8rem,3.4vw,2.35rem)}
h3{font-size:clamp(1.2rem,2vw,1.45rem);font-weight:600;letter-spacing:-.01em}
p{margin:0 0 1.1rem}
strong{color:var(--ink);font-weight:600}
.lede{font-size:clamp(1.3rem,2.3vw,1.85rem);line-height:1.35;color:var(--body);letter-spacing:-.01em;max-width:32ch;margin:0 0 1.4rem}
.meta{font-size:.86rem;color:var(--body);letter-spacing:.02em}
.eyebrow{font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--accent);font-weight:600;margin:0 0 .9rem}

/* ---------- header / nav ---------- */
.site-head{border-bottom:1px solid var(--rule);position:sticky;top:0;background:rgba(247,244,237,.88);backdrop-filter:saturate(1.4) blur(8px);z-index:50}
.site-head .wrap{display:flex;align-items:center;justify-content:space-between;gap:1.5rem;min-height:68px}
.brand{display:flex;align-items:center;gap:.6rem;font-family:var(--serif);font-weight:700;color:var(--ink);border:0;font-size:1.05rem;letter-spacing:-.01em}
.brand img{width:32px;height:32px;flex:0 0 auto;transition:opacity .2s ease}
.brand:hover{background:none;color:var(--accent)}
.brand:hover img{opacity:.72}
.nav{display:flex;gap:1.9rem;align-items:center}
.nav a{color:var(--body);border:0;font-weight:500;font-size:1rem;padding:.55rem 0;border-bottom:2px solid transparent}
.nav a:hover,.nav a[aria-current=page]{color:var(--accent);border-bottom-color:var(--accent);background:none}

/* ---------- hero ---------- */
.hero{position:relative;overflow:hidden}
.hero::before{
  content:"";position:absolute;inset:0 0 auto 0;height:62%;pointer-events:none;z-index:0;
  background-image:linear-gradient(rgba(24,35,52,.024) 1px,transparent 1px),
                   linear-gradient(90deg,rgba(24,35,52,.024) 1px,transparent 1px);
  background-size:80px 80px;
  -webkit-mask-image:linear-gradient(#000,transparent);mask-image:linear-gradient(#000,transparent);
}
.hero .wrap{position:relative;z-index:1;display:grid;grid-template-columns:1fr auto;gap:clamp(2rem,5vw,4rem);align-items:center;padding-top:clamp(2.5rem,6vw,4.5rem);padding-bottom:clamp(2.5rem,6vw,4.5rem)}
.hero h1{margin-bottom:1.1rem}

.hero-portrait{
  width:100%;max-width:210px;aspect-ratio:4/5;object-fit:cover;object-position:50% 30%;
  border-radius:20px;margin-left:auto;border:0;filter:saturate(.94);
  box-shadow:0 12px 30px rgba(24,35,52,.11), 0 2px 6px rgba(24,35,52,.05);
}
.about-portrait{
  width:100%;max-width:300px;aspect-ratio:4/5;object-fit:cover;object-position:50% 20%;
  border-radius:20px;margin-left:auto;border:0;filter:saturate(.94);
  box-shadow:0 12px 30px rgba(24,35,52,.11), 0 2px 6px rgba(24,35,52,.05);
}

.btn-row{display:flex;gap:.9rem;flex-wrap:wrap;margin-top:.4rem}
.btn{display:inline-block;padding:.85rem 1.6rem;border-radius:2px;font-weight:500;font-size:1rem;border:1px solid var(--accent);background:var(--accent);color:var(--surface);transition:background-color .2s ease,border-color .2s ease,transform .2s ease}
.btn:hover{background:var(--accent-dark);border-color:var(--accent-dark);color:var(--surface);transform:translateY(-1px)}
.btn.ghost{background:transparent;color:var(--accent)}
.btn.ghost:hover{background:rgba(20,107,92,.08);color:var(--accent)}

/* ---------- sections ---------- */
.section{padding:clamp(3rem,6vw,4.75rem) 0;border-top:1px solid var(--rule)}
.section h2{margin-bottom:.35rem}
.rule{display:block;height:2px;width:0;background:var(--accent);margin:0 0 1.6rem}
.is-in .rule{width:88px;transition:width .7s cubic-bezier(.22,.61,.36,1) .1s}
.no-js .rule{width:88px}

/* dark section — the homepage's second act */
.section.dark{background:var(--ink);color:#D9D4C8;border-top:0}
.section.dark h2,.section.dark h3{color:var(--surface)}
.section.dark p{color:#C9D0DB}
.section.dark .rule{background:var(--accent)}
.section.dark blockquote{border-left-color:var(--accent);color:var(--surface)}
.section.dark a{color:#7FD3C1;border-bottom-color:rgba(127,211,193,.4)}
.section.dark a:hover{color:#A8E5D6;background:rgba(127,211,193,.1);border-bottom-color:#A8E5D6}
.section.dark .eyebrow{color:#7FD3C1}

/* ---------- section fields ---------- */
.section.cream{background:var(--surface)}
.section.sand{background:#EFEAE0}
.section.bluegray{background:var(--blue-gray);border-top:0}

/* teal field — data, consulting, action */
.section.teal{background:var(--accent);color:#E8F1EE;border-top:0}
.section.teal h2,.section.teal h3{color:var(--surface)}
.section.teal p{color:#DCEAE6}
.section.teal .rule{background:var(--clay)}
.section.teal .eyebrow{color:#A8DCCF}
.section.teal a{color:#FFFDF9;border-bottom-color:rgba(255,253,249,.45)}
.section.teal a:hover{color:#fff;background:rgba(255,255,255,.10);border-bottom-color:#fff}

/* clay field — the closing invitation */
.section.clay{background:var(--clay-deep);color:#FAEFE9;border-top:0}
.section.clay h2{color:var(--surface)}
.section.clay p{color:#F5E4DB}
.section.clay .rule{background:#F0C9B4}
.section.clay a:not(.btn){color:#FFFDF9;border-bottom-color:rgba(255,253,249,.45)}
.section.clay .btn{background:var(--surface);color:var(--clay-deep);border-color:var(--surface)}
.section.clay .btn:hover{background:#fff;border-color:#fff;color:var(--clay-deep)}
.section.clay .btn.ghost{background:transparent;color:#FFFDF9;border-color:rgba(255,253,249,.6)}
.section.clay .btn.ghost:hover{background:rgba(255,255,255,.12);color:#fff}

/* ---------- masthead stripe ---------- */
.stripe{background:var(--accent);height:54px;overflow:hidden;display:flex;align-items:center}
.stripe-track{display:flex;white-space:nowrap;will-change:transform}
.stripe-set{display:flex;align-items:center;flex:0 0 auto}
.stripe-set b{
  font-weight:500;font-size:12.5px;letter-spacing:.2em;text-transform:uppercase;
  color:#FFFDF9;padding:0 1.9rem;
}
.stripe-set i{width:6px;height:6px;border-radius:50%;background:var(--clay);flex:0 0 auto}
@media(prefers-reduced-motion:no-preference){
  .stripe-track{animation:marquee 42s linear infinite}
  .stripe-track.paused{animation-play-state:paused}
}
@keyframes marquee{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media(max-width:520px){.stripe{height:48px}.stripe-set b{font-size:11.5px;padding:0 1.3rem}}

/* ---------- selected work: 2x2 ---------- */
.cards{display:grid;gap:1.25rem;margin-top:.5rem}
@media(min-width:820px){.cards.two-up{grid-template-columns:1fr 1fr}}
.card{background:var(--surface);border:1px solid var(--rule);border-top:3px solid var(--rule);border-radius:3px;padding:clamp(1.4rem,3vw,1.9rem);transition:transform .25s ease,border-color .25s ease;display:flex;flex-direction:column}
.card:hover{transform:translateY(-3px)}
.card h3{color:var(--ink)}
.card p{color:#2E3D54}
.card .figure-note{color:#4A5568}
.card .meta{border-top-color:rgba(24,35,52,.12)}

/* four domains, one family — tinted fields with a thin accent edge */
.card.a-navy{background:#E4E9ED;border-color:rgba(24,35,52,.12);border-top-color:#182334}
.card.a-navy .cat,.card.a-navy .figure{color:#182334}

.card.a-teal{background:#DDEAE5;border-color:rgba(20,107,92,.16);border-top-color:#146B5C}
.card.a-teal .cat,.card.a-teal .figure{color:#0F5548}

.card.a-clay{background:#F0DFD5;border-color:rgba(184,95,61,.22);border-top-color:#B85F3D}
.card.a-clay .cat,.card.a-clay .figure{color:#8F4526}

.card.a-gold{background:#EEE6D2;border-color:rgba(151,109,50,.24);border-top-color:#976D32}
.card.a-gold .cat,.card.a-gold .figure{color:#6F4F22}
.card .cat{font-size:.68rem;letter-spacing:.15em;text-transform:uppercase;color:var(--accent);font-weight:600;margin:0 0 .7rem}
.card .figure{font-family:var(--serif);font-size:clamp(1.9rem,3.4vw,2.5rem);line-height:1;color:var(--ink);margin:0 0 .15rem;letter-spacing:-.02em}
.card .figure-note{font-size:.8rem;color:var(--body);margin:0 0 1rem}
.card h3{margin-bottom:.55rem}
.card p{margin-bottom:.8rem;font-size:1rem}
.card .meta{margin-top:auto;padding-top:.9rem;border-top:1px solid var(--rule)}

/* ---------- work page cases ---------- */
.case{border-top:1px solid var(--rule);padding:clamp(2.25rem,4.5vw,3.25rem) 0}
.case-grid{display:grid;gap:clamp(1.25rem,3vw,2.75rem)}
@media(min-width:860px){.case-grid{grid-template-columns:260px 1fr}}
.case-num{font-family:var(--serif);font-size:2.4rem;line-height:1;color:var(--rule);margin:0 0 .5rem;letter-spacing:-.02em}
.case-aside h2{font-size:clamp(1.5rem,2.6vw,1.95rem);margin-bottom:.7rem}
.case-tags{font-size:.78rem;letter-spacing:.1em;text-transform:uppercase;color:var(--body);margin-top:1rem}
.case dl{margin:0}
.case dt{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);font-weight:600;margin-top:1.3rem}
.case dt:first-of-type{margin-top:0}
.case dd{margin:.35rem 0 0}
.case .result{background:var(--bg-2);border-left:2px solid var(--accent);padding:1rem 1.2rem;margin:.5rem 0 0;border-radius:2px}
.case .result strong{font-family:var(--serif);font-size:1.15rem;color:var(--ink);display:block;font-weight:700}

blockquote{margin:0 0 1.4rem;padding:0 0 0 1.4rem;border-left:2px solid var(--accent);font-family:var(--serif);font-size:clamp(1.25rem,2.2vw,1.6rem);line-height:1.35;color:var(--ink);letter-spacing:-.01em}

ul.clean{list-style:none;padding:0;margin:0}
ul.clean li{padding:.6rem 0 .6rem 1.6rem;position:relative;border-bottom:1px solid var(--rule)}
ul.clean li::before{content:"";position:absolute;left:0;top:1.15rem;width:8px;height:8px;border-radius:50%;border:2px solid var(--accent)}
ul.clean li:last-child{border-bottom:0}

/* ---------- split (portrait + text) ---------- */
.split{display:grid;grid-template-columns:300px 1fr;gap:clamp(1.75rem,4vw,3.25rem);align-items:center}
@media(max-width:760px){.split{grid-template-columns:1fr;gap:1.5rem}}

/* ---------- footer ---------- */
.site-foot{background:var(--ink);color:var(--rule)}
.site-foot .wrap{padding-top:3rem;padding-bottom:3rem;display:flex;justify-content:space-between;gap:2rem;flex-wrap:wrap}
.site-foot a{color:var(--rule);border-bottom-color:rgba(217,212,200,.35)}
.site-foot a:hover{color:var(--surface);background:none;border-bottom-color:var(--surface)}
.site-foot .name{font-family:var(--serif);color:var(--surface);font-size:1.1rem;font-weight:700;margin-bottom:.3rem}
.site-foot .links{display:flex;gap:1.4rem;flex-wrap:wrap;align-items:flex-start}
.site-foot small{opacity:.7;display:block;margin-top:.6rem;font-size:.82rem}

/* ============================================================
   Hero diagram — disorder becomes structure, left to right
   ============================================================ */
.viz-band{background:var(--sand);border-top:1px solid var(--rule);border-bottom:0;padding:clamp(2rem,4vw,2.75rem) 0}
.viz{display:block;width:100%;max-width:960px;margin:0 auto;height:auto;overflow:visible}
.viz .try{stroke:#C7BFB0;stroke-width:1.25;fill:none;stroke-linecap:round}
.viz .link{stroke:var(--rule);stroke-width:1.25;fill:none}
.viz .qpoint{fill:var(--ink)}
.viz .obs{fill:var(--body)}
.viz .path{stroke:var(--accent);stroke-width:2.5;fill:none;stroke-linecap:round}
.viz .outcome{fill:var(--clay)}
.viz .label{font-family:var(--sans);font-size:15px;letter-spacing:.1em;text-transform:uppercase;fill:var(--body)}
/* the conclusion of the animation, not a caption */
.viz-band .cap{
  text-align:center;max-width:38ch;margin:2.1rem auto .6rem;
  font-family:var(--serif);font-size:clamp(1.2rem,2vw,1.4rem);line-height:1.35;
  color:var(--ink);letter-spacing:-.01em;
}
.viz-band .cap span{display:block}
/* below 700px the SVG scales too far down for legible in-image text — use real HTML instead */
.viz-labels{display:none}
@media(max-width:700px){
  .viz .label{display:none}
  .viz-labels{display:flex;justify-content:space-between;gap:.5rem;max-width:520px;margin:.9rem auto 0}
  .viz-labels span{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--body);text-align:center;flex:1}
}

@media(prefers-reduced-motion:no-preference){
  /* start states only when JS is present, so content never hides on failure */
  .js .viz-band .qpoint,.js .viz-band .obs,.js .viz-band .outcome,.js .viz-band .label{opacity:0}
  .js .viz-band .try,.js .viz-band .link{stroke-dasharray:var(--len,300);stroke-dashoffset:var(--len,300)}
  .js .viz-band .path{stroke-dasharray:1200;stroke-dashoffset:1200}

  /* 1 — uncertainty: the question, then attempts with no clear destination.
        the weak attempts fade back but stay legible; they were not wasted. */
  .is-in .qpoint{animation:pop .34s cubic-bezier(.22,.61,.36,1) .05s forwards}
  .is-in .t1{animation:draw .62s ease-out .28s forwards, dim .6s ease-out 2.30s forwards}
  .is-in .t2{animation:draw .62s ease-out .42s forwards, dim .6s ease-out 2.38s forwards}
  .is-in .t3{animation:draw .68s ease-out .56s forwards}
  .is-in .tick{animation:draw .2s ease-out 1.05s forwards, dim .6s ease-out 2.38s forwards}

  /* 2 — attempts produce evidence, scattered */
  .is-in .obs{animation:pop .30s cubic-bezier(.22,.61,.36,1) forwards}
  .o1{animation-delay:1.15s}.o2{animation-delay:1.20s}.o3{animation-delay:1.25s}
  .o4{animation-delay:1.30s}.o5{animation-delay:1.35s}.o6{animation-delay:1.40s}
  .o7{animation-delay:1.45s}.o8{animation-delay:1.50s}.o9{animation-delay:1.55s}

  /* — a beat of stillness here (~0.4s) so the disorder registers before analysis — */

  /* 3 — analysis: what held up draws together, and relationships appear */
  .is-in .obs.keep{animation:pop .30s cubic-bezier(.22,.61,.36,1) forwards,
                             gather .6s cubic-bezier(.22,.61,.36,1) 2.25s forwards}
  .is-in .link{animation:draw .38s ease-out forwards}
  .k1{animation-delay:2.50s}.k2{animation-delay:2.58s}.k3{animation-delay:2.66s}.k4{animation-delay:2.74s}

  /* 4 — informed action: one route, still curved. runs once, then rests. */
  .is-in .path{animation:draw .85s cubic-bezier(.4,0,.2,1) 2.84s forwards}
  .is-in .outcome{animation:pop .34s cubic-bezier(.22,.61,.36,1) 3.58s forwards,
                            pulse .5s ease-out 3.90s 1}

  .is-in .label{animation:fade .42s ease-out forwards}
  .g1{animation-delay:.35s}.g2{animation-delay:1.30s}.g3{animation-delay:2.60s}.g4{animation-delay:3.62s}

  /* hero copy */
  .js .hero h1,.js .hero .lede,.js .hero .intro,.js .hero .btn-row{opacity:0}
  .hero h1{animation:rise .6s cubic-bezier(.22,.61,.36,1) forwards}
  .hero .lede{animation:rise .6s cubic-bezier(.22,.61,.36,1) .10s forwards}
  .hero .intro{animation:rise .6s cubic-bezier(.22,.61,.36,1) .20s forwards}
  .hero .btn-row{animation:rise .6s cubic-bezier(.22,.61,.36,1) .30s forwards}

  /* scroll reveals */
  .js .reveal{opacity:0;transform:translateY(12px);transition:opacity .6s ease-out,transform .6s cubic-bezier(.22,.61,.36,1)}
  .js .reveal.is-in{opacity:1;transform:none}
  .reveal-d1{transition-delay:.08s}.reveal-d2{transition-delay:.16s}.reveal-d3{transition-delay:.24s}
}

@keyframes draw{to{stroke-dashoffset:0}}
@keyframes dim{to{opacity:.34}}
@keyframes gather{to{transform:translate(var(--gx,0),var(--gy,0))}}
@keyframes pop{from{opacity:0;transform:scale(.2)}to{opacity:1;transform:none}}
@keyframes pulse{0%{r:7}55%{r:11}100%{r:7}}
@keyframes fade{to{opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* ---------- responsive ---------- */
@media(max-width:860px){
  .hero .wrap{grid-template-columns:1fr}
  .hero-portrait{margin:0 0 .5rem;max-width:160px}
  .about-portrait{margin:1.25rem 0 0;max-width:240px}
  .lede{max-width:none}
  .nav{gap:1.1rem}
  .nav a{font-size:.95rem;min-height:44px;display:flex;align-items:center}
  .hero::before{display:none}
  .site-head .wrap{flex-wrap:wrap;min-height:0;padding-top:.6rem;padding-bottom:.6rem}
  .viz .label{font-size:21px}
  .case-num{font-size:1.9rem}
}
@media(max-width:520px){
  .brand{font-size:.98rem}
  .nav{gap:.9rem}
  .btn{flex:1 1 auto;text-align:center}
  .viz .label{font-size:26px}
}
