@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0b0d0c;
  --surface: #121614;
  --surface-2: #171c19;
  --line: #26302a;
  --line-strong: #3a4a3f;
  --text: #f1f4f1;
  --muted: #a3afa7;
  --faint: #7c8b81;
  --accent: #a0fac8;
  --accent-strong: #bbf7cd;
  --ease: cubic-bezier(0.22, 0.8, 0.24, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 30px;
}

body {
  margin: 0;
  background:
    radial-gradient(ellipse 70% 40% at 80% -10%, rgba(160, 250, 200, 0.07), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #8bfac2;
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.skip {
  position: fixed;
  left: 20px;
  top: -100px;
  z-index: 5;
  padding: 12px;
  background: #a1ffca;
  color: #08160f;
}

.skip:focus {
  top: 12px;
}

.topbar,
main,
footer {
  max-width: 1320px;
  margin: auto;
  padding-left: 40px;
  padding-right: 40px;
}

/* Header */
.topbar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff14;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 650;
}

.brand img {
  object-fit: contain;
}

.brand-light {
  color: var(--muted);
  font-weight: 400;
}

.topbar nav {
  display: flex;
  gap: 28px;
  color: #c3cbc6;
  font-size: 13px;
}

.topbar nav a:hover {
  color: var(--accent);
}

/* Intro */
.hero {
  min-height: 184px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 32px 0;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #9fb3a7;
  font-size: 10px;
  letter-spacing: 0.22em;
}

.kicker > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9affc7;
  box-shadow: 0 0 18px #7affbb66;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.green {
  color: var(--accent);
}

.intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.hero-summary {
  flex-shrink: 0;
  display: grid;
  gap: 12px;
  padding: 8px 0 8px 28px;
  border-left: 1px solid #354239;
}

.hero-summary span {
  color: #afbeb4;
  font-size: 14px;
}

.hero-summary a {
  color: #bff5d1;
  font-size: 12px;
}

.hero-summary a:hover {
  color: #fff;
}

/* Collection header and controls */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid #ffffff1a;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.section-head h2 span {
  margin-left: 15px;
  color: #687e70;
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.15em;
}

.section-head p {
  margin: 0;
  color: #91a196;
  font-size: 12px;
}

.slash {
  padding: 0 10px;
  color: #43534a;
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 16px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filters button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #9dab9f;
  font-size: 13px;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease;
}

.filters button:hover {
  background: #19201b;
  color: #fff;
}

.filters button[aria-pressed="true"] {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #15251a;
  font-weight: 600;
}

.filters button span {
  margin-left: 5px;
  font-size: 10px;
  opacity: 0.65;
}

.search {
  min-width: 270px;
  height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid #2b352e;
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 160ms ease;
}

.search > span {
  color: #9bae9e;
  font-size: 23px;
}

.search input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 0;
  background: transparent;
  color: #edf4ee;
  font-size: 13px;
}

.search input:focus {
  outline: none;
}

.search:focus-within {
  border-color: var(--accent);
}

.search input::placeholder {
  color: #7d8c81;
}

.search kbd {
  padding: 2px 5px;
  border: 1px solid #36433a;
  border-radius: 3px;
  color: #748879;
  font-size: 10px;
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin: 12px 0 16px;
  color: #788b7d;
  font-size: 11px;
}

.result-line p {
  margin: 0;
}

.result-line > span {
  color: #86978c;
}

/* Cards: every card opens with a real screenshot, render or project page. */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  transition: border-color 220ms ease, transform 300ms var(--ease), box-shadow 300ms var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  border-color: #4c6353;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}

.preview {
  position: relative;
  display: block;
  aspect-ratio: 2.5;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #1d2922;
}

.preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.preview.top .preview-image {
  object-position: 50% 0%;
}

.preview.left .preview-image {
  object-position: 0% 50%;
}

.preview.corner .preview-image {
  object-position: 0% 0%;
}

.card:hover .preview-image {
  transform: scale(1.04);
}

.preview-arrow {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid #ffffff38;
  border-radius: 50%;
  background: #0a100cd9;
  color: #ddf8e4;
  font-size: 15px;
  transition: background 200ms ease, color 200ms ease;
}

.card:hover .preview-arrow {
  background: var(--accent-strong);
  color: #0d1a12;
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: #a0b5a6;
  font-size: 11px;
  line-height: 1.6;
}

.kind {
  display: flex;
  align-items: center;
  gap: 6px;
}

.kind.online::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(160, 250, 200, 0.14);
}

.index {
  color: #6d8475;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 10px;
}

.eyebrow {
  margin: 0 0 7px;
  color: #849d8b;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.description {
  flex: 1;
  margin: 0 0 14px;
  color: #aab6ae;
  font-size: 14px;
  line-height: 1.75;
}

.tags {
  margin: 0 0 14px;
  color: #83998a;
  font-size: 11px;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #2c3930;
}

.primary {
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbf9da;
  font-size: 13px;
  font-weight: 600;
}

.primary:hover {
  color: #fff;
}

.source,
.source-note {
  min-height: 28px;
  display: grid;
  align-items: center;
  color: #8c9c91;
  font-size: 12px;
}

.source:hover {
  color: #fff;
}

/* Empty state, note and footer */
.empty {
  padding: 70px 20px;
  border: 1px dashed #405347;
  border-radius: 14px;
  background: #131b15;
  text-align: center;
}

.empty > span {
  color: var(--accent);
  font-size: 35px;
}

.empty h3 {
  font-size: 19px;
  font-weight: 500;
}

.empty p {
  color: #a1b3a7;
  font-size: 13px;
  line-height: 1.8;
}

.empty button {
  margin-top: 15px;
  padding: 12px 18px;
  border: 0;
  border-radius: 6px;
  background: var(--accent-strong);
  color: #122117;
}

.noscript {
  color: var(--accent);
  font-size: 12px;
}

.note {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 28px 0 0;
  padding: 22px 24px;
  border: 1px solid #314035;
  border-radius: 14px;
  background: linear-gradient(110deg, #1b2b20, #121914);
}

.note-icon {
  color: var(--accent);
  font-size: 27px;
}

.note h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 500;
}

.note p {
  margin: 0;
  color: #9bafa1;
  font-size: 12px;
  line-height: 1.8;
}

.note > a {
  display: flex;
  gap: 20px;
  margin-left: auto;
  color: #cdf3d8;
  font-size: 12px;
  white-space: nowrap;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 12px;
  padding-top: 24px;
  padding-bottom: 24px;
  color: #84988b;
  font-size: 10px;
}

footer > a {
  color: #b2c3b7;
  font-size: 11px;
}

footer > span:nth-child(2) {
  color: #819487;
}

@media (max-width: 1050px) {
  .topbar,
  main,
  footer {
    padding-left: 28px;
    padding-right: 28px;
  }

  .controls {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .search {
    width: 100%;
    max-width: 100%;
  }

  .hero-summary {
    display: none;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card h3 {
    font-size: 19px;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 164px;
    padding: 26px 0;
  }

  .hero h1 {
    font-size: 34px;
  }

  .section-head h2 span {
    display: none;
  }

  .preview {
    aspect-ratio: 2.1;
  }

  .note {
    padding: 22px;
  }

  .note-icon {
    display: none;
  }

  .topbar nav {
    gap: 18px;
  }
}

@media (max-width: 540px) {
  .topbar,
  main,
  footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .topbar {
    height: 64px;
  }

  .brand {
    gap: 8px;
    font-size: 13px;
  }

  .brand-light {
    display: none;
  }

  .brand img {
    width: 27px;
    height: 27px;
  }

  .topbar nav {
    gap: 18px;
    font-size: 11px;
  }

  .hero {
    min-height: 0;
    padding: 25px 0;
  }

  .hero h1 {
    margin-bottom: 10px;
    font-size: 29px;
  }

  .kicker {
    margin-bottom: 13px;
    font-size: 9px;
  }

  .hero .intro {
    font-size: 13px;
  }

  .section-head {
    padding-top: 18px;
  }

  .section-head h2 {
    font-size: 16px;
  }

  .section-head p {
    font-size: 10px;
  }

  .controls {
    gap: 12px;
  }

  .filters {
    gap: 4px;
  }

  .filters button {
    padding: 8px 10px;
    font-size: 12px;
  }

  .result-line {
    margin: 12px 0;
  }

  .result-line > span {
    display: none;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .preview {
    aspect-ratio: 2.5;
  }

  .card-body {
    padding: 18px;
  }

  .card h3 {
    font-size: 20px;
  }

  .note {
    flex-direction: column;
    align-items: flex-start;
    gap: 17px;
    margin-top: 25px;
    padding: 20px;
  }

  .note > a {
    margin-left: 0;
  }

  footer {
    flex-wrap: wrap;
    margin-top: 8px;
    line-height: 1.8;
  }

  footer > span:nth-child(2) {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
