@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-VariableFont_slnt,wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0c0d10;
  --bg-elevated: #14161c;
  --bg-card: #1a1d26;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #c8f542;
  --accent-dim: rgba(200, 245, 66, 0.15);
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --max-width: 1200px;
  --iframe-width: 1280;
  --iframe-height: 800;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(200, 245, 66, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(99, 102, 241, 0.07), transparent 50%), var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(12, 13, 16, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
}

.brand__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-dim);
}

.brand__text {
  min-width: 0;
}

.brand__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__tagline {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.brand__location {
  color: var(--accent);
  font-weight: 600;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-left: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  border-color: rgba(200, 245, 66, 0.35);
  background: var(--accent-dim);
}

.btn--primary {
  background: var(--accent);
  color: #141414;
  border-color: transparent;
}

.btn--primary:hover {
  background: #d4f76a;
  color: #141414;
}

.btn--ghost {
  background: transparent;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.hero {
  margin-bottom: 2rem;
}

.hero__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero__lead {
  margin: 0;
  max-width: 52ch;
  color: var(--text-muted);
  font-size: 1rem;
}

.hero__lead a {
  color: var(--accent);
  font-weight: 600;
}

.hero__lead a:hover {
  text-decoration: underline;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.75rem 0 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.search:focus-within {
  border-color: rgba(200, 245, 66, 0.4);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.search input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  outline: none;
}

.search input::placeholder {
  color: var(--text-muted);
}

.toolbar__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 1.25rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.project-card:hover {
  border-color: rgba(200, 245, 66, 0.25);
  transform: translateY(-2px);
}

.project-card__preview {
  position: relative;
  container-type: inline-size;
  aspect-ratio: 1280 / 800;
  width: 100%;
  background: #0a0b0e;
  cursor: pointer;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.project-card__preview-inner {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.project-card__preview iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--iframe-width) * 1px);
  height: calc(var(--iframe-height) * 1px);
  border: 0;
  transform-origin: top left;
  transform: scale(calc(100cqw / (var(--iframe-width) * 1px)));
}

.project-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: opacity 0.35s ease;
}

.project-card__poster.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.project-card__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.project-card__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.project-card__number {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-card__badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
  border: 1px solid rgba(251, 191, 36, 0.25);
}

.project-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.project-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.35rem;
}

.project-card__actions .btn {
  flex: 1 1 auto;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  margin-top: 1rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent);
  font-weight: 600;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .header-nav {
    width: 100%;
    margin-left: 0;
  }

  .header-nav .btn {
    flex: 1 1 calc(50% - 0.25rem);
  }
}
