/* Zeeshan Latif portfolio - cream / ink / orange editorial style */
:root {
  --cream: #f6f1e7;
  --cream-2: #efe7d8;
  --ink: #16130f;
  --ink-2: #2a251f;
  --muted: #6f665b;
  --accent: #f0601e;
  --accent-2: #ff9a3c;
  --line: rgba(22, 19, 15, .12);
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  --r: 22px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }
body { background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; } /* otherwise the static avatar shows behind the talking video */
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence baseFrequency='.9' numOctaves='3'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* NAV */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(16px, 4vw, 48px); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--accent); color: #fff; font-family: var(--serif); font-size: 22px; }
.logo-text { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.logo-text em { color: var(--accent); }
.pill { display: flex; gap: 4px; padding: 5px; background: rgba(255,255,255,.75); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; }
.pill a { padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); transition: background .25s, color .25s; }
.pill a:hover { background: var(--cream-2); }
.pill a.active { background: var(--ink); color: #fff; }
.btn-dark { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; }
.btn-dark .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 4px rgba(61,220,132,.25); }

/* HERO */
.hero { position: relative; min-height: 100vh; padding: 110px clamp(16px, 4vw, 48px) 40px; text-align: center; overflow: hidden; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 600; color: var(--muted); }
.eyebrow.light { color: rgba(255,255,255,.6); }
.hero-name { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 15vw, 230px); line-height: .86; letter-spacing: -.02em; margin-top: 8px; display: flex; justify-content: center; gap: .22em; flex-wrap: wrap; position: relative; z-index: 1; }
.hero-name .italic { font-style: italic; }
.stage { position: relative; width: min(560px, 92vw); height: min(560px, 92vw); margin: -6vw auto 0; z-index: 2; }
.orb { position: absolute; left: 50%; top: 52%; width: 74%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 55%, #c9410c 100%);
  box-shadow: 0 40px 90px -20px rgba(240,96,30,.55), inset 0 -20px 60px rgba(0,0,0,.15); }
.ring { position: absolute; left: 50%; top: 52%; width: 96%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 1px dashed rgba(22,19,15,.18); animation: spin 60s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.avatar { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 62%; aspect-ratio: 3/4; border: 0; background: none; cursor: pointer; padding: 0; }
.avatar img, .avatar video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 42%, #000 62%, transparent 80%); mask-image: radial-gradient(ellipse 70% 75% at 50% 42%, #000 62%, transparent 80%); }
/* v4 avatar: head-to-waist, 420x688 (talk.webm and avatar.png share the same crop) */
.avatar.has-cutout { width: auto; height: 92%; aspect-ratio: 420 / 688; bottom: 0; }
.avatar.has-cutout img, .avatar.has-cutout video { object-fit: contain; object-position: bottom center;
  -webkit-mask-image: linear-gradient(#000 82%, transparent 100%); mask-image: linear-gradient(#000 82%, transparent 100%); }
.avatar.has-cutout video[hidden], .avatar.has-cutout img[hidden] { display: none; }
/* wave / idle / talk videos are stacked; only the .on layer is visible (short cross-fade hides tiny pose differences) */
.av-layer { opacity: 0; transition: opacity .18s ease; }
.av-layer.on { opacity: 1; }
.avatar.has-video { animation: none; } /* the videos already move; no CSS float on top */
.avatar { animation: float 5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-10px); } }
.avatar:hover, .avatar.talking { animation-play-state: paused; }
.speech { position: absolute; left: 50%; bottom: 102%; transform: translateX(-50%) scale(.9); opacity: 0; width: max-content; max-width: 300px; padding: 10px 14px; border-radius: 16px; background: #fff; color: var(--ink); font-size: 14px; line-height: 1.35; box-shadow: 0 12px 30px rgba(0,0,0,.12); transition: opacity .25s, transform .25s; pointer-events: none; }
.speech::after { content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 8px solid transparent; border-top-color: #fff; }
.avatar.talking .speech { opacity: 1; transform: translateX(-50%) scale(1); }
.hear-chip { position: absolute; left: 50%; bottom: 4%; transform-origin: center; translate: -50% 0; padding: 7px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; animation: pulse 2s ease-in-out infinite; }
.hear-chip::before { content: "🔊 "; }
.avatar.talking .hear-chip { opacity: 0; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.tag { position: absolute; z-index: 3; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.9); border: 1px solid var(--line); font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.06); white-space: nowrap; }
.tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.t1 { left: -6%; top: 26%; } .t2 { right: -8%; top: 20%; } .t3 { left: -12%; top: 58%; }
.t4 { right: -10%; top: 52%; } .t5 { left: 2%; bottom: 8%; } .t6 { right: 0; bottom: 12%; }

.hero-foot { position: relative; z-index: 3; margin-top: 28px; display: grid; gap: 18px; justify-items: center; }
.lead { max-width: 560px; font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); }
.lead strong { font-weight: 600; background: linear-gradient(transparent 62%, rgba(240,96,30,.28) 62%); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.btn-accent { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; border: 0; cursor: pointer; font-size: 15px; transition: transform .2s, box-shadow .2s; box-shadow: 0 10px 30px -8px rgba(240,96,30,.6); }
.btn-accent:hover { transform: translateY(-2px); }
.btn-ghost { padding: 14px 24px; border-radius: 999px; border: 1px solid var(--ink); font-weight: 600; font-size: 15px; transition: background .2s, color .2s; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.badges { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--muted); }
.badges b { color: var(--ink); }

/* MARQUEE */
.marquee { background: var(--ink); color: var(--cream); padding: 26px 0; overflow: hidden; transform: rotate(-1.5deg); margin: 30px -2% 0; width: 104%; }
.track { display: flex; gap: 34px; width: max-content; animation: marq 32s linear infinite; font-family: var(--serif); font-size: clamp(30px, 4vw, 52px); white-space: nowrap; align-items: center; }
.track .it { font-style: italic; color: var(--accent-2); }
.track i { font-style: normal; font-size: .5em; color: var(--accent); }
@keyframes marq { to { transform: translateX(-50%); } }

/* SECTIONS */
section { padding: clamp(70px, 10vw, 130px) clamp(16px, 4vw, 48px); }
.section-head { max-width: 760px; margin-bottom: 36px; }
h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 6.5vw, 88px); line-height: .95; letter-spacing: -.01em; margin: 10px 0 14px; }

/* WORK */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font: 500 14px var(--sans); cursor: pointer; transition: all .2s; }
.chip.active, .chip:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .3s; }
.card:hover { box-shadow: 0 24px 50px -24px rgba(0,0,0,.25); }
.card.big { grid-row: span 2; background: linear-gradient(160deg, #fff, #fff5ec); }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; }
.card p { color: var(--ink-2); font-size: 15px; }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.year { font-size: 12px; color: var(--muted); }
.pill-s { padding: 5px 11px; border-radius: 999px; background: var(--cream-2); font-size: 12px; font-weight: 600; }
.pill-s.light { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.ticks li { font-size: 12px; padding: 5px 10px; border-radius: 8px; background: var(--cream); }
.ticks li::before { content: "✓ "; color: var(--accent); font-weight: 700; }
.mini-chart { display: flex; align-items: flex-end; gap: 14px; height: 210px; margin-top: auto; padding-top: 30px; }
.bar { flex: 1; height: var(--h); min-height: 30px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); position: relative; transform-origin: bottom; }
.bar span { position: absolute; top: -26px; left: 0; right: 0; text-align: center; font-family: var(--serif); font-size: 24px; }
.bar small { position: absolute; bottom: -22px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--muted); }
.foot { margin-top: 26px; font-size: 12px !important; color: var(--muted) !important; }
.card.video { padding: 0; overflow: hidden; position: relative; min-height: 420px; background: var(--ink); }
.card.video video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.video-meta h3 { font-size: 30px; margin-top: 8px; }
.card.dark { background: var(--ink); color: var(--cream); }
.card.dark h3 { color: #fff; }
.card.dark { grid-column: 1 / -1; }
.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 6px; }
.steps li { counter-increment: s; font-size: 14px; color: rgba(246,241,231,.75); border-top: 1px solid rgba(255,255,255,.14); padding-top: 14px; }
.steps li::before { content: "0" counter(s); display: block; font-family: var(--serif); color: var(--accent-2); font-size: 34px; line-height: 1; margin-bottom: 8px; }
.steps b { display: block; color: #fff; font-size: 16px; margin-bottom: 4px; }
.tools { margin-top: auto; font-size: 12px !important; color: rgba(246,241,231,.55) !important; }
.card.hide { display: none; }

/* ABOUT */
.about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 90px); align-items: center; background: var(--cream-2); }
.about-photo { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; justify-self: center; }
.orb.small { width: 92%; top: 50%; }
.about-photo img { position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; transform: translate(-50%, -50%); border: 8px solid var(--cream); }
.float-note { position: absolute; padding: 8px 14px; border-radius: 12px; background: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 26px rgba(0,0,0,.08); }
.n1 { left: -4%; bottom: 14%; } .n2 { right: -2%; top: 12%; }
.about-copy p { color: var(--ink-2); max-width: 560px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 34px; border-top: 1px solid var(--line); padding-top: 26px; }
.num { font-family: var(--serif); font-size: clamp(40px, 4.5vw, 64px); line-height: 1; display: block; }
.stats small { font-size: 12px; color: var(--muted); display: block; margin-top: 6px; }

/* SERVICES */
.svc-list { border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 70px 1fr 40px; align-items: center; padding: 22px 0; font-family: var(--serif); font-size: clamp(30px, 4vw, 52px); line-height: 1.1; transition: color .2s, padding .3s; }
.svc summary::-webkit-details-marker { display: none; }
.svc summary span { font-family: var(--sans); font-size: 14px; color: var(--muted); }
.svc summary i { font-style: normal; font-family: var(--sans); font-size: 26px; justify-self: end; transition: transform .3s; }
.svc[open] summary i { transform: rotate(45deg); color: var(--accent); }
.svc summary:hover { color: var(--accent); padding-left: 10px; }
.svc p { padding: 0 0 24px 70px; max-width: 760px; color: var(--ink-2); }

/* FOOTER */
.footer { background: var(--ink); color: var(--cream); padding: clamp(70px, 10vw, 120px) clamp(16px, 4vw, 48px) 30px; border-radius: 36px 36px 0 0; }
.lets { display: inline-flex; align-items: center; gap: 24px; font-family: var(--serif); font-size: clamp(80px, 16vw, 240px); line-height: .9; margin: 10px 0 50px; }
.lets em { color: var(--accent); }
.arrow { width: clamp(70px, 9vw, 130px); height: clamp(70px, 9vw, 130px); border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-family: var(--sans); font-size: clamp(30px, 4vw, 54px); color: #fff; transition: transform .3s; }
.lets:hover .arrow { transform: rotate(45deg); }
.foot-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 40px; }
.contact { display: grid; gap: 14px; }
.contact label { display: grid; gap: 6px; font-size: 13px; color: rgba(246,241,231,.6); }
.contact input, .contact textarea { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 13px 15px; color: #fff; font: 15px var(--sans); resize: vertical; }
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.contact .btn-accent { justify-self: start; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot-cols h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .15em; color: rgba(246,241,231,.5); margin-bottom: 12px; font-weight: 600; }
.foot-cols a, .muted-l { display: block; margin-bottom: 8px; font-size: 15px; }
.foot-cols a:hover { color: var(--accent-2); }
.muted-l { color: rgba(246,241,231,.5); font-size: 13px; }
.copy { display: flex; justify-content: space-between; margin-top: 50px; font-size: 13px; color: rgba(246,241,231,.5); }

/* WELCOME SCREEN */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: var(--cream); cursor: pointer;
  transition: opacity .6s ease, visibility .6s; }
.intro.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-inner { text-align: center; display: grid; justify-items: center; gap: 12px; max-width: 520px; }
.intro-orb { width: 190px; height: 190px; border-radius: 50%; overflow: hidden; position: relative;
  background: radial-gradient(circle at 35% 30%, var(--accent-2), var(--accent) 55%, #c9410c 100%);
  box-shadow: 0 30px 70px -20px rgba(240,96,30,.55); animation: introPop .9s cubic-bezier(.2,.9,.3,1.3) both; }
.intro-orb img { position: absolute; left: 50%; top: 10px; width: 78%; transform: translateX(-50%); }
.intro-title { font-size: clamp(46px, 8vw, 84px); margin: 4px 0 0; }
.intro-sub { color: var(--ink-2); font-size: 17px; }
.intro-btn { margin-top: 8px; font-size: 17px; padding: 16px 34px; animation: pulse 2s ease-in-out infinite; }
.intro-note { color: var(--muted); font-size: 12px; }
@keyframes introPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* RESPONSIVE */
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .card.big { grid-row: auto; grid-column: span 2; }
  .about { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pill { display: none; }
  .grid { grid-template-columns: 1fr; }
  .card.big { grid-column: auto; }
  .tag { font-size: 11px; padding: 6px 10px; }
  .t3, .t6 { display: none; }
  .t1 { left: -2%; } .t2 { right: -2%; } .t4 { right: -2%; } .t5 { left: 0; }
  .hear-chip { right: -2%; }
  .svc summary { grid-template-columns: 44px 1fr 30px; }
  .svc p { padding-left: 44px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .lets { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* case-study numbers (Search Console) */
.metrics { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 4px; }
.metrics b { display: block; font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1; color: var(--accent, #e8590c); }
.metrics small { font-size: 12px; color: var(--muted); }
.mini-chart.days .bar small { font-size: 10px; }
/* Upwork reviews */
.reviews .rev-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.rev { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 26px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.rev .stars { color: #f59f00; letter-spacing: 3px; }
.rev blockquote { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.3; }
.rev figcaption { font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .reviews .rev-grid { grid-template-columns: 1fr; } }

.contact .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { margin: 0; font-size: 14px; color: #fff; min-height: 1.2em; }
.form-status.ok { color: #7ee2a8; }
.form-status.err { color: #ffb4a2; }
