@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Sora:wght@600;700;800&display=swap');

:root {
  --blue: #0a84ff;
  --indigo: #5e5ce6;
  --cyan: #64d2ff;
  --text: #1b2540;
  --muted: #5e6d8d;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(10, 132, 255, 0.18) 0%, transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(100, 210, 255, 0.16) 0%, transparent 34%),
    linear-gradient(180deg, #eef3ff, #f7fbff);
  min-height: 100vh;
}

h1,
h2,
h3,
nav h1 {
  font-family: 'Sora', 'DM Sans', sans-serif;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 251, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

nav h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #284158;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(219, 229, 245, 0.92);
  border-radius: 999px;
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

nav a:hover {
  transform: translateY(-1px);
  color: #1f3f76;
  box-shadow: 0 8px 16px rgba(27, 49, 112, 0.12);
}

nav a:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.28);
  outline-offset: 2px;
}

section,
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 18px;
}

.hero {
  padding-top: 24px;
}

.hero h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  letter-spacing: -0.04em;
  line-height: 1.05;
  font-weight: 800;
}

.hero p {
  margin: 0 0 14px;
  color: #4e6288;
}

button {
  border: none;
  border-radius: 12px;
  min-height: 42px;
  padding: 0.6rem 0.95rem;
  cursor: pointer;
  font-weight: 700;
}

.hero button {
  margin-right: 8px;
  margin-bottom: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(219, 229, 245, 0.92);
  font-weight: 700;
}

#searchBar {
  width: min(100%, 480px);
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(206, 221, 244, 0.95);
  border-radius: 12px;
  margin: 8px 0 16px;
  font-size: 1rem;
}

.item-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.item-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  box-shadow: 0 16px 30px rgba(20, 46, 90, 0.1);
  overflow: hidden;
  padding: 12px;
}

.item-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 36px rgba(27, 49, 112, 0.18);
}

.item-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
}

.item-card h4 {
  margin: 10px 0 6px;
  font-family: 'Sora', 'DM Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.item-card p {
  margin: 0 0 6px;
  color: #4b5f84;
  font-size: 0.92rem;
  line-height: 1.45;
  word-break: break-word;
}

.item-card button {
  width: 100%;
  margin-top: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

footer {
  color: #607192;
  font-weight: 600;
  padding-bottom: 26px;
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  nav a {
    justify-content: center;
  }
}

@media (max-width: 425px) {
  section,
  footer {
    padding: 16px 12px;
  }

  .item-cards-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 375px) {
  nav ul {
    grid-template-columns: 1fr;
  }

  nav h1 {
    font-size: 1.2rem;
  }

  .hero h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  .category {
    width: 100%;
    text-align: center;
  }
}