/* Khurrum Husain — portfolio. Senior, editorial, confident. */

:root {
  --paper: #faf9f6;
  --paper-warm: #f3f1ea;
  --ink: #1a1815;
  --ink-soft: #3d3a34;
  --muted: #76716a;
  --line: #e5e1d8;
  --accent: #1e4d3b;
  --accent-deep: #143726;
  --accent-soft: #e9f0ec;
  --gold: #b98a2f;
  --radius: 14px;
  --max: 1160px;
  --max-narrow: 780px;
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

::selection { background: var(--accent); color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: var(--max-narrow); margin: 0 auto; padding: 0 28px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: rgba(250, 249, 246, 0.82);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 28px;
  height: 68px; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
}
.brand-name { font-weight: 600; letter-spacing: 0.01em; font-size: 15px; }
.brand-name span { color: var(--muted); font-weight: 400; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 4px 0;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width 0.25s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
  border: 1px solid var(--ink); border-radius: 999px; padding: 8px 18px !important;
  color: var(--ink) !important; font-weight: 600 !important;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; }

/* ---------- Hero ---------- */
.hero { padding: 168px 0 96px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6.4vw, 84px);
  line-height: 1.04; font-weight: 560; letter-spacing: -0.015em;
  max-width: 16ch; margin-bottom: 28px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 19px; color: var(--ink-soft); max-width: 62ch; margin-bottom: 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 15.5px;
  text-decoration: none; transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.hero-meta {
  display: flex; gap: 48px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 28px;
}
.hero-meta div { font-size: 14px; color: var(--muted); }
.hero-meta strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* ---------- Sections ---------- */
section.block { padding: 96px 0; }
.section-head { margin-bottom: 56px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px); font-weight: 560; letter-spacing: -0.01em;
  margin: 14px 0 12px;
}
.section-head p { color: var(--ink-soft); max-width: 64ch; font-size: 18px; }

/* ---------- Project cards ---------- */
.project-card {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 40px; text-decoration: none;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.project-card:hover { box-shadow: 0 24px 60px rgba(26, 24, 21, 0.10); transform: translateY(-4px); }
.project-visual { background: var(--paper-warm); min-height: 380px; display: grid; place-items: center; overflow: hidden; }
.project-visual img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-visual img { transform: scale(1.03); }
.project-visual .ph {
  color: var(--muted); font-size: 14px; text-align: center; padding: 40px;
  border: 1.5px dashed var(--line); border-radius: 10px; margin: 40px;
}
.project-body { padding: 52px 48px; display: flex; flex-direction: column; justify-content: center; }
.project-index { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 14px; }
.project-body h3 { font-family: var(--font-display); font-size: 34px; font-weight: 560; margin-bottom: 12px; letter-spacing: -0.01em; }
.project-body p { color: var(--ink-soft); margin-bottom: 22px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tag {
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em;
  background: var(--accent-soft); color: var(--accent-deep);
  padding: 6px 13px; border-radius: 999px;
}
.tag.neutral { background: var(--paper-warm); color: var(--ink-soft); }
.card-link { font-weight: 600; font-size: 15.5px; color: var(--accent); display: inline-flex; align-items: center; gap: 8px; }
.card-link .arrow { transition: transform 0.25s ease; }
.project-card:hover .card-link .arrow { transform: translateX(6px); }
.project-card.reverse { direction: rtl; }
.project-card.reverse > * { direction: ltr; }

/* ---------- Experience ---------- */
.exp-list { border-top: 1px solid var(--line); }
.exp-item {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 32px; align-items: baseline;
  padding: 30px 0; border-bottom: 1px solid var(--line);
}
.exp-dates { font-size: 14px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.exp-item h3 { font-size: 20px; font-weight: 650; margin-bottom: 4px; }
.exp-item .exp-org { color: var(--accent); font-weight: 600; font-size: 15.5px; margin-bottom: 8px; }
.exp-item p { color: var(--ink-soft); font-size: 16px; max-width: 60ch; }
.exp-tag {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; white-space: nowrap;
}

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.about-grid h2 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 46px); font-weight: 560; margin: 14px 0 20px; letter-spacing: -0.01em; }
.about-copy p { margin-bottom: 18px; color: var(--ink-soft); font-size: 17.5px; }
.about-copy p strong { color: var(--ink); }
.fact-list { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.fact-list li { padding: 20px 26px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 150px 1fr; gap: 16px; font-size: 15.5px; }
.fact-list li:last-child { border-bottom: 0; }
.fact-list li span:first-child { color: var(--muted); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; padding-top: 3px; }

/* ---------- Contact / footer ---------- */
.contact { background: var(--ink); color: var(--paper); border-radius: 22px; padding: 88px 64px; text-align: center; margin: 40px 0 96px; }
.contact .eyebrow { color: var(--gold); justify-content: center; }
.contact .eyebrow::before { background: var(--gold); }
.contact h2 { font-family: var(--font-display); font-size: clamp(34px, 4.6vw, 58px); font-weight: 560; letter-spacing: -0.01em; margin-bottom: 18px; }
.contact h2 em { font-style: italic; color: var(--gold); }
.contact p { color: rgba(250, 249, 246, 0.72); max-width: 56ch; margin: 0 auto 36px; font-size: 18px; }
.btn-light { background: var(--paper); color: var(--ink); }
.btn-light:hover { background: #fff; }
.contact-links { display: flex; justify-content: center; gap: 28px; margin-top: 40px; flex-wrap: wrap; }
.contact-links a { color: rgba(250, 249, 246, 0.72); text-decoration: none; font-size: 15px; font-weight: 500; border-bottom: 1px solid rgba(250,249,246,0.25); padding-bottom: 2px; }
.contact-links a:hover { color: var(--paper); border-color: var(--paper); }
.footer { border-top: 1px solid var(--line); padding: 32px 0 48px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* ---------- Case study ---------- */
.cs-hero { padding: 168px 0 64px; }
.cs-hero h1 { font-family: var(--font-display); font-size: clamp(44px, 6vw, 76px); font-weight: 560; letter-spacing: -0.015em; line-height: 1.05; margin: 18px 0 16px; }
.cs-hero .lede { font-size: 21px; color: var(--ink-soft); max-width: 60ch; }
.cs-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 28px 0; margin: 48px 0 64px;
}
.cs-meta div { font-size: 14.5px; color: var(--muted); }
.cs-meta strong { display: block; color: var(--ink); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; }
.cs-figure { margin: 56px 0; }
.cs-figure img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.cs-figure figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; text-align: center; }
.cs-figure .ph {
  border: 1.5px dashed var(--line); border-radius: var(--radius); background: #fff;
  min-height: 320px; display: grid; place-items: center; color: var(--muted);
  font-size: 14px; text-align: center; padding: 40px;
}
.cs-body h2 {
  font-family: var(--font-display); font-size: clamp(28px, 3.4vw, 40px); font-weight: 560;
  letter-spacing: -0.01em; margin: 88px 0 20px; padding-top: 8px;
  display: flex; align-items: baseline; gap: 18px;
}
.cs-body h2 .num { font-size: 15px; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.12em; color: var(--accent); }
.cs-body p { margin-bottom: 18px; color: var(--ink-soft); font-size: 18px; max-width: 68ch; }
.cs-body p strong, .cs-body li strong { color: var(--ink); }
.cs-body ul, .cs-body ol { margin: 0 0 22px 4px; padding-left: 22px; color: var(--ink-soft); font-size: 18px; max-width: 68ch; }
.cs-body li { margin-bottom: 10px; }
.insight {
  background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 28px 32px; margin: 36px 0;
}
.insight h4 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.insight ul { margin: 0; padding-left: 20px; }
.insight li { font-size: 16.5px; margin-bottom: 8px; }
.pullquote {
  font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-style: italic;
  color: var(--accent-deep); line-height: 1.4; margin: 48px 0; padding-left: 28px;
  border-left: 3px solid var(--gold); max-width: 30ch;
}
.cs-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 96px 0 40px; }
.cs-nav a {
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  padding: 32px; text-decoration: none; transition: box-shadow 0.25s ease, transform 0.25s ease;
  display: block;
}
.cs-nav a:hover { box-shadow: 0 16px 40px rgba(26,24,21,0.08); transform: translateY(-3px); }
.cs-nav span { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cs-nav h3 { font-family: var(--font-display); font-size: 24px; margin-top: 8px; font-weight: 560; }
.cs-nav a.next { text-align: right; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .project-card, .project-card.reverse { grid-template-columns: 1fr; direction: ltr; }
  .project-visual { min-height: 260px; }
  .project-body { padding: 36px 28px; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .exp-item { grid-template-columns: 1fr; gap: 8px; }
  .contact { padding: 64px 28px; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); flex-direction: column; align-items: flex-start;
    padding: 20px 28px 28px; border-bottom: 1px solid var(--line); gap: 18px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  section.block { padding: 72px 0; }
  .hero { padding: 136px 0 72px; }
  .cs-nav { grid-template-columns: 1fr; }
  .fact-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Mockup galleries (visual refresh 2026) ---------- */
.mock-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.mock-item { margin: 0; }
.mock-gallery img {
  width: 100%; height: auto; border-radius: 34px; display: block;
  box-shadow: 0 30px 60px -28px rgba(26, 24, 21, 0.35);
  background: #0b0b0c;
}
.mock-cap { font-size: 13.5px; color: var(--muted); margin-top: 14px; text-align: center; line-height: 1.55; }
/* Roli hero: floating tilted white phones on a soft gradient stage, echoing the original presentation */
.cs-figure.tilt-stage {
  background: linear-gradient(135deg, #E6EEF0 0%, #F4F8F7 55%, #E9F3EB 100%);
  border-radius: 28px;
  padding: 64px 48px 20px;
  margin-top: 44px;
}
.mock-gallery.tilt { align-items: center; }
.mock-gallery.tilt .mock-item:nth-child(1) img { transform: rotate(-5deg); }
.mock-gallery.tilt .mock-item:nth-child(2) { margin: 0 -26px; z-index: 1; }
.mock-gallery.tilt .mock-item:nth-child(2) img { transform: translateY(14px); }
.mock-gallery.tilt .mock-item:nth-child(3) img { transform: rotate(5deg); }
.mock-gallery.tilt img { background: transparent; box-shadow: 0 38px 64px -26px rgba(26, 24, 21, 0.38); }
.mock-gallery.tilt .mock-cap { color: #5c6663; }
@media (max-width: 820px) {
  .cs-figure.tilt-stage { padding: 40px 20px 12px; }
  .mock-gallery.tilt .mock-item:nth-child(2) { margin: 0 -12px; }
}
.design-note {
  font-size: 13.5px; color: var(--muted); line-height: 1.65;
  border-left: 2px solid var(--accent); padding: 2px 0 2px 16px;
  margin: 30px 0 0; max-width: 660px;
}
.project-visual.phone { background: linear-gradient(135deg, var(--paper-warm), #ECE5D4); }
.project-visual.phone img {
  width: auto; height: 330px; border-radius: 30px;
  box-shadow: 0 24px 48px -20px rgba(26, 24, 21, 0.35);
}
@media (max-width: 820px) {
  .mock-gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    gap: 18px; margin: 0 -20px; padding: 6px 20px 16px;
  }
  .mock-item { flex: 0 0 72%; scroll-snap-align: center; }
}

/* authentic process artifacts (original research images, shown smaller) */
.cs-figure.artifact { max-width: 640px; margin-left: auto; margin-right: auto; }
.cs-figure.artifact img { border-radius: 12px; }
.artifact-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 640px) { .artifact-pair { grid-template-columns: 1fr 1fr; gap: 12px; } }
.artifact-pair .mock-item { margin: 0; }
.artifact-pair img {
  width: 100%; height: auto; display: block; border-radius: 28px;
  box-shadow: 0 30px 60px -28px rgba(26, 24, 21, 0.35);
}
.artifact-pair .mock-cap { margin-top: 14px; }
