:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #51607a;
  --accent: #2563eb;
  --accent-hover: #1e4fc2;
  --border: #dde4f0;
  --shadow: 0 8px 20px rgba(12, 27, 58, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 2.5rem 0 1rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.subtitle {
  margin: 0;
  color: var(--muted);
}

.status {
  margin: 1rem 0 1.25rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card-image-button {
  position: relative;
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #eef3fb;
}

.card-image-icon {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(26, 34, 51, 0.7);
  font-size: 1rem;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.card-image-button:hover .card-image-icon,
.card-image-button:focus-visible .card-image-icon {
  opacity: 1;
  transform: translateY(0);
}

.card-image-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(10, 15, 28, 0.72);
}

.image-modal[hidden] {
  display: none;
}

.image-modal-content {
  position: relative;
}

.image-modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(26, 34, 51, 0.75);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.image-modal-close:hover,
.image-modal-close:focus-visible {
  background: rgba(26, 34, 51, 0.9);
}

.image-modal-image {
  display: block;
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
}

.card-description {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  text-decoration: none;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-weight: 600;
}

.card-link:hover,
.card-link:focus-visible {
  background: var(--accent-hover);
}
