/* Kamran Asim — portfolio. Concept B "Editorial". */
:root {
  --accent: #1F4E79;
  --accent-hover: #163A5A;
  --accent-soft: #EEF3F9;
  --ai: #0F6E56;
  --ai-soft: #EEF7F3;
  --ink: #0F172A;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748B;
  --slate-300: #CBD5E1;
  --slate-200: #E2E8F0;
  --slate-100: #F1F5F9;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;
  --ok: #15803D;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.on-dark :focus-visible, .site-footer :focus-visible { outline-color: #93C5FD; }
h1, h2, h3, p, ul { margin: 0; }
.head { font-family: var(--font-head); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; background: var(--ink); color: var(--white);
  border-radius: 8px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--white); }

.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--slate-200); }
.site-header .wrap {
  padding-top: 20px; padding-bottom: 20px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-family: var(--font-head); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; }
.nav a { color: var(--slate-700); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a.btn-ink, .nav a.btn-ink:hover { color: var(--white); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 14px 24px; border-radius: 999px;
  text-decoration: none; font-weight: 500; line-height: 1.2;
}
.btn-sm { padding: 10px 18px; }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #1E293B; color: var(--white); }
.btn-accent { background: var(--accent); color: var(--white); font-weight: 600; }
.btn-accent:hover { background: var(--accent-hover); color: var(--white); }
.btn-outline { border: 1px solid var(--slate-300); color: var(--ink); }
.btn-outline:hover { border-color: var(--slate-500); color: var(--ink); }
.btn-white { background: var(--white); color: var(--ink); font-weight: 600; }
.btn-white:hover { background: var(--slate-200); color: var(--ink); }
.btn-ghost-dark { border: 1px solid var(--slate-600); color: var(--white); }
.btn-ghost-dark:hover { border-color: var(--slate-300); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Type ---------- */
.eyebrow { font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: 0.01em; }
.eyebrow.ai { color: var(--ai); }
.label { font-size: 13px; font-weight: 600; color: var(--slate-500); }
.label.accent { color: var(--accent); }
.label.ai { color: var(--ai); }
.lede { font-size: 19px; line-height: 1.6; color: var(--slate-600); }
.muted { color: var(--slate-600); }
.subtle { color: var(--slate-500); }
.stack-line { font-size: 14px; color: var(--slate-500); line-height: 1.6; }
.body-copy { color: var(--slate-600); line-height: 1.7; }
.arrow-link { font-weight: 600; }

.h1-hero { font-family: var(--font-head); font-weight: 600; font-size: clamp(40px, 7vw, 64px); line-height: 1.02; letter-spacing: -0.03em; }
.h1-page { font-family: var(--font-head); font-weight: 600; font-size: clamp(36px, 6vw, 56px); line-height: 1.05; letter-spacing: -0.02em; }
.h2-xl { font-family: var(--font-head); font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.02em; line-height: 1.1; }
.h2-lg { font-family: var(--font-head); font-size: clamp(28px, 4.2vw, 36px); letter-spacing: -0.01em; line-height: 1.15; }
.h2-md { font-family: var(--font-head); font-size: clamp(26px, 3.8vw, 32px); line-height: 1.15; }
.h3-card { font-family: var(--font-head); font-size: clamp(22px, 3vw, 26px); line-height: 1.2; }

/* ---------- Layout helpers ---------- */
.grid { display: grid; gap: 16px; }
.grid-gap-20 { gap: 20px; }
.cols-260 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.cols-300 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.cols-320 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.cols-340 { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.cols-480 { grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr)); }
.cols-500 { grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr)); }
.cols-220 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.band { background: var(--slate-100); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.min0 { min-width: 0; }

/* ---------- Cards ---------- */
.card-line { border: 1px solid var(--slate-200); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.card-white { background: var(--white); border-radius: 16px; padding: 28px; }
.card-white.p24 { padding: 24px; }
.card-soft { background: var(--slate-50); border-radius: 16px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card-soft h3 { font-size: 19px; }
.card-soft .arrow-link, .push-end { margin-top: auto; }

.pill-tag { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border: 1px solid var(--slate-300); border-radius: 999px; font-size: 14px; color: var(--slate-700); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; background: var(--slate-100); border-radius: 999px; font-size: 13px; }
.badge { display: inline-block; padding: 6px 12px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 13px; font-weight: 600; }

.facts { border: 1px solid var(--slate-200); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 16px; margin: 0; }
.facts.compact { padding: 24px; gap: 12px; }
.facts > div { display: flex; justify-content: space-between; gap: 12px; }
.facts:not(.compact) > div:not(:last-child) { border-bottom: 1px solid var(--slate-200); padding-bottom: 14px; }
.facts dt { color: var(--slate-500); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.bullets { padding-left: 20px; color: var(--slate-700); line-height: 1.7; display: flex; flex-direction: column; gap: 10px; }
.bullets.tight { gap: 8px; }

/* ---------- Home ---------- */
.hero { padding-top: 72px; padding-bottom: 64px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-end; }
.hero-main { flex: 1 1 560px; min-width: 0; }
.hero-side { flex: 1 1 300px; min-width: 0; }
.hero .h1-hero span { color: var(--accent); }
.stats { border-top: 1px solid var(--slate-200); border-bottom: 1px solid var(--slate-200); }
.stats .wrap { padding-top: 32px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 24px; margin-top: 0; margin-bottom: 0; list-style: none; }
.stats li { flex: 1 1 200px; }
.stat-num { font-family: var(--font-head); font-size: 40px; font-weight: 700; line-height: 1.2; }
.timeline { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.timeline li { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 20px 0; border-top: 1px solid var(--slate-200); }
.timeline li:last-child { border-bottom: 1px solid var(--slate-200); }
.timeline .co { flex: 1 1 360px; font-weight: 600; }
.timeline .role { flex: 1 1 260px; color: var(--slate-600); }
.timeline .yrs { color: var(--slate-500); }

/* ---------- Experience ---------- */
.job { display: flex; flex-wrap: wrap; gap: 24px 48px; padding: 48px 0; border-top: 1px solid var(--slate-200); }
.job:last-child { border-bottom: 1px solid var(--slate-200); }
.job-meta { flex: 1 1 240px; min-width: 0; }
.job-body { flex: 3 1 600px; min-width: 0; }
.job-title { font-family: var(--font-head); font-size: clamp(24px, 3.4vw, 30px); line-height: 1.2; }
.job-org { margin: 6px 0 20px; font-size: 17px; color: var(--accent); font-weight: 600; }

/* ---------- Projects ---------- */
.case { border: 1px solid var(--slate-200); border-radius: 20px; padding: 36px; display: flex; flex-wrap: wrap; gap: 24px 48px; }
.case-head { flex: 1 1 300px; min-width: 0; }
.case-body { flex: 2 1 520px; min-width: 0; gap: 20px; }
.case-title { font-family: var(--font-head); font-size: clamp(24px, 3.4vw, 28px); line-height: 1.2; }
.case-body h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.case-body p { color: var(--slate-600); line-height: 1.65; }
.ai-sys { display: flex; flex-wrap: wrap; gap: 40px; padding: 40px 0; border-bottom: 1px solid var(--slate-200); align-items: flex-start; }
.ai-sys:last-child { border-bottom: 0; }
.ai-sys-text { flex: 1 1 480px; min-width: 0; }
.ai-sys-title { font-family: var(--font-head); font-size: clamp(26px, 3.6vw, 30px); line-height: 1.2; margin-bottom: 6px; }
.shot { flex: 1 1 400px; min-width: 0; height: 320px; border-radius: 20px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-weight: 600; }
.shot-media { flex: 1 1 400px; min-width: 0; margin: 0; padding: 16px; border-radius: 20px; display: flex; flex-direction: column; gap: 12px; }
.shot-media img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--slate-200); background: var(--white); }
.shot-media figcaption { font-size: 14px; color: var(--slate-600); }
.shot-blue { background: var(--accent-soft); color: var(--accent); }
.shot-green { background: var(--ai-soft); color: var(--ai); }
.shot-grey { background: var(--slate-100); color: var(--slate-700); }

/* ---------- Screenshot carousel ---------- */
.carousel .slide { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.carousel .slide-frame { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; background: var(--white); border-radius: 12px; border: 1px solid var(--slate-200); overflow: hidden; }
.carousel .slide-frame img { width: 100%; height: 100%; object-fit: contain; border: 0; border-radius: 0; }
.carousel.is-ready .slide:not(.is-active) { display: none; }
.carousel-controls { display: flex; align-items: center; gap: 10px; }
.carousel-btn { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 1px solid var(--slate-300); background: var(--white); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.carousel-btn:hover { border-color: var(--slate-500); }
.carousel-dots { display: flex; gap: 2px; }
.carousel-dot { width: 28px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.carousel-dot::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--slate-500); transition: width .2s ease, background-color .2s ease; }
.carousel-dot[aria-current="true"]::before { width: 22px; background: var(--ink); }
.carousel-status { margin: 0 0 0 auto; font-size: 14px; color: var(--slate-600); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .carousel-dot::before { transition: none; } }

/* ---------- Research ---------- */
.metric { font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1.1; }
.certs { padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.certs li { background: var(--white); border-radius: 12px; padding: 16px 20px; display: flex; justify-content: space-between; gap: 12px; }
.certs li span:first-child { font-weight: 500; }
.certs li span:last-child { color: var(--slate-500); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--slate-200); }
.site-footer .wrap { padding-top: 72px; padding-bottom: 72px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.site-footer.short .wrap { padding-top: 56px; padding-bottom: 56px; }
.footer-cta { font-family: var(--font-head); color: var(--white); flex: 1 1 420px; min-width: 0; line-height: 1.15; font-weight: 700; }
.footer-cta.xl { font-size: clamp(30px, 4.6vw, 40px); }
.footer-cta.lg { font-size: clamp(28px, 4.2vw, 36px); }
.footer-cta.md { font-size: clamp(24px, 3.6vw, 28px); font-weight: 400; }
.legal { background: var(--ink); color: #94A3B8; font-size: 14px; border-top: 1px solid #1E293B; }
.legal .wrap { padding-top: 20px; padding-bottom: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.legal a { color: #CBD5E1; }
.legal a:hover { color: var(--white); }

/* ---------- Small screens ---------- */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav { gap: 12px 20px; }
  .hero { padding-top: 48px; padding-bottom: 48px; gap: 32px; }
  .card-line, .case { padding: 24px; }
  .card-white { padding: 24px; }
  .facts { padding: 20px; }
  .shot { height: 220px; }
  .lede { font-size: 17px; }
  .site-footer .wrap { padding-top: 48px; padding-bottom: 48px; }
  .stat-num { font-size: 34px; }
}
