:root {
  --page-surface: #1b2d50;
  --edge-surface: #253b62;
  --section-ink: #edf3fc;
  --section-muted: #b5c5df;
  --section-rule: #ffffff24;
  --section-accent: #eebd91;
  --detail-surface: #ffffff04;
}
html[data-theme="day"] {
  --page-surface: #edf3fb;
  --edge-surface: #deebfd;
  --section-ink: #172e48;
  --section-muted: #4d637c;
  --section-rule: #18334e29;
  --section-accent: #88532e;
  --detail-surface: #ffffff35;
}
body { background: var(--page-surface); transition: background-color 1s ease; }
/* Cut away the pale area baked into both PNGs, retaining one landscape edge.
   All clipped surfaces retain the native 1487 × 1058 coordinate system. */
main, html[data-theme="day"] main {
  background: var(--edge-surface);
  --landscape-clip: url(#landscape-edge-evening);
  --landscape-feather: url(#landscape-feather-evening);
  transition: background-color 1s ease;
}
html[data-theme="day"] main { --landscape-clip: url(#landscape-edge-day); --landscape-feather: url(#landscape-feather-day); }
main::before { content: none; }
main > img, main > .overlay, main > .valley-fog, main > .laptop-screen {
  clip-path: var(--landscape-clip);
}
/* Keep the text contrast wash inside the artwork instead of over the section. */
main::after {
  inset: 0 auto auto 0;
  width: 100%; height: auto;
  aspect-ratio: 1487 / 1058;
  clip-path: var(--landscape-clip);
}
/* Feather only the last few pixels INSIDE the traced silhouette.
   The clip remains a guard against exposing the pale original PNG margin. */
main > img, main > .overlay, main > .valley-fog, main > .laptop-screen, main::after {
  -webkit-mask-image: var(--landscape-feather);
  mask-image: var(--landscape-feather);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}
/* The daytime readability wash is for the copy, not the foreground.
   Intersect it with a vertical fade so it ends before the landscape edge. */
html[data-theme="day"] main::after {
  -webkit-mask-image: var(--landscape-feather), linear-gradient(to bottom, #000 0%, #000 31%, transparent 53%);
  mask-image: var(--landscape-feather), linear-gradient(to bottom, #000 0%, #000 31%, transparent 53%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media (max-width: 650px) {
  main::after {
    left: calc(50% - 730px); top: 160px;
    width: 1100px; height: auto;
  }
}
.selected-work {
  position: relative;
  isolation: isolate;
  background: var(--page-surface);
  box-sizing: border-box;
  max-width: 1487px;
  margin: auto;
  padding: 52px 8.4% 64px;
  color: var(--section-ink);
  scroll-margin-top: 32px;
  transition: color .8s ease, background-color 1s ease;
}
/* Color transition lives below the silhouette, never over the artwork. */
.selected-work::before, .selected-work::after {
  content: ""; position: absolute; z-index: -1;
  top: 0; left: 0; right: 0; height: 210px;
  pointer-events: none; transition: opacity 1s ease;
}
.selected-work::before { background: linear-gradient(to bottom, #253b62, #253b6200); opacity: 1; }
.selected-work::after { background: linear-gradient(to bottom, #deebfd, #deebfd00); opacity: 0; }
html[data-theme="day"] .selected-work::before { opacity: 0; }
html[data-theme="day"] .selected-work::after { opacity: 1; }
.section-heading { margin-bottom: 27px; }
.selected-work h2 { margin: 0; font-family: Roobert, system-ui, sans-serif; font-weight: 500; font-size: clamp(38px, 4.4vw, 64px); line-height: 1.12; letter-spacing: -.04em; }
.draft-note { margin: 0 0 20px; font-size: 11px; line-height: 1.6; color: var(--section-muted); }
.draft-note span { color: var(--section-accent); }
.work-filters { display: flex; flex-wrap: wrap; gap: 4px 23px; margin: 0 0 30px; }
.work-filters button { min-height: 44px; padding: 9px 0; border: 0; border-bottom: 1px solid transparent; border-radius: 0; background: transparent; color: var(--section-muted); font-size: 13px; line-height: 1.4; }
.work-filters button[aria-pressed="true"] { color: var(--section-ink); border-bottom-color: var(--section-ink); }
.work-filters button:hover { border-color: var(--section-accent); }
.work-filters button:focus-visible { outline: 2px solid var(--section-accent); outline-offset: 3px; }
.filter-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.project-card[hidden], .projects-empty[hidden] { display: none; }
.projects-empty { color: var(--section-muted); padding: 40px 20px; border: 1px dashed var(--section-rule); border-radius: 10px; font-size: 14px; line-height: 1.7; text-align: center; }
.project-focus { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.project-tag { font-size: 12px; }
.project-tag + .project-tag::before { content: "/"; color: var(--section-muted); margin-right: 7px; }
.tag-draft { display: none; }
.projects-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr); gap: 44px; align-items: start; }
.project-card { min-width: 0; }
.project-card:nth-child(even) { margin-top: clamp(45px, calc(7.4vw - 4px), 106px); }
.projects-grid:has(> .project-card[hidden]) .project-card { margin-top: 0; }
.project-preview { position: relative; overflow: hidden; aspect-ratio: 1.45; border-radius: 6px; padding: 26px 25px 44px; box-sizing: border-box; }
.preview-coinhub { color: #eaf0ff; background: linear-gradient(145deg, #243857, #3b5685); }
.preview-coinhub { aspect-ratio: 1.35; }
.preview-phn { color: #173c65; background: linear-gradient(145deg, #bdd4ec, #e4effb); }
.preview-browser { height: 100%; overflow: hidden; border: 1px solid #ffffff30; border-radius: 8px; background: #12233e; box-shadow: 0 14px 35px #091a3226; transform: translateY(5px); transition: transform .35s ease; }
.preview-phn .preview-browser { background: #f2f7fd; border-color: #ffffffa0; }
.browser-top { display: flex; justify-content: space-between; padding: 10px 13px; border-bottom: 1px solid #91abc52b; font-size: 9px; letter-spacing: .06em; opacity: .65; }
.browser-top span:first-child { letter-spacing: 2px; }
.preview-content { padding: clamp(16px, 2vw, 28px); }
.preview-category { font-size: 8px; letter-spacing: .13em; opacity: .6; }
.preview-content strong { display: block; margin: 10px 0 15px; font-family: Roobert, system-ui, sans-serif; font-weight: 500; font-size: clamp(22px, 2.8vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.placeholder-lines i { display: block; width: 53%; height: 4px; border-radius: 4px; background: currentColor; opacity: .13; margin-top: 7px; }
.placeholder-lines i:nth-child(2) { width: 38%; }
.placeholder-panels { display: flex; gap: 8px; margin-top: 22px; }
.placeholder-panels i { width: 29%; height: 32px; border: 1px solid currentColor; border-radius: 4px; opacity: .12; }
.screenshot-label { position: absolute; left: 25px; bottom: 15px; font-size: 10px; letter-spacing: .01em; opacity: .8; }
.project-card:hover .preview-browser { transform: translateY(0); }
.project-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 23px; }
.selected-work h3 { margin: 0; font-family: Roobert, system-ui, sans-serif; font-size: clamp(23px, 2vw, 29px); font-weight: 500; letter-spacing: -.025em; line-height: 1.25; }
.project-focus { color: var(--section-accent); font-size: 12px; margin: 11px 0 15px; line-height: 1.5; }
.project-details { margin-top: 22px; border-top: 1px solid var(--section-rule); border-bottom: 1px solid var(--section-rule); }
.project-details summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; cursor: pointer; font-size: 14px; font-weight: 500; list-style: none; }
.project-details summary::-webkit-details-marker { display: none; }
.project-details summary span { font-size: 23px; font-weight: 300; transition: transform .2s ease; }
.project-details[open] summary span { transform: rotate(45deg); }
.project-details summary:hover { color: var(--section-accent); }
.project-details summary:focus-visible { outline: 2px solid var(--section-accent); outline-offset: 5px; border-radius: 2px; }
.project-details dl { margin: 0 0 18px; padding: 18px; background: var(--detail-surface); border-radius: 6px; }
.project-details dl div + div { margin-top: 17px; }
.project-details dt { font-size: 12px; font-weight: 600; margin-bottom: 5px; }
.project-details dd { margin: 0; color: var(--section-muted); font-size: 13px; line-height: 1.6; }
@media (max-width: 750px) {
  .selected-work { padding: 34px 6% 45px; }
  .section-heading { display: block; }
  .draft-note { margin: 22px 0 26px; }
  .projects-grid { grid-template-columns: 1fr; gap: 38px; }
  .project-card:nth-child(even) { margin-top: 0; }
  .project-preview, .preview-coinhub { aspect-ratio: 1.65; }
  .work-filters { gap: 2px 19px; margin-bottom: 25px; }
  .preview-content strong { font-size: clamp(25px, 6vw, 40px); }
  .project-preview { padding: 23px 22px 40px; }
}
@media (prefers-reduced-motion: reduce) {
}
