:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --surface: #12151a;
  --surface-raised: #181c22;
  --line: #2a3039;
  --line-strong: #3a424e;
  --text: #f4f5f7;
  --muted: #969eaa;
  --accent: #e8b45a;
  --accent-strong: #ffd27e;
  --accent-ink: #17120a;
  --radius: 18px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -20%, rgb(232 180 90 / 8%), transparent 30rem),
    var(--bg);
}

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

a {
  color: inherit;
}

button {
  font: inherit;
}

main {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

main {
  min-height: 100vh;
  padding-block: 40px 88px;
}

h2,
p {
  margin-top: 0;
}

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: 160ms ease;
}

.filter:hover,
.filter:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
}

.filter.is-active {
  border-color: var(--text);
  color: var(--bg);
  background: var(--text);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.project-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.project-card__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 800 / 470;
  background: #08090b;
}

.project-card__cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 500ms ease;
}

.project-card:hover .project-card__cover {
  transform: scale(1.015);
}

.project-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgb(7 8 10 / 72%));
  pointer-events: none;
}

.project-card__media-logo {
  position: absolute;
  z-index: 2;
  top: 28%;
  left: 50%;
  width: min(60%, 360px);
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 4px 18px rgb(0 0 0 / 70%));
}

.project-card__body {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.project-card__title-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
}

.project-card h2 {
  margin-bottom: 8px;
  font-size: clamp(25px, 3vw, 34px);
  letter-spacing: -0.035em;
}

.project-card__description {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.tag-list,
.platform-list,
.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag,
.platform-status {
  padding: 6px 10px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
}

.platform-list {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.platform-link {
  color: var(--text);
  text-decoration: none;
}

.platform-link:hover,
.platform-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-card__actions {
  align-items: center;
}

.action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition: 160ms ease;
}

.action:hover,
.action:focus-visible {
  border-color: var(--text);
}

.action--primary {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
}

.action--primary:hover,
.action--primary:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.empty-state {
  padding: 72px 32px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.empty-state__label {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.empty-state h2 {
  margin-bottom: 8px;
}

.empty-state p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.noscript {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 10;
  margin: 0;
  padding: 14px;
  border-radius: 10px;
  color: #1b1205;
  background: var(--accent-strong);
  text-align: center;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  main {
    width: min(100% - 28px, 1180px);
    padding-block: 20px 56px;
  }

  .filters {
    overflow-x: auto;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card__body {
    padding: 22px;
  }

  .project-card__title-row {
    display: block;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
