:root {
  color-scheme: dark;
  --bg: #080c09;
  --panel: #0d130f;
  --line: #243027;
  --bright: #8bff77;
  --ink: #edf3eb;
  --muted: #a7b4a9;
  --dim: #85998a;
  --red: #852b36;
  --red-light: #e38d94;
  --mono: "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", Inter, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body, h1, h2, h3, p { overflow-wrap: anywhere; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 5px; }
::selection { background: var(--bright); color: #0a180b; }
.wrap { width: min(1140px, calc(100% - 96px)); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 12px; left: 12px; transform: translateY(-150%); clip-path: inset(50%); background: var(--bright); color: var(--bg); padding: 10px; }
.skip:focus { transform: none; clip-path: none; }
.loading { min-height: 60vh; padding-top: 70px; color: var(--muted); }

.masthead { border-bottom: 1px solid #1e2c21; background: #0a0e0b; position: relative; z-index: 1; }
.masthead-inner { min-height: 76px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 11px; font: 700 13px/1.15 var(--mono); letter-spacing: .1em; }
.brand img { flex: none; }
.brand small { display: block; margin-top: 5px; font-size: 9px; font-weight: 500; letter-spacing: .23em; color: var(--dim); }
.masthead nav { display: flex; gap: 30px; }
.masthead nav a { color: var(--muted); font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .095em; padding-block: 12px; }
.masthead nav a:hover, .masthead nav [aria-current] { color: var(--bright); }
.masthead-tag { justify-self: end; color: #96a79a; font: 11px var(--mono); letter-spacing: .09em; white-space: nowrap; }
.masthead-tag i, .hero-code i, .art-id i, .status i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; background: var(--bright); vertical-align: .12em; box-shadow: 0 0 10px #6ef45f50; }

.hero { position: relative; isolation: isolate; border-bottom: 1px solid #213026; background: radial-gradient(ellipse at 77% 52%, #0c2614, #090f0a 70%); overflow: hidden; }
.matrix, .hero-scrim { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.matrix { opacity: .95; }
.hero-scrim {
  background:
    linear-gradient(90deg, #080c09 2%, #080c09f0 25%, #080c09d6 42%, #080c0915 77%, #080c0960),
    linear-gradient(0deg, #080c09 0%, transparent 31%, transparent 75%, #080c0990 100%),
    repeating-linear-gradient(0deg, #0000 0 3px, #080c092b 4px);
}
.hero-inner { position: relative; min-height: 505px; padding-block: 86px 81px; }
.hero-label { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 24px; padding: 8px 10px; border: 1px solid #4a292d; background: #201013d9; color: var(--red-light); font: 600 11px var(--mono); letter-spacing: .13em; }
.hero-label span { width: 6px; height: 6px; background: #c0515d; box-shadow: 0 0 8px #c0515d60; }
.hero h1 { margin: 0; max-width: 960px; font-size: clamp(3.15rem, 6.65vw, 6.25rem); font-weight: 770; line-height: .99; letter-spacing: -.078em; }
.hero h1 em { color: var(--bright); font-style: normal; text-shadow: 0 0 44px #55f44c24; }
.hero-intro { margin: 26px 0 26px; max-width: 500px; color: #b5c4b8; font-size: 16px; line-height: 1.65; white-space: pre-line; }
.primary-action { display: inline-flex; min-height: 47px; max-width: 100%; align-items: center; justify-content: space-between; gap: 18px; padding: 0 15px; border: 1px solid #b8ff9e; border-radius: 3px; background: var(--bright); color: #102411; font: 700 13px var(--mono); box-shadow: 0 0 24px #67ff4830; transition: background-color .16s, box-shadow .16s; }
.primary-action:hover { background: #b1ff9f; box-shadow: 0 0 27px #67ff484d; }
.primary-action svg, .project-link svg, .back-link svg, .footer-link svg { flex: none; }
.hero-code { position: absolute; bottom: 24px; right: 0; color: #96ac98; font: 10px var(--mono); letter-spacing: .14em; }
.hero-code i { width: 4px; height: 4px; }

.projects { padding-block: 66px 71px; }
.section-label { margin: 0 0 14px; color: var(--red-light); font: 600 11px/1.4 var(--mono); letter-spacing: .14em; }
.section-label span { display: inline-block; width: 19px; height: 2px; margin-right: 10px; background: #9d3a46; vertical-align: .28em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.section-heading h2, .about h2 { margin: 0; font-size: clamp(2.15rem, 4vw, 3.35rem); font-weight: 720; line-height: 1.04; letter-spacing: -.062em; }
.section-heading p, .about-grid > p { margin: 12px 0 0; color: var(--muted); line-height: 1.65; white-space: pre-line; }
.directory-count { color: var(--dim); font: 12px var(--mono); letter-spacing: .12em; white-space: nowrap; padding-bottom: 3px; }
.directory-count b { color: #cf757e; }
.project-list { display: grid; gap: 18px; }
.project-card { display: grid; grid-template-columns: 1.04fr 1fr; overflow: hidden; border: 1px solid #2a3c2c; border-radius: 7px; background: var(--panel); min-height: 299px; }
.project-card:hover { border-color: #4b6d4e; }
.project-art { position: relative; isolation: isolate; display: grid; min-height: 252px; place-items: center; overflow: hidden; background:
  linear-gradient(#365d3928 1px, transparent 1px),
  linear-gradient(90deg, #365d3928 1px, transparent 1px),
  radial-gradient(ellipse, #172d17, #0b160e 75%);
  background-size: 26px 26px, 26px 26px, auto;
  background-position: center;
}
.project-card .project-art { border-right: 1px solid #2a3c2c; }
.project-art img { width: 100%; height: 100%; max-height: 350px; position: absolute; inset: 0; object-fit: contain; }
.art-id, .art-caption { position: absolute; z-index: 1; color: #a0b29d; font: 10px var(--mono); letter-spacing: .13em; }
.art-id { top: 18px; left: 18px; }
.art-id i { width: 5px; height: 5px; }
.art-caption { bottom: 18px; right: 18px; }
.terminal-art { display: flex; gap: .1em; color: var(--bright); font: 700 clamp(4rem, 8vw, 7rem)/1 var(--mono); text-shadow: 0 0 30px #6aff6880; }
.terminal-art span:last-child { color: #b65963; }
.project-copy { align-self: center; padding: 33px clamp(24px, 4vw, 53px); }
.project-meta { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; margin-bottom: 15px; font: 600 10px/1.3 var(--mono); letter-spacing: .1em; }
.category { color: #adeda1; border: 1px solid #314b32; border-radius: 2px; padding: 5px 7px; }
.status { color: var(--red-light); }
.status i { width: 5px; height: 5px; background: #bf4e5c; box-shadow: none; }
.project-copy h3 { max-width: 465px; margin: 0; font-size: clamp(1.75rem, 3.05vw, 2.56rem); line-height: 1.08; letter-spacing: -.048em; }
.project-copy > p { color: var(--muted); margin: 14px 0 19px; font-size: 15px; line-height: 1.58; white-space: pre-line; }
.project-link, .back-link, .footer-link { display: inline-flex; align-items: center; gap: 10px; width: fit-content; color: var(--bright); font: 700 13px/1.35 var(--mono); }
.project-link:hover, .back-link:hover, .footer-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.empty { padding: 32px; margin: 0; border: 1px dashed var(--line); color: var(--muted); }

.about { padding-bottom: 66px; }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; border: 1px solid var(--line); border-left: 3px solid var(--red); border-radius: 4px; padding: 32px 35px; background: #0c120e; }
.about h2 { font-size: clamp(1.85rem, 3vw, 2.65rem); }
.about-grid > p { margin: 0; }
.site-footer { border-top: 1px solid var(--line); padding-block: 27px 34px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; align-items: center; }
.site-footer > p { margin: 0; color: var(--dim); text-align: center; font-size: 13px; }
.footer-link { justify-self: end; color: var(--muted); font-size: 12px; }
.footer-link svg { width: 14px; height: 14px; }

.detail { min-height: 65vh; padding-block: 46px 67px; }
.detail > h1, .detail-grid h1 { font-size: clamp(2.5rem, 5.5vw, 4.7rem); letter-spacing: -.065em; line-height: 1.02; margin: 0; }
.detail > p, .detail-summary { color: var(--muted); font-size: 17px; line-height: 1.65; }
.back-link { margin-bottom: 35px; }
.back-link svg { transform: rotate(180deg); }
.detail-grid { display: grid; grid-template-columns: 1fr .92fr; gap: 38px; align-items: center; padding-bottom: 42px; border-bottom: 1px solid var(--line); }
.detail-grid .project-art { border: 1px solid #2a3c2c; border-radius: 7px; aspect-ratio: 1.7; }
.detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 23px 38px; padding-top: 24px; }
.detail-body h2 { font-size: 24px; letter-spacing: -.035em; margin-bottom: 10px; }
.detail-body p, .detail-body li { margin-top: 0; color: var(--muted); line-height: 1.65; white-space: pre-line; }
.detail-body ul { margin: 0; padding-left: 1.2em; }
.detail-body li + li { margin-top: 5px; }
.detail-body li::marker { color: var(--bright); }
.detail-body .stack { color: #adeda1; font-family: var(--mono); font-size: 14px; }
.app-page-nav { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 28px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.app-page-nav a { padding: 9px 12px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); font: 600 12px var(--mono); }
.app-page-nav a:hover { color: var(--bright); }
.app-page-nav a[aria-current="page"] { color: var(--bright); border-color: #3b603b; background: #152617; }
.privacy-page { max-width: 850px; }
.privacy-date { color: var(--muted); margin-block: 22px; }
.privacy-text { white-space: pre-wrap; color: var(--muted); font-size: 17px; line-height: 1.8; margin-top: 30px; }
.feedback-page { max-width: 850px; }
.feedback-page > p { color: var(--muted); line-height: 1.6; }
#feedback-form { margin-top: 28px; padding: clamp(18px, 4vw, 30px); border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
#feedback-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.feedback-contact { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
#feedback-form label { display: grid; gap: 8px; font-weight: 600; font-size: 14px; }
#feedback-form input, #feedback-form textarea { width: 100%; padding: 11px; border: 1px solid #344638; border-radius: 4px; color: var(--ink); background: #090f0b; font: 15px/1.5 var(--sans); }
#feedback-form textarea { resize: vertical; min-height: 170px; }
.feedback-hint { margin-block: 11px 20px; color: var(--muted); font-size: 13px; line-height: 1.5; }
#feedback-form button { cursor: pointer; }
#feedback-form button:disabled { opacity: .55; cursor: wait; }
.feedback-status { color: var(--bright); margin: 18px 0 0; line-height: 1.6; }
.feedback-status:empty { display: none; }
.feedback-status[data-error] { color: var(--red-light); }

@media (max-width: 900px) {
  .wrap { width: calc(100% - 56px); }
  .hero-inner { min-height: 440px; padding-block: 70px; }
  .masthead-tag { display: none; }
  .masthead-inner { grid-template-columns: 1fr auto; }
  .project-copy { padding: 27px; }
}

@media (max-width: 640px) {
  .wrap { width: calc(100% - 36px); }
  .masthead-inner { min-height: 66px; gap: 10px; }
  .masthead nav { gap: 12px; }
  .masthead nav a { font-size: 10px; }
  .brand { gap: 7px; font-size: 11px; }
  .brand img { width: 33px; height: 33px; }
  .brand small { font-size: 8px; }
  .hero-inner { min-height: 420px; padding-block: 57px 66px; }
  .hero h1 { font-size: clamp(2.65rem, 10.4vw, 4.15rem); letter-spacing: -.073em; }
  .hero-intro { margin: 20px 0; }
  .hero-scrim { background: linear-gradient(90deg, #080c09f0 8%, #080c09ba 55%, #080c0940), linear-gradient(0deg, #080c09, transparent 50%); }
  .projects { padding-block: 47px 48px; }
  .section-heading { gap: 9px; }
  .directory-count { font-size: 9px; }
  .project-card, .about-grid, .detail-grid, .detail-body { grid-template-columns: 1fr; }
  .project-card .project-art { min-height: 205px; border-right: 0; border-bottom: 1px solid #2a3c2c; }
  .project-copy { padding: 23px 20px 27px; }
  .about { padding-bottom: 48px; }
  .about-grid { padding: 23px 20px; gap: 14px; }
  .site-footer { grid-template-columns: 1fr auto; }
  .site-footer > p { grid-row: 2; grid-column: 1 / -1; text-align: left; }
  .detail { padding-block: 33px 45px; }
  .detail-grid { gap: 23px; padding-bottom: 26px; }
  .detail-body { gap: 6px; }
  .feedback-contact { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; }
}
