/* Muzammil Imtiaz, v2 design preview */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Martian Mono";
  src: url("fonts/martian-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* brand */
  --crimson: #D41514;
  --obsidian: #080808;
  --chrome: #CDCBCA;

  /* dark theme (default) */
  --bg: #080808;
  --fg: #F1EFEE;
  --text: #CDCBCA;
  --muted: #8E8C8B;
  --line: rgba(205, 203, 202, .12);
  --line-strong: rgba(205, 203, 202, .26);
  --surface: #0E0E0E;
  --nav-bg: rgba(8, 8, 8, .8);
  --orb-a: #0e0707;
  --orb-b: #0a0707;
  --orb-glow: rgba(212, 21, 20, .13);
  color-scheme: dark;

  /* type */
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* layout */
  --max: 1440px;
  --pad: clamp(20px, 4vw, 56px);
  --inline: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  --gap: 24px;
  --cols: minmax(120px, 1fr) minmax(0, 3.1fr) minmax(0, 2.5fr) minmax(0, 1.7fr) 28px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

[data-theme="light"] {
  --bg: #F1F0EF;
  --fg: #0A0A0A;
  --text: #2A2928;
  --muted: #676564;
  --line: rgba(8, 8, 8, .11);
  --line-strong: rgba(8, 8, 8, .24);
  --surface: #E7E5E4;
  --nav-bg: rgba(241, 240, 239, .84);
  --orb-a: #EAE3E2;
  --orb-b: #EDE8E7;
  --orb-glow: rgba(212, 21, 20, .09);
  color-scheme: light;
}

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

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  transition: background-color .35s ease, color .35s ease;
}
body {
  font-family: var(--sans);
  font-stretch: 100%;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--crimson); color: #fff; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 3px; border-radius: 2px; }

.sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--pad); top: -64px; z-index: 100;
  padding: 10px 16px; background: var(--crimson); color: #fff; border-radius: 999px;
  font-size: 14px; transition: top .2s;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
section, .foot { position: relative; }

/* display voice: wide uppercase */
.hero-title, .sec-head h2, .h-sm, .contact-q, .w-name, .xp-role h3, .stack-grid h3,
.facts dt, .brand, .ai-quote, .ai-num, .ai-grid h3, .svc-grid h3 {
  font-stretch: 125%;
  text-transform: uppercase;
}

/* small wide caps: nav, buttons, micro labels */
.nav-links a, .pill, .hero-foot, .contact-links a, .text-link, .foot a {
  font-stretch: 125%;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: .17em; text-transform: uppercase;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 80px; padding: 0 var(--inline);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 24px;
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s;
}
.nav.is-scrolled {
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.brand {
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--fg);
  padding: 8px 0;
}
.nav-links { justify-self: center; display: flex; gap: clamp(22px, 3vw, 52px); }
.nav-links a { position: relative; padding: 8px 0; color: var(--text); transition: color .2s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: var(--crimson); transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-end { display: flex; align-items: center; gap: 20px; }

.theme {
  position: relative; width: 38px; height: 38px; flex: none;
  border: 1px solid var(--line-strong); border-radius: 50%;
  background: none; cursor: pointer; color: var(--fg);
  transition: border-color .2s, color .2s;
}
.theme:hover { border-color: var(--crimson); }
.theme svg {
  position: absolute; inset: 0; margin: auto; width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  transition: opacity .25s, transform .4s var(--ease);
}
.theme .i-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="light"] .theme .i-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="light"] .theme .i-moon { opacity: 1; transform: none; }

.pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 40px; padding: 0 20px;
  border: 1.5px solid var(--crimson); border-radius: 999px;
  font-weight: 600; color: var(--fg); white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.pill:hover { background: var(--crimson); color: #fff; }
.arw { width: 16px; height: 16px; fill: none; stroke: var(--crimson); stroke-width: 1.6; transition: transform .25s var(--ease), stroke .2s; }
.pill:hover .arw { stroke: #fff; transform: translateX(3px); }

.menu {
  display: none; width: 40px; height: 40px; position: relative; flex: none;
  background: none; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer;
}
.menu span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--fg);
  transition: transform .3s var(--ease);
}
.menu span:first-child { top: 16px; }
.menu span:last-child { top: 22px; }
.menu[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.sheet {
  position: fixed; inset: 0; z-index: 49;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px var(--pad) 40px;
  background: var(--bg);
}
.sheet[hidden] { display: none; }
.sheet nav { display: flex; flex-direction: column; gap: 6px; }
.sheet nav a {
  font-stretch: 125%; font-weight: 760; text-transform: uppercase;
  font-size: clamp(34px, 10vw, 56px); line-height: 1.1; color: var(--fg);
}
.sheet-mail { font-size: 16px; color: var(--text); border-bottom: 1px solid var(--crimson); align-self: flex-start; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  overflow: hidden; isolation: isolate;
}
.hero-orb {
  --d: min(88vh, 60vw, 860px);
  position: absolute; z-index: 0;
  width: var(--d); height: var(--d);
  left: calc(max(0px, (100% - var(--max)) / 2) + min(100%, var(--max)) * .73 - var(--d) / 2);
  top: calc(53% - var(--d) / 2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 58% 62%, var(--orb-glow), transparent 66%),
    radial-gradient(circle, var(--orb-a) 0%, var(--orb-b) 62%, var(--bg) 71%);
}
.hero-orb svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform: rotate(8deg); }
.hero-canvas {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block;
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
  mask-image: linear-gradient(to bottom, #000 80%, transparent 99%);
}
.hero-fade { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

.hero-body {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding: 128px var(--inline) 40px;
}
.hero-title {
  font-weight: 760;
  font-size: clamp(40px, 5.7vw, 82px);
  line-height: .9;
  letter-spacing: -.01em;
  color: var(--fg);
}
.t-line { display: block; white-space: nowrap; min-height: .9em; }
.t-red { color: var(--crimson); }
.hero-title .bit, .w-name .bit {
  font-family: var(--mono); font-stretch: 100%; font-weight: 400;
  text-transform: none; letter-spacing: 0;
}
.hero-sub {
  margin-top: clamp(22px, 3.8vh, 38px);
  max-width: 40ch;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--text);
}
.hero-cta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px;
  margin-top: clamp(26px, 4.6vh, 48px);
}
.pill-lg { height: 56px; padding: 0 26px 0 30px; gap: 18px; font-size: 11.5px; }
.text-link {
  padding: 6px 0; color: var(--text);
  border-bottom: 1px solid var(--line-strong);
  transition: color .2s, border-color .2s;
}
.text-link:hover { color: var(--fg); border-color: var(--crimson); }

.hero-foot {
  position: relative; z-index: 2;
  padding: 0 var(--inline) 28px;
  color: var(--muted);
}
.hero-facts { display: flex; flex-wrap: wrap; list-style: none; row-gap: 8px; }
.hero-facts li + li { margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line-strong); }


/* intro: one orchestrated load moment */
.js body:not(.is-ready) .t-line { visibility: hidden; }
.no-gl .hero-canvas { display: none; }
.js .hero-sub, .js .hero-cta, .js .hero-foot {
  opacity: 0; transform: translateY(8px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js .is-ready .hero-sub { transition-delay: .75s; }
.js .is-ready .hero-cta { transition-delay: .9s; }
.js .is-ready .hero-foot { transition-delay: 1.1s; }
.js .is-ready .hero-sub, .js .is-ready .hero-cta, .js .is-ready .hero-foot { opacity: 1; transform: none; }

/* ---------- sections ---------- */
.about, .work, .ai, .services, .experience, .stack, .creds, .contact { padding: clamp(88px, 13vh, 160px) 0; }
.work, .ai, .services, .experience, .stack, .creds, .contact { border-top: 1px solid var(--line); }

.sec-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.sec-head h2 {
  font-weight: 760;
  font-size: clamp(36px, 5.6vw, 92px);
  line-height: .9; letter-spacing: -.01em;
  color: var(--fg);
}
.sec-head p { max-width: 36ch; font-size: 15px; line-height: 1.5; color: var(--muted); padding-bottom: 6px; }

/* about */
.lead {
  max-width: 27em;
  font-size: clamp(24px, 2.7vw, 42px);
  line-height: 1.22; letter-spacing: -.012em;
  color: var(--fg);
}
.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 8vh, 88px);
  border-top: 1px solid var(--line-strong);
}
.facts div { padding: 28px var(--gap) 0 0; }
.facts div + div { padding-left: var(--gap); border-left: 1px solid var(--line); }
.facts dt { font-weight: 700; font-size: clamp(32px, 3.4vw, 54px); line-height: 1; color: var(--fg); }
.facts dd { margin-top: 12px; max-width: 24ch; font-size: 15px; color: var(--muted); }

/* ---------- work ---------- */
.work-list { list-style: none; border-top: 1px solid var(--line-strong); }
.work-item { border-bottom: 1px solid var(--line); }
.work-row { scroll-margin-top: 84px; }
.work-row {
  width: 100%;
  display: grid; grid-template-columns: var(--cols); gap: var(--gap); align-items: center;
  padding: 30px 0;
  background: none; border: 0; text-align: left; cursor: pointer;
}
.work-row:focus-visible { outline-offset: -2px; }
.w-domain { font-size: 13px; color: var(--muted); }
.w-name {
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 40px);
  line-height: 1;
  color: var(--text);
  transition: color .2s;
}
.w-name .bit { color: var(--crimson); }
.w-what { max-width: 32ch; font-size: 15px; line-height: 1.45; color: var(--muted); }
.w-tags { display: flex; flex-wrap: wrap; gap: 4px 14px; font: 400 11px/1.6 var(--mono); color: var(--text); }
.w-plus { position: relative; justify-self: end; width: 16px; height: 16px; transition: transform .35s var(--ease); }
.w-plus::before, .w-plus::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1.5px; margin-top: -.75px; background: var(--text); transition: background-color .2s;
}
.w-plus::after { transform: rotate(90deg); }
.work-row:hover .w-name, .work-row:focus-visible .w-name, .is-open .w-name { color: var(--fg); }
.work-row:hover .w-plus::before, .work-row:hover .w-plus::after,
.is-open .w-plus::before, .is-open .w-plus::after { background: var(--crimson); }
.is-open .w-plus { transform: rotate(45deg); }

.work-panel {
  display: grid; grid-template-rows: 0fr; visibility: hidden;
  transition: grid-template-rows .5s var(--ease), visibility 0s linear .5s;
}
.is-open .work-panel { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .5s var(--ease); }
.work-inner { overflow: hidden; min-height: 0; }
.w-detail { display: grid; grid-template-columns: var(--cols); gap: var(--gap); padding: 2px 0 32px; }
.w-points { grid-column: 2 / 4; list-style: none; max-width: 64ch; }
.w-points li { position: relative; padding-left: 20px; font-size: 16px; line-height: 1.6; color: var(--text); }
.w-points li + li { margin-top: 10px; }
.w-points li::before { content: ""; position: absolute; left: 0; top: .56em; width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--crimson); }
.w-side { grid-column: 4 / 6; min-width: 0; }
.term {
  padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font: 400 11.5px/1.95 var(--mono); color: var(--text);
  white-space: pre-wrap; overflow-x: auto;
}
.term .p { color: var(--muted); }
.term .ok { color: var(--crimson); }
.w-link { display: inline-block; margin-top: 16px; padding-bottom: 2px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--crimson); transition: color .2s; }
.w-link:hover { color: var(--fg); }

/* screenshots */
.w-shots { display: grid; grid-template-columns: var(--cols); gap: var(--gap); padding-bottom: 44px; }
.w-gallery { grid-column: 2 / -1; position: relative; min-width: 0; }
.w-strip {
  display: flex; gap: 18px; padding-bottom: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
  --fl: 0px; --fr: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
}
.w-strip::-webkit-scrollbar { display: none; }
.w-gallery.can-next .w-strip { --fr: 120px; }
.w-gallery.can-prev .w-strip { --fl: 120px; }
.g-btn {
  position: absolute; top: calc(50% - 4px); z-index: 2; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--crimson); background: var(--bg); color: var(--fg); cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
  transition: background-color .2s, color .2s, opacity .2s;
}
.g-btn:hover { background: var(--crimson); color: #fff; }
.g-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.g-prev { left: 8px; }
.g-next { right: 8px; }
.g-btn[hidden] { display: none; }
.g-count {
  position: absolute; right: 0; top: -30px;
  font: 400 10.5px/1 var(--mono); color: var(--muted);
}
.shot {
  --h: 300px;
  flex: none; scroll-snap-align: start; width: min-content;
  display: flex; flex-direction: column;
  height: calc(var(--h) + 30px);
  border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden;
  background: var(--surface);
}
.shot-bar {
  display: flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px; flex: none;
  border-bottom: 1px solid var(--line);
  font: 400 10.5px/1 var(--mono); color: var(--muted);
}
.shot-bar i { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.shot-bar i:first-child { background: var(--crimson); }
.shot-bar span { margin-left: 8px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shot-body { flex: 1; min-height: 0; }
.shot-open { display: block; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot-open img { height: var(--h); width: auto; max-width: none; transition: transform .5s var(--ease); }
.shot-open:hover img { transform: scale(1.015); }
.shot-empty {
  width: calc(var(--h) * 1.78); height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background:
    repeating-linear-gradient(90deg, transparent 0 13px, var(--line) 13px 14px),
    repeating-linear-gradient(0deg, transparent 0 13px, var(--line) 13px 14px);
  color: var(--muted); font-size: 13px;
}
.shot-empty code { display: none; font: 400 11px/1 var(--mono); color: var(--crimson); }
.shot-phone .shot-empty { width: calc(var(--h) * .5); text-align: center; padding: 0 12px; }

/* ---------- AI ---------- */
.ai-top {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px); align-items: end;
  padding-bottom: clamp(40px, 7vh, 72px);
  border-bottom: 1px solid var(--line-strong);
}
.ai-quote {
  font-weight: 760;
  font-size: clamp(30px, 3.6vw, 58px);
  line-height: 1; letter-spacing: -.01em;
  color: var(--fg);
}
.ai-proof { display: grid; grid-template-columns: auto auto auto; justify-content: start; align-items: start; gap: 20px 24px; }
.ai-num { font-weight: 760; font-size: clamp(28px, 2.7vw, 40px); line-height: 1; white-space: nowrap; }
.ai-then .ai-num { color: var(--muted); }
.ai-then s { text-decoration-color: var(--crimson); text-decoration-thickness: 3px; }
.ai-now .ai-num { color: var(--crimson); }
.ai-lbl { margin-top: 12px; font-size: 14px; line-height: 1.45; color: var(--muted); max-width: 24ch; }
.ai-arw { width: 48px; height: 16px; margin-top: clamp(8px, 1.2vw, 20px); fill: none; stroke: var(--text); stroke-width: 1.5; }

.ai-grid, .svc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.svc-grid { border-top: 1px solid var(--line-strong); }
.ai-grid > *, .svc-grid > * { padding: 32px var(--gap) 0 0; }
.ai-grid > * + *, .svc-grid > * + * { padding-left: var(--gap); border-left: 1px solid var(--line); }
.ai-grid h3, .svc-grid h3 { margin-bottom: 14px; font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--fg); }
.ai-grid p, .svc-grid p { font-size: 16px; line-height: 1.6; color: var(--text); max-width: 34ch; }
.svc-grid h3 { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.15; }
.svc-cta { margin-top: clamp(40px, 7vh, 64px); }

/* ---------- experience ---------- */
.xp { list-style: none; border-top: 1px solid var(--line-strong); }
.xp li {
  display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 3.1fr) minmax(0, 4.2fr);
  gap: var(--gap); padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
.xp-when { padding-top: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.xp-now .xp-when { color: var(--fg); }
.xp-now .xp-when::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 10px; vertical-align: 1px;
  border-radius: 50%; background: var(--crimson); box-shadow: 0 0 0 4px rgba(212, 21, 20, .2);
}
.xp-role h3 { font-weight: 700; font-size: clamp(18px, 1.6vw, 24px); line-height: 1.15; color: var(--fg); }
.xp-role p { margin-top: 8px; font-size: 14px; color: var(--muted); }
.xp-role a { color: var(--text); border-bottom: 1px solid var(--line-strong); transition: border-color .2s, color .2s; }
.xp-role a:hover { color: var(--fg); border-color: var(--crimson); }
.xp-what { max-width: 60ch; font-size: 16px; line-height: 1.6; color: var(--text); }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.stack-grid > div { padding: 28px var(--gap) 0 0; }
.stack-grid > div + div { padding-left: var(--gap); border-left: 1px solid var(--line); }
.stack-grid h3 { margin-bottom: 16px; font-weight: 700; font-size: 15px; letter-spacing: .02em; color: var(--fg); }
.stack-grid ul { list-style: none; }
.stack-grid li { font-size: 17px; line-height: 2; color: var(--text); }

/* ---------- credentials ---------- */
.creds-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(36px, 6vw, 112px); }
.h-sm { margin-bottom: 24px; font-weight: 760; font-size: clamp(22px, 2vw, 30px); line-height: 1; color: var(--fg); }
.edu-name { max-width: 22ch; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; color: var(--fg); }
.edu-meta { margin-top: 10px; font-size: 15px; color: var(--muted); }
.cert-list { list-style: none; border-top: 1px solid var(--line-strong); }
.cert-list a {
  display: flex; justify-content: space-between; align-items: baseline; gap: 24px;
  padding: 16px 0; border-bottom: 1px solid var(--line);
  font-size: 16px; color: var(--text); transition: color .2s, padding-left .3s var(--ease);
}
.cert-list a:hover { color: var(--fg); padding-left: 10px; box-shadow: inset 2px 0 0 var(--crimson); }
.cert-by { white-space: nowrap; font-size: 14px; color: var(--muted); }

/* ---------- contact ---------- */
.contact { padding-bottom: clamp(96px, 16vh, 180px); }
.contact-q { max-width: 14em; font-weight: 760; font-size: clamp(36px, 5.6vw, 92px); line-height: .92; letter-spacing: -.01em; color: var(--fg); }
.contact-mail {
  display: inline-block; margin-top: clamp(28px, 5vh, 56px); padding-bottom: 6px;
  font-stretch: 112%; font-weight: 500; font-size: clamp(20px, 3.4vw, 54px); line-height: 1.15;
  color: var(--text); border-bottom: 2px solid var(--crimson); transition: color .2s;
}
.contact-mail:hover { color: var(--fg); }
.contact-links { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 36px; }
.contact-links a { padding: 6px 0; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--line-strong); transition: color .2s, border-color .2s; }
.contact-links a:hover { color: var(--fg); border-color: var(--crimson); }

/* ---------- footer ---------- */
.foot {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 28px var(--inline);
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.foot a { color: var(--text); transition: color .2s; }
.foot a:hover { color: var(--crimson); }

/* ---------- lightbox ---------- */
.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; color: #F1EFEE;
}
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(8, 8, 8, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-fig { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 92vw; }
.lb-img { max-width: 92vw; max-height: 82vh; width: auto; height: auto; border-radius: 10px; border: 1px solid rgba(205, 203, 202, .2); }
.lb-cap { font: 400 11px/1 var(--mono); color: #8E8C8B; }
.lb-btn {
  position: fixed; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(205, 203, 202, .3); background: rgba(8, 8, 8, .6); color: #F1EFEE; cursor: pointer;
  transition: border-color .2s;
}
.lb-btn:hover { border-color: var(--crimson); }
.lb-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-btn[hidden] { display: none; }

/* ---------- boot intro (first visit per session) ---------- */
.boot {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
  transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.boot-on .boot { display: flex; animation: boot-safety 0s linear 6s forwards; }
.boot.is-done { opacity: 0; visibility: hidden; }
.boot-log {
  min-width: min(560px, 100%); min-height: 9.5em;
  font: 400 clamp(12px, 1.25vw, 15px)/1.9 var(--mono); color: var(--text);
  white-space: pre-wrap;
}
.boot-log .p { color: var(--crimson); }
.boot-log .ok { color: var(--crimson); }
.boot-log .dim { color: var(--muted); }
.boot-log .cur { display: inline-block; width: .6em; height: 1.1em; vertical-align: -.2em; background: var(--crimson); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes boot-safety { to { opacity: 0; visibility: hidden; } }

/* ---------- responsive ---------- */

@media (max-width: 1100px) {
  :root { --cols: minmax(0, 1fr) 28px; }
  .work-row { grid-template-areas: "domain plus" "name plus" "what plus" "tags plus"; row-gap: 10px; align-items: start; }
  .w-domain { grid-area: domain; }
  .w-name { grid-area: name; }
  .w-what { grid-area: what; max-width: 52ch; }
  .w-tags { grid-area: tags; }
  .w-plus { grid-area: plus; align-self: center; }
  .w-detail { grid-template-columns: minmax(0, 1fr); }
  .w-points, .w-side { grid-column: 1; }
  .w-side { max-width: 560px; }
  .w-gallery { grid-column: 1 / -1; }
  .xp li { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .xp-when { grid-column: 1 / -1; padding-top: 0; }
  .stack-grid, .ai-grid, .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-grid > div:nth-child(3), .ai-grid > div:nth-child(3), .svc-grid > article:nth-child(3) { padding-left: 0; border-left: 0; }
  .stack-grid > div:nth-child(n + 3), .ai-grid > div:nth-child(n + 3), .svc-grid > article:nth-child(n + 3) { margin-top: 12px; border-top: 1px solid var(--line); }
  .ai-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

@media (max-width: 1024px) {
  .nav { grid-template-columns: 1fr auto; height: 68px; }
  .nav-links { display: none; }
  .menu { display: block; }
  .nav-end { gap: 12px; }
  .nav-end .pill { height: 40px; }
}

@media (max-width: 860px) {
  .hero-orb { --d: min(86vw, 50svh); left: calc(58% - var(--d) / 2); top: calc(28% - var(--d) / 2); }
  .hero-fade { background: linear-gradient(to bottom, transparent 34%, color-mix(in srgb, var(--bg) 85%, transparent) 46%, var(--bg) 54%); }
  .hero-body { justify-content: flex-end; padding-top: 96px; padding-bottom: 24px; }
  .hero-title { font-size: clamp(36px, 10.4vw, 72px); }
  .hero-facts li:nth-child(3) { display: none; }

  .sec-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .sec-head p { padding-bottom: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 28px; }
  .xp li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .creds-grid { grid-template-columns: minmax(0, 1fr); }
  .shot { --h: 220px; }
  .g-btn { width: 40px; height: 40px; }
}

@media (max-width: 520px) {
  .nav-end .pill { display: none; }
  .stack-grid, .ai-grid, .svc-grid { grid-template-columns: minmax(0, 1fr); }
  .stack-grid > div, .stack-grid > div + div, .ai-grid > div, .ai-grid > div + div, .svc-grid > *, .svc-grid > * + * { padding-left: 0; border-left: 0; }
  .stack-grid > div + div, .ai-grid > div + div, .svc-grid > * + * { margin-top: 12px; border-top: 1px solid var(--line); }
  .cert-list a { flex-direction: column; gap: 2px; }
  .ai-proof { grid-template-columns: minmax(0, 1fr); }
  .ai-arw { transform: rotate(90deg); margin: 0 0 0 4px; }
  .hero-cta { gap: 16px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}
