/* Akbayan Abaykyzy — portfolio
   Dark, typographic, restrained: grey text with white highlights, big project names. */

:root {
  --bg: #0e0e0f;
  --bg-2: #151517;
  --text: #ffffff;
  --text-soft: #c9c9ce;
  --text-muted: #8d8d94;   /* the grey around white highlights */
  --text-faint: #6b6b72;
  --line: rgba(255, 255, 255, 0.10);
  --card-border: rgba(255, 255, 255, 0.16);
  --panel: rgba(255, 255, 255, 0.04);
  --radius-card: 28px;
  --wrap: 1120px;
  --text-col: 760px;
  --gutter: 40px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  -webkit-font-smoothing: antialiased; line-height: 1.6; overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.col { width: min(var(--text-col), 100%); margin-left: auto; margin-right: 0; }

/* ---------- Header ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter);
  transition: background .3s ease, padding .3s ease;
}
.site-head.solid { background: rgba(14,14,15,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding-block: 16px; }
.brand { font-weight: 600; font-size: 17px; line-height: 1.1; letter-spacing: -.01em; }
.nav { display: flex; gap: 40px; }
.nav a { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); transition: color .2s; }
.nav a:hover { color: #fff; }

/* ---------- Hero with photo ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero picture { position: absolute; inset: 0 0 0 30%; }
.hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero picture img { object-fit: cover; object-position: 50% 62%; transform: scale(1.04); animation: settle 2.4s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes settle { to { transform: scale(1); } }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 0%, var(--bg) 30%, rgba(14,14,15,.6) 44%, rgba(14,14,15,0) 62%),
    linear-gradient(0deg, var(--bg) 0%, rgba(14,14,15,0) 30%),
    linear-gradient(180deg, rgba(14,14,15,.75) 0%, rgba(14,14,15,0) 22%);
}
.hero-inner { position: relative; z-index: 1; width: 100%; padding: 0 var(--gutter) 12vh; }
.hero h1 { font-size: clamp(34px, 4.6vw, 64px); font-weight: 600; line-height: 1.15; letter-spacing: -.02em; max-width: 15ch; color: var(--text-muted); text-wrap: balance; }
.hero h1 b { color: #fff; font-weight: 600; }
.hero-social { position: absolute; z-index: 1; left: var(--gutter); bottom: 28px; display: flex; gap: 22px; }
.hero-social a { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
.hero-social a:hover { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 140px 0; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 56px; }

/* About */
.statement { font-size: clamp(26px, 3.1vw, 40px); font-weight: 600; line-height: 1.32; letter-spacing: -.015em; color: var(--text-muted); text-wrap: pretty; }
.statement + .statement { margin-top: 28px; }
.statement b { color: #fff; font-weight: 600; }
.about-body { margin-top: 72px; display: grid; gap: 22px; max-width: 60ch; }
.about-body p { font-size: 17px; color: var(--text-soft); }
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 30px; border-radius: 999px;
  background: #fff; color: #000; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  transition: transform .2s ease, background .2s ease; width: max-content; margin-top: 24px;
}
.btn:hover { transform: translateY(-2px); background: #e9e9ec; }

/* Work list */
.work-section { position: relative; }
.work { border-top: 1px solid var(--line); }
.work-item { display: block; border-bottom: 1px solid var(--line); padding: 44px 0; }
.work-name {
  display: block; font-size: clamp(38px, 6.6vw, 92px); font-weight: 700; line-height: 1; letter-spacing: -.035em; text-transform: uppercase;
  color: #fff; transition: color .3s ease, transform .4s cubic-bezier(.2,.7,.2,1); overflow-wrap: anywhere;
}
.work-desc { display: block; margin-top: 14px; font-size: 17px; color: var(--text-soft); }
.work-desc span { color: var(--text-faint); margin-left: 10px; }
@media (hover: hover) {
  .work:hover .work-name { color: #3a3a3f; }
  .work .work-item:hover .work-name { color: #fff; transform: translateX(12px); }
}

/* Other projects: a quiet compact list */
.others { padding-top: 110px; }
.other-list { list-style: none; border-top: 1px solid var(--line); }
.other-list a { display: grid; grid-template-columns: 230px minmax(0,1fr) 110px; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); transition: padding .3s ease; }
.other-list a:hover { padding-left: 10px; }
.o-name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.o-desc { font-size: 15px; color: var(--text-soft); }
.o-year { font-size: 14px; color: var(--text-faint); text-align: right; }
@media (max-width: 640px) {
  .others { padding-top: 80px; }
  .other-list a { grid-template-columns: 1fr auto; gap: 4px 16px; }
  .o-desc { grid-column: 1 / -1; grid-row: 2; }
}

/* Floating preview that follows the cursor on desktop */
.preview {
  position: fixed; z-index: 40; top: 0; left: 0; width: 380px; aspect-ratio: 16 / 10; border-radius: 16px; overflow: hidden;
  pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,.6); background: #222;
}
.preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.preview img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
@media (hover: none), (max-width: 900px) { .preview { display: none; } }

/* Contact */
.contact-list { list-style: none; border-top: 1px solid var(--line); }
.contact-list li { border-bottom: 1px solid var(--line); padding: 20px 0; }
.contact-list .k { display: block; font-size: 14px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.contact-list .v { font-size: clamp(18px, 2vw, 24px); font-weight: 600; letter-spacing: -.01em; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 14px; overflow-wrap: anywhere; }
.contact-list a.v:hover { color: var(--text-soft); }
.copy { border: 1px solid var(--card-border); background: transparent; color: var(--text-soft); border-radius: 999px; height: 34px; padding: 0 14px; font: 600 12px var(--font); letter-spacing: .04em; cursor: pointer; }
.copy:hover { color: #fff; border-color: #fff; }
.contact-note { margin-bottom: 48px; font-size: 17px; color: var(--text-soft); max-width: 52ch; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 56px; }
.footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 14px; color: var(--text-faint); }

/* ---------- Reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero picture img { animation: none; transform: none; }
}

/* =================================================================
   Case-study pages
   ================================================================= */
.pill {
  display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 26px; border-radius: 999px;
  background: #fff; color: #000; font-size: 13px; font-weight: 600; letter-spacing: .02em; transition: transform .2s ease, background .2s ease; white-space: nowrap;
}
.pill:hover { transform: translateY(-2px); background: #e9e9ec; }
.pill.ghost { background: transparent; color: #fff; border: 1px solid var(--card-border); }
.pill.ghost:hover { background: rgba(255,255,255,.08); }

.cs-hero { padding: 180px 0 60px; }
.cs-kicker { font-size: 11px; font-weight: 600; color: var(--text-faint); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 24px; }
.cs-hero h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -.025em; max-width: 18ch; color: var(--text-muted); text-wrap: balance; }
.cs-hero h1 em { font-style: normal; color: #fff; }
.cs-lede { font-size: clamp(17px, 1.7vw, 20px); color: var(--text-soft); margin-top: 28px; max-width: 56ch; }

.cs-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.cs-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-faint); margin-bottom: 6px; font-weight: 600; }
.cs-facts dd { font-size: 16px; font-weight: 500; }
.cs-actions { display: flex; gap: 12px; margin-top: 40px; flex-wrap: wrap; }

.card { display: block; }
.card-media { border-radius: var(--radius-card); overflow: hidden; border: 1px solid var(--card-border); aspect-ratio: 1024 / 607; background: var(--bg-2); max-width: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media img { transform: scale(1.03); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 28px; }
.card-meta h3 { font-size: clamp(24px, 3vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }

.cs-cover { margin: 40px auto 0; }
.cs-cover .card-media { aspect-ratio: auto; }
.cs-cover img { width: 100%; height: auto; }

.cs-section { padding: 110px 0 0; }
.cs-grid { display: grid; grid-template-columns: 260px 1fr; gap: 56px; }
.cs-grid > * { min-width: 0; }
.cs-label { position: sticky; top: 110px; align-self: start; }
.cs-label .num { font-size: 11px; color: var(--text-faint); font-weight: 600; letter-spacing: .16em; }
.cs-label h2 { font-size: clamp(28px, 2.8vw, 36px); font-weight: 700; line-height: 1.15; margin-top: 10px; letter-spacing: -.02em; }
.cs-body p { font-size: 17px; color: var(--text-soft); margin-bottom: 20px; max-width: 62ch; }
.cs-body p strong { color: #fff; font-weight: 600; }
.cs-body h3 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; }

.problems { list-style: none; display: grid; gap: 12px; margin: 8px 0 28px; }
.problems li { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px; font-size: 16px; color: var(--text-soft); }
.problems li b { display: block; color: #fff; font-size: 17px; margin-bottom: 4px; font-weight: 600; }

.steps { list-style: none; counter-reset: step; display: grid; margin-top: 8px; }
.steps li { counter-increment: step; position: relative; padding: 0 0 36px 64px; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--card-border); display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff;
}
.steps li::after { content: ""; position: absolute; left: 22px; top: 52px; bottom: 8px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h4 { font-size: 18px; font-weight: 600; margin: 9px 0 6px; }
.steps p { font-size: 16px; color: var(--text-soft); margin: 0; max-width: 58ch; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.chips span { border: 1px solid var(--card-border); border-radius: 999px; padding: 6px 14px; font-size: 13px; color: var(--text-soft); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 24px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.stat b { display: block; font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.stat span { display: block; margin-top: 10px; font-size: 14px; color: var(--text-muted); font-weight: 500; }

.gallery { display: grid; gap: 24px; margin-top: 64px; }
.gallery.two { grid-template-columns: 1fr 1fr; }
.gallery figure { border-radius: 22px; overflow: hidden; border: 1px solid var(--card-border); background: var(--bg-2); }
.gallery img { width: 100%; height: auto; }

.next-project { margin-top: 150px; }

/* Website covers: live-site screenshot in a browser frame */
.card-media.shot {
  display: flex; align-items: flex-start; justify-content: center; padding: 7% 8% 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.07), transparent 60%), linear-gradient(180deg, #1b1b1e, #0f0f10);
}
.browser { width: 100%; max-width: 800px; border-radius: 14px 14px 0 0; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); }
.browser-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #2a2a2d; color: #9a9aa2; font-size: 11px; font-weight: 500; }
.browser-bar i { width: 9px; height: 9px; border-radius: 50%; background: #4a4a50; display: block; }
.browser-bar span { margin-left: 10px; background: #1d1d20; border-radius: 6px; padding: 3px 12px; flex: 1; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-media.shot img { width: 100%; height: auto; object-fit: initial; }
.card:hover .card-media.shot img { transform: none; }
.card-media.shot .browser { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.card:hover .card-media.shot .browser { transform: translateY(-8px); }
.cs-cover .card-media.shot { aspect-ratio: 1024 / 607; }
.gallery .browser { max-width: none; border-radius: 0; box-shadow: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  :root { --gutter: 24px; }
  .cs-grid { grid-template-columns: 1fr; gap: 18px; }
  .cs-label { position: static; }
  .cs-facts { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; }
  .gallery.two { grid-template-columns: 1fr; }
  .col { margin-left: 0; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; --radius-card: 20px; }
  .site-head { padding: 18px var(--gutter); }
  .nav { gap: 18px; }
  .brand { font-size: 15px; }
  .hero picture { inset: 0; }
  .hero picture img { object-position: 50% 45%; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 6%, rgba(14,14,15,.88) 36%, rgba(14,14,15,0) 60%), linear-gradient(180deg, rgba(14,14,15,.7) 0%, rgba(14,14,15,0) 18%); }
  .hero-inner { padding-bottom: 92px; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); max-width: 16ch; color: #a9a9b0; }
  .section { padding: 96px 0; }
  .label { margin-bottom: 36px; }
  .about-body { margin-top: 48px; }
  .about-body p { font-size: 16px; }
  .work-item { padding: 30px 0; }
  .work-desc { font-size: 15px; }
  .work-desc span { display: block; margin: 2px 0 0; }
  .card-meta { flex-direction: column; align-items: flex-start; }
  .cs-hero { padding-top: 120px; }
  .browser-bar { height: 22px; }
  .browser-bar span { display: none; }
}

/* Gallery captions and tall page designs */
.gallery figcaption { padding: 14px 20px; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--line); }
.gallery + figure.tall, figure.tall { max-width: 640px; margin: 24px auto 0; border-radius: 22px; overflow: hidden; border: 1px solid var(--card-border); background: var(--bg-2); }
figure.tall img { width: 100%; height: auto; }
figure.tall figcaption { padding: 14px 20px; font-size: 13px; color: var(--text-muted); border-top: 1px solid var(--line); }

/* ---------- Compact work list with thumbnails ---------- */
.w-list { list-style: none; border-top: 1px solid var(--line); }
.w-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.w-thumb { display: block; width: 132px; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--bg-2); }
.w-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.w-text { display: grid; gap: 2px; min-width: 0; }
.w-name { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.w-desc { font-size: 15px; color: var(--text-muted); }
.w-year { font-size: 14px; color: var(--text-faint); white-space: nowrap; }
.w-row:hover .w-thumb img { transform: scale(1.06); }
.w-row:hover .w-name { color: var(--text-soft); }
.w-row.small { grid-template-columns: 88px minmax(0, 1fr) auto; padding: 14px 0; }
.w-row.small .w-thumb { width: 88px; border-radius: 8px; }
.w-row.small .w-name { font-size: 17px; }
.others-label { margin-top: 80px; }
@media (max-width: 640px) {
  .w-row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .w-thumb { width: 96px; }
  .w-row.small { grid-template-columns: 72px minmax(0, 1fr); }
  .w-row.small .w-thumb { width: 72px; }
  .w-year { display: none; }
  .w-name { font-size: 17px; }
  .w-desc { font-size: 14px; }
}

/* ---------- Short case-study layout ---------- */
.cs-hero h1 { color: #fff; max-width: none; }
.cs-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 96px; }
.cs-brief .label { margin-bottom: 16px; }
.cs-task { font-size: 20px; line-height: 1.5; color: var(--text-soft); max-width: 40ch; }
.cs-did { list-style: none; display: grid; gap: 12px; }
.cs-did li { font-size: 17px; color: var(--text-soft); padding-left: 22px; position: relative; }
.cs-did li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 1px; background: var(--text-muted); }
.cs-facts a { border-bottom: 1px solid var(--card-border); }
.cs-facts a:hover { border-color: #fff; }
.next-project { margin-top: 120px; margin-bottom: 40px; }
.next-link { display: block; border-top: 1px solid var(--line); padding-top: 28px; }
.next-link .label { display: block; margin-bottom: 8px; }
.next-name { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.02em; transition: color .2s; }
.next-link:hover .next-name { color: var(--text-soft); }
@media (max-width: 760px) { .cs-brief { grid-template-columns: 1fr; gap: 36px; padding-top: 64px; } .cs-task { font-size: 18px; } }

/* ---------- RS-Bank-style sections: label, a sentence or two, then media ---------- */
.cs-sec { padding-top: 96px; }
.cs-sec .label { margin-bottom: 14px; }
.cs-text { font-size: clamp(18px, 1.8vw, 22px); line-height: 1.5; color: var(--text-soft); max-width: 46ch; }
.cs-sec .pill { margin-top: 28px; }
.cs-media { margin-top: 44px; border-radius: 22px; overflow: hidden; border: 1px solid var(--card-border); background: var(--bg-2); }
.cs-media.narrow { max-width: 420px; }
.cs-media img, .cs-media video { width: 100%; height: auto; display: block; }
.phones { display: flex; gap: 24px; margin-top: 44px; flex-wrap: wrap; }
.phone { flex: 0 1 260px; aspect-ratio: 9 / 19.5; border-radius: 36px; overflow: hidden; border: 6px solid #222226; background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.phone img, .phone video { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
@media (max-width: 640px) {
  .cs-sec { padding-top: 64px; }
  .phones { gap: 12px; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .phone { flex: 0 0 64%; border-radius: 28px; border-width: 5px; scroll-snap-align: start; }
}

/* ---------- IQUP: hero stage with fanned phones ---------- */
.iq-hero { margin-top: 40px; }
.iq-stage {
  position: relative; display: flex; justify-content: center; align-items: center; gap: 0;
  padding: 64px 24px; border-radius: var(--radius-card); overflow: hidden;
  background: radial-gradient(90% 80% at 50% 0%, #5cc0e4 0%, #2f8fb5 45%, #1b5e7c 100%);
}
.iq-stage .phone { flex: 0 0 auto; width: clamp(150px, 22vw, 260px); margin: 0 -18px; transform: scale(.88) rotate(-4deg); }
.iq-stage .phone:last-child { transform: scale(.88) rotate(4deg); }
.iq-stage .phone.mid { transform: none; z-index: 2; }

/* ---------- Phone carousels ---------- */
.rail-wrap { margin-top: 40px; position: relative; }
.rail {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 6px 2px 24px; scrollbar-width: none; cursor: grab;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }
.rail .phone { flex: 0 0 236px; scroll-snap-align: start; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.rail .phone:hover { transform: translateY(-6px); }
.rail-nav { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }
.rail-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--card-border); background: transparent;
  color: #fff; font: 600 16px var(--font); cursor: pointer; transition: background .2s, opacity .2s;
}
.rail-btn:hover { background: rgba(255,255,255,.08); }
.rail-btn[disabled] { opacity: .3; cursor: default; }

/* Long screens slowly scroll inside the phone */
.phone.scroll img { height: auto; object-fit: initial; animation: pan var(--pan-dur, 14s) ease-in-out infinite alternate; animation-play-state: paused; }
.phone.scroll.live img { animation-play-state: running; }
.phone.scroll:hover img { animation-play-state: paused; }
@keyframes pan { 0%, 12% { transform: translateY(0); } 88%, 100% { transform: translateY(var(--pan, 0px)); } }
@media (prefers-reduced-motion: reduce) { .phone.scroll img { animation: none; } }

@media (max-width: 640px) {
  .iq-stage { padding: 40px 8px; }
  .iq-stage .phone { width: 34vw; margin: 0 -14px; border-width: 4px; border-radius: 20px; }
  .rail { gap: 12px; }
  .rail .phone { flex-basis: 62%; }
  .rail-nav { display: none; }
}

/* ---------- IQUP v2: big titles, entrance animations, interactions ---------- */
.iq-sec { padding-top: 140px; }
.iq-title { font-size: clamp(44px, 7vw, 96px); font-weight: 800; line-height: 1; letter-spacing: -.04em; margin-bottom: 18px; }
.iq-sec .cs-text { max-width: 44ch; }
.iq-sec .pill { margin-top: 28px; }
.iq-brief { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; padding-top: 140px; }
.iq-brief .iq-title { font-size: clamp(40px, 5.4vw, 72px); }

/* Hero: centre phone rises, side phones fan out from behind it */
.iq-stage .phone, .iq-stage .phone:last-child, .iq-stage .phone.mid { transform: none; }
.iq-stage .phone { opacity: 0; transition: transform 1.1s cubic-bezier(.2,.8,.2,1), opacity .8s ease; }
.iq-stage .phone.mid { transform: translateY(80px) scale(.94); transition-delay: .1s; }
.iq-stage .phone.l { transform: translateX(60%) scale(.8) rotate(0deg); transition-delay: .45s; }
.iq-stage .phone.r { transform: translateX(-60%) scale(.8) rotate(0deg); transition-delay: .45s; }
.iq-hero.in .iq-stage .phone { opacity: 1; }
.iq-hero.in .iq-stage .phone.mid { transform: none; }
.iq-hero.in .iq-stage .phone.l { transform: translateX(0) scale(.88) rotate(-6deg); }
.iq-hero.in .iq-stage .phone.r { transform: translateX(0) scale(.88) rotate(6deg); }
.iq-hero.in .iq-stage .phone.mid img { animation: float 6s ease-in-out 1.4s infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* Phone groups: staggered rise-in, tilt on hover, tap to enlarge */
.show { display: flex; gap: 28px; margin-top: 48px; perspective: 1200px; flex-wrap: wrap; }
.show .phone { flex: 0 1 250px; }
.stagger .phone { opacity: 0; transform: translateY(60px); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * .12s); }
.stagger.in .phone { opacity: 1; transform: none; }
.zoomable { cursor: zoom-in; will-change: transform; }
.show .phone.tilting { transition: transform .12s ease-out; }

/* Qibla: one phone playing through its states */
.seq { display: flex; align-items: center; gap: 56px; margin-top: 48px; flex-wrap: wrap; }
.seq-phone { position: relative; flex: 0 0 260px; }
.seq-phone img { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.seq-phone img.on { opacity: 1; position: absolute; }
.seq-steps { list-style: none; counter-reset: s; display: grid; gap: 14px; }
.seq-steps li { counter-increment: s; font-size: 20px; font-weight: 600; color: var(--text-faint); transition: color .4s; cursor: pointer; display: flex; gap: 14px; align-items: center; }
.seq-steps li::before { content: counter(s, decimal-leading-zero); font-size: 13px; color: var(--text-faint); width: 28px; }
.seq-steps li.on { color: #fff; }
.seq-steps li.on::before { color: #5cc0e4; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,8,9,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; gap: 24px; padding: 24px; }
.lightbox[hidden] { display: none; }
.lb-phone { height: min(86vh, 860px); aspect-ratio: 9 / 19.5; border-radius: 40px; overflow: hidden; border: 7px solid #222226; background: #000; animation: pop .35s cubic-bezier(.2,.8,.2,1); }
.lb-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lb-phone.long { overflow-y: auto; scrollbar-width: none; }
.lb-phone.long img { height: auto; object-fit: initial; }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
.lightbox button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--card-border); background: rgba(255,255,255,.06); color: #fff; font: 600 20px var(--font); cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.16); }
.lb-close { position: absolute; top: 24px; right: 24px; font-size: 28px !important; }
.lb-count { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; font-size: 13px; color: var(--text-muted); letter-spacing: .1em; }

@media (prefers-reduced-motion: reduce) {
  .iq-stage .phone, .stagger .phone { opacity: 1 !important; transition: none !important; }
  .iq-hero.in .iq-stage .phone.mid img { animation: none; }
}
@media (max-width: 760px) {
  .iq-sec, .iq-brief { padding-top: 96px; }
  .iq-brief { grid-template-columns: 1fr; gap: 56px; }
  .show { gap: 12px; flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: none; }
  .show .phone { flex: 0 0 62%; scroll-snap-align: start; }
  .show.duo .phone { flex-basis: 46%; }
  .seq { gap: 28px; }
  .seq-phone { flex-basis: 56%; }
  .seq-steps li { font-size: 17px; }
  .lightbox { gap: 8px; padding: 12px; }
  .lb-prev, .lb-next { position: absolute; bottom: 20px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
  .lb-phone { height: min(78vh, 700px); border-radius: 32px; }
}

/* IQUP v3: phones without the blue panel, a little bigger; facts with a button */
.iq-stage { background: none; padding: 24px 0 8px; overflow: visible; }
.iq-stage .phone { width: clamp(170px, 25vw, 300px); margin: 0 -22px; box-shadow: 0 40px 90px rgba(0,0,0,.65); }
.iq-hero { margin-top: 24px; }
.iq-facts { padding-top: 72px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px; }
.iq-facts .cs-facts { margin-top: 0; padding-top: 28px; flex: 1 1 520px; grid-template-columns: repeat(3, 1fr); }
@media (max-width: 640px) {
  .iq-stage .phone { width: 31vw; margin: 0 -10px; }
  .iq-hero { overflow-x: clip; }
  .iq-facts { padding-top: 48px; }
  .iq-facts .cs-facts { grid-template-columns: 1fr 1fr; }
  .iq-facts .pill { width: 100%; }
}

/* Step sequences everywhere: phone + numbered steps with a progress line */
.seq { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 72px; margin-top: 56px; }
.seq.flip { grid-template-columns: minmax(0, 1fr) 300px; }
.seq.flip .seq-phone { order: 2; }
.seq-phone { position: relative; width: 300px; flex: none; }
.seq-phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transform: scale(1.04); transition: opacity .6s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.seq-phone img.on { opacity: 1; transform: none; }
.seq-steps { list-style: none; counter-reset: s; display: grid; gap: 6px; max-width: 460px; }
.seq-steps li { counter-increment: s; position: relative; display: flex; gap: 18px; align-items: baseline; padding: 16px 0 18px; border-bottom: 1px solid var(--line); font-size: clamp(18px, 1.9vw, 24px); font-weight: 600; color: var(--text-faint); cursor: pointer; transition: color .4s; }
.seq-steps li::before { content: counter(s, decimal-leading-zero); font-size: 13px; font-weight: 600; letter-spacing: .08em; color: var(--text-faint); min-width: 26px; transition: color .4s; }
.seq-steps li::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: #5cc0e4; }
.seq-steps li.done { color: var(--text-muted); }
.seq-steps li.on { color: #fff; }
.seq-steps li.on::before { color: #5cc0e4; }
.seq-steps li.run::after { animation: fill var(--dur, 2600ms) linear forwards; }
.seq-steps li:hover { color: var(--text-soft); }
@keyframes fill { to { width: 100%; } }
.seq .seq-phone { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform 1s cubic-bezier(.2,.8,.2,1); }
.seq.in .seq-phone { opacity: 1; transform: none; }
.seq .seq-steps li { opacity: 0; transform: translateX(-16px); transition: opacity .6s ease, transform .7s cubic-bezier(.2,.8,.2,1), color .4s; }
.seq.in .seq-steps li { opacity: 1; transform: none; }
.seq.in .seq-steps li:nth-child(2) { transition-delay: .08s, .08s, 0s; }
.seq.in .seq-steps li:nth-child(3) { transition-delay: .16s, .16s, 0s; }
.seq.in .seq-steps li:nth-child(4) { transition-delay: .24s, .24s, 0s; }
.seq.in .seq-steps li:nth-child(5) { transition-delay: .32s, .32s, 0s; }
@media (prefers-reduced-motion: reduce) { .seq .seq-phone, .seq .seq-steps li { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .seq, .seq.flip { grid-template-columns: 1fr; gap: 28px; justify-items: center; }
  .seq.flip .seq-phone { order: 0; }
  .seq-phone { width: min(66vw, 280px); }
  .seq-steps { width: 100%; }
  .seq-steps li { font-size: 17px; padding: 13px 0 14px; }
}
.seq-steps li.done::after { width: 100%; background: rgba(92,192,228,.35); }

/* ---------- Interactive reader ---------- */
.reader-demo { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 72px; align-items: center; margin-top: 56px; }
.rd-phone { width: 300px; display: flex; flex-direction: column; background: var(--rd-bg); color: var(--rd-fg); transition: background .5s ease, color .5s ease; }
.rd-phone[data-theme="white"] { --rd-bg: #ffffff; --rd-fg: #1d1d1f; --rd-mute: #8a8a8e; }
.rd-phone[data-theme="sepia"] { --rd-bg: #f6efdc; --rd-fg: #2a2318; --rd-mute: #9a8f78; }
.rd-phone[data-theme="dark"]  { --rd-bg: #2c2c2e; --rd-fg: #ececec; --rd-mute: #8d8d92; }
.rd-phone[data-theme="navy"]  { --rd-bg: #0b2545; --rd-fg: #e8eef6; --rd-mute: #7f93ad; }
.rd-phone[data-font="kazimir"] .rd-page { font-family: "PT Serif", Georgia, serif; }
.rd-phone[data-font="iowan"] .rd-page { font-family: "Lora", "Iowan Old Style", Georgia, serif; }
.rd-phone[data-font="avenir"] .rd-page { font-family: "Nunito Sans", "Avenir Next", system-ui, sans-serif; }
.rd-phone[data-font="arial"] .rd-page { font-family: Arial, Helvetica, sans-serif; }
.rd-status { display: flex; justify-content: space-between; padding: 14px 22px 0; font: 600 12px var(--font); color: var(--rd-fg); }
.rd-icons { letter-spacing: 1px; font-size: 9px; opacity: .8; }
.rd-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 6px; font: 500 11px var(--font); color: var(--rd-mute); }
.rd-page { flex: 1; overflow: hidden; padding: 6px 20px 0; font-size: calc(var(--rd-size, 20) * .72px); line-height: var(--rd-lh, 1.45); transition: font-size .35s ease, line-height .35s ease; }
.rd-phone[data-spacing="1"] { --rd-lh: 1.25; }
.rd-phone[data-spacing="2"] { --rd-lh: 1.45; }
.rd-phone[data-spacing="3"] { --rd-lh: 1.75; }
.rd-page p { margin: 0 0 .8em; }
.rd-page em { font-style: italic; }
.rd-foot { text-align: center; font: 500 10px var(--font); color: var(--rd-mute); padding: 8px 0 14px; }
.rd-page p { animation: rdfade .45s ease; }
@keyframes rdfade { from { opacity: .35; } }

.rd-controls { display: grid; gap: 26px; max-width: 440px; }
.rd-hint { font-size: 15px; color: var(--text-muted); }
.rd-group { display: grid; gap: 12px; }
.rd-label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); display: flex; justify-content: space-between; }
.rd-label output { color: var(--text-soft); letter-spacing: 0; }
.rd-controls button { cursor: pointer; font-family: var(--font); transition: border-color .2s, background .2s, transform .15s; }
.rd-controls button:active { transform: scale(.96); }
.rd-swatches { display: flex; gap: 12px; }
.rd-swatches button { width: 56px; height: 40px; border-radius: 10px; border: 2px solid transparent; outline: 1px solid var(--card-border); }
.rd-swatches button[data-val="white"] { background: #fff; }
.rd-swatches button[data-val="sepia"] { background: #f6efdc; }
.rd-swatches button[data-val="dark"]  { background: #2c2c2e; }
.rd-swatches button[data-val="navy"]  { background: #0b2545; }
.rd-swatches button.on { border-color: #5cc0e4; outline-color: transparent; }
.rd-fonts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.rd-fonts button { display: grid; gap: 2px; justify-items: center; padding: 10px 4px; border-radius: 12px; border: 1px solid var(--card-border); background: transparent; color: var(--text-soft); }
.rd-fonts button b { font-size: 22px; font-weight: 400; }
.rd-fonts button small { font-size: 11px; color: var(--text-faint); }
.rd-fonts button[data-val="kazimir"] b { font-family: "PT Serif", serif; }
.rd-fonts button[data-val="iowan"] b { font-family: "Lora", serif; }
.rd-fonts button[data-val="avenir"] b { font-family: "Nunito Sans", sans-serif; }
.rd-fonts button[data-val="arial"] b { font-family: Arial, sans-serif; }
.rd-fonts button.on { border-color: #5cc0e4; color: #fff; background: rgba(92,192,228,.08); }
.rd-fonts button.on small { color: #5cc0e4; }
.rd-size { display: flex; align-items: center; gap: 14px; color: var(--text-soft); }
.rd-size .big { font-size: 22px; }
.rd-size input { flex: 1; accent-color: #5cc0e4; }
.rd-spacing { display: flex; gap: 10px; }
.rd-spacing button { width: 56px; height: 44px; border-radius: 10px; border: 1px solid var(--card-border); background: transparent; display: grid; align-content: center; justify-items: center; }
.rd-spacing button i { display: block; width: 22px; height: 2px; background: var(--text-soft); }
.rd-spacing button[data-val="1"] { gap: 2px; } .rd-spacing button[data-val="2"] { gap: 4px; } .rd-spacing button[data-val="3"] { gap: 6px; }
.rd-spacing button.on { border-color: #5cc0e4; }
.rd-spacing button.on i { background: #5cc0e4; }
.reader-demo .rd-phone { opacity: 0; transform: translateY(40px); transition: opacity .8s ease, transform 1s cubic-bezier(.2,.8,.2,1), background .5s ease, color .5s ease; }
.reader-demo.in .rd-phone { opacity: 1; transform: none; }

/* ---------- Widgets ---------- */
.widgets { display: flex; gap: 24px; margin-top: 48px; flex-wrap: wrap; align-items: flex-start; }
.wdg { border-radius: 28px; padding: 18px 20px; color: #fff; background: linear-gradient(160deg, #4bb6dc 0%, #2a87ad 100%); box-shadow: 0 24px 60px rgba(0,0,0,.45); font-family: var(--font); }
.wdg-s { width: 170px; height: 170px; display: grid; align-content: space-between; }
.wdg-m { width: 360px; height: 170px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.w-city { font-size: 11px; opacity: .85; }
.w-lbl { font-size: 12px; opacity: .9; }
.w-count { font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.w-next { font-size: 12px; font-weight: 600; }
.w-top { display: flex; justify-content: space-between; align-items: baseline; }
.w-times { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; align-items: end; }
.w-times li { display: grid; gap: 4px; text-align: center; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 10px 0; border-radius: 12px; }
.w-times li span { font-size: 10px; font-weight: 500; opacity: .85; }
.w-times li.next { background: rgba(255,255,255,.22); }
.widgets .wdg { opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * .15s); }
.widgets.in .wdg { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .reader-demo { grid-template-columns: 1fr; gap: 32px; justify-items: center; }
  .rd-phone { width: min(70vw, 290px); }
  .rd-controls { width: 100%; }
  .widgets { gap: 14px; }
  .wdg-s { width: calc(50% - 7px); height: auto; aspect-ratio: 1; }
  .wdg-m { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .reader-demo .rd-phone, .widgets .wdg { opacity: 1; transform: none; } }
.iq-sub { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; color: #5cc0e4; margin: -4px 0 12px; letter-spacing: -.01em; }
.iq-actions { display: flex; gap: 12px; flex-wrap: wrap; }
#maktaba .cs-text + .cs-text { margin-top: 16px; }
#maktaba { scroll-margin-top: 90px; }
@media (max-width: 640px) { .iq-actions { width: 100%; } .iq-actions .pill { flex: 1 1 100%; } }

/* Blue splash behind the hero phones */
.iq-stage { position: relative; isolation: isolate; }
.iq-stage::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 150%); aspect-ratio: 1.25;
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
  background: radial-gradient(closest-side, rgba(110,205,240,1), rgba(58,160,200,.85) 38%, rgba(30,110,145,.4) 68%, rgba(27,94,124,0) 100%);
  filter: blur(10px); transition: transform 1.4s cubic-bezier(.2,.8,.2,1), opacity 1.2s ease;
}
.iq-hero.in .iq-stage::before { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.iq-hero { overflow-x: clip; }
.iq-sec .cs-text + .stats { margin-top: 28px; }
.stat b { font-size: clamp(24px, 2.6vw, 34px); }
@media (prefers-reduced-motion: reduce) { .iq-stage::before { opacity: 1; transform: translate(-50%, -50%); transition: none; } }

.iq-facts .cs-facts { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 640px) { .iq-facts .cs-facts { grid-template-columns: 1fr 1fr; } }
.iq-hero.wrap { width: 100%; }
.iq-note { margin-top: 14px; font-size: 13px; color: var(--text-faint); }
.stats.two { grid-template-columns: repeat(2, 1fr); max-width: 640px; }

/* ---------- InspirED: landscape step sequences, brand swatches, website frame ---------- */
.insp { --accent: #f6b737; }
.insp .seq-steps li::after { background: var(--accent); }
.insp .seq-steps li.on::before { color: var(--accent); }
.insp .seq-steps li.done::after { background: rgba(246,183,55,.35); }
.insp .iq-sub { color: var(--accent); }
.ins-cover { margin-top: 56px; border-radius: 24px; overflow: hidden; border: 1px solid var(--card-border); }
.ins-cover img { width: 100%; height: auto; display: block; transform: scale(1.06); transition: transform 1.6s cubic-bezier(.2,.8,.2,1); }
.ins-cover.in img { transform: none; }
.seq.wide { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.seq.wide.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.seq.wide .seq-phone { width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--card-border); cursor: zoom-in; }
.seq.wide .seq-phone img { object-fit: contain; object-position: center; padding: 4%; }
.ins-figure { margin-top: 48px; border-radius: 22px; overflow: hidden; border: 1px solid var(--card-border); background: #fff; cursor: zoom-in; }
.ins-figure img { width: 100%; height: auto; display: block; }
.ins-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 48px; }
.ins-grid figure { border-radius: 20px; overflow: hidden; border: 1px solid var(--card-border); cursor: zoom-in; }
.ins-grid img { width: 100%; height: auto; display: block; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.ins-grid figure:hover img { transform: scale(1.04); }
.stagger figure { opacity: 0; transform: translateY(40px); transition: opacity .7s ease, transform .9s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i, 0) * .12s); }
.stagger.in figure { opacity: 1; transform: none; }
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 48px; }
.swatch { aspect-ratio: 3 / 4; border-radius: 20px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; font-weight: 600; font-size: 15px; letter-spacing: .04em; transform-origin: bottom; transform: scaleY(.2); opacity: 0; transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .5s ease; transition-delay: calc(var(--i, 0) * .1s); }
.stagger.in .swatch { transform: none; opacity: 1; }
.swatch small { display: block; font-size: 11px; font-weight: 500; opacity: .7; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.type-card { border: 1px solid var(--card-border); border-radius: 20px; padding: 28px; background: var(--panel); }
.type-card b { display: block; font-size: clamp(56px, 7vw, 96px); line-height: 1; font-weight: 700; }
.type-card span { display: block; margin-top: 14px; color: var(--text-muted); font-size: 15px; }
.type-card.sf b { font-family: -apple-system, "SF Pro Display", "Helvetica Neue", Arial, sans-serif; font-weight: 400; }
.web-frame { margin-top: 48px; border-radius: 14px; overflow: hidden; border: 1px solid var(--card-border); background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5); max-width: 880px; }
.web-view { height: min(72vh, 640px); overflow: hidden; position: relative; }
.web-view img { width: 100%; height: auto; display: block; animation: pan var(--pan-dur, 30s) ease-in-out infinite alternate; animation-play-state: paused; }
.web-view.live img { animation-play-state: running; }
.web-view:hover img { animation-play-state: paused; }
.lb-phone.wide { height: auto; max-height: 86vh; width: min(92vw, 1200px); aspect-ratio: auto; border-radius: 18px; border: 0; background: #fff; }
.lb-phone.wide img { height: auto; max-height: 86vh; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { .web-view img { animation: none; } .swatch, .stagger figure, .ins-cover img { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .seq.wide, .seq.wide.flip { grid-template-columns: 1fr; }
  .seq.wide .seq-phone { width: 100%; }
  .ins-grid, .type-row { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .swatch { aspect-ratio: 4 / 3; }
  .web-view { height: 70vh; }
}
/* Interactive website embed: desktop width scaled to fit the frame */
.live-site { max-width: none; }
.site-box { position: relative; height: min(76vh, 720px); overflow: hidden; background: #fff; }
.site-box iframe { position: absolute; left: 0; top: 0; border: 0; width: 100%; height: 100%; transform-origin: 0 0; }
/* Showcase video */
.showcase { margin-top: 48px; border-radius: 22px; overflow: hidden; border: 1px solid var(--card-border); background: #0e0e0f; aspect-ratio: 16 / 9; }
.showcase video { width: 100%; height: 100%; display: block; object-fit: cover; }
/* Visual design: sticky page names + full pages in a laptop bezel (like drukarov.com/crave) */
.vd { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr); gap: 56px; margin-top: 56px; align-items: start; }
.vd-nav { position: sticky; top: 30vh; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.vd-nav a { font-size: clamp(36px, 4.6vw, 68px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em; text-transform: uppercase; color: rgba(255,255,255,.18); text-align: right; transition: color .35s ease, transform .35s ease; }
.vd-nav a:hover { color: rgba(255,255,255,.45); }
.vd-nav a.on { color: var(--accent, #f6b737); transform: translateX(-6px); }
.vd-pages { display: grid; gap: 120px; }
.vd-page { scroll-margin-top: 90px; }
.vd-bezel { border-radius: 22px 22px 0 0; border: 12px solid #1f1f22; border-bottom: 0; background: #1f1f22; overflow: hidden; position: relative; box-shadow: 0 40px 100px rgba(0,0,0,.5); }
.vd-bezel::before { content: ""; position: absolute; top: -8px; left: 50%; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: #3a3a3f; }
.vd-bezel img { width: 100%; height: auto; display: block; border-radius: 6px 6px 0 0; }
@media (max-width: 860px) {
  .vd { grid-template-columns: 1fr; gap: 20px; }
  .vd-nav { top: 64px; z-index: 5; flex-direction: row; align-items: center; gap: 18px; overflow-x: auto; padding: 12px 0; background: var(--bg); scrollbar-width: none; }
  .vd-nav a { font-size: 20px; white-space: nowrap; transform: none !important; }
  .vd-pages { gap: 56px; }
  .vd-bezel { border-width: 6px; border-radius: 14px 14px 0 0; }
}
.cs-text + .cs-text { margin-top: 14px; }
.vd { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.vd-nav a { white-space: nowrap; font-size: clamp(28px, 3.4vw, 52px); }
@media (max-width: 860px) { .vd { grid-template-columns: 1fr; } .vd-nav a { font-size: 20px; } }
/* Home: featured work cards */
.feat { display: grid; gap: 40px; }
.feat-card { display: block; }
.feat-media { display: block; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: var(--bg-2); border: 1px solid var(--card-border); }
.feat-media img, .feat-media video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.feat-card:hover .feat-media img, .feat-card:hover .feat-media video { transform: scale(1.03); }
.feat-info { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px; align-items: baseline; padding: 22px 4px 0; }
.feat-name { font-size: clamp(26px, 3vw, 40px); font-weight: 700; letter-spacing: -.02em; }
.feat-desc { color: var(--text-muted); font-size: 16px; }
.feat-year { color: var(--text-faint); font-size: 14px; }
.feat-card:hover .feat-name { color: var(--text-soft); }
.w-name .ext { font-style: normal; font-size: .8em; color: var(--text-faint); margin-left: 4px; }
/* Experience */
.x-list { list-style: none; border-top: 1px solid var(--line); }
.x-list li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.x-logo { width: 56px; height: 56px; border-radius: 14px; background: #19191b; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.x-logo img { width: 70%; height: 70%; object-fit: contain; }
.x-badge { font-size: 15px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.x-co { display: block; font-size: 18px; font-weight: 600; }
.x-role { display: block; color: var(--text-muted); font-size: 15px; margin-top: 2px; }
.x-clients { display: block; color: var(--text-faint); font-size: 14px; margin-top: 6px; }
.x-date { color: var(--text-faint); font-size: 14px; white-space: nowrap; }
/* Education */
.diploma { margin-top: 40px; border-radius: 16px; overflow: hidden; border: 1px solid var(--card-border); background: #fff; }
.diploma img { width: 100%; height: auto; display: block; }
.paper { display: block; margin-top: 28px; padding: 22px 24px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); transition: background .3s; }
.paper:hover { background: rgba(255,255,255,.07); }
.paper .k { display: block; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; letter-spacing: .02em; }
.paper .v { font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; line-height: 1.4; }
@media (max-width: 640px) {
  .feat { gap: 32px; }
  .feat-media { border-radius: 16px; }
  .feat-info { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding-top: 14px; }
  .feat-desc { grid-column: 1 / -1; order: 3; font-size: 14px; }
  .x-list li { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .x-logo { width: 44px; height: 44px; border-radius: 11px; }
  .x-date { grid-column: 2; }
}
/* Home: bigger section titles, smaller featured cards */
.sec-title { font-size: clamp(30px, 3.4vw, 46px); font-weight: 700; letter-spacing: -.025em; line-height: 1.1; text-transform: none; color: #fff; margin-bottom: 40px; }
.others-label.sec-title { margin-top: 96px; }
.feat { grid-template-columns: 1fr 1fr; gap: 28px; }
.feat-media { aspect-ratio: 16 / 10; border-radius: 18px; }
.feat-info { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding-top: 16px; }
.feat-name { font-size: clamp(20px, 1.8vw, 26px); }
.feat-desc { grid-column: 1 / -1; order: 3; font-size: 15px; }
@media (max-width: 760px) { .feat { grid-template-columns: 1fr; gap: 36px; } .sec-title { margin-bottom: 28px; } }
/* Case studies: slightly smaller section titles; Task / Research / Overview stacked in one column */
.iq-title, .iq-brief .iq-title { font-size: clamp(34px, 4.6vw, 64px); }
.iq-brief { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
.iq-brief > div { padding-top: 120px; max-width: 760px; }
.iq-brief .cs-text { max-width: 44ch; }
@media (max-width: 640px) { .iq-brief > div { padding-top: 88px; } }
