:root {
  color-scheme: dark;
  --bg: #080d15;
  --panel: #101923;
  --border: #23303e;
  --text: #f0f5fa;
  --muted: #a5b3c2;
  --accent: #79f9d0;
  --mono: "IBM Plex Mono", "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Geist", "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header-height, 5rem) + 1rem); }
body { margin: 0; background: var(--bg); color: var(--text); font: 1rem/1.6 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.shell { width: min(100% - 5.5rem, 74rem); margin-inline: auto; }
.accent { color: var(--accent); }
.sr-only, .skip-link:not(:focus) {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 5; top: 0.5rem; left: 0.5rem; padding: 0.5rem 1rem; background: var(--accent); color: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 3; background: rgba(8, 13, 21, 0.94); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.header-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
a { text-decoration-thickness: .14em; text-underline-offset: .17em; }
main a[href]:not(.button, nav a) {
  --link-underline: color-mix(in srgb, currentColor 65%, transparent);
  color: var(--accent);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 .14em no-repeat,
    linear-gradient(var(--link-underline), var(--link-underline)) 0 100% / 100% .14em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size .25s ease-out;
}
main a[href]:not(.button, nav a):is(:hover, :focus-visible) {
  background-size: 100% .14em, 100% .14em;
}
@media (prefers-reduced-motion: reduce) {
  main a[href]:not(.button, nav a) { transition: none; }
}
@media (forced-colors: active) {
  main a[href]:not(.button, nav a) { text-decoration: underline; }
}
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: var(--text); font: 700 1.05rem var(--mono); text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 0.45rem; background: #10252a; color: var(--accent); letter-spacing: -0.12em; padding-right: 0.12em; }
.brand-cursor { animation: terminal-cursor 1.1s steps(1, end) infinite; }
@keyframes terminal-cursor { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .brand-cursor { animation: none; } }
nav { display: flex; align-items: center; gap: clamp(1.1rem, 4vw, 2.65rem); }
nav a { padding: 0.5rem 0; color: var(--muted); text-decoration: none; font-size: 0.94rem; font-weight: 600; }
nav a:hover, nav a[aria-current] { color: var(--accent); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 2.85rem; padding: 0.57rem 1.05rem; border: 1px solid transparent; border-radius: 0.5rem; font-weight: 700; line-height: 1.35; text-decoration: none; transition: border-color .18s, background .18s, color .18s; }
.button-solid { color: #06221c; background: var(--accent); }
.button-solid:hover { background: #b2ffe7; }
.button-outline { background: #101822; color: var(--text); border-color: #334353; }
.button-outline:hover { color: var(--accent); border-color: var(--accent); background: #132429; }
.header-github { min-height: 2.55rem; font-size: .9rem; }
[data-icon] { display: inline-flex; flex: none; }
.icon { width: 1.12rem; height: 1.12rem; display: block; }
.hero { position: relative; overflow: hidden; background: radial-gradient(ellipse at 76% 52%, #10252c 0, transparent 43%), #080d15; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(#6ec0bd12 1px, transparent 1px), linear-gradient(90deg, #6ec0bd12 1px, transparent 1px);
  background-size: 39px 39px; mask-image: linear-gradient(90deg, transparent, black 55%, #0008);
}
.hero-inner { min-height: 32.5rem; position: relative; display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem; padding-block: 3.7rem; }
.hero-content { position: relative; z-index: 1; }
.eyebrow { display: flex; gap: .65rem; align-items: center; margin: 0 0 1rem; color: var(--accent); font: 600 .875rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .105em; }
.eyebrow span { color: #55bca4; }
h1, h2, h3 { margin: 0; font-weight: 740; }
h1 { font-size: clamp(3.45rem, 6.5vw, 6rem); line-height: .99; letter-spacing: -.076em; }
h1 em { color: var(--accent); font-style: normal; }
.hero-description { color: var(--muted); font-size: 1.11rem; max-width: 29rem; margin: 1.5rem 0 1.65rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.hero-visual { min-width: 0; position: relative; aspect-ratio: 1.24; display: grid; place-items: center; isolation: isolate; }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; z-index: -2; pointer-events: none; }
.hero-visual::before { inset: 12% 16%; border: 1px solid #52828a33; border-radius: 50%; }
.hero-visual::after { inset: 25% 26%; border: 1px dashed #52828a3b; border-radius: 50%; }
.hero-visual img { position: absolute; z-index: -1; width: 117%; height: 119%; object-fit: cover; mix-blend-mode: screen; mask-image: radial-gradient(ellipse, #000 43%, #000d 57%, transparent 73%); }
.frame-corner { position: absolute; width: 1rem; height: 1rem; border: 0 solid #56968f; opacity: .8; }
.top-left { inset: 6% auto auto 7%; border-width: 1px 0 0 1px; }
.top-right { inset: 6% 7% auto auto; border-width: 1px 1px 0 0; }
.bottom-left { inset: auto auto 6% 7%; border-width: 0 0 1px 1px; }
.bottom-right { inset: auto 7% 6% auto; border-width: 0 1px 1px 0; }
.inventory { border-block: 1px solid var(--border); background: #0d151e; }
.inventory-inner { display: grid; grid-template-columns: repeat(3, 1fr); margin-block: 0; }
.inventory-inner > div { display: flex; align-items: center; justify-content: center; gap: 1rem; min-height: 5.3rem; padding: .5rem .75rem; }
.inventory-inner > div + div { border-left: 1px solid var(--border); }
.inventory dd { order: -1; margin: 0; color: var(--accent); font: 650 1.95rem var(--mono); }
.inventory dt { font-size: .89rem; color: var(--muted); }
.catalogue { padding-block: 4.2rem 5rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.4rem; }
.section-heading .eyebrow { margin-bottom: .6rem; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.35rem); line-height: 1.08; letter-spacing: -.055em; }
.section-heading p:last-child, .about p:not(.eyebrow) { color: var(--muted); margin: .65rem 0 0; }
.search { width: min(100%, 21rem); min-height: 3rem; padding: 0 .8rem; display: flex; align-items: center; gap: .65rem; color: var(--muted); border: 1px solid #344252; background: #0e1722; border-radius: .45rem; }
.search:focus-within { border-color: var(--accent); }
.search input { color: var(--text); background: transparent; border: 0; outline: 0; width: 100%; min-width: 0; min-height: 3rem; }
.search input::placeholder { color: var(--muted); }
.search kbd { padding: .01rem .42rem; border: 1px solid var(--border); border-radius: .25rem; color: var(--muted); font: .85rem/1.45 var(--mono); }
.filters { display: flex; align-items: start; justify-content: space-between; gap: .65rem; margin-top: 1.7rem; }
.category-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter-button, .select-control select { min-height: 2.55rem; border: 1px solid var(--border); border-radius: .42rem; background: #101822; color: var(--muted); font-size: .875rem; }
.filter-button { padding: .34rem .74rem; }
.filter-button:hover, .select-control select:hover { border-color: #63817f; color: var(--text); }
.filter-button[aria-pressed="true"] { background: #12302c; border-color: #407b70; color: var(--accent); font-weight: 700; }
.select-control { position: relative; flex: none; }
.select-control select { appearance: none; padding: .34rem 2rem .34rem .75rem; }
.select-control [data-icon] { position: absolute; top: 50%; right: .6rem; transform: translateY(-50%); pointer-events: none; color: var(--muted); }
.results-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 3.7rem; margin-top: .2rem; gap: .5rem; }
.results-toolbar p { margin: 0; color: var(--muted); font: .82rem var(--mono); }
.sort-control select { min-height: 2.2rem; background: transparent; border-color: transparent; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.project-card { display: flex; position: relative; flex-direction: column; min-width: 0; min-height: 15.5rem; padding: 1.12rem; border: 1px solid var(--border); border-radius: .72rem; background: radial-gradient(ellipse at top right, color-mix(in srgb, var(--category-tint) 10%, transparent), transparent 65%), var(--panel); }
.project-card:hover, .project-card:focus-within { border-color: color-mix(in srgb, var(--category-tint) 58%, var(--border)); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.category-mark { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; background: color-mix(in srgb, var(--category-tint) 12%, #101923); color: var(--category-tint); border: 1px solid color-mix(in srgb, var(--category-tint) 34%, #182637); border-radius: .48rem; }
.category-mark .icon { width: 1.29rem; height: 1.29rem; }
.source-label { display: inline-flex; align-items: center; gap: .32rem; font: .76rem/1.3 var(--mono); color: var(--muted); }
.source-label .icon { width: .86rem; height: .86rem; }
.project-card h4 { font-size: 1.26rem; line-height: 1.24; letter-spacing: -.026em; margin: .85rem 0 .42rem; overflow-wrap: anywhere; }
.project-card p { color: var(--muted); margin: 0 0 .65rem; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; padding: 0; margin: auto 0 .85rem; gap: .32rem; list-style: none; }
.tags li, .stack li { font: .78rem/1.3 var(--mono); border: 1px solid #2d3b4b; border-radius: .32rem; background: #111c27; color: #c6d6e4; padding: .24rem .43rem; overflow-wrap: anywhere; }
.card-detail-button { align-self: flex-start; min-height: 1.85rem; background: none; border: none; padding: 0 .15rem; color: var(--accent); font-size: .89rem; font-weight: 700; }
.card-detail-button::after { content: ""; position: absolute; inset: 0; border-radius: .72rem; }
.card-detail-button:hover { text-decoration: underline; }
.more { display: flex; justify-content: center; margin-top: 1.6rem; }
.feedback { grid-column: 1 / -1; text-align: center; padding: 2rem 1rem; border: 1px dashed var(--border); border-radius: .55rem; color: var(--muted); }
.feedback p { margin-top: 0; }
.about { border-top: 1px solid var(--border); padding-block: 3.7rem; background: #0c141e; }
.about-inner { display: grid; grid-template-columns: 1.25fr 1fr; align-items: start; gap: 3rem; }
.about p:not(.eyebrow) { max-width: 37rem; margin-bottom: 1.1rem; }
.stack { border: 1px solid var(--border); background: #101923; border-radius: .65rem; padding: 1.15rem; }
.stack h3 { color: var(--accent); font: 600 .9rem var(--mono); }
.stack ul { display: flex; flex-wrap: wrap; gap: .42rem; list-style: none; padding: 0; margin: .9rem 0 0; }
.stack li { font-size: .85rem; padding: .34rem .53rem; }
footer { border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; min-height: 5rem; gap: .75rem; }
.footer-inner .brand { gap: .35rem; }
.footer-inner p { margin: 0; color: var(--muted); font: .75rem/1.5 var(--mono); text-align: right; }
dialog { width: min(100% - 2rem, 36rem); max-height: calc(100dvh - 2rem); overflow-y: auto; padding: 0; color: var(--text); background: #111c28; border: 1px solid #45586a; border-radius: .85rem; box-shadow: 0 1.5rem 5rem #0009; }
dialog::backdrop { background: #05080cbd; backdrop-filter: blur(5px); }
.dialog-content { position: relative; padding: clamp(1.1rem, 5vw, 1.8rem); }
.icon-button { display: inline-grid; place-items: center; width: 2.7rem; height: 2.7rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--bg); }
.icon-button:hover { color: var(--accent); border-color: var(--accent); }
.close-dialog { position: absolute; top: .8rem; right: .8rem; }
.detail-category { margin: .7rem 0 .35rem; color: var(--category-tint); font: .88rem var(--mono); }
#detail-title { font-size: clamp(1.65rem, 6vw, 2.35rem); padding-right: 2rem; overflow-wrap: anywhere; }
.detail-description { overflow-wrap: anywhere; }
.detail-facts { margin: .95rem 0; padding: .75rem 0; border-block: 1px solid var(--border); }
.detail-facts div { display: grid; grid-template-columns: minmax(0, 9.6rem) 1fr; gap: .55rem; }
.detail-facts dt { color: var(--muted); }
.detail-facts dd { margin: 0; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 980px) {
  .shell { width: min(100% - 3rem, 74rem); }
  .hero-inner { min-height: 28rem; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 660px) {
  .shell { width: calc(100% - 2rem); }
  .header-inner { min-height: 3.85rem; gap: .6rem; }
  .header-github { display: none; }
  nav { gap: .87rem; }
  nav a { font-size: .875rem; }
  .brand { font-size: .93rem; gap: .36rem; }
  .brand-mark { width: 1.78rem; height: 1.78rem; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 2.7rem 0; gap: 0; }
  h1 { font-size: clamp(3rem, 12vw, 4.7rem); }
  .hero-description { margin-block: 1.05rem 1.25rem; }
  .hero-visual { max-height: 19rem; margin-inline: 8%; }
  .inventory-inner > div { display: grid; justify-items: center; justify-content: center; align-content: center; gap: .12rem; text-align: center; padding-inline: .3rem; }
  .inventory dt { font-size: .77rem; }
  .inventory dd { font-size: 1.6rem; }
  .catalogue { padding-block: 3rem; }
  .section-heading { align-items: start; flex-direction: column; }
  .search { width: 100%; }
  .filters { flex-wrap: wrap; margin-top: 1rem; }
  .about-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-inner { min-height: 4.5rem; }
}
@media (max-width: 460px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
  .project-card { min-height: 0; }
  .footer-inner { flex-wrap: wrap; padding-block: .8rem; }
  .footer-inner p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; }
}
