/* Portfolio theme: dark graphite, square blocks, mono type. Stash's own pages keep /style.css. */
:root {
  --bg: #111213; --block: #17181a; --block2: #1e1f22; --line: #2b2c30; --line2: #3b3d42;
  --text: #eeede8; --text2: #b3b2ad; --dim: #7d7e83;
  --accent: #ff5a36; --brand: var(--accent);
  --display: "Martian Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text2); font: 14px/1.65 var(--mono); }
img { display: block; max-width: 100%; }
a { color: var(--text); text-decoration-color: var(--line2); text-underline-offset: 3px; }
a:hover { color: var(--brand); text-decoration-color: currentColor; }
::selection { background: var(--brand); color: var(--bg); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* top bar */
.top { border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; gap: 20px; align-items: center; justify-content: space-between; height: 56px; }
.top .home { font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.top .home::before { content: ""; display: inline-block; width: 10px; height: 14px; background: var(--accent); margin-right: 10px; vertical-align: -2px; }
.top nav { display: flex; gap: 18px; font-size: 12px; overflow-x: auto; }
.top nav a { color: var(--dim); text-decoration: none; white-space: nowrap; }
.top nav a:hover { color: var(--text); }
@media (max-width: 560px) { .top nav .opt { display: none; } }

/* type */
.display { font-family: var(--display); font-weight: 800; color: var(--text); letter-spacing: -.045em; line-height: .98; margin: 0; font-size: clamp(40px, 9vw, 104px); }
.display.md { font-size: clamp(32px, 6vw, 64px); }
.kicker { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 18px; }
.kicker b { color: var(--brand); font-weight: 500; }
.sub { font-size: 15px; color: var(--text2); max-width: 62ch; margin: 22px 0 0; }
.small { font-size: 12px; color: var(--dim); }
h2, h3 { font-family: var(--display); color: var(--text); letter-spacing: -.03em; margin: 0; }
h3 { font-size: 18px; line-height: 1.25; font-weight: 700; }
p { margin: 0 0 10px; }
strong { color: var(--text); font-weight: 500; }
code { font-family: var(--mono); font-size: .92em; color: var(--text); background: var(--block2); padding: 1px 5px; }

/* hero */
.hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .hero { padding: 120px 0 96px; } }
.cursor::after { content: ""; display: inline-block; width: .5em; height: .82em; background: var(--brand); margin-left: .08em; vertical-align: -.04em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor::after { animation: none; } }

/* sections */
.section { padding: 56px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(24px, 4vw, 36px); font-weight: 800; }
.section-head .small { margin-left: auto; text-align: right; }

/* block grid: 1px lines between cells */
.grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid.c2 { grid-template-columns: repeat(2, 1fr); } .grid.c3 { grid-template-columns: repeat(3, 1fr); } .grid.c4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 560px) and (max-width: 719px) { .grid.c3, .grid.c4 { grid-template-columns: repeat(2, 1fr); } }
.cell { background: var(--block); padding: 22px; min-width: 0; }
.cell h3 { margin-bottom: 8px; }
.cell p { font-size: 13px; color: var(--text2); }
.cell p:last-child { margin-bottom: 0; }
.cell .label { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }

/* project card (whole block is a link) */
.card { display: flex; flex-direction: column; gap: 16px; background: var(--block); padding: 24px; text-decoration: none; color: var(--text2); min-height: 280px; position: relative; transition: background .15s; }
.card::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .2s; }
.card:hover { background: var(--block2); color: var(--text2); }
.card:hover::after { transform: scaleX(1); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-icon { width: 56px; height: 56px; border-radius: 12px; }
.card-name { font-family: var(--display); font-weight: 800; color: var(--text); font-size: clamp(28px, 4vw, 40px); letter-spacing: -.045em; line-height: 1; }
.card-desc { font-size: 13px; margin: 0; max-width: 46ch; }
.card .tags { margin-top: auto; }
.card .go { font-size: 12px; color: var(--dim); }
.card:hover .go { color: var(--brand); }

.status { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); border: 1px solid var(--line2); padding: 3px 8px; white-space: nowrap; }
.status.live { color: var(--bg); background: var(--brand); border-color: var(--brand); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.tags li, .tags span { font-size: 11px; color: var(--text2); background: var(--block2); border: 1px solid var(--line); padding: 2px 8px; margin: 0; }

/* redaction */
.bar { background: var(--text); color: transparent; user-select: none; padding: 0 .1em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.redacted-card { background: var(--block); padding: 24px; display: flex; flex-direction: column; gap: 14px; min-height: 240px; text-decoration: none; color: var(--text2); background-image: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255,255,255,.018) 14px 28px); }
.redacted-card:hover { background-color: var(--block2); color: var(--text2); }
.redacted-card .card-name { font-size: clamp(26px, 3.6vw, 36px); }
.stamp { display: inline-block; font-family: var(--display); font-weight: 800; font-size: 12px; letter-spacing: .14em; color: var(--accent); border: 2px solid var(--accent); padding: 4px 10px; transform: rotate(-3deg); }
.icon-redacted { width: 56px; height: 56px; background: var(--text); border-radius: 12px; }

/* project page */
.crumbs { font-size: 12px; color: var(--dim); padding-top: 32px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.p-head { padding: 40px 0 56px; border-bottom: 1px solid var(--line); }
.p-head .p-icon { width: 96px; height: 96px; border-radius: 20px; margin-bottom: 28px; }
.p-head .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); background: var(--block2); border: 1px solid var(--line2); padding: 10px 14px; text-decoration: none; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.solid { background: var(--brand); border-color: var(--brand); color: var(--bg); font-weight: 500; }
.btn.solid:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* key/value facts (platform, stack, status...) */
.meta { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 36px 0 0; grid-template-columns: 1fr; }
@media (min-width: 560px) { .meta { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .meta { grid-template-columns: repeat(4, 1fr); } }
.meta div { background: var(--block); padding: 14px 16px; }
.meta dt { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; }
.meta dd { margin: 4px 0 0; color: var(--text); font-size: 13px; }

/* screenshots: horizontal strip on small screens, row on large */
.gallery { --n: 2; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--n) - 1) * 12px) / var(--n)); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.gallery::-webkit-scrollbar { height: 6px; }
.gallery::-webkit-scrollbar-thumb { background: var(--line2); }
.gallery img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: contain; scroll-snap-align: start; border: 1px solid var(--line); background: var(--block); }
.wide { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .wide.c2 { grid-template-columns: repeat(2, 1fr); } .wide.c3 { grid-template-columns: repeat(3, 1fr); } }
.wide img { width: 100%; height: auto; border: 1px solid var(--line); background: var(--block); }
figure { margin: 0; }
figcaption { font-size: 12px; color: var(--dim); margin-top: 8px; }

/* stack table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table.stack { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 560px; }
table.stack th, table.stack td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
table.stack tr:last-child td { border-bottom: 0; }
table.stack th { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .12em; font-weight: 400; background: var(--block); }
table.stack td:first-child { color: var(--text); white-space: nowrap; }

/* diagrams drawn in text */
pre.ascii { font: 12px/1.45 var(--mono); color: var(--text2); background: var(--block); border: 1px solid var(--line); padding: 20px; margin: 0; overflow-x: auto; }
pre.ascii b { color: var(--brand); font-weight: 500; }

/* list of short points with a block marker */
ul.points { list-style: none; padding: 0; margin: 0; }
ul.points li { padding: 10px 0 10px 22px; border-top: 1px solid var(--line); position: relative; font-size: 13px; }
ul.points li::before { content: ""; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: var(--brand); }

/* footer */
.foot { padding: 40px 0 56px; font-size: 12px; color: var(--dim); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.foot a { color: var(--text2); }

/* seams found while assembling pages */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.section > .small { margin-top: 14px; }
.section > .small + .table-wrap { margin-top: 14px; }
h3.num { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin-bottom: 10px; }
.cell .tags { margin-top: 14px; }
@media (max-width: 400px) { .top nav { gap: 12px; } }

/* work history */
.roles { border: 1px solid var(--line); }
.role { display: grid; grid-template-columns: 1fr; gap: 10px 32px; padding: 24px; background: var(--block); border-top: 1px solid var(--line); }
.role:first-child { border-top: 0; }
@media (min-width: 720px) { .role { grid-template-columns: 220px 1fr; } }
.role .when { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.role .when b { display: block; font-family: var(--display); font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.03em; text-transform: none; margin-bottom: 2px; }
.role h3 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.045em; margin-bottom: 8px; }
.role h3 span { color: var(--dim); font-weight: 400; }
.role p { font-size: 13px; max-width: 64ch; }
.role .tags { margin-top: 14px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* long-form text (policies built from Markdown) */
.policy { max-width: 80ch; font-size: 14px; }
.policy h2 { font-size: clamp(20px, 3vw, 26px); font-weight: 800; margin: 40px 0 14px; }
.policy h2:first-child { margin-top: 0; }
.policy h3 { font-size: 15px; margin: 28px 0 10px; }
.policy ul { padding-left: 20px; margin: 0; }
.policy li { margin-bottom: 14px; }
.policy li::marker { color: var(--brand); }
.policy li p { margin: 0; }
/* whole images only: --n of them fill the strip exactly, the rest are a swipe away */
@media (min-width: 560px) { .gallery { --n: 3; } }
@media (min-width: 900px) { .gallery { --n: 4; } }
.gallery.landscape { --n: 1; }
@media (min-width: 720px) { .gallery.landscape { --n: 2; } }
.gallery > figure { scroll-snap-align: start; }
.gallery.landscape img { aspect-ratio: 16 / 10; }
