/* Dhruba Poudel — portfolio design system */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --paper: #f7f6f1;
  --white: #fff;
  --ink: #102b3d;
  --muted: #52646d;
  --teal: #007f7b;
  --teal-dark: #006762;
  --mint: #dcece6;
  --line: #d8dfd9;
  --warm: #eae6dc;
  --violet: #66679d;
  --max: 1240px;
  --sans: 'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Manrope', var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
body, button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--white); background: var(--teal-dark); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-underline-offset: .24em; }
button { color: inherit; font: inherit; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 5px; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; letter-spacing: -.045em; }
h1 { font-size: clamp(2.8rem, 5.3vw, 5.1rem); font-weight: 600; }
h2 { font-size: clamp(2rem, 3.6vw, 3.25rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
p + p { margin-top: 1rem; }
.wrap { width: min(var(--max), calc(100% - 96px)); margin-inline: auto; }
.section { padding-block: 108px; }
.eyebrow { display: block; margin-bottom: 20px; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.text-link { display: inline-flex; gap: 14px; align-items: center; font-size: .9rem; font-weight: 700; text-decoration: none; padding-bottom: 4px; border-bottom: 1px solid currentColor; }
.text-link span { transition: transform .2s ease; }
.text-link:hover span { transform: translate(3px, -3px); }
.skip-link { position: fixed; z-index: 100; left: 20px; top: -100px; padding: 10px 20px; background: var(--ink); color: var(--white); }
.skip-link:focus { top: 15px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(247,246,241,.96); border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { width: 37px; height: 37px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-family: var(--display); font-size: .82rem; font-weight: 700; letter-spacing: -.09em; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: .94rem; letter-spacing: -.03em; }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { font-size: .82rem; font-weight: 500; text-decoration: none; }
.site-nav a:not(.nav-contact):hover { color: var(--teal-dark); }
.site-nav .nav-contact { border: 1px solid var(--ink); padding: 10px 18px; border-radius: 3px; }
.nav-contact:hover { background: var(--ink); color: var(--white); }
.menu-toggle { border: 1px solid var(--line); background: none; padding: 8px 12px; font-size: .8rem; }

.hero { padding-block: 74px 64px; }
.hero-grid { display: grid; grid-template-columns: 1.23fr 1fr; gap: 7%; align-items: center; }
.hero .eyebrow { font-size: .67rem; color: var(--teal-dark); margin-bottom: 26px; }
.hero h1 em { display: block; font-style: normal; color: var(--teal-dark); margin-top: 9px; }
.hero-intro { max-width: 500px; color: var(--muted); font-size: 1.05rem; line-height: 1.8; margin-top: 29px; }
.hero-actions { display: flex; gap: 25px; align-items: center; flex-wrap: wrap; margin-top: 31px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 24px; min-height: 49px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); padding: 13px 20px; font-size: .82rem; font-weight: 700; text-decoration: none; border-radius: 3px; transition: background .2s ease, transform .2s ease; }
.button:hover { background: #1d4256; transform: translateY(-2px); }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--warm); }
.hero-note { display: flex; align-items: center; gap: 9px; font-size: .72rem; color: var(--muted); margin-top: 35px; }
.status-dot { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; flex: 0 0 auto; }
.portrait-frame { position: relative; margin: 0; padding: 14px 14px 0; border: 1px solid var(--line); background: #ecefe8; }
.portrait-frame::before { content: ''; position: absolute; height: 40%; width: 2px; background: var(--teal); left: -1px; top: 30%; }
.portrait-frame img { width: 100%; height: 460px; object-fit: cover; object-position: 50% 36%; background: var(--warm); }
.portrait-frame figcaption { min-height: 57px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline: 5px; }
.portrait-frame figcaption strong { font-size: .78rem; font-weight: 500; }
.portrait-frame figcaption span { font-size: .62rem; letter-spacing: .09em; text-transform: uppercase; }
.hero-foot { display: grid; grid-template-columns: 1fr 2.2fr; gap: 30px; border-top: 1px solid var(--line); margin-top: 65px; padding-top: 25px; font-size: .75rem; }
.hero-foot .label { font-weight: 600; }
.focus-list { display: flex; gap: 30px; flex-wrap: wrap; color: var(--muted); }

.section-heading { display: grid; grid-template-columns: 1.3fr 1fr; gap: 50px; align-items: end; margin-bottom: 42px; }
.section-heading .eyebrow { color: var(--teal-dark); }
.section-heading p { color: var(--muted); font-size: .95rem; max-width: 480px; }
.work-section { border-top: 1px solid var(--line); padding-top: 88px; }
.work-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-button { background: transparent; border: 1px solid var(--line); border-radius: 30px; padding: 7px 16px; font-size: .74rem; line-height: 1.5; transition: all .2s ease; }
.filter-button:hover { border-color: var(--ink); }
.filter-button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.work-count { font-size: .7rem; color: var(--muted); white-space: nowrap; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 35px 28px; }
.project-card { min-width: 0; }
.project-card:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1.5fr 1fr; border: 1px solid var(--line); }
.project-visual { position: relative; min-height: 294px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--mint); padding: 35px; }
.project-visual .visual-caption { position: absolute; bottom: 16px; left: 22px; font-size: .59rem; letter-spacing: .08em; text-transform: uppercase; color: #425f5b; }
.project-visual .visual-index { position: absolute; top: 17px; left: 22px; font-size: .65rem; letter-spacing: .08em; color: #425f5b; }
.screenshot-card { padding: 48px 24px; }
.screenshot-card img { width: 100%; height: auto; border: 1px solid #a8bfb6; border-radius: 4px; box-shadow: 0 10px 25px rgba(16,43,61,.08); }
.project-copy { padding-top: 23px; }
.project-card:first-child .project-copy { padding: 40px 34px; display: flex; flex-direction: column; justify-content: center; }
.project-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .62rem; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 15px; }
.project-state { border: 1px solid #bdcbc3; border-radius: 30px; padding: 3px 9px; font-size: .58rem; line-height: 1.4; color: var(--teal-dark); }
.project-card h3 a { text-decoration: none; }
.project-card h3 a:hover { color: var(--teal-dark); }
.project-card p { font-size: .86rem; line-height: 1.8; color: var(--muted); margin-top: 16px; max-width: 490px; }
.project-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin-top: 23px; }
.project-links a { font-size: .75rem; }
.mini-system { width: 100%; max-width: 500px; position: relative; padding: 10px; }
.system-source { margin: 0 auto 35px; width: 60%; padding: 12px 17px; background: #fffefa; border: 1px solid #a8bfb6; border-radius: 5px; font-size: .67rem; box-shadow: 0 4px 0 rgba(0,0,0,.025); }
.system-source::after { content: ''; position: absolute; width: 1px; background: #7d9e90; height: 35px; left: 50%; top: 57px; }
.system-source .source-label { display: flex; justify-content: space-between; gap: 15px; color: #4b6960; border-bottom: 1px solid #dbe5df; padding-bottom: 7px; margin-bottom: 6px; }
.system-documents { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.system-document { position: relative; min-height: 130px; padding: 17px; background: #fffefa; border: 1px solid #a8bfb6; border-radius: 4px; }
.system-document .doc-title { font-size: .66rem; font-weight: 700; padding-bottom: 13px; }
.system-document .doc-line { height: 4px; background: #d9e1d9; margin-bottom: 8px; width: 95%; border-radius: 3px; }
.system-document .doc-line.short { width: 60%; }
.linked-value { display: inline-block; margin-block: 4px 12px; padding: 3px 7px; font-size: .64rem; background: #e0f1ea; color: #00625e; border: 1px solid #b7d4c7; border-radius: 2px; }
.workbench-visual { background: #e7eaf0; padding: 44px; }
.workbench-window { width: 100%; max-width: 420px; border: 1px solid #b9c3ce; background: #fff; border-radius: 7px; box-shadow: 0 18px 40px rgba(16,43,61,.07); transform: rotate(-3deg); overflow: hidden; }
.window-top { display: flex; align-items: center; gap: 5px; border-bottom: 1px solid #dce1e5; padding: 12px; background: #f6f8fa; }
.window-top i { display: block; width: 5px; height: 5px; border-radius: 50%; background: #bec9d0; }
.window-top span { margin-left: auto; font-size: .57rem; color: #64717d; }
.mini-dashboard { padding: 22px; }
.mini-dashboard .mini-label { font-size: .6rem; color: #536375; display: flex; justify-content: space-between; padding-bottom: 15px; }
.bar-chart { display: flex; align-items: end; gap: 10px; height: 80px; border-bottom: 1px solid #d5dde5; padding-inline: 6px; }
.bar-chart i { flex: 1; height: var(--bar); background: var(--teal); border-radius: 2px 2px 0 0; }
.bar-chart i:nth-child(2n) { background: #a4c8c2; }
.mini-table { margin-top: 17px; }
.mini-row { display: grid; grid-template-columns: 1fr 1fr; font-size: .55rem; border-bottom: 1px solid #e8edf0; padding-block: 5px; }
.mini-row span:last-child { text-align: right; color: #007a73; }
.arcade-visual { background: #e9e3d9; }
.arcade-board { width: 220px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(5,1fr); gap: 8px; transform: rotate(5deg); }
.arcade-board span { border-radius: 6px; background: #d1d7c9; border: 1px solid #c3cbbb; }
.arcade-board span:nth-child(3n) { background: #c9a069; border-color: #b98f56; }
.arcade-board span:nth-child(4n) { background: var(--teal); border-color: #006c66; }
.arcade-board span:nth-child(8) { background: #faf6ef; border: 1px solid #c4b398; position: relative; }
.arcade-board span:nth-child(8)::after { content: ''; position: absolute; top: 8px; left: 10px; border: 6px solid transparent; border-left: 8px solid var(--ink); }
.arcade-keys { display: flex; gap: 8px; position: absolute; right: 22px; bottom: 20px; }
.arcade-keys kbd { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #b3b8ac; border-bottom-width: 3px; border-radius: 4px; background: #f7f4ed; font-family: var(--sans); font-size: .72rem; }
.project-grid.is-filtered .project-card:first-child { grid-column: auto; display: block; border: 0; }
.project-grid.is-filtered .project-card:first-child .project-copy { padding: 23px 0 0; }

.approach-section { background: var(--ink); color: var(--paper); }
.approach-section .eyebrow { color: #a9d5c7; }
.approach-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; align-items: end; margin-bottom: 60px; }
.approach-intro p { color: #c1d0d2; font-size: .94rem; }
.process { display: grid; grid-template-columns: repeat(4,1fr); gap: 32px; }
.process-step { border-top: 1px solid #49606b; padding-top: 23px; }
.step-number { color: #94c5b6; font-size: .68rem; margin-bottom: 28px; display: block; }
.process h3 { font-size: 1.1rem; letter-spacing: -.025em; margin-bottom: 14px; }
.process p { font-size: .78rem; color: #bdced0; }
.productivity-note { margin-top: 52px; padding-top: 27px; border-top: 1px solid #49606b; display: grid; grid-template-columns: 1fr 3fr; gap: 30px; }
.productivity-note h3 { font-size: .78rem; letter-spacing: 0; }
.productivity-note p { color: #bdced0; font-size: .8rem; max-width: 760px; }

.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 11%; }
.about-copy .eyebrow { color: var(--teal-dark); }
.about-copy p { color: var(--muted); font-size: .94rem; margin-top: 25px; }
.about-facts { display: grid; gap: 22px; margin-top: 34px; }
.about-fact { padding-top: 16px; border-top: 1px solid var(--line); }
.about-fact span { display: block; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.about-fact strong { font-size: .85rem; font-weight: 500; }
.about-fact a { font-size: .81rem; }
.skills-panel { border: 1px solid var(--line); padding: 30px; align-self: start; }
.skills-panel h3 { font-size: 1.1rem; margin-bottom: 24px; letter-spacing: -.02em; }
.skill-group + .skill-group { margin-top: 23px; }
.skill-group h4 { margin: 0 0 10px; font-size: .62rem; color: var(--muted); font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; }
.tags li { padding: 5px 10px; background: #eeeee6; border: 1px solid #e1e3da; font-size: .69rem; line-height: 1.5; border-radius: 3px; }
.skills-scope { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 17px; font-size: .73rem; line-height: 1.7; color: var(--muted); }

.contact-section { padding-top: 0; }
.contact-panel { border-top: 1px solid var(--ink); padding-top: 42px; display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 70px; }
.contact-panel h2 { max-width: 610px; }
.contact-panel p { color: var(--muted); font-size: .9rem; margin-top: 20px; }
.contact-links { display: grid; border-top: 1px solid var(--line); }
.contact-links a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 18px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: .9rem; }
.contact-links a:hover { color: var(--teal-dark); }
.site-footer { border-top: 1px solid var(--line); padding-block: 25px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 35px; justify-content: space-between; align-items: center; font-size: .67rem; color: var(--muted); }
.footer-inner a { text-decoration: none; }

.case-hero { padding-block: 55px 60px; }
.back-link { display: inline-flex; gap: 10px; font-size: .74rem; color: var(--muted); text-decoration: none; margin-bottom: 42px; }
.back-link:hover { color: var(--teal-dark); }
.case-hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10%; align-items: end; }
.case-hero h1 { font-size: clamp(3rem,6vw,5.2rem); }
.case-hero .eyebrow { color: var(--teal-dark); }
.case-lead { max-width: 710px; font-size: 1.1rem; color: var(--muted); margin-top: 25px; }
.case-links { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 30px; }
.case-meta { border-top: 1px solid var(--ink); margin: 0; font-size: .76rem; }
.case-meta div { display: grid; grid-template-columns: 90px 1fr; gap: 15px; padding-block: 13px; border-bottom: 1px solid var(--line); }
.case-meta dt { color: var(--muted); }
.case-meta dd { margin: 0; }
.case-art { background: var(--mint); border: 1px solid var(--line); padding: 45px; }
.case-art .mini-system { max-width: 700px; margin-inline: auto; }
.case-art .system-source { max-width: 380px; }
.case-art .system-documents { gap: 80px; }
.case-art .system-document { min-height: 160px; }
.case-art figcaption { text-align: center; color: #49665f; margin-top: 30px; font-size: .7rem; }
.case-art figure { margin: 0; }
.project-screenshot { margin: 0; }
.project-screenshot a { display: block; }
.project-screenshot img { width: 100%; height: auto; border: 1px solid #b7c8be; border-radius: 3px; box-shadow: 0 14px 40px rgba(16,43,61,.08); }
.project-screenshot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 18px; color: var(--muted); font-size: .72rem; }
.case-body { display: grid; grid-template-columns: 230px 1fr; gap: 9%; padding-block: 80px 100px; }
.case-index { align-self: start; position: sticky; top: 130px; }
.case-index h2 { font-size: .65rem; font-family: var(--sans); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.case-index ol { padding: 0; margin: 0; list-style: none; }
.case-index li + li { margin-top: 10px; }
.case-index a { font-size: .76rem; text-decoration: none; }
.case-index a:hover { color: var(--teal-dark); }
.case-content { max-width: 780px; min-width: 0; }
.case-content section + section { margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.case-content h2 { font-size: 1.65rem; margin-bottom: 19px; letter-spacing: -.035em; }
.case-content h3 { font-size: 1rem; margin-block: 25px 10px; }
.case-content p, .case-content li { color: var(--muted); font-size: .9rem; }
.case-content ul, .case-content ol { margin: 18px 0 0; padding-left: 20px; }
.case-content li + li { margin-top: 9px; }
.case-content code { font-size: .85em; background: #e9ede6; color: var(--ink); padding: 2px 5px; border-radius: 2px; }
.case-content .tags { margin-top: 24px; padding: 0; }
.case-content .tags li { margin: 0; font-size: .68rem; }
.evidence-link { display: inline-block; margin-top: 16px; color: var(--teal-dark); font-size: .8rem; }
.next-case { padding-block: 45px; background: #eaece4; }
.next-case-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.next-case span { font-size: .63rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.next-case h2 { font-size: 1.8rem; margin-top: 10px; }
.case-flow { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 20px 0; }
.flow-node { padding: 24px 18px; border: 1px solid #a6beb5; background: #fffefa; position: relative; border-radius: 4px; }
.flow-node:not(:last-child)::after { content: '→'; position: absolute; right: -18px; top: 50%; transform: translateY(-50%); color: var(--teal-dark); font-size: .9rem; }
.flow-node b { display: block; font-size: .77rem; font-weight: 500; }
.flow-node span { display: block; font-size: .65rem; color: #5c7269; margin-top: 7px; }
.arcade-case-art { background: #e9e3d9; display: flex; align-items: center; justify-content: center; gap: 70px; padding-block: 60px; }
.arcade-case-art .arcade-board { width: 240px; }
.arcade-case-art .art-copy { max-width: 350px; }
.arcade-case-art .art-copy p { font-size: .88rem; color: #675f51; margin-top: 16px; }
.arcade-case-art .art-copy h2 { font-size: 2.1rem; }

@media (min-width:1600px) { .hero { padding-block: 90px 74px; } }
@media (max-width:1050px) {
  .wrap { width: calc(100% - 64px); }
  .site-nav { gap: 20px; }
  .hero-grid { gap: 5%; }
  .portrait-frame img { height: 410px; }
  .hero h1 { font-size: 3.5rem; }
  .project-card:first-child .project-copy { padding: 30px; }
  .process { gap: 23px; }
  .about-grid { gap: 7%; }
  .case-body { grid-template-columns: 180px 1fr; gap: 6%; }
}
@media (max-width:780px) {
  html { scroll-padding-top: 90px; }
  .wrap { width: calc(100% - 40px); }
  .section { padding-block: 70px; }
  .header-inner { min-height: 73px; position: relative; flex-wrap: wrap; gap: 14px; padding-block: 15px; }
  .brand-name { font-size: .85rem; }
  .brand-mark { width: 32px; height: 32px; }
  .site-nav { width: 100%; justify-content: space-between; gap: 12px; padding-bottom: 5px; }
  .site-nav a { font-size: .75rem; }
  .site-nav .nav-contact { padding: 7px 10px; }
  .js .site-nav { display: none; padding-top: 15px; }
  .js .site-nav.is-open { display: flex; }
  .hero { padding-block: 45px; }
  .hero-grid { grid-template-columns: 1fr; gap: 45px; }
  .hero h1 { font-size: clamp(3rem,9.6vw,4.6rem); }
  .hero-intro { font-size: .98rem; max-width: 560px; }
  .hero .eyebrow { font-size: .61rem; letter-spacing: .11em; }
  .hero-actions { gap: 22px; }
  .hero-note { margin-top: 25px; }
  .portrait-frame { width: min(100%,480px); margin-inline: auto; }
  .portrait-frame img { height: 430px; }
  .hero-foot { margin-top: 40px; grid-template-columns: 1fr; gap: 12px; }
  .focus-list { gap: 10px 24px; font-size: .71rem; }
  .section-heading, .approach-intro, .about-grid, .contact-panel, .case-hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .section-heading { margin-bottom: 30px; }
  .section-heading p { font-size: .88rem; }
  .work-toolbar { align-items: start; flex-direction: column; gap: 12px; }
  .project-grid { grid-template-columns: 1fr; gap: 38px; }
  .project-card:first-child { grid-column: auto; grid-template-columns: 1fr; }
  .project-card:first-child .project-copy { padding: 27px; }
  .project-visual { min-height: 290px; padding: 35px 25px; }
  .screenshot-card { min-height: 0; padding: 45px 18px; }
  .project-copy { padding-top: 20px; }
  .process { grid-template-columns: 1fr 1fr; gap: 32px; }
  .step-number { margin-bottom: 20px; }
  .productivity-note { grid-template-columns: 1fr; gap: 12px; margin-top: 38px; }
  .skills-panel { margin-top: 16px; padding: 25px; }
  .contact-section { padding-top: 0; }
  .contact-panel { gap: 32px; }
  .footer-inner { font-size: .62rem; }
  .case-hero { padding-block: 35px 40px; }
  .back-link { margin-bottom: 30px; }
  .case-hero h1 { font-size: clamp(2.4rem,9.6vw,3.6rem); }
  .case-lead { font-size: 1rem; }
  .case-meta { margin-top: 10px; }
  .case-art { padding: 30px 20px; }
  .project-screenshot figcaption { align-items: start; flex-direction: column; gap: 7px; }
  .case-art .system-documents { gap: 20px; }
  .case-art .system-document { min-height: 135px; }
  .case-body { grid-template-columns: 1fr; gap: 35px; padding-block: 45px 70px; }
  .case-index { position: static; border-bottom: 1px solid var(--line); padding-bottom: 25px; }
  .case-index h2 { margin-bottom: 14px; }
  .case-index ol { display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .case-index li + li { margin: 0; }
  .case-content section + section { margin-top: 35px; padding-top: 30px; }
  .case-flow { grid-template-columns: 1fr 1fr; gap: 16px; }
  .flow-node:not(:last-child)::after { display: none; }
  .arcade-case-art { gap: 35px; flex-direction: column; padding-block: 40px; }
  .arcade-case-art .art-copy { text-align: center; }
  .next-case h2 { font-size: 1.5rem; }
}
@media (max-width:400px) {
  .wrap { width: calc(100% - 32px); }
  .hero h1 { font-size: 2.8rem; }
  .portrait-frame img { height: 365px; }
  .hero-actions { gap: 18px; }
  .hero-actions .text-link { font-size: .8rem; }
  .system-document { padding: 12px; }
  .system-documents { gap: 15px; }
  .system-source { width: 75%; }
  .process { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Selected project illustrations and public-source recognition. */
.tools-visual { background: #e5eaf0; }
.tool-tiles { width: min(100%, 300px); display: grid; grid-template-columns: 1fr 1fr; gap: 14px; transform: rotate(-3deg); }
.tool-tiles span { display: grid; place-items: center; min-height: 78px; background: #fffefa; border: 1px solid #bdc9cf; border-radius: 5px; color: #234659; font-size: .85rem; letter-spacing: .08em; box-shadow: 0 6px 18px rgba(16,43,61,.04); }
.tool-tiles span:nth-child(2), .tool-tiles span:nth-child(3) { color: #006b65; background: #edf5ef; }
.art-caption { font-size: .7rem; color: #49665f; text-align: center; margin-top: 20px; }
.about-fact .recognition-proof { font-size: .77rem; line-height: 1.75; margin-top: 10px; }
.recognition-proof a { font-size: inherit; }
