:root {
  color-scheme: light;
  --ink: #101417;
  --muted: #66706f;
  --paper: #f5f2eb;
  --surface: #fffaf1;
  --thumb: #e8e2d7;
  --checker: rgba(16, 20, 23, 0.045);
  --line: rgba(16, 20, 23, 0.13);
  --blue: #315f8b;
  --green: #1f6a5b;
  --coral: #cf664f;
  --gold: #d8a642;
  --shadow: 0 22px 70px rgba(16, 20, 23, 0.12);
  --header-bg: rgba(245, 242, 235, 0.88);
  --card-shadow: 0 14px 34px rgba(16, 20, 23, 0.08);
  --focus: rgba(31, 106, 91, 0.13);
}

body[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f3efe6;
  --muted: #b9c2bd;
  --paper: #111716;
  --surface: #1a2320;
  --thumb: #25302c;
  --checker: rgba(243, 239, 230, 0.055);
  --line: rgba(243, 239, 230, 0.16);
  --blue: #87b8e1;
  --green: #7dcfbc;
  --coral: #ff9c83;
  --gold: #edc765;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --header-bg: rgba(17, 23, 22, 0.88);
  --card-shadow: 0 14px 34px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background-color 160ms ease, color 160ms ease;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-actions nav {
  flex: 1 1 auto;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.brand-mark:hover,
.brand-mark[aria-expanded="true"] {
  background: var(--green);
}

.brand-menu-wrap {
  position: relative;
  display: inline-flex;
}

.brand-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  min-width: 180px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-menu[hidden] {
  display: none;
}

.brand-menu a {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.brand-menu a:hover,
.brand-menu a:focus {
  background: var(--ink);
  color: var(--surface);
  outline: none;
}

nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

nav a {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

nav a.is-active,
nav a:hover {
  border-color: transparent;
  background: var(--ink);
  color: var(--surface);
}

.theme-toggle {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: transparent;
  background: var(--ink);
  color: var(--surface);
}

.theme-toggle svg {
  width: 19px;
  height: 19px;
}

main {
  padding: clamp(36px, 6vw, 78px) clamp(18px, 4vw, 56px) 72px;
}

.hero {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7.2rem);
  line-height: 0.95;
}

h2 {
  margin: 46px 0 18px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.toolbar {
  display: flex;
  margin: 30px 0;
}

label {
  display: grid;
  width: min(520px, 100%);
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  padding: 13px 16px;
  outline: none;
}

input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--focus);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.category-card,
.asset-card,
.pdf-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.category-card {
  display: grid;
  min-height: 330px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.category-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: var(--thumb);
}

.category-card div,
.asset-card figcaption,
.pdf-card {
  padding: 18px;
}

.category-card h2,
.asset-card h3,
.pdf-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.asset-section {
  margin-top: 34px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
}

.asset-card {
  display: flex;
  flex-direction: column;
}

.asset-card a {
  display: grid;
  min-height: 220px;
  place-items: center;
  background:
    linear-gradient(45deg, var(--checker) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker) 25%, transparent 25%),
    var(--thumb);
  background-size: 18px 18px;
}

.asset-card img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
}

.asset-card figcaption {
  margin-top: auto;
}

.asset-card p,
.pdf-card p,
.category-card p {
  font-size: 0.92rem;
}

.meta {
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pdf-card {
  display: grid;
  gap: 10px;
}

.pdf-card a {
  display: inline-flex;
  width: fit-content;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 800;
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
  }

  nav {
    width: 100%;
  }

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