/* Minimal modern styling */
:root {
  --bg: #0f1724;
  --card: #0b1220;
  --accent: #00d4ff;
  --muted: #9aa4b2;
  --glass: rgba(255, 255, 255, 0.04);
  --radius: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

/* :root defines CSS variables you can reuse anywhere using var(--name).

This makes it easier to change theme colors and fonts later.*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(180deg, #071028 0%, #08121b 100%);
  color: #e6eef6;
  min-height: 100vh;
  line-height: 1.5;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px;
}

.site-header {
  padding: 28px 0;
  text-align: center;
}

.site-header h1 {
  font-size: 2.2rem;
  letter-spacing: 0.6px;
}

.subtitle {
  color: var(--muted);
  margin-top: 6px;
}

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

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.6);
  transition: transform .2s, box-shadow .2s;
}

.card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}
/* object-fit: cover keeps aspect ratio and crops excess.*/

.card-body {
  padding: 14px;
}

.card-body h2 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.card-body .short {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.more-btn {
  background: transparent;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.8);
}

.site-footer {
  padding: 20px 0;
  text-align: center;
  color: var(--muted);
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(2, 6, 23, 0.8));
  padding: 20px;
}

.modal-content {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
  max-width: 900px;
  width: 100;
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.9);
  position: relative;
}

/* position: relative allows absolute-positioned close button.*/

.modal-content img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.close {
  position: absolute;
  right: 14px;
  top: 10px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

#modalMeta {
  list-style: none;
  margin-top: 8px;
  color: var(--muted);
}

/* On small screens:

Card images shrink to 180px height.

Modal images shrink to 220px height.*/

@media (max-width: 560px) {
  .card img {
    height: 180px;
  }
  .modal-content img {
    max-height: 220px;
  }
}
