/* Javeed Mohammad — portfolio
   System: ink outlines + hard shadows (neo-brutalist), a design-tool layer in selection blue,
   Anybody (display, wdth axis) / Archivo (text) / Martian Mono (labels). */

:root {
  --ink: #121212;
  --paper: #faf9f6;
  --card: #ffffff;
  --red: #d42a20;
  --lemon: #ffd84a;
  --sel: #0d99ff;
  --sky: #bfe6ff;
  --mint: #bff0d4;
  --rose: #ffc9d6;
  --muted: #4f4d48;
  --line: 3px solid var(--ink);
  --shadow: 6px 6px 0 var(--ink);
  --shadow-lg: 10px 10px 0 var(--ink);
  --r: 16px;
  --r-sm: 10px;
  --display: "Anybody", "Arial Black", "Helvetica Neue", sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --max: 1320px;
  --pad: 16px;
  --gap: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p, h1, h2, h3, h4, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--lemon); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--sel);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--lemon); color: var(--ink); border: var(--line); border-radius: var(--r-sm);
  padding: 10px 16px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
@media (min-width: 760px) { :root { --pad: 32px; } }
@media (min-width: 1200px) { :root { --pad: 60px; } }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Shared type ---------- */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.4;
  font-variation-settings: "wdth" 90;
}
.frame-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .02em;
  font-variation-settings: "wdth" 90;
  color: var(--ink);
  margin-bottom: 18px;
}
.frame-tag svg { width: 14px; height: 14px; flex: none; }
.h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(44px, 8.4vw, 112px);
  line-height: .9;
  letter-spacing: -.02em;
  text-transform: uppercase;
  font-variation-settings: "wdth" 130;
}
.h2 .alt { font-variation-settings: "wdth" 70; }
.section { padding: clamp(72px, 9vw, 128px) 0; position: relative; }
.section-head {
  display: grid; gap: 20px; align-items: end;
  margin-bottom: clamp(36px, 5vw, 64px);
}
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr minmax(280px, 400px); }
}
.section-head .intro { font-size: 18px; color: var(--muted); max-width: 40ch; }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--card);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  background: var(--bg); color: var(--ink);
  border: var(--line); border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--text); font-weight: 700; font-size: 16px; letter-spacing: .005em;
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--ink); }
.btn-ink { --bg: var(--ink); color: #fff; box-shadow: 4px 4px 0 var(--red); }
.btn-ink:hover { box-shadow: 6px 6px 0 var(--red); }
.btn-lemon { --bg: var(--lemon); }
.btn-red { --bg: var(--red); color: #fff; }
.btn-icon { width: 52px; padding: 0; }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; border-radius: 10px; }

/* ---------- Nav ---------- */
.topbar { position: sticky; top: 0; z-index: 50; padding-top: 12px; }
.nav {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: var(--line); border-radius: var(--r);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 8px 8px 8px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.mono-mark {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px; border: var(--line);
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 900; font-size: 17px; letter-spacing: -.02em;
  font-variation-settings: "wdth" 120;
}
.brand-name { display: none; font-family: var(--display); font-weight: 800; font-size: 16px; text-transform: uppercase; letter-spacing: .01em; font-variation-settings: "wdth" 115; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; text-transform: none; letter-spacing: .01em; color: var(--muted); font-variation-settings: "wdth" 85; }
.nav-links { display: none; align-items: center; gap: 4px; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 2px solid transparent;
}
.nav-links a:hover { background: var(--lemon); border-color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.grid-toggle { display: none; }
.grid-toggle[aria-pressed="true"] { --bg: var(--sel); color: var(--ink); }
.menu { position: static; }
.menu summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px;
  border: var(--line); border-radius: 10px; font-weight: 700; font-size: 15px; background: var(--card);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: 16px; height: 16px; }
.menu[open] summary { background: var(--ink); color: #fff; }
.menu:not([open]) .menu-panel { display: none; }
.menu-panel {
  position: absolute; left: -3px; right: -3px; top: calc(100% + 10px);
  background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 10px; display: grid; gap: 4px;
}
.menu-panel a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-radius: 10px; text-decoration: none;
  font-family: var(--display); font-weight: 800; font-size: 22px; text-transform: uppercase;
  font-variation-settings: "wdth" 120;
}
.menu-panel a:hover, .menu-panel a:focus-visible { background: var(--lemon); }
.menu-panel a span { font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: none; font-variation-settings: "wdth" 90; }

@media (min-width: 560px) { .brand-name { display: block; } }
@media (min-width: 1040px) {
  .nav { padding-left: 8px; }
  .nav-links { display: flex; }
  .menu { display: none; }
  .grid-toggle { display: inline-flex; }
  .js .grid-toggle { display: inline-flex; }
}
.no-js .grid-toggle { display: none !important; }

/* ---------- Hero ---------- */
.hero { padding: clamp(36px, 5vw, 72px) 0 clamp(40px, 4vw, 56px); position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(18, 18, 18, .16) 1.2px, transparent 1.6px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
}
.hero-grid { display: grid; gap: 36px; }
.hero-eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 22px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); flex: none; }
.name {
  --name-size: calc((100vw - 2 * var(--pad)) / 6.1);
  font-family: var(--display); font-weight: 900; text-transform: uppercase;
  line-height: .8; letter-spacing: -.015em; margin: 0;
  font-size: var(--name-size);
}
.name span { display: block; }
.name .n1 { font-variation-settings: "wdth" 150; }
.name .n2 { font-variation-settings: "wdth" 90; margin-top: .06em; }
.thesis {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: clamp(26px, 3.4vw, 40px);
  font-size: clamp(30px, 4.4vw, 60px); line-height: 1;
}
.sel {
  position: relative; display: inline-block;
  font-family: var(--display); font-weight: 800; font-variation-settings: "wdth" 120;
  letter-spacing: -.01em; padding: .08em .14em .1em;
  background: var(--lemon);
}
.sel::before {
  content: ""; position: absolute; inset: -8px; border: 2px solid var(--sel); pointer-events: none;
}
.handles i {
  position: absolute; width: 11px; height: 11px; background: #fff; border: 2px solid var(--sel);
}
.handles i:nth-child(1) { left: -13px; top: -13px; }
.handles i:nth-child(2) { right: -13px; top: -13px; }
.handles i:nth-child(3) { left: -13px; bottom: -13px; }
.handles i:nth-child(4) { right: -13px; bottom: -13px; }
.cursor {
  position: absolute; right: -26px; bottom: -44px; display: flex; align-items: flex-start; gap: 0;
  pointer-events: none;
}
.cursor svg { width: 22px; height: 22px; }
.cursor span {
  margin-top: 16px; margin-left: -2px;
  background: var(--red); color: #fff; border: 2px solid var(--ink); border-radius: 0 8px 8px 8px;
  font-family: var(--text); font-weight: 700; font-size: 13px; line-height: 1; padding: 6px 9px 7px;
  letter-spacing: 0;
}
.codes {
  word-spacing: -.28em;
  font-family: var(--mono); font-weight: 600; font-variation-settings: "wdth" 100;
  font-size: .78em; letter-spacing: -.03em; white-space: nowrap;
}
.codes .caret {
  display: inline-block; width: .5em; height: .95em; margin-left: .08em; vertical-align: -.12em;
  background: var(--red);
}
.lede { margin-top: clamp(40px, 4.6vw, 56px); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.portrait { position: relative; width: min(72%, 420px); margin: 8px 18px 0 auto; }
.portrait-plate {
  position: absolute; inset: 16px -8px -10px 14px; border: var(--line); border-radius: 22px;
  background: var(--red);
  transform: rotate(4deg);
}
.portrait-card {
  position: relative; background: var(--card); border: var(--line); border-radius: 22px;
  padding: 10px; box-shadow: var(--shadow-lg);
  transform: rotate(-3deg);
}
.portrait-card img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 13px; border: 2px solid var(--ink); }
.portrait-cap {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 10px 4px 2px; font-family: var(--mono); font-size: 12px; font-variation-settings: "wdth" 90;
}
.portrait-cap b { font-family: var(--display); font-weight: 800; font-size: 15px; text-transform: uppercase; font-variation-settings: "wdth" 115; }
.bubble {
  position: absolute; left: -14px; top: 26px; z-index: 2;
  background: var(--lemon); border: var(--line); border-radius: 18px;
  padding: 10px 16px 12px; box-shadow: 4px 4px 0 var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 24px; line-height: 1; text-transform: uppercase;
  font-variation-settings: "wdth" 125; transform: rotate(-8deg);
}
.bubble::after {
  content: ""; position: absolute; right: 22px; bottom: -14px; width: 20px; height: 20px;
  background: var(--lemon); border-right: var(--line); border-bottom: var(--line);
  transform: skewX(30deg) rotate(45deg);
}

@media (min-width: 1040px) {
  .hero-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
  .hero-copy { grid-column: 1 / span 8; }
  .portrait { grid-column: 9 / span 4; width: 100%; margin: 6px 0 0 auto; max-width: 400px; }
  .name { --name-size: calc((min(100vw - 2 * var(--pad), var(--max)) - 11 * var(--gap)) / 12 * 8 / 6.1 + 7 * var(--gap) / 6.1); }
}

/* Toolbar (design-tool dock) */
.dock-wrap { margin-top: clamp(40px, 6vw, 72px); }
.dock {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  overflow: hidden;
}
.dock-title { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: 9px 14px; border-bottom: var(--line); background: var(--ink); color: #fff; }
.dock-title .label { color: #fff; }
.dock .tool {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 12px 4px; min-height: 78px; text-align: center;
  font-weight: 600; font-size: 12.5px; line-height: 1.15;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.dock .tool:nth-child(4n+1) { border-right: 0; }
.dock .tool:nth-last-child(-n+4) { border-bottom: 0; }
.dock .tool svg { width: 24px; height: 24px; flex: none; }
@media (min-width: 760px) { .dock .tool { font-size: 15px; gap: 8px; padding: 14px 8px; } .dock .tool svg { width: 26px; height: 26px; } }
@media (min-width: 1200px) {
  .dock { grid-template-columns: auto repeat(8, minmax(0, 1fr)); }
  .dock-title { grid-column: auto; border-bottom: 0; border-right: var(--line); flex-direction: column; justify-content: center; align-items: flex-start; gap: 2px; padding: 10px 18px; }
  .dock .tool, .dock .tool:nth-child(4n+1) { border-bottom: 0; border-right: 2px solid var(--ink); }
  .dock .tool:last-child { border-right: 0; }
}

/* ---------- About ---------- */
.about-grid { display: grid; gap: 40px; }
.lead {
  font-family: var(--text); font-weight: 600; font-size: clamp(28px, 3.7vw, 50px); line-height: 1.14;
  letter-spacing: -.02em; font-variation-settings: "wdth" 100;
}
.hl {
  --hl: var(--lemon);
  background: var(--hl); border: 2px solid var(--ink); border-radius: 8px;
  padding: 0 .16em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.hl-rose { --hl: var(--rose); }
.hl-sky { --hl: var(--sky); }
.hl-mint { --hl: var(--mint); }
.about-cols { display: grid; gap: 22px; margin-top: 36px; font-size: 18px; line-height: 1.65; }
.about-cols .hl { border-width: 1.5px; border-radius: 6px; }
.facts { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; align-self: start; }
.facts-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--lemon); border-bottom: var(--line); }
.facts-head h3 { font-family: var(--display); font-weight: 900; font-size: 20px; text-transform: uppercase; font-variation-settings: "wdth" 125; }
.facts dl { margin: 0; }
.facts dl div { padding: 14px 18px; border-bottom: 2px solid var(--ink); display: grid; gap: 4px; }
.facts dl div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); font-variation-settings: "wdth" 90; }
.facts dd { margin: 0; font-weight: 600; font-size: 17px; line-height: 1.4; }
.facts dd a { text-decoration-thickness: 2px; text-underline-offset: 3px; overflow-wrap: anywhere; }
@media (min-width: 900px) {
  .about-grid { grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); }
  .about-main { grid-column: 1 / span 8; }
  .facts { grid-column: 9 / span 4; margin-top: 8px; }
  .about-cols { grid-template-columns: 1fr 1fr; column-gap: 36px; }
  .about-cols p:first-child { grid-column: 1 / -1; font-size: 21px; }
}

/* ---------- Journey ---------- */
.journey { background: var(--lemon); border-block: var(--line); }
.journey .section-head .intro { color: var(--ink); }
.roles { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); overflow: hidden; }
.role { display: grid; gap: 16px; padding: 24px 20px; border-bottom: var(--line); transition: background-color .2s ease; }
.role:last-child { border-bottom: 0; }
.role:hover { background: #fffbea; }
.role-top { display: flex; gap: 16px; align-items: center; }
.logo-tile {
  width: 72px; height: 72px; flex: none; border: var(--line); border-radius: 14px; background: #fff;
  display: grid; place-items: center; box-shadow: 3px 3px 0 var(--ink); overflow: hidden;
}
.logo-tile img { width: 44px; height: 44px; object-fit: contain; }
.logo-tile.fill img { width: 100%; height: 100%; }
.logo-tile.wide img { width: 62px; height: 62px; }
.logo-tile svg { width: 38px; height: 38px; }
.role-co {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95;
  font-size: clamp(24px, 2.6vw, 36px); letter-spacing: -.01em; font-variation-settings: "wdth" 112;
}
.role-title { font-weight: 700; font-size: 17px; line-height: 1.35; margin-top: 6px; }
.role-desc { font-size: 16.5px; line-height: 1.6; max-width: 58ch; }
.role-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.years {
  font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; font-variation-settings: "wdth" 100;
  white-space: nowrap;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; min-height: 30px; padding: 3px 11px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--card);
  font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 1.3; font-variation-settings: "wdth" 88;
}
.chip-ink { background: var(--ink); color: #fff; }
.chip-loc { gap: 6px; }
.chip-loc svg { width: 12px; height: 12px; }
@media (min-width: 900px) {
  .role { grid-template-columns: minmax(300px, 1fr) minmax(0, 1.25fr) 200px; column-gap: 36px; padding: 30px 32px; align-items: start; }
  .role-meta { flex-direction: column; align-items: flex-end; text-align: right; }
  .years { font-size: 28px; }
}

.edu { margin-top: clamp(48px, 6vw, 72px); }
.edu-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.h3 {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95;
  font-size: clamp(30px, 4vw, 52px); letter-spacing: -.015em; font-variation-settings: "wdth" 125;
}
.edu-list { display: grid; gap: 20px; }
.edu-card { background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 22px; display: grid; gap: 16px; grid-template-columns: auto 1fr; align-items: start; }
.edu-years { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; border-top: 2px solid var(--ink); }
.edu-degree { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.05; text-transform: uppercase; font-variation-settings: "wdth" 105; }
.edu-school { font-weight: 600; margin-top: 6px; }
@media (min-width: 760px) { .edu-list { grid-template-columns: 1fr 1fr; } }

/* ---------- Projects ---------- */
.subhead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.subhead p { color: var(--muted); max-width: 52ch; }
.feat-grid { display: grid; gap: 28px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.viz {
  position: relative; border-bottom: var(--line); background: var(--sky);
  display: grid; place-items: center; overflow: hidden; min-height: 220px;
}
.viz > svg { width: 100%; height: 100%; }
.viz-dots { background-image: radial-gradient(circle at 1px 1px, rgba(18, 18, 18, .18) 1.1px, transparent 1.5px); background-size: 18px 18px; }
.t-lemon { background-color: var(--lemon); }
.t-rose { background-color: var(--rose); }
.t-sky { background-color: var(--sky); }
.t-mint { background-color: var(--mint); }
.t-paper { background-color: var(--paper); }
.t-ink { background-color: var(--ink); }
.t-red { background-color: var(--red); }
.card-body { display: flex; flex-direction: column; gap: 12px; padding: 22px 22px 22px; flex: 1; }
.kicker { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-family: var(--mono); font-size: 12px; font-weight: 500; font-variation-settings: "wdth" 88; color: var(--muted); }
.kicker .tag { color: var(--ink); background-color: var(--lemon); border: 2px solid var(--ink); border-radius: 6px; padding: 1px 8px; }
.p-name {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .95;
  font-size: clamp(26px, 2.5vw, 34px); letter-spacing: -.01em; font-variation-settings: "wdth" 115;
}
.p-desc { font-size: 16px; line-height: 1.58; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.repo { font-family: var(--mono); font-size: 11.5px; color: var(--muted); font-variation-settings: "wdth" 85; overflow-wrap: anywhere; }
.src {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  background: var(--ink); color: #fff; border: var(--line); border-radius: 10px;
  font-weight: 700; font-size: 14.5px; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.src svg { width: 16px; height: 16px; }
.src:hover { background: var(--lemon); color: var(--ink); }
.feat-grid .viz { min-height: 250px; }
@media (min-width: 760px) {
  .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-bake { grid-column: 1 / -1; }
  .f-slim, .f-tasks { grid-column: span 1; }
}
@media (min-width: 1100px) {
  .feat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .f-bake { grid-column: span 4; }
  .f-tiles { grid-column: span 2; }
  .f-socket, .f-first, .f-bmi { grid-column: span 2; }
  .f-slim, .f-tasks { grid-column: span 3; }
  .f-bake .viz, .f-tiles .viz { min-height: 320px; }
}

/* Engineering grid */
.eng { margin-top: clamp(64px, 8vw, 104px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--card); cursor: pointer;
  font-weight: 600; font-size: 14.5px;
}
.filter .n { font-family: var(--mono); font-size: 11px; font-variation-settings: "wdth" 85; }
.filter:hover { background: var(--paper); box-shadow: 2px 2px 0 var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: #fff; }
.no-js .filters { display: none; }
.eng-grid { display: grid; gap: 22px; grid-auto-flow: dense; }
.eng-grid .viz { min-height: 0; aspect-ratio: 320 / 150; }
.eng-grid .card-body { padding: 18px 18px 18px; gap: 10px; }
.eng-grid .p-name { font-size: clamp(22px, 1.9vw, 26px); }
.eng-grid .p-desc { font-size: 15px; line-height: 1.55; }
.stack { font-family: var(--mono); font-size: 11.5px; line-height: 1.6; font-variation-settings: "wdth" 85; color: var(--ink); }
.stack span + span::before { content: " / "; color: var(--red); }
.eng-grid .card.is-hidden { display: none; }
@media (min-width: 640px) { .eng-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .eng-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .e-wide { grid-column: span 2; }
  .e-wide .viz { aspect-ratio: auto; height: 100%; min-height: 0; }
}
.e-wide .viz { aspect-ratio: 660 / 150; }
@media (min-width: 1100px) { .e-wide .viz { aspect-ratio: 660 / 150; height: auto; } }
.gh-more { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px; border: var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); }
.gh-more p { font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.2vw, 28px); text-transform: uppercase; line-height: 1.05; font-variation-settings: "wdth" 115; }

/* SVG vocabulary */
.v-ink { fill: var(--ink); }
.v-w { fill: #fff; }
.v-paper { fill: var(--paper); }
.v-red { fill: var(--red); }
.v-y { fill: var(--lemon); }
.v-sky { fill: var(--sky); }
.v-mint { fill: var(--mint); }
.v-rose { fill: var(--rose); }
.v-sel { fill: var(--sel); }
.v-none { fill: none; }
.v-st { stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.v-st2 { stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.v-ln { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.v-ln2 { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.v-lnr { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.v-lnw { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.v-dash { stroke-dasharray: 6 7; }
.v-t { font-family: var(--text); font-size: 13px; font-weight: 600; fill: var(--ink); font-variation-settings: "wdth" 90; }
.v-m { font-family: var(--mono); font-weight: 500; font-variation-settings: "wdth" 78; }
.v-ts { font-size: 11px; }
.v-tl { font-size: 15px; }
.v-tw { fill: #fff; }
.v-td { font-family: var(--display); font-weight: 900; text-transform: uppercase; }
.v-tn { text-transform: none; }

/* Tiles game demo */
.viz-tiles { background: var(--ink); padding: 26px 20px 20px; place-items: stretch; gap: 16px; grid-template-rows: 1fr auto; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; width: min(100%, 290px); margin: 0 auto; align-self: center; }
.tile {
  position: relative; aspect-ratio: 1; border-radius: 10px; border: 3px solid var(--ink);
  background: #2b2b2b; box-shadow: inset 0 0 0 2px #3a3a3a; cursor: pointer;
  transition: transform .35s ease, background-color .2s ease;
}
.tile::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: #3d3d3d; }
.tile.up { background: var(--card); box-shadow: none; transform: rotateY(0); }
.tile.up::after { inset: 22%; border-radius: 0; background: var(--c, var(--red)); }
.tile.up[data-s="o"]::after { border-radius: 50%; }
.tile.up[data-s="t"]::after { clip-path: polygon(50% 4%, 100% 96%, 0 96%); }
.tile.up[data-s="d"]::after { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.tile.up[data-s="p"]::after { clip-path: polygon(36% 0, 64% 0, 64% 36%, 100% 36%, 100% 64%, 64% 64%, 64% 100%, 36% 100%, 36% 64%, 0 64%, 0 36%, 36% 36%); }
.tile.match { outline: 3px solid var(--lemon); outline-offset: 2px; }
.tiles-bar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.lvl { font-family: var(--mono); font-size: 11.5px; font-weight: 500; color: #fff; border: 2px solid #fff; border-radius: 999px; padding: 3px 10px; font-variation-settings: "wdth" 88; }
.lvl.on { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
.shuffle { min-height: 30px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--lemon); background: transparent; color: var(--lemon); font-family: var(--mono); font-size: 11.5px; font-weight: 600; cursor: pointer; font-variation-settings: "wdth" 88; }
.shuffle:hover { background: var(--lemon); color: var(--ink); }
.no-js .shuffle { display: none; }

/* My First App mixer */
.viz-mixer { padding: 22px; grid-template-columns: auto 1fr; gap: 18px; align-items: center; place-items: center stretch; }
.phone {
  width: 150px; border: var(--line); border-radius: 26px; background: var(--ink); padding: 7px; box-shadow: 5px 5px 0 var(--ink);
  justify-self: center;
}
.phone-screen { background: #fff; border-radius: 19px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; min-height: 236px; transition: background-color .25s ease; }
.phone-top { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px 4px; }
.phone-top i { width: 34px; height: 6px; border-radius: 4px; background: var(--ink); }
.phone-top b { width: 22px; height: 12px; border-radius: 8px; border: 2px solid var(--ink); position: relative; }
.phone-top b::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); top: 1px; left: 1px; }
.swatch { margin: 8px 12px; border-radius: 12px; border: 2px solid var(--ink); background: rgb(var(--mr, 212) var(--mg, 42) var(--mb, 32)); min-height: 110px; }
.phone-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); }
.phone-tabs span { display: grid; place-items: center; padding: 8px 0; }
.phone-tabs span + span { border-left: 2px solid var(--ink); }
.phone-tabs svg { width: 16px; height: 16px; }
.phone.dark .phone-screen { background: #1f1f1f; }
.phone.dark .phone-top i, .phone.dark .phone-top b::after { background: #fff; }
.phone.dark .phone-top b, .phone.dark .swatch, .phone.dark .phone-tabs, .phone.dark .phone-tabs span + span { border-color: #fff; }
.phone.dark .phone-tabs svg { filter: invert(1); }
.mixer { display: grid; gap: 10px; min-width: 0; }
.mixer label { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 600; font-variation-settings: "wdth" 90; }
.mixer input[type="range"] { width: 100%; min-width: 0; accent-color: var(--ink); height: 24px; margin: 0; }
.theme-switch {
  display: inline-flex; align-items: center; gap: 8px; justify-self: start;
  min-height: 34px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff;
  font-family: var(--mono); font-size: 11.5px; font-weight: 600; cursor: pointer; font-variation-settings: "wdth" 88;
}
.theme-switch svg { width: 14px; height: 14px; }
.mixer-static { font-family: var(--mono); font-size: 12px; font-variation-settings: "wdth" 90; }
.no-js .mixer-live { display: none; }
.js .mixer-static { display: none; }

/* ---------- Skills ---------- */
.skills { background: var(--ink); color: #fff; }
.skills .frame-tag { color: #fff; }
.skills .section-head .intro { color: #d8d6d0; }
.bands { display: grid; gap: 22px; }
.band { background: #1c1c1c; border: 3px solid #fff; border-radius: var(--r); overflow: hidden; }
.band-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; color: var(--ink); border-bottom: 3px solid #fff; }
.band-head h3 { font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: clamp(30px, 4vw, 48px); line-height: .9; font-variation-settings: "wdth" 140; letter-spacing: -.01em; }
.band-head .label { color: var(--ink); }
.band-body { display: grid; }
.cat { padding: 18px 20px 22px; border-bottom: 2px solid #3a3a3a; }
.cat:last-child { border-bottom: 0; }
.cat-name { font-family: var(--mono); font-size: 12px; font-weight: 500; color: #d8d6d0; margin-bottom: 10px; font-variation-settings: "wdth" 90; }
.cat-items { display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--text); font-weight: 600; font-size: clamp(20px, 1.8vw, 24px); line-height: 1.3; letter-spacing: -.01em; }
.cat-items li:not(:last-child)::after { content: "/"; color: var(--lemon); margin: 0 .42em; font-weight: 400; }
.cat-items.big { font-family: var(--display); font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 100; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.12; letter-spacing: -.005em; }
@media (min-width: 900px) {
  .bands { grid-template-columns: 1fr 1fr; align-items: start; }
  .band-design { grid-row: span 2; }
}

/* ---------- Contact ---------- */
.contact { background: var(--red); color: #fff; border-top: var(--line); }
.contact .frame-tag { color: #fff; }
.contact-grid { display: grid; gap: 40px; }
.contact-title {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; letter-spacing: -.02em;
  font-size: clamp(44px, 6.6vw, 96px); line-height: .9; font-variation-settings: "wdth" 100;
}
.contact-title em { font-style: normal; font-variation-settings: "wdth" 140; color: var(--lemon); -webkit-text-stroke: 0; }
.contact-sub { margin-top: 24px; font-size: 19px; font-weight: 600; }
.contact-list { display: grid; gap: 14px; }
.c-email {
  display: grid; gap: 14px; padding: 22px; background: var(--lemon); color: var(--ink);
  border: var(--line); border-radius: var(--r); box-shadow: 6px 6px 0 var(--ink);
}
.c-mail {
  font-family: var(--display); font-weight: 800; font-size: clamp(20px, 2.15vw, 30px); line-height: 1.1;
  font-variation-settings: "wdth" 92; overflow-wrap: anywhere; text-decoration-thickness: 3px; text-underline-offset: 5px;
}
.c-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.no-js .copy { display: none; }
.c-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 16px 12px 12px; background: var(--card); color: var(--ink); text-decoration: none;
  border: var(--line); border-radius: var(--r); box-shadow: 5px 5px 0 var(--ink);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.c-row:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); background: #fffbea; }
.c-ico { width: 46px; height: 46px; border: 2px solid var(--ink); border-radius: 12px; display: grid; place-items: center; background: var(--paper); }
.c-ico svg { width: 22px; height: 22px; }
.c-txt { display: grid; gap: 2px; min-width: 0; }
.c-txt .label { color: var(--muted); }
.c-val { font-family: var(--text); font-weight: 700; font-size: 19px; line-height: 1.2; letter-spacing: -.005em; overflow-wrap: anywhere; }
.c-arrow { width: 20px; height: 20px; }
@media (min-width: 1040px) {
  .contact-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: center; }
  .contact-copy { grid-column: 1 / span 7; }
  .contact-list { grid-column: 8 / span 5; }
}

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 56px 0 28px; overflow: hidden; }
.foot-top { display: grid; gap: 28px; }
.foot-brand b { display: block; font-family: var(--display); font-weight: 900; text-transform: uppercase; font-size: 22px; letter-spacing: .01em; font-variation-settings: "wdth" 125; }
.foot-brand span { color: #d8d6d0; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-nav a, .foot-social a { text-decoration: none; font-weight: 600; }
.foot-nav a:hover, .foot-social a:hover { color: var(--lemon); text-decoration: underline; text-underline-offset: 4px; }
.foot-social { display: flex; gap: 10px; }
.foot-social a { display: inline-grid; place-items: center; width: 46px; height: 46px; border: 2px solid #fff; border-radius: 12px; }
.foot-social a:hover { background: var(--lemon); color: var(--ink); border-color: var(--lemon); }
.foot-social svg { width: 20px; height: 20px; }
.wordmark {
  margin-top: 44px; font-family: var(--display); font-weight: 900; text-transform: uppercase;
  font-size: calc((min(100vw - 2 * var(--pad), var(--max))) / 12.4); line-height: .82; letter-spacing: -.015em;
  color: var(--lemon); white-space: nowrap;
}
.wordmark .w1 { font-variation-settings: "wdth" 150; }
.wordmark .w2 { font-variation-settings: "wdth" 90; }
.foot-bottom { margin-top: 28px; padding-top: 18px; border-top: 2px solid #3a3a3a; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #d8d6d0; }
.foot-bottom .label { color: #d8d6d0; }
@media (min-width: 900px) { .foot-top { grid-template-columns: 1fr auto auto; align-items: center; gap: 40px; } }

/* ---------- Layout grid overlay (toggle) ---------- */
.grid-overlay { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: none; }
.show-grid .grid-overlay { display: block; }
.grid-overlay .wrap { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.grid-overlay i { background: rgba(13, 153, 255, .06); border-inline: 1px solid rgba(13, 153, 255, .5); }
.grid-overlay i:nth-child(n+5) { display: none; }
@media (min-width: 1040px) {
  .grid-overlay .wrap { grid-template-columns: repeat(12, 1fr); }
  .grid-overlay i:nth-child(n+5) { display: block; }
}
.show-grid .card, .show-grid .roles, .show-grid .facts, .show-grid .edu-card, .show-grid .band, .show-grid .c-tile, .show-grid .dock {
  outline: 2px dashed var(--sel); outline-offset: 6px;
}
.grid-note {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 45;
  background: var(--sel); color: var(--ink); border: var(--line); border-radius: 999px; padding: 8px 16px;
  font-family: var(--mono); font-size: 12px; font-weight: 600; display: none; white-space: nowrap;
  font-variation-settings: "wdth" 88;
}
.show-grid .grid-note { display: block; }

/* ---------- Motion (only when allowed; content is always visible) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .codes .caret { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .portrait-card { animation: slap .7s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes slap { from { transform: rotate(-9deg) scale(1.06); } to { transform: rotate(-3deg) scale(1); } }
  .bubble { animation: pop .6s .35s cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes pop { from { transform: rotate(-16deg) scale(.86); } to { transform: rotate(-8deg) scale(1); } }
  .cursor { animation: drift 4s ease-in-out infinite; }
  @keyframes drift { 50% { transform: translate(-8px, -4px); } }
}

.kicker .tag.t-mint { background-color: var(--mint); }
.kicker .tag.t-sky { background-color: var(--sky); }
.kicker .tag.t-rose { background-color: var(--rose); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); }
.filter[aria-pressed="true"] .sw { border-color: #fff; }
.v-compact { display: none; }
@media (max-width: 1099px) {
  .e-wide .viz { aspect-ratio: 320 / 150; }
  .v-wide { display: none; }
  .v-compact { display: block; }
}
.mixer-side { display: grid; gap: 12px; min-width: 0; align-content: center; }
.role-main { display: grid; gap: 14px; }

.about { padding-top: clamp(40px, 5vw, 72px); }
.feat-grid .card .viz { flex: 1 0 auto; }
.feat-grid .card-body { flex: 0 0 auto; }
.cat-items.big { flex-direction: column; gap: 6px; }
.cat-items.big li::after { content: none !important; }
.band-head { flex-wrap: wrap; row-gap: 4px; }
.band-head h3 { font-variation-settings: "wdth" 118; }

.detail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail .label { color: var(--muted); margin-right: 4px; }
.detail code { font-family: var(--mono); font-size: 11.5px; font-variation-settings: "wdth" 85; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 6px; padding: 2px 7px; }

/* ---------- Phone composition ---------- */
@media (max-width: 759px) {
  .section { padding: 64px 0; }
  .about { padding-top: 56px; }
  .section-head { margin-bottom: 28px; gap: 14px; }
  .section-head .intro { font-size: 16.5px; }
  .hero { padding: 28px 0 48px; }
  .hero-eyebrow { margin-bottom: 16px; gap: 6px 10px; }
  .thesis { font-size: clamp(23px, 7.4vw, 29px); gap: 10px 12px; margin-top: 22px; }
  .codes { font-variation-settings: "wdth" 78; }
  .sel::before { inset: -6px; }
  .handles i { width: 9px; height: 9px; }
  .handles i:nth-child(1) { left: -10px; top: -10px; } .handles i:nth-child(2) { right: -10px; top: -10px; }
  .handles i:nth-child(3) { left: -10px; bottom: -10px; } .handles i:nth-child(4) { right: -10px; bottom: -10px; }
  .cursor { right: -6px; bottom: -38px; }
  .cursor span { font-size: 12px; padding: 5px 8px 6px; }
  .lede { margin-top: 48px; font-size: 17px; }
  .hero-cta { gap: 10px; margin-top: 24px; }
  .hero-cta .btn { min-height: 48px; padding: 0 16px; }
  .hero-cta .btn-icon { width: 48px; padding: 0; }
  .hero-grid { gap: 28px; }
  .portrait-cap span { display: none; }
  .portrait-cap b { font-size: 13px; }
  .bubble { font-size: 19px; left: -22px; top: 18px; padding: 8px 12px 10px; }
  .lead { font-size: 27px; }
  .about-cols { font-size: 16.5px; line-height: 1.6; gap: 16px; margin-top: 24px; }
  .facts dl div { padding: 11px 16px; }
  .role { padding: 20px 18px; gap: 14px; }
  .logo-tile { width: 60px; height: 60px; border-radius: 12px; }
  .logo-tile img { width: 36px; height: 36px; }
  .logo-tile.fill img { width: 100%; height: 100%; }
  .logo-tile.wide img { width: 52px; height: 52px; }
  .role-desc { font-size: 15.5px; }
  .chip { min-height: 26px; padding: 2px 9px; font-size: 11px; }
  .chips { gap: 6px; }
  .edu-card { padding: 18px; gap: 14px; }
  .card-body { padding: 18px; gap: 10px; }
  .p-desc { font-size: 15.5px; }
  .feat-grid { gap: 22px; }
  .feat-grid .viz { min-height: 0; }
  .viz-tiles { padding: 18px 16px 16px; }
  .tiles { width: min(100%, 208px); gap: 7px; }
  .viz-mixer { padding: 18px 16px; gap: 14px; }
  .phone { width: 128px; }
  .phone-screen { min-height: 200px; }
  .swatch { min-height: 88px; }
  .eng { margin-top: 64px; }
  .eng-grid { gap: 18px; }
  .eng-grid .viz, .e-wide .viz { aspect-ratio: auto; height: 132px; }
  .eng-grid .card-body { position: relative; }
  .eng-grid .card-foot { position: absolute; top: 14px; right: 16px; margin: 0; padding: 0; }
  .eng-grid .src { min-height: 34px; padding: 0 12px; font-size: 13.5px; }
  .subhead { margin-bottom: 18px; }
  .filters { gap: 6px; }
  .filter { min-height: 36px; padding: 0 11px; font-size: 13.5px; }
  .cat { padding: 14px 16px 16px; }
  .cat-items { font-size: 19px; }
  .cat-items.big { font-size: 21px; }
  .band-head { padding: 14px 16px; }
  .c-email { padding: 18px; }
  .footer { padding: 44px 0 24px; }
  .wordmark { margin-top: 32px; }
}

@media (max-width: 759px) {
  .hero-resume, .edu-note { display: none; }
  .c-val { font-size: 17px; }
}

.band-design { display: flex; flex-direction: column; align-self: stretch; }
.band-design .band-body { flex: 1; display: flex; flex-direction: column; }
.specimen { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 20px 18px; background: #171717; }
.spec-row { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; color: var(--lemon); margin-bottom: 10px; }
.spec-row span { font-family: var(--display); font-size: clamp(34px, 4.6vw, 68px); line-height: .9; font-weight: var(--g); font-variation-settings: "wdth" var(--w); }
.specimen .cat-name { margin: 0; }
.cap-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); flex: none; }
.portrait-cap span.cap-dot { display: block; }

@media (max-width: 759px) {
  .hero-eyebrow span[aria-hidden="true"]:not(.status-dot) { display: none; }
  .hero-eyebrow span:last-child { flex-basis: 100%; padding-left: 22px; }
}

@media (max-width: 759px) { .h2 { font-size: clamp(34px, 11.2vw, 48px); } }
